PageSourceSearch

https://cdnres.115.com/site/static/js/min/core-im-min.js?v=1790642766

js 115.com collected 2026-10-01 09:07:16 UTC 97,191 bytes, 1 lines download raw bytes

1if(!window.PAGE_PATHS){(function(){var domainStr=document.location.host.replace(/.*115/g,"115");window.PAGE_PATHS={MY:"//my."+domainStr,MY_OS:"//my."+domainStr,PASSPORT_N:"//passport."+domainStr,PASSPORT:"//passport."+domainStr,WAN:"//wan."+domainStr,Q:"//q."+domainStr,MSG:"//msg."+domainStr,U:"//"+domainStr,VIP:"//vip."+domainStr,UAPI:"//webapi."+domainStr,PAY:"//pay."+domainStr,STATIC:"//static."+domainStr,APS:"//aps."+domainStr};var _isHTTPS=false;var thisURL=window.location.href;if(/^https:\/\/.*$/.test(thisURL)){_isHTTPS=true}if(_isHTTPS){window.PAGE_PATHS.UAPI="//webapi."+domainStr}})()}var Core=window.Core||{};Core.ACTIVE={AcDesk:0,GetMain:function(){return $(document)}};Core.Plugs=(function(){var _cache={};return{AddButton:function(key,fun){if(!_cache.float_menu_btn){_cache.float_menu_btn={}}_cache.float_menu_btn[key]=fun},DoButton:function(key){if(_cache.float_menu_btn&&_cache.float_menu_btn[key]){var arg=arguments;var params=[];if(arg.length>1){for(var i=1,len=arg.length;i<len;i++){params.push("arg["+i+"]")}}try{eval("var res = _cache['float_menu_btn'][key]("+params.join(",")+")");return true}catch(e){return false}}return false},Add:function(key,type,mod){if(!_cache[type]){_cache[type]={}}_cache[type][key]=mod},Check:function(key,type){if(_cache[type]){return(_cache[type][key]?true:false)}return false},Cmd:function(key,type,funName){if(Core.Plugs.Check(key,type)){var arg=arguments;var params=[];if(arg.length>3){for(var i=3,len=arg.length;i<len;i++){params.push("arg["+i+"]")}}if(_cache[type][key][funName]){eval("var res = _cache[type][key]."+funName+"("+params.join(",")+")")}return res}}}})();Core.Html={GetShadow:function(){return"";return'<div class="shadow-cor cor-tl"></div><div class="shadow-cor cor-tr"></div><div class="shadow-cor cor-br"></div><div class="shadow-cor cor-bl"></div><div class="shadow-cor cor-t"></div><div class="shadow-cor cor-r"></div><div class="shadow-cor cor-b"></div><div class="shadow-cor cor-l"></div>'},StopPropagation:function(e){Util.Html.StopPropagation(e)},GetFullIFrame:function(){return""}};Core.getFileDataApiCheck=function(key){return(!Core.FileInFrame?Core.FileConfig.DataAPI:Core.FileConfig.FileFrameDataAPI)[key]};Util.CopyMsg=function(result){if(result){Core.MinMessage.Show({text:"内容已复制至剪贴板",type:"suc",timeout:2000})}else{Core.MinMessage.Show({text:"复制失败! 你使用的浏览器不支持复制功能",type:"war",timeout:2000})}};Core.Debug=(function(){var _content,_model;var _class=function(content,callback){var _self=this;Core.WindowBase.call(this,{content:content,title:"调试",min_title:"调试"});var oldclose=_self.Close;this.Close=function(){oldclose();callback&&callback()}};return{write:function(msg){if(!Core.CONFIG.TUpDebugKey){return}if(!_model){_content=$(document.createElement("textarea"));_content.css({width:"100%",height:"100%"});_model=new _class(_content,function(){_model=false});_model.Open()}_content.val(_content.val()+msg+"\n")}}})();Core.HAS_TALK=1;if(!window.STATIC_DIR){STATIC_DIR=PAGE_PATHS.U+"/static"}Core.Update115=null;Core.Update115Browser=null;try{if(!window.useFUpload){if(window.uploadInterface){var uploadVersion=uploadInterface.getVersion()+"";uploadVersion=uploadVersion.split(".");if(uploadVersion[3].length==1){uploadVersion[3]="0"+uploadVersion[3]}uploadVersion=uploadVersion.join("")*1;var is_MAC=((navigator.platform=="Mac68K")||(navigator.platform=="MacPPC")||(navigator.platform=="Macintosh")||(navigator.platform=="MacIntel"))?true:false;var maxVersion=is_MAC?71018:71043;var newMaxVersion=is_MAC?72001:72007;if(uploadVersion>=maxVersion&&uploadInterface.uploadBySelecting){window.UPDATE115_STATE=function(data){if(!data){Core.Update115=uploadInterface;if(uploadVersion>=newMaxVersion){Core.Update115Browser=true}}else{Core.Update115=false}};Util.log("隐身状态");window.browserInterface&&browserInterface.ChromeGetIncognitoState&&browserInterface.ChromeGetIncognitoState("UPDATE115_STATE")}}}}catch(e){}Core.CONFIG={TwinkTime:70,TwinkCount:3,MsgTimeout:2000,ActiveClass:"window-current",WindowMinWidth:400,WindowMinHeight:300,Path:{My:PAGE_PATHS.MY,MyAjax:PAGE_PATHS.MY,HOME:PAGE_PATHS.HOME+"/",G:PAGE_PATHS.Q+"/",GAJAX:PAGE_PATHS.Q+"/",U:PAGE_PATHS.U+"/",PASS:PAGE_PATHS.PASSPORT+"/",Msg:PAGE_PATHS.MSG+"/",OS:PAGE_PATHS.U+"/",VIP:PAGE_PATHS.VIP,VIP_ORDER:PAGE_PATHS.VIP+"/vip",UAPI:PAGE_PATHS.UAPI,APP:PAGE_PATHS.APP,WENKU:PAGE_PATHS.WENKU,APS:PAGE_PATHS.APS},JSPath:{FUp:STATIC_DIR+"/swfup/swfup_min.js?v=99",JPlayer:STATIC_DIR+"/js/jquery.jplayer.min.js?v=2015",JPProxy:STATIC_DIR+"/js/jplayer_proxy.js?v=2015"},FUpSWF:PAGE_PATHS.U+"/static/swfup/swfup.swf?v=5.0",FUpDebug:false,HTML5:(typeof(Worker)!=="undefined"),IsWindows:true,IsWindowNT:(navigator.userAgent.indexOf("Windows NT")!=-1),IsMac:(navigator.platform=="Mac68K")||(navigator.platform=="MacPPC")||(navigator.platform=="Macintosh")||(navigator.platform=="MacIntel"),IsMacOOF:window.uploadInterface,IsOOF:(function(){var res={state:false};
1if(/webkit/.test(navigator.userAgent.toLowerCase())){var nav=navigator.appVersion;var str=/115Chrome\/[^\s]*/.exec(nav);if(str){res.state=true;var arr=$.trim(str.join("")).split("/");if(arr.length>1){res.version=arr[1];if(arr[1]=="1.0.2"||arr[1]=="1.0.3"){res.is_first=true}}}}return res})(),BaseDir:[1,2,3,4,5,9],WinRightPX:12,DABridgeURL:PAGE_PATHS.UAPI+"/bridge.html",DABridgeURL_NEW:PAGE_PATHS.UAPI+"/bridge_2.0.html",DAAppBridgeURL:PAGE_PATHS.APP+"/bridge_new.html",DAUserBridgeURL:PAGE_PATHS.MY+"/bridge.html",DAMsgBridgeURL:PAGE_PATHS.MSG+"/api/bridge.html",DAQBridgeURL:PAGE_PATHS.Q+"/static/bridge.html",DAUBridgeURL:PAGE_PATHS.U+"/ubridge.html",DASTBridgeURL:PAGE_PATHS.STATIC+"/bridge_2.0.html",APSBridgeURL:PAGE_PATHS.APS+"/bridge_2.0"+(document.domain!="115.com"?"_rc":"")+".html",DAPASBridgeURL:PAGE_PATHS.PASSPORT+"/bridge.html"};Core.WinHistory=(function(){var _list={};var _random=0;var _zIndex=9999;var _old_active;var _bindState=false;var bindEvent=function(){if(!_bindState){$(window).bind("resize",function(){for(var k in _list){var win=_list[k];var h=win.Main.height();var w=win.Main.width();var wH=win.warp.height();var wW=win.warp.width();var wT=win.warp.offset().top;var wL=win.warp.offset().left;var mL=win.Main.offset().left;if(win.Setting.is_right){win.warp.height(h-wT-5);win.warp.offset({left:mL+w-wW-Core.CONFIG.WinRightPX})}else{if((wL+wW)>w){var newL=w-wW-5;if(newL<0){wW=wW+newL;newL=0}if(!win.Setting.is_not_resize){if(wW<win.Setting.min_width){wW=win.Setting.min_width}win.warp.width(wW)}win.warp.offset({left:newL})}if((wT+wH)>h){var newT=h-wH-5;if(newT<0){wH=wH+newT;newT=0}if(!win.Setting.is_not_resize){if(wH<win.Setting.min_height){wH=win.Setting.min_height}win.warp.height(wH)}win.warp.offset({top:newT})}}}});_bindState=true}};var windowStatusChange=function(){for(var k in Core.WinHistory.ChangeDelegate){try{if(Core.WinHistory.ChangeDelegate[k]){Core.WinHistory.ChangeDelegate[k](_list)}}catch(e){Core.WinHistory.ChangeDelegate[k]=null;delete Core.WinHistory.ChangeDelegate[k]}}};return{ChangeDelegate:{},GetList:function(){return _list},Add:function(win){bindEvent();win.Key=win.Type+"_"+_random;_random++;_list[win.Key]=win;windowStatusChange()},Del:function(key){if(_list[key]){_list[key]=null;delete _list[key];windowStatusChange()}},GetIndex:function(){return _zIndex++},LessIndex:function(){_zIndex--},Active:function(win){if(_old_active&&_old_active==win.Key){return}_zIndex++;win.Active(_zIndex);win.IsActive=true;if(_old_active&&_list[_old_active]){_list[_old_active].DeActive();_list[_old_active].IsActive=false}_old_active=win.Key;windowStatusChange()},Alarm:function(win){},DeOldActive:function(){if(_old_active&&_list[_old_active]){_list[_old_active].DeActive();_list[_old_active].IsActive=false;_old_active=false}},DeActiveStatus:function(win){Core.WinHistory.DeOldActive();_old_active=false;windowStatusChange()}}})();Core.WinTitle=(function(){var _temp='<h2 class="dialog-title" rel="base_title"><span>{title}</span><div class="dialog-handle">{button}</div></h2>';var _btns=['<a href="javascript:;" class="diag-minimize" btn="hide">最小化</a>','<a href="javascript:;" class="diag-maximize" btn="max">最大化</a><a href="javascript:;" class="diag-return" style="display:none" btn="revert">还原</a>','<a href="javascript:;" class="diag-close" btn="close">关闭</a>'];var bindEvents=function(box,win){box.find("[btn]").mousedown(function(e){Core.Html.StopPropagation(e);Core.WinHistory.Active(win)}).click(function(e){win.SetButtonHandler($(this).attr("btn"));return false})};return{Get:function(win){var html=_btns.join("");var box=$(String.formatmodel(_temp,{title:win.Setting.title,button:html}));bindEvents(box,win);return box}}})();Core.WindowBase=function(setting){var _temp='<div class="dialog-box" style="display:none;" id="{key}_warp">'+Core.Html.GetShadow()+'<div id="{key}_inner" style="height:100%;"></div>'+Core.Html.GetFullIFrame()+"</div>";var _resizeTemp='<div resize="{resize_type}" style="position: absolute; overflow: hidden; background: url('+STATIC_DIR+'/js/transparent.gif) repeat scroll 0% 0% transparent; {css}"></div>';var _self=this;var _cache={resize:{t:"left: 0; top: -3px; width: 100%; height: 5px; z-index: 1;",r:"right: -3px; top: 0; width: 5px; height: 100%; z-index: 1;",b:"left: 0; bottom: -3px; width: 100%; height: 5px; z-index: 1;",l:"left: -3px; top: 0; width: 5px; height: 100%; z-index: 1;",rt:"right: -3px; top: -3px; width: 10px; height: 10px; z-index: 2",rb:"right: -3px; bottom: -3px; width: 10px; height: 10px; z-index: 2",lt:"left: -3px; top: -3px; width: 10px; height: 10px; z-index: 2",lb:"left: -3px; bottom: -3px; width: 10px; height: 10px; z-index: 2"}};if(!setting){setting={}}if(!setting.content){setting.content=""}if(!setting.title){setting.title=""}
1if(!setting.min_title){setting.min_title="窗口"}this.warp;this.Type="window";this.IsActive=false;this.StatusType=0;if(setting.Status!=undefined){this.StatusType=setting.Status}this.Setting=setting;this.Main;var bindResize=function(resizeType,ele){var rt="";switch(resizeType){case"t":rt="n-resize";break;case"r":rt="e-resize";break;case"b":rt="s-resize";break;case"l":rt="w-resize";break;case"rt":rt="ne-resize";break;case"rb":rt="se-resize";break;case"lb":rt="sw-resize";break;case"lt":rt="nw-resize";break}Util.Mouse.MoveLine(ele,rt,function(line){var xLess=line.eX-line.x;var yLess=line.eY-line.y;var w=_cache.resize_width;var h=_cache.resize_height;var t=_cache.resize_top;var l=_cache.resize_left;if(/l/.test(resizeType)){w=w-xLess;if(w<_cache.resize.min_width){l=_cache.resize_maxL}else{l=l+xLess}}if(/r/.test(resizeType)){w=w+xLess}if(/b/.test(resizeType)){h=h+yLess}if(/t/.test(resizeType)){h=h-yLess;if(h<_cache.resize.min_height){t=_cache.resize_maxT}else{t=t+yLess}}if(w<_cache.resize.min_width){w=_cache.resize.min_width}if(h<_cache.resize.min_height){h=_cache.resize.min_height}if(t<_cache.resize_mt){h=h-Math.abs(_cache.resize_mt-t);t=_cache.resize_mt}if((t+h)>_cache.resize_mb){h=_cache.resize_mb-t}if(l<_cache.resize_ml){w=w-Math.abs(_cache.resize_ml-l);l=_cache.resize_ml}if((l+w)>_cache.resize_mr){w=_cache.resize_mr+l}_self.warp.css({width:w+"px",height:h+"px",top:t+"px",left:l+"px"});if(_self.Setting.is_right){_self.Setting.is_right=false}},function(){var mainBox=_self.Main;_cache.resize_mt=mainBox.offset().top;_cache.resize_ml=mainBox.offset().left;_cache.resize_mr=_cache.resize_ml+mainBox.width();_cache.resize_mb=_cache.resize_mt+mainBox.height();_cache.resize_width=_self.warp.width();_cache.resize_height=_self.warp.height();_cache.resize_top=_self.warp.offset().top;_cache.resize_left=_self.warp.offset().left;_cache.resize_maxL=_cache.resize_left+_cache.resize_width-_cache.resize.min_width;_cache.resize_maxT=_cache.resize_top+_cache.resize_height-_cache.resize.min_height})};var create=function(){if(!_cache.initState){_self.Main=$(document.body);_cache.initState=true;Core.WinHistory.Add(_self);_cache.resize.min_width=_self.Setting.min_width=_self.Setting.min_width?_self.Setting.min_width:Core.CONFIG.WindowMinWidth;_cache.resize.min_height=_self.Setting.min_height=_self.Setting.min_height?_self.Setting.min_height:Core.CONFIG.WindowMinHeight;if(!_self.warp){_self.warp=$(String.formatmodel(_temp,{key:_self.Key}));var inner=_self.warp.find("#"+_self.Key+"_inner");if(!_self.Setting.is_not_resize){_cache.resize_list=[];for(var k in _cache.resize){var ele=$(String.formatmodel(_resizeTemp,{resize_type:k,css:_cache.resize[k]}));bindResize(k,ele);_self.warp.append(ele);_cache.resize_list.push(ele)}}if(!_self.Setting.is_not_title){_cache.title=Core.WinTitle.Get(_self);inner.append(_cache.title)}inner.append(_self.Setting.content);if(_self.Setting.width!=undefined){_self.warp.width(_self.Setting.width)}if(_self.Setting.height!=undefined){_self.warp.height(_self.Setting.height)}var mainBox=_self.Main;mainBox.append(_self.warp);if(_self.warp.height()>mainBox.height()){_self.warp.height(mainBox.height())}if(_self.Setting.position){_self.warp.css(_self.Setting.position)}else{Util.Layer.Center(_self.warp,{NoAddScrollTop:true});_self.warp.css({position:"fixed"})}var st={ClickBox:_cache.title?_cache.title:_self.warp,Box:_self.warp,Outer:mainBox,Callback:function(){Core.WinHistory.Active(_self)},MoveCallback:function(){if(_self.Setting.is_right){_self.Setting.is_right=false}}};var oh=document.documentElement.scrollHeight>document.documentElement.clientHeight?document.documentElement.scrollHeight:document.documentElement.clientHeight;if(oh<=mainBox.height()){st.Outer=mainBox}Util.Mouse.MoveBox(st);if(!_self.Setting.is_not_resize){_cache.title.bind("dblclick",function(){if(!_self.MaxState){_self.Max()}else{_self.Revert()}})}else{_cache.title&&_cache.title.find("[btn='max']").empty().remove();_cache.title&&_cache.title.find("[btn='revert']").empty().remove()}if(_self.Setting.is_not_min_title){_cache.title&&_cache.title.find(".win-minsize").empty().remove()}_self.warp.bind("mousedown",function(e){Core.WinHistory.Active(_self)});if(_self.Setting.is_max_window){_self.Max()}}if(_self.Initial){_self.Initial()}}};this.Max=function(){var mainBox=_self.Main;var w=mainBox.width(),h=mainBox.height();var oh=document.documentElement.scrollHeight>document.documentElement.clientHeight?document.documentElement.scrollHeight:document.documentElement.clientHeight;h=oh;_self.MaxState=true;
1_cache.old_sq={w:_self.warp.width(),h:_self.warp.height(),t:_self.warp.offset().top,l:_self.warp.offset().left};_self.warp.width(w).height(h).css({top:0,left:0});setTitleBtn();_self.Open()};this.Revert=function(){_self.MaxState=false;var w=_cache.resize.min_width,h=_cache.resize.min_height,t=0,l=0;if(_cache.old_sq){w=_cache.old_sq.w;h=_cache.old_sq.h;t=_cache.old_sq.t;l=_cache.old_sq.l}_self.warp.width(w).height(h).css({top:t,left:l});setTitleBtn()};this.CreateDom=function(){create()};this.Hide=function(){_self.warp.hide();_self.DeActive();Core.WinHistory.DeActiveStatus(_self);_self.IsActive=false};this.Open=function(){create();_self.warp.show();Core.WinHistory.Active(_self)};var setTitleBtn=function(){if(_self.MaxState){_cache.title.find("[btn='max']").hide();_cache.title.find("[btn='revert']").show();if(_cache.resize_list){for(var i=0,len=_cache.resize_list.length;i<len;i++){_cache.resize_list[i].hide()}}}else{_cache.title.find("[btn='revert']").hide();_cache.title.find("[btn='max']").show();if(_cache.resize_list){for(var i=0,len=_cache.resize_list.length;i<len;i++){_cache.resize_list[i].show()}}}};this.SetButtonHandler=function(type){switch(type){case"hide":_self.Hide();break;case"max":_self.Max();break;case"revert":_self.Revert();break;case"close":_self.Close();break}};this.Close=function(){Core.WinHistory.Del(_self.Key);_cache.initState=false;_self.warp&&_self.warp.hide();_self.MaxState=false};this.Active=function(zIndex){_self.warp.css({zIndex:zIndex}).addClass(Core.CONFIG.ActiveClass)};this.DeActive=function(){_self.warp.removeClass(Core.CONFIG.ActiveClass)}};(function(){var _coverIndex=1000000003;Core.DialogBaseHandler={};Core.DialogBase=function(settings){var _temp='<div class="dialog-box dialog-mini" style="display:none;z-index:1000000002">'+Core.Html.GetShadow()+'<div class="dialog-header" rel="title_box"><h3 rel="base_title"></h3></div><div class="dialog-handle"><a href="javascript:;" class="close" btn="close">关闭</a></div><div rel="base_content"></div></div>';var _box,_cover,_timer,_self=this,_notShowCover=false;var _settings=!settings?{}:settings;this.Main=Core.ACTIVE.GetMain();settings.CloseHandler&&(Core.DialogBaseHandler.CloseHandler=settings.CloseHandler);var create=function(win){if(!_self.warp){_self.warp=$(settings.warpHtml||_temp);if(_settings.width){_self.warp.width(_settings.width)}$(document.body).append(_self.warp);_self.warp.find("[btn]").mousedown(function(e){Core.Html.StopPropagation(e);return true});_self.warp.find("[btn]").click(function(e){switch($(this).attr("btn")){case"close":_self.Close();break}return false});if(_settings.title){_self.warp.find("[rel='base_title']").html(_settings.title)}if(_settings.content){_self.warp.find("[rel='base_content']").append(_settings.content)}if(!Core.CONFIG.DialogNotMove){var mset={ClickBox:_self.warp.find("[rel='title_box']"),Box:_self.warp,Outer:_self.Main};Util.Mouse.MoveBox(mset)}if(_self.Initial){_self.Initial()}_self.warp.css({position:"fixed"})}if(!_cover){_cover=$('<div class="dialog-back-mask" style="z-index: 1000000001; display: none;background: none repeat scroll 0 0 #000;_padding-top:40px;height: 100%;left: 0;position: absolute;top: 0;width: 100%;filter:alpha(opacity=40);-moz-opacity:0.4;opacity:0.4;"><div style="height:100%;width:100%;"></div></div>');var oldCover=$(".dialog-back-mask");if(oldCover.length&&!oldCover.is(":hidden")){_notShowCover=true;_cover.hide()}else{_notShowCover=false}$(document.body).append(_cover);_cover.css({position:"fixed"});_cover.bind("mousedown",function(){if(_timer){window.clearInterval(_timer)}_timer=window.setInterval(function(){if(_timer_index%2){_self.warp&&_self.warp.addClass(Core.CONFIG.ActiveClass)}else{_self.warp&&_self.warp.removeClass(Core.CONFIG.ActiveClass)}_timer_index++;if(_timer_index>(Core.CONFIG.TwinkCount*2+1)){_timer_index=1;if(_timer){window.clearInterval(_timer)}}},Core.CONFIG.TwinkTime)});$(document).on("keydown",function(e){if(e.keyCode==27){if(_cover){_self.Close();return false}}})}
1Util.Layer.Center(_self.warp,{Main:false,NoAddScrollTop:true})};var _timer_index=1;this.Open=function(calback,win){create(win);if(calback){calback()}_cover.show().css({"z-index":_coverIndex++,"background-color":"rgba(0,0,0,"+(_notShowCover?"0":"0.4")+")"});_self.warp.css({"z-index":_coverIndex++});if(_notShowCover){_notShowCover=false}Core.DialogBase.acIndex=_coverIndex;_self.warp.addClass(Core.CONFIG.ActiveClass).show();_self.warp.find('[btn="close"]').focus().blur();if(!Core.DialogBase.History){Core.DialogBase.History=0}Core.DialogBase.History++;Core.DialogBaseHandler.ShowHandler&&Core.DialogBaseHandler.ShowHandler()};this.Close=function(){_cover&&_cover.hide().remove();_self.warp&&_self.warp.hide().remove();_cover=false;_self.warp=false;if(Core.DialogBase.History){Core.DialogBase.History--}if(Core.DialogBase.History<0){Core.DialogBase.History=0}Core.DialogBaseHandler.CloseHandler&&Core.DialogBaseHandler.CloseHandler()}};Core.DialogBase.acIndex=_coverIndex})();Core.DataAccess={};Core.DataAccess.DataAPI=null;Core.DataAccess.UDataAPI=null;Core.DataAccess.ScurityKey="";Core.DataAccess.DataAppAPI=null;Core.DataAccess.DataUserAPI=null;Core.DataAccess.DataMsgAPI=null;Core.DataAccess.DataStaicAPI=null;Core.DataAccess.DataAPSAPI=null;Core.DataAccess.DataPASAPI=null;Core.DataAccess.DataQAPI=null;Core.DataAccess.Bridge=(function(){var _doms={},_callbacks={},_bridge={file:Core.CONFIG.DABridgeURL,file_new:Core.CONFIG.DABridgeURL_NEW,app:Core.CONFIG.DAAppBridgeURL,user:Core.CONFIG.DAUserBridgeURL,im:Core.CONFIG.DAIMBridgeURL,msg:Core.CONFIG.DAMsgBridgeURL,q:Core.CONFIG.DAQBridgeURL,u:Core.CONFIG.DAUBridgeURL,"static":Core.CONFIG.DASTBridgeURL,pass:Core.CONFIG.DAPASBridgeURL,aps:Core.CONFIG.APSBridgeURL},_par;return{ChangeBridge:function(type,url){_bridge[type]=url},RemoveBridge:function(key){if(_doms[key]){$(_doms[key]).find("iframe").attr("src","");$(_doms[key]).empty().remove();_doms[key]=null;delete _doms[key]}},Load:function(complete,key,namespace,api){if(!_par){_par=$('<div style="height:1px;overflow:hidden;position:absolute;width:1px;"></div>');$(document.body).append(_par)}var dom=_doms[key];(_callbacks[key]||(_callbacks[key]=[])).push(complete||function(){});if(!dom){dom=document.createElement("iframe");var onload=function(){var cbs=_callbacks[key],c;dom.loaded=true;while(c=cbs.shift()){try{c(dom)}catch(e){window.console&&window.console.log(e)}}};$(dom).on("readystatechange",function(){if(this.readyState=="complete"){if(dom.doload){return}dom.doload=true;window.setTimeout(function(){onload()},10)}});$(dom).on("load",function(){if(dom.doload){return}dom.doload=true;window.setTimeout(function(){onload()},10)});dom.src=_bridge[key]+"?namespace="+namespace+"&api="+api+"&_t=v5";_par.append(dom);_doms[key]=dom}else{if(dom.loaded){_callbacks[key]=[];if(complete){try{complete(dom)}catch(e){window.console&&window.console.log(e)}}}}}}})();Core.DataAccess.Ajax=Core.DataAccess.UAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(){window.setTimeout(function(){if(setting.dataType=="json"){setting.dataType=false;delete setting.dataType;var callback=setting.success;setting.success=function(r){if(r){r=eval("("+r+")");callback&&callback(r)}}}if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}Core.DataAccess.UDataAPI.ajax(setting)},10)},"file_new","Core.DataAccess","UDataAPI")}}})();Core.DataAccess.APSAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(){window.setTimeout(function(){if(setting.dataType=="json"){setting.dataType=false;delete setting.dataType;var callback=setting.success;setting.success=function(r){r=eval("("+r+")");callback&&callback(r)}}if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}Core.DataAccess.DataAPSAPI.ajax(setting)},10)},"aps","Core.DataAccess","DataAPSAPI")}}})();window["APS$"]={ajax:Core.DataAccess.APSAjax.Send};window["UA$"]={ajax:Core.DataAccess.UAjax.Send};Core.DataAccess.DiskAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(ifr){if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}ifr.contentWindow.$.ajax(setting)},"u","Core.DataAccess","DataDiskAPI")}}})();window["U$"]={ajax:Core.DataAccess.DiskAjax.Send};Core.DataAccess.StaticAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(ifr){if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}ifr.contentWindow.$.ajax(setting)},"static","Core.DataAccess","DataStaticAPI")}}})();window["ST$"]={ajax:Core.DataAccess.StaticAjax.Send};Core.DataAccess.QAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(ifr){if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}ifr.contentWindow.$.ajax(setting)},"q","Core.DataAccess","DataQAPI")}}})();window["Q$"]={ajax:Core.DataAccess.QAjax.Send};Core.DataAccess.PassportAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(ifr){if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}ifr.contentWindow.$.ajax(setting)},"pass","Core.DataAccess","DataPASAPI")}}})();window["PAS$"]={ajax:Core.DataAccess.PassportAjax.Send};Core.DataAccess.MsgAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(){if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}Core.DataAccess.DataMsgAPI.ajax(setting)},"msg","Core.DataAccess","DataMsgAPI")}}})();Core.DataAccess.AppAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(){if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}Core.DataAccess.DataAppAPI&&Core.DataAccess.DataAppAPI.ajax(setting)},"app","Core.DataAccess","DataAppAPI")}}})();Core.DataAccess.UserAjax=(function(){return{Send:function(setting){Core.DataAccess.Bridge.Load(function(){if(window.oofUtil&&oofUtil.autoToken){setting.data=oofUtil.autoToken.setRequestToken(setting.data)}Core.DataAccess.DataUserAPI.ajax(setting)},"user","Core.DataAccess","DataUserAPI")}}})();Core.DataAccess.Error=(function(){return{Throw:function(e){(Core.MinMessage)&&Core.MinMessage.Show({text:e.message,type:"war",timeout:Core.CONFIG.MsgTimeout})}}})();Core.DataAccess.FileRead=(function(){var IS_115DOMAIN=/115(rc)?\.com/.test(location.href);var WEB_API_URL=IS_115DOMAIN?"//webapi.115.com":"/webapi";
1var APS_URL=IS_115DOMAIN?"//aps.115.com":"/aps";var _errObj={message:"网络异常,请刷新页面重试"},_isLoadingList=false;var GetFileListLoadingTimeout,getListLoadingTimeout;var getList=function(url,data,callback,type){if(!data.offset){data.offset=0}if(!data.limit){data.limit=30}if(!data.source){data.source=""}if(!data.format){data.format="json"}getListLoadingTimeout&&clearTimeout(getListLoadingTimeout);getListLoadingTimeout=setTimeout(function(){(Core.MinMessage)&&Core.MinMessage.Show({text:"正在读取文件...",type:"load",timeout:10000})},1000);$.ajax({url:WEB_API_URL+url,type:type?type:"GET",data:data,xhrFields:{withCredentials:true},success:function(r){getListLoadingTimeout&&clearTimeout(getListLoadingTimeout);(Core.MinMessage)&&Core.MinMessage.Hide();try{r=eval("("+r+")");if(r.state===false&&r.errNo!=20130827){Core.DataAccess.Error.Throw({message:r.error});return}top.window._SORTTIMETYPE=r.order;callback&&callback(r)}catch(e){callback&&callback(r);return;Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})};return{GetClassList:function(data,callback){getList("/lists",data,callback)},IsLoadingList:function(){return _isLoadingList},GetQFileList:function(data,callback){_isLoadingList=true;getList("/qfiles",data,function(r){_isLoadingList=false;if(!r.path){r.path=[{name:"圈子共享",aid:999,qid:0,cid:0}]}callback&&callback(r)},"POST")},SearchQFile:function(data,callback){_isLoadingList=true;getList("/files/qsearch",data,function(r){_isLoadingList=false;callback&&callback(r)},"POST")},GetFileList:function(data,callback){_isLoadingList=true;var obj={n:"共享给我的文件夹",ns:"共享给我的文件夹",p:0,pid:"0",sh:"1",t:"1614599408",te:"1614599408",tp:"1604979524",u:"",style:"display:none"};getList("/files",data,function(r){if(r.state){for(var i=0;i<r.data.length;i++){r.data[i]["sourceData"]=r.data[i]}_isLoadingList=false;if(!r.path){r.path=[{name:"文件",aid:1,cid:0,pid:0}];r.aid=1;r.cid=0;data.aid=1;data.cid=0}callback&&callback(r)}else{GetFileListLoadingTimeout&&clearTimeout(GetFileListLoadingTimeout);GetFileListLoadingTimeout=setTimeout(function(){(Core.MinMessage)&&Core.MinMessage.Show({text:"正在读取文件...",type:"load",timeout:10000})},1000);if(r.order!=undefined){data.o=r.order}if(r.is_asc!=undefined){data.asc=r.is_asc}if(r.fc_mix!==undefined){data.fc_mix=r.fc_mix}$.ajax({url:APS_URL+"/natsort/files.php",data:data,type:"GET",dataType:"json",xhrFields:{withCredentials:true},success:function(res){GetFileListLoadingTimeout&&clearTimeout(GetFileListLoadingTimeout);(Core.MinMessage)&&Core.MinMessage.Hide();r=res;_isLoadingList=false;if(r.state){if(!r.path){r.path=[{name:"文件",aid:1,cid:0,pid:0}];r.aid=1;r.cid=0;data.aid=1;data.cid=0}r.aps=1;callback&&callback(r)}else{Core.DataAccess.Error.Throw({message:r.error})}}})}})},GetTargetRecord:function(data,callback){_isLoadingList=true;getList("/history/move_target_list",data,function(r){_isLoadingList=false;if(r.state){r.path=[{name:"文件",aid:1,cid:0,pid:0},{name:"最近移动记录",aid:-3,cid:0,pid:0}];r.aid=1;r.cid=0;r.count=r.data.total;r.data=r.data.list}callback&&callback(r)})},GetQRBList:function(data,callback){_isLoadingList=true;getList("/files/qrb",data,function(r){_isLoadingList=false;callback&&callback(r)})},GetQFileDetail:function(file_id,qid,callback){Core.DataAccess.Ajax.Send({url:"/files/qdesc",type:"GET",data:{file_id:file_id,qid:qid,format:"json"},success:function(r){try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetFileDetail:function(file_id,callback){Core.DataAccess.Ajax.Send({url:"/files/desc",type:"GET",data:{file_id:file_id,format:"json",compat:1,new_html:1},success:function(r){try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}if(r.desc==="<p></p>"){r.desc=""}callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetFilePass:function(file_id,callback){Core.DataAccess.Ajax.Send({url:"/files/desc",type:"GET",data:{file_id:file_id,field:"pass",format:"json"},success:function(r){try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}if(r.desc==="<p></p>"){r.desc=""}callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},Search:function(data,callback){getList("/files/search",data,callback)},CheckSame:function(data,callback){var url=APS_URL+"/repeat/show.php";$.ajax({url:url,type:"GET",data:data,success:function(r){try{r=eval("("+r+")");callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},Same:function(data,callback){if(!data.offset){data.offset=0}if(!data.limit){data.limit=30}if(!data.source){data.source=""}if(!data.format){data.format="json"}(Core.MinMessage)&&Core.MinMessage.Show({text:"正在读取文件...",type:"load",timeout:10000});var url=APS_URL+"/repeat/show.php";$.ajax({url:url,type:"GET",data:data,success:function(r){(Core.MinMessage)&&Core.MinMessage.Hide();try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetActiveDate:function(y,m,callback){Core.DataAccess.Ajax.Send({url:"/files/curmonth",type:"GET",data:{month:y+"-"+m},success:function(r){try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}callback&&callback(y,m,r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetReport:function(data,callback){if(!data.offset){data.offset=0}if(!data.limit){data.limit=30}(Core.MinMessage)&&Core.MinMessage.Show({text:"正在读取文件...",type:"load",timeout:10000});var url=APS_URL+"/repeat/show.php";$.ajax({url:url,type:"GET",data:data,success:function(r){(Core.MinMessage)&&Core.MinMessage.Hide();try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},RB:function(data,callback){getList("/rb",data,callback)},GetSHA1RepeatList:function(data,callback){getList("/files/get_repeat_sha",data,callback)},GetInfoBySha1:function(sha1,callback){Core.DataAccess.Ajax.Send({url:"/files/shasearch",type:"GET",data:{sha1:sha1},success:function(r){try{r=eval("("+r+")");callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetQFiles:function(data,callback){(Core.MinMessage)&&Core.MinMessage.Show({text:"正在读取文件...",type:"load",timeout:10000});Core.DataAccess.Ajax.Send({url:"/qfiles",type:"POST",data:data,success:function(r){(Core.MinMessage)&&Core.MinMessage.Hide();try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetOtherImg:function(data,callback){(Core.MinMessage)&&Core.MinMessage.Show({text:"正在读取图片...",type:"load",timeout:10000});if(data.filter_type){var f_type=data.filter_type;Core.FileConfig.DataAPI.ReInstance({type:f_type,next_page:true,callback:function(r){if(r.state){r.data=[""].concat(r.data);callback&&callback(r)}else{callback&&callback({state:false});Core.Debug.write("msg:"+r+" error:"+r.message)}}});return}Core.DataAccess.Ajax.Send({url:"/files/imglist",type:"GET",data:data,success:function(r){(Core.MinMessage)&&Core.MinMessage.Hide();try{r=eval("("+r+")");if(r.state===false){Core.DataAccess.Error.Throw({message:r.error});return}callback&&callback(r)}catch(e){callback&&callback({state:false});Core.Debug.write("msg:"+r+" error:"+e.message)}}})}}})();Core.DataAccess.Dir=(function(){var _errObj={message:"网络异常,请刷新页面重试"};return{GetAll:function(callback){Core.DataAccess.Ajax.Send({url:"/category",type:"GET",success:function(r){try{r=eval("("+r+")");callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetQDetail:function(aid,cid,qid,callback){if(Core.DataAccess.FileRead.IsLoadingList(
1)){return}if(cid==undefined){cid=0}Core.DataAccess.Ajax.Send({url:"/category/qget",type:"GET",data:{aid:aid,cid:cid,qid:qid},success:function(r){try{r=eval("("+r+")");callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},GetDetail:function(aid,cid,callback){if(Core.DataAccess.FileRead.IsLoadingList()){return}if(cid==undefined){cid=0}Core.DataAccess.Ajax.Send({url:"/category/get",type:"GET",data:{aid:aid,cid:cid},success:function(r){try{r=eval("("+r+")");if(r.desc==="<p></p>"){r.desc=""}callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})},Stat:function(callback){Core.DataAccess.Ajax.Send({url:"/stat",type:"GET",success:function(r){try{r=eval("("+r+")");callback&&callback(r)}catch(e){Core.DataAccess.Error.Throw(_errObj);Core.Debug.write("msg:"+r+" error:"+e.message)}}})}}})();(function(){Core.DataAccess.IMAPI=null;var imif=Core.DataAccess.IMIF=(function(){return{Run:function(funName){var arg=arguments;var params=[];if(arg.length>1){for(var i=1,len=arg.length;i<len;i++){params.push("arg["+i+"]")}}Core.DataAccess.Bridge.Load(function(){if(Core.DataAccess.IMAPI&&Core.DataAccess.IMAPI[funName]){if(imif.SuccessCallback){imif.SuccessCallback()}try{eval("var res = Core.DataAccess.IMAPI."+funName+"("+params.join(",")+")")}catch(e){var msg="网络异常,请稍候重试";if(imif.ErrorCallback){imif.ErrorCallback(msg)}else{Core.DataAccess.Error.Throw({message:msg})}}}else{var msg="网络异常,请稍候重试";if(imif.ErrorCallback){imif.ErrorCallback(msg)}else{Core.DataAccess.Error.Throw({message:msg})}}},"im","Core.DataAccess","IMAPI")},Kill:function(){Core.DataAccess.IMAPI=null}}})()})();Core.API={};(function(){var im=Core.API.IM=(function(){var _cache={clients:{},is_connect:false,recon_count:0,recon_times:3};var reconnect=function(msg){_cache.is_connect=false;Core.CONFIG.DAIMBridgeURL=false;if(_cache.recon_count<_cache.recon_times){_cache.recon_count++;if(_cache.is_signin_again){return}window.setTimeout(function(){connect()},100)}else{if(!msg){msg="网络异常,暂无法建立通信连接"}Core.Message.Confirm({text:msg,type:"war",confirm_text:"马上重连",callback:function(r){if(r){_cache.recon_count=0;connect()}}})}};var tryConnect=function(msg){if(_cache.recon_count<_cache.recon_times){_cache.recon_count++;if(_cache.is_signin_again){return}var timeOut=1000;if(_cache.recon_count<2){timeOut=3000}window.setTimeout(function(){_cache.is_connect=false;Core.CONFIG.DAIMBridgeURL=false;connect()},timeOut)}else{_cache.recon_count=0;Core.MinMessage.Show({text:msg,type:"war",timeout:2000})}};var sucConnect=function(){_cache.recon_count=0};var msgDeal=(function(){var notiStruct={"2t":"signin_again","2u":"signout","5m":"add_friend","5n":"del_friend","5o":"friend_status","8e":"group_add_friend","8f":"group_del_friend","8g":"group_friend_status",dx:"reconnect",dy:"notify"};var getT=function(id){var spec_sign=["Q","G","T"];var new_id=String(id);var sign=new_id.substr(0,1);var ind=$.inArray(sign,spec_sign);if(ind!=-1){return spec_sign[ind]}else{return -1}};return{compress_id:function(id){var spec_sign=["Q","G","T"];var new_id=String(id);var sign=new_id.substr(0,1);if($.inArray(sign,spec_sign)!=-1){var new_id=Number(new_id.substr(1));return isNaN(new_id)?id:sign+new_id.toString(36)}else{var new_id=Number(new_id);return isNaN(new_id)?id:new_id.toString(36)}},decompress_id:function(id){var spec_sign=["Q","G","T"];var new_id=String(id);var sign=new_id.substr(0,1);if($.inArray(sign,spec_sign)!=-1){var new_id=parseInt(new_id.substr(1),36);return isNaN(new_id)?id:sign+new_id}else{var new_id=parseInt(new_id,36);return isNaN(new_id)?id:new_id}},ex_noti:function(item){if(item.mt=="n"&&notiStruct[item.t]){item.t=notiStruct[item.t];if(item.fr&&!item.friends){var arr=item.fr.split(",");if(arr.length){item.friends=[];for(var i=0,len=arr.length;i<len;i++){var fid=arr[i];item.friends.push(msgDeal.decompress_id(fid))}}}if(item.id){if(getT(item.id)=="Q"){item.qid=msgDeal.decompress_id(item.id)}else{item.id=msgDeal.decompress_id(item.id)}}}}}})();var recv=function(){if(_cache.clients){var item={mt:"n",t:"open"};for(var k in _cache.clients){try{var clients=_cache.clients[k];clients.Receive(item)}catch(e){}}}Core.DataAccess.IMIF.Run("Recv",_cache.session_id,function(data){for(var i=0,len=data.length;i<len;i++){var item=data[i];switch(item.mt){case"t":if(item.fid&&item.fid.toString().charAt(0)=="A"){var fArr=item.fid.split(".");item.fid=msgDeal.decompress_id(fArr[1]);item.qid=msgDeal.decompress_id(fArr[0].substring(1,fArr[0].length))}else{item.fid=msgDeal.decompress_id(item.fid)}item.tid=msgDeal.decompress_id(item.tid);item.ft=parseInt(item.ft,36);var clients=_cache.clients[item.tt];if(clients){try{clients.Receive(item)}catch(e){}}break;case"n":msgDeal.ex_noti(item);switch(item.t){case"signin_again":_cache.is_signin_again=true;_cache.recon_count=_cache.recon_times;try{Core.DataAccess.IMIF.Run("Kill")}catch(e){}_cache.is_connect=false;Core.CONFIG.DAIMBridgeURL=false;
1if(_cache.clients){for(var k in _cache.clients){try{var clients=_cache.clients[k];clients.Receive(item)}catch(e){}}}return;case"notify":item.tt=1;var clients=_cache.clients[item.tt];if(clients){try{clients.Receive(item)}catch(e){}}break;case"del_friend":case"add_friend":item.tt=1;var clients=_cache.clients[item.tt];if(clients){try{clients.Receive(item)}catch(e){alert(e)}}break;case"friend_status":item.tt=1;var clients=_cache.clients[item.tt];if(clients){try{clients.Receive(item)}catch(e){}}break;case"group_friend_status":case"group_add_friend":case"group_del_friend":item.tt=2;var clients=_cache.clients[item.tt];if(clients){try{clients.Receive(item)}catch(e){}}break;case"reconnect":try{Core.DataAccess.IMIF.Run("Kill")}catch(e){}_cache.is_connect=false;Core.CONFIG.DAIMBridgeURL=false;connect();break;default:break}break}}},function(status){if(status==408){reconnect()}else{tryConnect("网络异常,暂无法建立通信连接")}})};var _cache_callback=[];var connect=function(callback){if((!_cache.is_connect&&!Core.CONFIG.DAIMBridgeURL)||_cache.is_signin_again){callback&&_cache_callback.push(callback);Core.DataAccess.IMIF.ErrorCallback=tryConnect;Core.DataAccess.IMIF.SuccessCallback=sucConnect;if(_cache.is_signin_again){_cache.is_signin_again=false;_cache.recon_count=0;try{Core.DataAccess.IMIF.Run("Kill")}catch(e){}_cache.is_connect=false;Core.CONFIG.DAIMBridgeURL=false}_cache.is_connect=true;Core.DataAccess.MsgAjax.Send({url:"/proapi/im.php?ac=signin",type:"GET",success:function(r){r=eval("("+r+")");if(r.session_id){window.onbeforeunload=function(){Core.DataAccess.MsgAjax.Send({url:"/proapi/im.php?ac=signout",type:"GET",sync:false,success:function(r){}})};_cache.session_id=r.session_id;var url="//"+r.server+"/chat/bridge";Core.CONFIG.DAIMBridgeURL=url;Core.DataAccess.Bridge.ChangeBridge("im",url);Core.DataAccess.Bridge.RemoveBridge("im");recv();window.setTimeout(function(){for(var i=0,len=_cache_callback.length;i<len;i++){_cache_callback[i]&&_cache_callback[i]()}_cache_callback=[]},10)}else{tryConnect("网络异常,暂无法建立通信连接")}},error:function(){try{Core.DataAccess.IMIF.Run("Kill")}catch(e){}_cache.is_connect=false;Core.CONFIG.DAIMBridgeURL=false;connect()}})}else{callback&&callback()}};var addClient=function(type,opt){_cache.clients[type]=opt;connect(function(){})};return{Client:function(opt){addClient(opt.type,opt)},RemoveClient:function(type){if(_cache.clients[type]){_cache.clients[type]=null;delete _cache.clients[type]}},Reconnect:function(callback){_cache.is_signin_again=true;connect(callback)},GetSession:function(callback){connect(function(){callback&&callback(_cache.session_id)})},MsgDeal:msgDeal}})()})();Core.API.Ajax=(function(){return{MoveQ:function(qid,pick_codes,is_talk,callback){var data={};data.qid=qid;data.type=is_talk?is_talk:0;for(var i=0,len=pick_codes.length;i<len;i++){data["pickcodes["+i+"]"]=pick_codes[i]}$.ajax({url:"?ct=q&ac=move_q",data:data,type:"POST",dataType:"json",success:function(r){if(r.state){callback&&callback(r.data)}else{Core.MinMessage.Show({text:r.msg,type:r.errtype||"err",timeout:2000});callback&&callback(false,r.msg)}}})},QCollect:function(opt){var data={qid:opt.qid,cid:opt.cid,aid:opt.aid,tid:opt.tid?opt.tid:"",token:opt.token?opt.token:"",time:opt.time?opt.time:""};if(!opt.pick_codes.length){Core.MinMessage.Show({text:"请先选择文件",type:"err",timeout:2000});opt.callback&&opt.callback({state:false,msg:"请先选择文件"});return}for(var i=0,len=opt.pick_codes.length;i<len;i++){data["pickcodes["+i+"]"]=opt.pick_codes[i]}$.ajax({url:"?ct=ajax&ac=collect",type:"POST",data:data,dataType:"json",success:function(r){if(!r.state){Core.MinMessage.Show({text:r.msg,type:r.errtype||"err",timeout:2000})}else{Core.FileResultDG.Show(r.data,{aid:data.aid,cid:data.cid})}opt.callback&&opt.callback(r)}})}}})();Core.MinMessage=(function(){var _dom,_timer;var _temp='<div class="popup-hint" style="z-index:9999999999;"><i class="" rel="type"></i><em class="sl"><b></b></em><span rel="con"></span><em class="sr"><b></b></em></div>';var _temp='<div class="ex-popoup-hint " style="z-index:9999999999;"><s></s><span rel="con">操作成功提示!</span></div>';var _cache={Type:{suc:"exph-suc",war:"exph-war",err:"exph-err",load:"exph-loader",inf:"exph-war"}};var create=function(text,type){if(!_dom){_dom=$(String.format(_temp,text));$(document.body).append(_dom);_dom.css({position:"fixed"})}_dom.find("[rel='con']").html(text);var icon=_dom;for(var k in _cache.Type){icon.removeClass(_cache.Type[k])}icon.addClass(_cache.Type[type])};var hide=function(){if(_timer){window.clearTimeout(_timer)}if(_dom){_dom.hide()}};
1return{Show:function(obj){if(!obj.type){obj.type="war"}create(obj.text,obj.type);var NoAddScrollTop=true;Util.Layer.Center(_dom,{NoAddScrollTop:NoAddScrollTop});var st=($(window).height()-_dom.outerHeight())/4.5;if(st<50){st=50}var srt=0;if(!NoAddScrollTop){srt=$(window).scrollTop()}if(st){st+=srt}_dom.css("top",st);_dom.show();if(_timer){window.clearTimeout(_timer)}if(obj.timeout){_timer=window.setTimeout(hide,obj.timeout)}},Hide:function(){hide()}}})();Core.Message=(function(){var _dialog;var _MessageModel=function(){var _self=this,_initState=false,_callback,_openStatus=false,_dialog_type;var _content=$('<div><div class="dialog-msg" rel="content"></div><div class="dialog-action"><a href="javascript:;" class="dgac-cancel"  style="display:none;" btn="cancel">取消</a><a href="javascript:;" class="dgac-confirm" btn="confirm">确定</a></div>');Core.DialogBase.call(this,{content:_content,title:"信息提示"});var setTitle=function(title){title&&_self.warp.find("[rel='base_title']").html(title)};this.Initial=function(){if(!_initState){$(document).bind("keyup",function(e){if(_openStatus){if(e.keyCode==13||e.keyCode==32){_content.find("[btn='confirm']").click()}else{if(e.keyCode==27){switch(_dialog_type){case 0:_content.find("[btn='confirm']").click();break;case 1:_content.find("[btn='cancel']").click();break}}}}})}};var _closeFun=this.Close;this.Close=function(){_closeFun();_openStatus=false};this.Show=function(obj){_callback=false;_self.Open(function(){var cancelBtn=_content.find("[btn='cancel']");var confirmBtn=_content.find("[btn='confirm']");if(obj.confirm_link){confirmBtn.unbind("click").bind("click",function(){if(_callback){_callback(true)}_self.Close();return true});confirmBtn.attr("href",obj.confirm_link).attr("target","_blank");cancelBtn.unbind("click").bind("click",function(){var r=true;if(_callback){r=_callback(false)}if(r===false){return false}_self.Close();return false})}else{if(confirmBtn.attr("target")){confirmBtn.removeAttr("target");confirmBtn.attr("href","javascript:;")}_self.warp.find("[btn]").unbind("click").bind("click",function(){var r=true;if(_callback){r=_callback($(this).attr("btn")=="confirm")}if(r===false){return false}_self.Close();return false})}if(obj.confirm_text){confirmBtn.html(obj.confirm_text)}else{confirmBtn.html("确定")}if(obj.cancel_text){cancelBtn.html(obj.cancel_text)}else{cancelBtn.html("取消")}_callback=obj.callback;setTitle(obj.title);if(obj.dialog_type==undefined){obj.dialog_type=0}if(!obj.type){obj.type="war"}var html_temp='<h3 rel="text"><i class="hint-icon hint-{type}"></i><span>{text}</span></h3>'+(obj.content?'<div class="dialog-msg-text" rel="text_content">{content}</div>':"");var con=_content.find("[rel='content']");con.html(String.formatmodel(html_temp,obj));confirmBtn.removeClass("btn-orange");switch(obj.dialog_type){case 0:cancelBtn.hide();break;case 1:cancelBtn.show();break}_dialog_type=obj.dialog_type;_openStatus=true;if(!obj.con_style){obj.con_style={}}var conStyle=obj.con_style;if(conStyle.warp){conStyle.warp(con)}else{var styleTxt=con.attr("style");if(styleTxt){var arr=styleTxt.split(";");if(arr&&arr.length){for(var i=0,len=arr.length;i<len;i++){var item=arr[i];var iitem=item.split(":");if(iitem.length){con.css(iitem[0],"")}}}}con.removeAttr("style")}if(conStyle.title){conStyle.title(con.find('[rel="text"]'))}if(conStyle.content){conStyle.content(con.find('[rel="text_content"]'))}},obj.win)}};var init=function(){if(!_dialog){_dialog=new _MessageModel()}};var _alertTimer;return{Confirm:function(obj){init();obj.dialog_type=1;_dialog.Show(obj)},Alert:function(obj){init();obj.dialog_type=0;_dialog.Show(obj);if(obj.timeout){_alertTimer=window.setTimeout(function(){Core.Message.Hide()},obj.timeout)}},Hide:function(){if(_alertTimer){window.clearTimeout(_alertTimer)}if(_dialog){_dialog.Close()}}}})();(function(){Core.WriteInput=(function(){var activeBox;return{Open:function(callback,config){if(!config){config={}}var editCon=$('<div class="dialog-input">'+(!config.ext?'<input type="text" rel="txt" class="text" '+(config.placeholder?'placeholder="'+config.placeholder+'"':"")+"/>":'<input type="text" rel="txt" class="text" style="width:362px;" '+(config.placeholder?'placeholder="'+config.placeholder+'"':"")+'/><span class="file-ext-name" rel="ext_name" style="top:30px;border: 1px solid;border-color: #CECECF;box-shadow: inset 0px 0px 0px rgba(0,0,0,0.1);">'+config.ext+"</span>")+'</div><div class="dialog-action"><a href="javascript:;" class="dgac-cancel" btn="cancel">取消</a><a href="javascript:;" class="dgac-confirm" btn="confirm">确定</a></div>');var editBox=new Core.DialogBase({title:config.title||"请输入内容",content:editCon});activeBox=editBox;editBox.Open();var docallback=function(){if(callback){var isClose=callback(editCon.find("[rel='txt']").val());if(isClose){editBox.Close();activeBox=false;return}else{editCon.find("[rel='txt']").focus()}}};if(config.maxlength){editCon.find("[rel='txt']").attr("maxlength",config.maxlength)}editCon.find("[rel='txt']").val(config.text||"");editCon.find("[rel='txt']").on("keydown",function(e){if(e.keyCode==13){docallback()}else{if(e.keyCode==27){editBox.Close();activeBox=false}}});editCon.find("[btn]").on("click",function(e){switch($(this).attr("btn")){case"confirm":docallback();break;case"cancel":editBox.Close();activeBox=false;break}return false});editCon.find("[rel='txt']")[0].focus();window.setTimeout(function(){editCon.find("[rel='txt']")[0].select();if(config.ext){window.setTimeout(function(){editCon.find("[rel='txt']").width(420-editCon.find("[rel='ext_name']").width()-20)},10)}},20)},Close:function(){activeBox.Close();activeBox=false}}})()})();Core.Permission=Core.FilePermission=(function(){var _per;return{ShowUpgrade:function(){Core.Message.Alert({text:'抱歉,请<a href="http://115.com/?nav=safe&child=user&mode=my_set" target="_blank">绑定手机</a> 或 <a style="color:#f60;" href="http://vip.115.com" target="_blank">升级VIP</a>方可使用。',type:"inf"})},Set:function(data){_per=data},Shared:function(aid){aid=Number(aid);if(!_per){return false}return true},SharedDir:function(aid){aid=Number(aid);if(!_per){return false}var txt=aid+"|";return _per.share_dir.indexOf(txt)!=-1},Vip:function(){if(!_per){return false}return _per.is_vip},VipExp:function(){if(!_per){return false}return _per.is_vip_exp},VipExpLimit:function(){if(!_per){return false}return _per.is_vip_exp_limit},LockFile:function(aid){aid=Number(aid);if(!_per){return false}return _per.lock_file},LockDir:function(aid){aid=Number(aid);if(!_per){return false}return _per.lock_dir},CanPlayer:function(arr,flag){switch(Number(flag)){case 9:for(var i=0,len=arr.length;i<len;i++){var fileDom=arr[i];var suffix="";if(fileDom.attr("file_type")=="1"){var fileName=fileDom.find("[field='file_name']").attr("title");if(fileName&&fileName.lastIndexOf(".")!=-1){suffix=fileName.substring(fileName.lastIndexOf("."),fileName.length).replace(".","")}if(UPLOAD_CONFIG&&UPLOAD_CONFIG["9"]&&$.inArray(suffix,UPLOAD_CONFIG["9"]["upload_type_limit"])!=-1){}else{return false}}else{return false}}return true;break;case 4:var newArr=[],pcs=[];for(var i=0,len=arr.length;i<len;i++){var fileDom=arr[i];if(fileDom.attr("file_type")=="1"){var suffix="";var fileName=fileDom.find("[field='file_name']").attr("title");if(fileName.lastIndexOf(".")!=-1){suffix=fileName.substring(fileName.lastIndexOf("."),fileName.length).replace(".","")}var musicType=["mp3","ape","flac","wav","m4a"],suffixType=suffix.toLowerCase();
1if($.inArray(suffixType,musicType)!=-1){newArr.push(fileDom);pcs.push(fileDom.attr("pick_code"))}}}if(newArr.length){return{list:newArr.length,pick_codes:pcs}}else{return false}break}return false}}})();(function(){var mod=function(actions){var _content=$('<div class="dialog-frame"><iframe frameborder=0 src=""></iframe></div>'),_self=this;if(!actions){actions={}}var _top=Util.Override(Core.DialogBase,_self,{Initial:function(){if(/firefox/.test(navigator.userAgent.toLowerCase())){_content.find("iframe").on("load",function(){try{var win=$(this.contentWindow);$(win).on("keydown",function(e){if(e.keyCode==27){return false}})}catch(e){}})}},GetIframe:function(){return _content.find("iframe")[0]},Show:function(url){_top.Open(function(){_content.find("iframe").off("load").on("load",function(){if(actions&&actions.ready){var ifr=this;window.setTimeout(function(){actions.ready(ifr.contentWindow)},10)}})});_content.find("iframe").attr("src",url)},Reset:function(width,height,notcenter){if(width){_self.warp.width(width)}if(height){_content.find("iframe").height(height)}if(!notcenter){Util.Layer.Center(_self.warp,{Main:false,NoAddScrollTop:true})}},Close:function(doHide){actions&&actions.close&&actions.close(doHide);window.setTimeout(function(){_content.find("iframe").attr("src","");_top.Close()},10)},ResetTitle:function(title){_self.warp.find('[rel="base_title"]').html(title)}},{content:_content,title:"新窗口",warpHtml:actions.warpHtml})};Core.FrameBaseDG=mod;Core.SimpleFrameDG=(function(){var _cache={},_ready=false,_ackey,_hideBack={},_doHandler={},_hideBackData={};return{Open:function(key,url,setting){if(!setting){setting={}}if(setting.callback){_doHandler[key]=setting.callback}else{_doHandler[key]=false}if(!setting.width){setting.width=320}_ready=false;if(setting){_ready=setting.ready}if(!_cache[key]){_cache[key]=new mod({ready:function(win){_ready&&_ready(win)},close:function(doHide){if(!doHide){if(_hideBack[key]){_doHandler[key]&&_doHandler[key](_hideBackData[key])}}},warpHtml:setting.warpHtml})}_hideBackData[key]=null;_hideBackData[key]=setting.hide_data;_hideBack[key]=setting.is_hide_back;_cache[key].Show(url);_ackey=key;if(setting){_cache[key].Reset(setting.width,setting.height);_cache[key].ResetTitle(setting.title?setting.title:"新窗口")}return _cache[key]},Close:function(key,data){if(!key){key=_ackey}if(_cache[key]){if(_doHandler[key]){_doHandler[key](data)}_cache[key].Close(true)}},Reset:function(key,setting){if(_cache[key]){_cache[key].Reset(setting.width,setting.height,setting.notcenter)}}}})();Core.FrameDG=(function(){var _mod,_doHandler,_hideBack=false,_hideBackData,_ready;return{IsOpen:function(){if(_mod){return _mod.warp.length}return false},GetIframe:function(){if(_mod){return _mod.GetIframe()}else{return false}},Reset:function(width,height,notcenter){if(_mod){_mod.Reset(width,height,notcenter)}},ResetTitle:function(title){if(_mod){_mod.ResetTitle(title)}},Open:function(url,setting){if(setting.callback){_doHandler=setting.callback}else{_doHandler=false}if(setting.ready){_ready=setting.ready}else{_ready=false}if(!_mod){_mod=new mod({ready:function(win){_ready&&_ready(win)},close:function(doHide){if(!doHide){if(_hideBack){_doHandler&&_doHandler(_hideBackData)}}}})}_hideBackData=null;_hideBackData=setting.hide_data;_hideBack=setting.is_hide_back;_mod.Show(url);if(setting){_mod.Reset(setting.width,setting.height);_mod.ResetTitle(setting.title?setting.title:"新窗口")}return _mod},Close:function(data){if(_mod){if(_doHandler){_doHandler(data)}_mod.Close(true)}},Hide:function(){if(_mod){_mod.Close()}}}})()})();Core.OnlyFrame=(function(){var _cache={},_defautWidth=960;var disInstance=function(){if(_cache.iframe){_cache.iframe.attr("src","");_cache.iframe.empty().remove();_cache.iframe=false}if(_cache.box){_cache.box.empty().remove();_cache.box=false}_cache.resizeCallback=false;if(_cache.closeCallback){_cache.closeCallback(_cache.hideBackData);_cache.closeCallback=false}};var init=function(){if(!_cache.box){_cache.box=$('<div class="popup-window-wrap" is_over="1"><div class="popup-window"><iframe src="" frameborder=0></iframe><div class="popup-window-handle"><a href="javascript:;" class="close" btn="close">关闭</a></div></div></div>');
1$(document.body).append(_cache.box);_cache.iframe=_cache.box.find("iframe");if(/firefox/.test(navigator.userAgent.toLowerCase())){_cache.iframe.on("load",function(){try{var win=$(this.contentWindow);$(win).on("keydown",function(e){if(e.keyCode==27){return false}})}catch(e){alert(e)}})}_cache.box.on("mouseenter",function(){_cache.box.attr("is_over","1")}).on("mouseleave",function(){_cache.box.attr("is_over","0")});_cache.box.find("[btn='close']").on("click",function(){disInstance();return false})}if(!_cache.bind_reset){_cache.bind_reset=true;$(window).on("resize",function(){if(_cache.resizeCallback){_cache.resizeCallback($(document).width(),$(document).height())}});$(document).on("keydown",function(e){if(e.keyCode==27){if(_cache.box&&_cache.box.attr("is_over")=="1"){disInstance();return false}}})}};var _openTimer;return{Resize:function(width,height){if(_cache.box){var l=0;if(width){l=-width/2}_cache.box.find(".popup-window").width(width).css("margin-left",l+"px")}},Open:function(url,setting){if(_openTimer){window.clearTimeout(_openTimer)}init();if(!setting){setting={}}if(!setting.width){setting.width=960}if(!setting.height){setting.height=500}if(setting.resizeCallback){_cache.resizeCallback=setting.resizeCallback}else{_cache.resizeCallback=false}_cache.hideBackData=null;_cache.hideBackData=setting.hide_data;if(setting.hideCallback){_cache.closeCallback=setting.hideCallback}else{_cache.closeCallback=false}_cache.iframe.attr("src",url);_cache.box.find(".popup-window").width(setting.width).css("margin-left",(-setting.width/2)+"px");_openTimer=window.setTimeout(function(){try{_cache.box&&_cache.box.show()}catch(e){}},20)},Close:function(data){if(data!=undefined){_cache.hideBackData=data}disInstance()}}})();Core.TabFrame=(function(){var _tabList,_mod;var mod=function(){var _content=$('<div class="dialog-frame"><iframe style="height: 510px;" frameborder=0 src=""></iframe></div>'),_self=this,_titleTab;var focusLi=function(type){_titleTab.find(".focus").removeClass("focus");var el=_titleTab.find("li")[type];if(el){$(el).addClass("focus")}};var _top=Util.Override(Core.DialogBase,_self,{Initial:function(){var html=[];html.push('<ul class="dialog-tab">');for(var i=0,len=_tabList.length;i<len;i++){var item=_tabList[i];html.push('<li key="'+i+'"><span>'+item.text+"</span></li>")}html.push("</ul>");_titleTab=$(html.join(""));_titleTab.find("li").on("click",function(){var el=$(this);var ind=Number(el.attr("key"));_content.find("iframe").attr("src",_tabList[ind].url);focusLi(ind);return false}).on("mousedown",function(e){e.stopPropagation()});var title=_self.warp.find('[rel="base_title"]');title.before(_titleTab);title.hide()},Reset:function(width,height,notcenter){if(width){_self.warp.width(width)}if(height){_content.find("iframe").height(height)}if(!notcenter){Util.Layer.Center(_self.warp,{Main:false,NoAddScrollTop:true})}},Show:function(type){_top.Open(function(){_content.find("iframe").off("load").on("load",function(){var ifr=this;window.setTimeout(function(){$(ifr.contentWindow.document).on("keydown",function(e){if(e.keyCode==27){_self.Close()}})},100)});focusLi(type)});_content.find("iframe").attr("src",_tabList[type].url)},Close:function(){window.setTimeout(function(){_content.find("iframe").attr("src","");_top.Close()},10)}},{content:_content,title:"",width:700})};return{Open:function(list,opt,setting){_tabList=list;if(!_tabList){return}if(!_mod){_mod=new mod()}if(!opt){opt={}}if(opt.type==undefined){opt.type=0}_mod.Show(opt.type);if(setting){_mod.Reset(setting.width,setting.height)}},Close:function(){if(_mod){_mod.Close()}}}})();Core.LineTabFrame=(function(){var _tabList,_mod,_title;var mod=function(){var _self=this,_titleTab,_iframe;var _content=$('<div class="dg-sub-tab"></div><div class="dg-sub-frame"><iframe src="setting_common.html" frameborder="0"></iframe></div>');var focusLi=function(type){_titleTab.find(".focus").removeClass("focus");var el=_titleTab.find("li")[type];if(el){$(el).find("a").addClass("focus")}};var _top=Util.Override(Core.DialogBase,_self,{Initial:function(){_self.warp.height(500);_iframe=_self.warp.find("iframe");var html=[];html.push("<ul>");for(var i=0,len=_tabList.length;i<len;i++){var item=_tabList[i];html.push('<li key="'+i+'"><a href="javascript:;">'+item.text+"</a></li>")}html.push("</ul>");_titleTab=$(html.join(""));_titleTab.find("li").on("click",function(){var el=$(this);var ind=Number(el.attr("key"));_iframe.attr("src",_tabList[ind].url);focusLi(ind);return false});var tabBox=_self.warp.find(".dg-sub-tab");tabBox.html("").append(_titleTab)},Show:function(type){_top.Open(function(){_iframe.off("load").on("load",function(){var ifr=this;window.setTimeout(function(){$(ifr.contentWindow.document).on("keydown",function(e){if(e.keyCode==27){_self.Close()}})},100)});
1focusLi(type)});_iframe.attr("src",_tabList[type].url)},Close:function(){window.setTimeout(function(){_iframe&&_iframe.attr("src","");_top.Close()},10)}},{content:_content,title:_title,width:700,height:500})};return{Open:function(list,opt){_title=opt.title?opt.title:"";_tabList=list;if(!_tabList){return}if(!_mod){_mod=new mod()}if(!opt){opt={}}if(opt.type==undefined){opt.type=0}_mod.Show(opt.type);_mod.warp.find('[rel="base_title"]').html(_title)},Close:function(){if(_mod){_mod.Close()}}}})();Core.Frame=function(url,obj){var _self=this;if(!obj){obj={}}if(!obj.title){obj.title="新窗口"}var _content=$('<div class="window-frame"><iframe src="" frameborder="0" rel="content"></iframe>'+(obj.is_has_flash?'<div class="app-back" rel="flash_op" style="display:none;"></div>':"")+"</div>");var _opcBoxTemp='<div style="z-index: 9000000;background: none repeat scroll 0 0 black;height: 100%;left: 0;position: absolute;top: 0;width: 100%;filter:alpha(opacity=0.15);-moz-opacity:0;opacity:0;"></div>';var _opcBox;obj.content=_content;Core.WindowBase.call(this,obj);var parentClose=_self.Close;var parentOpen=_self.Open;var parentHide=_self.Hide;var parentActive=_self.Active;var parentDeActive=_self.DeActive;var _isClose=true;this.FrameSetting=obj;this.IsHide=false;if(this.FrameSetting.is_has_flash!=undefined&&typeof this.FrameSetting.is_has_flash=="string"){this.FrameSetting.is_has_flash=Number(this.FrameSetting.is_has_flash)}this.Initial=function(){_self.warp.addClass("window-box")};this.Open=function(newUrl){parentOpen();if(_isClose){_content.find("[rel='content']").attr("src",newUrl?newUrl:url);_isClose=false}else{if(newUrl){_content.find("[rel='content']").attr("src",newUrl)}}_self.IsHide=false};this.Hide=function(){parentHide();_self.IsHide=true};this.Close=function(){parentClose();_content.find("[rel='content']").attr("src","");if(_opcBox){_opcBox.remove();_opcBox=false}_content.find("iframe").attr("src","");_content.html("");_self.warp&&_self.warp.remove();_self.warp=false;_isClose=true;_self.IsHide=false};this.Active=function(zIndex){if(_opcBox){_opcBox.hide()}parentActive(zIndex);if(_self.FrameSetting.is_has_flash){_content.find("[rel='content']").css({height:"",width:""});_content.find("[rel='flash_op']").hide()}};this.DeActive=function(zIndex){if(!_opcBox){_opcBox=$(_opcBoxTemp);_content.find("[rel='content']").before(_opcBox)}_opcBox.show();parentDeActive(zIndex);if(_self.FrameSetting.is_has_flash){_content.find("[rel='content']").css({height:"1px",width:"1px"});_content.find("[rel='flash_op']").show()}}};Core.AppFrame=function(url,obj){var _self=this;Core.Frame.call(this,url,obj);var _oldHide=_self.Hide;this.Hide=function(){if(obj.HideCallBack){obj.HideCallBack()}_oldHide()}};Core.Dir=(function(){var IS_115DOMAIN=/115(rc)?\.com/.test(location.href);var WebApi=IS_115DOMAIN?"//webapi.115.com":"/webapi";var checkHasUtil=function(){if(!window.Util){window.Util={}}if(!Util.Validate){Util.Validate={}}if(!Util.Validate.CategoryName){Util.Validate={CategoryName:function(category_name){category_name=category_name.replace(" ","");if(category_name.length<1){return"文件夹名不能为空。"}if(category_name.length>255){return"文件夹名称不能超过255个字。"}return true;var regular=/^[^\\/:*?<>\|\\\\\"]*$/;if(!regular.test(category_name)){return'文件夹名称不能包含下列任意字符之一\n \\ / : * ? "  < > |'}return true}}}};var createNode=function(aid,pid,floderName,callback){checkHasUtil();var r=Util.Validate.CategoryName($.trim(floderName));if(r!==true){if(callback){callback({state:false,message:r})}return}var data={pid:pid,cname:floderName};$.ajax({url:WebApi+"/files/add",type:"POST",dataType:"json",xhrFields:{withCredentials:true},data:data,success:function(result){if(callback){callback(result)}}})};return{Rename:function(aid,cid,oldName,shareId){var editCon=$('<div class="file-rename"><ul><li><a href="javascript:;" class="btn-clear" rel="clear"><s>清空</s></a><div class="rename-new new-editing"><!-- 编辑文本时添加类名 new-editing,编辑时需要js动态调整高度,幅度是30px --><p rel="name_cover"></p><textarea rel="txt"></textarea></div></li><li rel="show_old_name" style="display:none;"><a href="javascript:;" class="btn-origan" rel="old_name_btn" status="1"><span>原文件名</span></a><div class="rename-origan"><p rel="old_name"></p></div></li></ul></div><div class="dialog-action"><div class="left-side"><a href="javascript:;" btn="advance" class="button btn-line btn-large"><span>高级模式</span></a></div><a href="javascript:;" class="dgac-cancel" btn="cancel">取消</a><a href="javascript:;" class="dgac-confirm" btn="confirm">确定</a></div>');var editBox=new Core.DialogBase({title:"重命名文件夹",content:editCon,width:550});editBox.Open();
1var fileName=editCon.find("[rel='txt']"),cover=editCon.find('[rel="name_cover"]'),oldNameWarp=editCon.find('[rel="show_old_name"]'),oldNameBtn=editCon.find('[rel="old_name_btn"]'),oldNameShow=editCon.find('[rel="old_name"]'),clear=editCon.find('[rel="clear"]');fileName.val(oldName);cover.text(oldName);oldNameShow.text(oldName);var renameFolderFun=function(e){var cid=e.data.cid;var data={fid:cid,file_name:editCon.find("[rel='txt']").val(),files_new_name:{}};data.files_new_name[cid]=data.file_name;checkHasUtil();var r=Util.Validate.CategoryName($.trim(data.file_name));if(r!==true){Core.MinMessage.Show({text:r,type:"err",timeout:Core.CONFIG.MsgTimeout,window:editBox});editCon.find("[rel='txt']")[0].focus();return}shareId&&(data.share_id=shareId);UA$.ajax({url:"/files/batch_rename",type:"POST",dataType:"json",data:data,success:function(r){if(r.state){editBox.Close();Core.MinMessage.Show({text:"重命名成功",type:"suc",timeout:Core.CONFIG.MsgTimeout});setTimeout(function(){if(Core.FileConfig.DataAPI){Core.FileConfig.DataAPI.UpdateDir({cid:data.fid,dir_name:data.file_name})}},1000)}else{Core.MinMessage.Show({text:r.error,type:"err",timeout:Core.CONFIG.MsgTimeout,window:editBox});editCon.find("[rel='txt']")[0].focus()}}})};fileName.on("keydown",{aid:aid,cid:cid},function(e){if(e.keyCode==13){renameFolderFun(e)}else{if(e.keyCode==27){editBox.Close()}}oldNameWarp.show()}).on("input",function(){if(!fileName.val()){clear.hide()}else{clear.show()}cover.text(fileName.val())});oldNameBtn.on("click",function(){var status=$(this).attr("status");if(status==1){oldNameWarp.addClass("rename-origan-fold");$(this).attr("status",0)}else{oldNameWarp.removeClass("rename-origan-fold");$(this).attr("status",1)}return false});clear.on("click",function(){fileName.val("");cover.text("");clear.hide();oldNameWarp.show();return false});editCon.find("[btn]").bind("click",{aid:aid,cid:cid},function(e){switch($(this).attr("btn")){case"confirm":renameFolderFun(e);break;case"cancel":editBox.Close();break;case"advance":function getAttr($el){var obj={file_id:$el.attr("file_id")||$el.attr("cate_id"),file_name:$el.attr("title"),file_new_name:$el.attr("title"),file_type:$el.attr("file_type"),ico:$el.attr("ico"),iv:$el.attr("iv")||"",vdi:$el.attr("vdi")||"",path:$el.attr("path")||"",sha1:$el.attr("sha1")||""};if(!obj.ico&&obj.file_type=="0"){obj.ico="folder"}obj.file_category=obj.file_type=="0"?"0":"1";var vidConfig={1:"tp-video-sd",2:"tp-video-hd",3:"tp-video-fhd",4:"tp-video-1080p",5:"tp-video-4k",100:"tp-video-origin"};if(obj.iv==1){obj.ico=obj.ico+" "+(vidConfig[obj.vdi]||"")}return obj}editBox.Close();var getOne=Core.getFileDataApiCheck("getOne");var node=getOne(cid);var data=[];data.push(getAttr(node));Core.ReNameMultiDG.Show(data,function(r){if(r){var updateDir=Core.getFileDataApiCheck("UpdateDir");updateDir({cid:cid,dir_name:r.data[cid]})}else{}});break}return false});fileName.focus();window.setTimeout(function(){fileName.select()},20)},Create:function(aid,cid,callback){if(!callback){callback=function(node){if(Ext.CACHE&&Ext.CACHE.FileMain){Core.MinMessage.Show({text:"新建成功",timeout:2000,type:"suc"});window.setTimeout(function(){Ext.CACHE.FileMain.GotoDir(node.aid,node.cid)},500)}}}var addCon=$('<div class="dialog-input"><input type="text" rel="txt" class="text" /></div><div class="dialog-action"><a href="javascript:;" class="dgac-cancel" btn="cancel">取消</a><a href="javascript:;" class="dgac-confirm" btn="confirm">确定</a></div>');var createBox=new Core.DialogBase({title:"新建文件夹",content:addCon,width:550});createBox.Open(null);var addFolderFun=function(e){var aid=e.data.aid;var cid=e.data.cid;var value=addCon.find("[rel='txt']").val();checkHasUtil();if(top.window.Util.Validate.CategoryName(value)!=true){Core.MinMessage.Show({text:top.window.Util.Validate.CategoryName(value),type:"war",timeout:Core.CONFIG.MsgTimeout});addCon.find("[rel='txt']").focus();return false}createNode(aid,cid,addCon.find("[rel='txt']").val(),function(r){if(r.state){Core.MinMessage.Show({text:"新建成功",type:"suc",timeout:Core.CONFIG.MsgTimeout,window:createBox});callback&&callback(r);createBox.Close()}else{Core.MinMessage.Show({text:r.error,type:"war",timeout:Core.CONFIG.MsgTimeout,window:createBox});addCon.find("[rel='txt']")[0].focus()}})};addCon.find("[rel='txt']").bind("keydown",{aid:aid,cid:cid},function(e){if(e.keyCode==13){Util.Html.StopPropagation(e);addFolderFun(e)}else{if(e.keyCode==27){createBox.Close()}}});addCon.find("[btn]").bind("click",{aid:aid,cid:cid},function(e){switch($(this).attr("btn")){case"confirm":addFolderFun(e);break;case"cancel":createBox.Close();break}return false});addCon.find("[rel='txt']")[0].focus()}}})();Core.FileSelectDG=(function(){var _dirCacheAid,_dirCacheCid,_dirCacheCname,_dirCachePath,_paths,_api=false;var _DG;var IS_115DOMAIN=/115(rc)?\.com/.test(location.href);var SITE_URL=IS_115DOMAIN?"//115.com":"/site";var _model=function(){var _self=this,_cache={disClass:"btn-disabled"};var _content=$('<div><div class="dialog-frame"><iframe src="" frameborder="0" rel="js_iframe" style="height: 100%;"></iframe></div><div class="select-footer" rel="check_save_path_warp" style="display: none;">\n        <div class="path-select">\n            <label class="sel-label" for="js_check_save_file_path" rel="check_save_path_warp"><input type="checkbox" id="js_check_save_file_path" rel="check_save_path" style="display: ;"><span>最近保存路径:<em></em></span></label>\n        </div>\n</div><div class="dialog-action"><div class="left-side">'+(Core.Dir?'<a href="javascript:;"  class="button btn-large btn-line" btn="add_dir"><i class="icon-operate ifo-newdir"></i><span>新建文件夹</span></a> ':"")+'<a href="javascript:;" class="button btn-large btn-line" btn="dir_record"><i class="icon-operate ifo-recently"></i><span>最近移动记录</span></a></div><span id="js_selec_file_check_count" style="float: none;font-size: 14px;padding-right: 25px;text-align: center;line-height: 38px;display:none;">选中0个文件(夹)</span>
1<label for="js_selec_file_check_all" is_all="1" rel="check_all" style="color:#00a8ff;cursor:pointer;font-size:14px;padding-right:20px;line-height:38px;">全选</label> <a href="javascript:;" class="dgac-confirm" btn="confirm">确定</a></div></div>');Core.DialogBase.call(this,{title:"请选择文件",content:_content,width:700});var _frame=_content.find("[rel='js_iframe']");var changeURL=function(aid,cid,opt){var select=0,filter="",nf="",select_dir="",not_select_file="";if(opt){select=opt.select_one?1:0;filter=opt.filter?opt.filter:"";nf=opt.nf?opt.nf:"";max_size=opt.max_size?opt.max_size:"";select_dir=opt.select_dir?1:0;not_select_file=opt.not_select_file?opt.not_select_file:""}_api=false;var url=SITE_URL+"/?ct=file&ac=userfile&ajax=1&select="+select+"&nf="+nf+"&filter="+filter+"&select_dir="+select_dir+"&aid="+aid+"&cid="+cid+"&max_size="+max_size+"&nsf="+not_select_file+"&_t="+new Date().getTime()+(opt&&opt.order?"&o="+opt.order:"");_frame.attr("src","");_frame.attr("src",url)};this.Initial=function(){_self.warp.addClass("file-select");var _tipTop="";if(_cache.showTopTip){_tipTop='<div class="promptbar-caution promptbar-invflow" style="float: left;background: none;padding: 0;font-size: 12px;line-height: 32px;"><p>请遵循<a href="//cdnres.115.com/site/static/plug/public_share/protocol_share.html" target="_blank">服务协议</a>!严禁存储、传播违法违规信息!</p></div>'}var $head=$('<div class="header-side">'+_tipTop+'    <!-- !文件搜索 -->    <div class="search-box" rel="search_box" style="overflow: hidden;">        <form>            <input type="text" rel="search_input"  autocomplete="off" placeholder="搜索文件夹">            <button type="submit"><i>搜索</i></button>        </form>    </div>    <!-- !文件筛选 -->    <div class="search-file-filter" rel="filter_box" style="display: none">        <a href="javascript:;" class="ff-select" rel="tab"><i class="icon-filter if-all"></i><span>全部</span><s></s></a>        <div class="ff-list" style="display: none;" rel="con">            <ul>                <li><a href="javascript:;" val="0"><i class="icon-filter if-all"></i><span>全部</span></a></li>                <li><a href="javascript:;" val="star"><i class="icon-filter if-star"></i><span>星标</span></a></li>                <li><a href="javascript:;" val="4"><i class="icon-filter if-video"></i><span>视频</span></a></li>                <li><a href="javascript:;" val="2"><i class="icon-filter if-photo"></i><span>图片</span></a></li>                <li><a href="javascript:;" val="3"><i class="icon-filter if-music"></i><span>音频</span></a></li>                <li><a href="javascript:;" val="1"><i class="icon-filter if-document"></i><span>文档</span></a></li>                <li><a href="javascript:;" val="6"><i class="icon-filter if-application"></i><span>应用</span></a></li>                <li><a href="javascript:;" val="5"><i class="icon-filter if-archive"></i><span>压缩包</span></a></li>            </ul>        </div>    </div>    <!-- !列表模式 -->    <div class="search-file-mode" rel="view_type_box" style="display: none">        <a href="javascript:;" rel="list" class="button btn-light" ><i class="icon-fsd-list"></i><span>列表</span></a>        <a href="javascript:;" rel="view" class="button btn-light" style="display:none;"><i class="icon-fsd-thumb"></i><span>图标</span></a>    </div></div>');_self.warp.find("[rel=title_box]").append($head);function getApi(){var api=(_frame[0].contentWindow||_frame[0].window);return api&&api.FS_PAGE_API}function checkSetCallback(){var api=getApi();checkSetCallback.timer&&clearTimeout(checkSetCallback.timer);if(api){api.SetCallback(function(type,arg){if(type=="SELECT_DIR"){var path=arg[4][arg[4].length-1];if(path.aid!=-3||path.name!="搜索结果"){$head.find("[rel=search_input]").val("")}if(path.aid!=-3||path.name!="最近移动记录"){_self.warp.find("[btn=confirm]").removeClass("btn-disabled")}}if(type=="CHANGE_TYPE"){$head.find('[rel="filter_box"]').find('[rel="tab"]').html($head.find('[rel="filter_box"]').find('[val="'+arg[0]+'"]').html()+"<s></s>")}if(type=="CHANGE_VIEW"){$head.find("[rel=view_type_box]").find("[rel]").show().filter("[rel="+arg[0]+"]").hide()}});$head.find("[rel=view_type_box]").show().find("[rel]").show().filter("[rel="+api.GetCurrListView()+"]").hide()}else{checkSetCallback.timer=setTimeout(function(){checkSetCallback()},16)}}_frame.on("load",function(){checkSetCallback()});$head.mousedown(function(e){e.stopPropagation()});$head.find("form").on("submit",function(){var api=getApi();if(api){api.Search($head.find("[rel=search_input]").val())}return false});$head.find("[rel=view_type_box]").on("click","[rel]",function(){var rel=$(this).attr("rel");var api=getApi();if(api){api.ChangeListView(rel);$head.find("[rel=view_type_box]").find("[rel]").show();$(this).hide()}return false});Util.DropDown.Bind({Title:$head.find('[rel="filter_box"] [rel="tab"]'),Content:$head.find('[rel="filter_box"] [rel="con"]'),IsOverShow:true});$head.find('[rel="filter_box"] [val]').on("click",function(){var el=$(this);var val=el.attr("val");var api=getApi();if(api){api.ChangeType(val)}$head.find('[rel="filter_box"] [rel="con"]').hide();return false});window.DBLClick_BACK=function(node){_cache.list=[node];_content.find("[btn='confirm']").click()};_self.warp.find('[for="js_selec_file_check_all"]').on("click",function(){if(_api.SelectAll){if($(this).attr("is_all")==1){var arr=_api.SelectAll();_DG&&_DG.ListCheck(_self.warp,arr)}else{_api.CancelSelect();_DG&&_DG.CancelCheck(_self.warp)}}});
1_content.find("[btn]").off("click").on("click",function(){if($(this).is(".btn-disabled")){return false}switch($(this).attr("btn")){case"add_dir":if(_dirCacheAid){Core.Dir.Create(_dirCacheAid,_dirCacheCid,function(r){if(r.state){Core.MinMessage.Show({text:"新建成功",type:"suc",timeout:2000});window.setTimeout(function(){changeURL(_dirCacheAid,r.cid,{select_one:_cache.select_one,filter:_cache.filter,nf:_cache.nf,max_size:_cache.max_size,order:_cache.order||null})},500)}})}break;case"confirm":var $saveFileCheck=_self.warp.find("#js_check_save_file_path");var checkDefaultSaveFilePath=_cache.saveFilePathData&&_cache.saveFilePathData.cid&&$saveFileCheck.prop("checked")&&_cache.select_one;if(_cache.nf){if(_dirCacheAid===false){Core.MinMessage.Show({text:"请等待进入文件夹",timeout:Core.CONFIG.MsgTimeout,window:_self});return}}else{if(!_cache.not_select_file){if(!_cache.list||!_cache.list.length&&!checkDefaultSaveFilePath){Core.MinMessage.Show({text:"请选择文件",timeout:Core.CONFIG.MsgTimeout,window:_self});return}}}switch(_cache.type){case"cover":Core.FileAjax.EditCover(_cache.cover_aid,_cache.cover_cid,_cache.list[0].attr("file_id"),function(r){if(r.state){Core.MinMessage.Show({text:"修改成功",type:"suc",timeout:Core.CONFIG.MsgTimeout});if(Core.FileConfig.DataAPI){Core.FileConfig.DataAPI.EditCover({cate_id:_cache.cover_cid,img_url:r.img_url})}}else{Core.MinMessage.Show({text:r.msg,type:r.errtype||"err",timeout:Core.CONFIG.MsgTimeout})}_self.Close()});break;case"msg":var arr=[];if(_cache.nf){arr.push({aid:_dirCacheAid,cid:_dirCacheCid,cname:_dirCacheCname,path:_dirCachePath})}else{if(_cache.list&&_cache.list.length){for(var i=0,len=_cache.list.length;i<len;i++){var item=_cache.list[i];if(item.attr("file_type")=="1"){arr.push({file_id:item.attr("file_id"),file_size:item.attr("file_size"),file_name:item.find('[field="file_name"]').attr("title"),aid:item.attr("area_id"),cid:item.attr("p_id"),ico:item.attr("ico"),sha1:item.attr("sha1"),pick_code:item.attr("pick_code"),path:item.attr("path")})}else{if(_cache.select_dir){arr.push({aid:item.attr("area_id"),cid:item.attr("cate_id"),cate_name:item.attr("cate_name"),pick_code:item.attr("pick_code"),is_dir:1})}else{arr.push({aid:item.attr("area_id"),cid:item.attr("cate_id")})}}}}else{arr.push({aid:_dirCacheAid,cid:_dirCacheCid,cname:_dirCacheCname,path:_dirCachePath})}}var list=checkDefaultSaveFilePath?[{cid:_cache.saveFilePathData.cid}]:arr;if(arr.length==1&&arr[0].cid=="0"&&(arr[0].cname=="搜索结果"||arr[0].cname=="最近移动记录")){Core.MinMessage.Show({text:"请选择文件夹",timeout:Core.CONFIG.MsgTimeout,window:_self});return}_self.Callback&&_self.Callback(list,false);window.setTimeout(function(){_self.Close()},10);break;default:var list=checkDefaultSaveFilePath?[{cid:_cache.saveFilePathData.cid}]:_cache.list;_self.Callback&&_self.Callback(list,false);window.setTimeout(function(){_self.Close()},10);break}break;case"cancel":_self.Close();break;case"dir_record":var api=getApi();if(api){api.ShowDirRecord()}break}return false});var oldAid=1,oldCid=0;var oldCookie=Util.Cookie.get("SEL_F_DIR");if(_cache.init_cid){oldCid=_cache.init_cid}else{if(oldCookie){var oldArr=oldCookie.split("|");if(oldArr.length==2){oldAid=Number(oldArr[0]);oldCid=Number(oldArr[1])}}}if(_cache.nf){_self.warp.find("[btn='add_dir']").show()}else{_self.warp.find("[btn='add_dir']").hide()}if(_cache.saveFilePathData&&_cache.saveFilePathData.cid){_self.warp.find("[rel=check_save_path_warp]").show();_self.warp.find("[rel=check_save_path_warp] em").text((_cache.saveFilePathData.cid=="0"?"":"/")+_cache.saveFilePathData.file_name)}else{_self.warp.find("[rel=check_save_path_warp]").hide()}var copyInput=_self.warp.find("input[rel='copy']");copyInput.prop("checked",false);if(_cache.show_copy){_self.warp.find("[rel='copy']").show()}else{_self.warp.find("[rel='copy']").hide()}if(_cache.nf||_cache.filter){$head.find('[rel="filter_box"]').hide()}else{$head.find('[rel="filter_box"]').show()}changeURL(oldAid,oldCid,{select_one:_cache.select_one,filter:_cache.filter,nf:_cache.nf,max_size:_cache.max_size,select_dir:_cache.select_dir,not_select_file:_cache.not_select_file,order:_cache.order||null})};this.Setting=function(obj){_cache.saveFilePathData=obj.saveFilePathData;_cache.init_cid=obj.init_cid;_cache.list=false;_cache.users=obj.users;_cache.type=obj.type;_cache.cover_cid=obj.cover_cid;_cache.cover_aid=obj.cover_aid;_cache.hide_aids=obj.hide_aids;_cache.select_one=obj.select_one;_cache.filter=obj.filter;_cache.nf=obj.nf;_cache.max_size=obj.max_size;_cache.select_dir=obj.select_dir;_cache.show_copy=obj.show_copy;_cache.show_record=obj.show_record;_cache.is_talk=obj.is_talk;_cache.qcid=obj.qcid;_cache.btn_txt=obj.btn_txt;_cache.select_txt=obj.select_txt;_cache.title=obj.title;
1_cache.showTopTip=obj.showTopTip;_cache.not_select_file=obj.not_select_file;if(obj.order){_cache.order=obj.order}};var _closeEvent=_self.Close;this.Close=function(){_frame.attr("src","");_closeEvent();_self.Callback=false};var _openEvent=_self.Open;this.ListCheck=function(_content,arr){var $this=_self.warp.find('[for="js_selec_file_check_all"]');var $count=_content.find("#js_selec_file_check_count");var maxCount=$this.attr("total")*1;var ma=0;for(var i=0;i<arr.length;i++){var item=arr[i];if(item.attr("file_id")&&item.attr("file_id")!=0){ma++}}$count.text("已选中"+arr.length+"个文件"+(ma<arr.length?"(夹)":""));if(arr.length){$count.show();if(arr.length>=maxCount){$this.text("全不选");$this.removeAttr("is_all")}else{$this.text("全选");$this.attr("is_all",1)}}else{$count.hide();$this.text("全选");$this.attr("is_all",1)}};this.CancelCheck=function(_content){_content.find('[for="js_selec_file_check_all"]').attr("is_all",1).text("全选");_content.find("#js_selec_file_check_count").hide().text("已选中0个文件(夹)")};this.Open=function(){_dirCacheAid=false;_dirCacheCid=false;_openEvent();if(_cache.nf){_self.warp.find('[rel="base_title"]').html("打开要"+_cache.select_txt+"的目标文件夹");_self.warp.find('[btn="confirm"]').html(_cache.btn_txt)}else{_self.warp.find('[rel="base_title"]').html("请选择文件");_self.warp.find('[btn="confirm"]').html("确定")}if(_cache.title){_self.warp.find('[rel="base_title"]').html(_cache.title)}if(_cache.select_one||_cache.nf){_self.warp.find("[rel='check_all']").hide()}else{_self.warp.find("[rel='check_all']").show()}if(_cache.show_record){_self.warp.find("[btn='dir_record']").show()}else{_self.warp.find("[btn='dir_record']").hide()}};this.Set=function(arr){_cache.list=arr;this.ListCheck(_self.warp,arr)};this.Callback=false};return{OpenByMsg:function(callback,opt){if(!_DG){_DG=new _model()}var setting={type:"msg"};if(opt){setting.select=opt.select?1:0;setting.filter=opt.filter?opt.filter:"";setting.select_dir=opt.select_dir?1:0}_DG.Setting(setting);_DG.Open();_DG.Callback=callback},Open:function(callback,opt){if(!_DG){_DG=new _model()}var setting={type:"msg"};if(opt){setting.select=opt.select?1:0;setting.filter=opt.filter?opt.filter:"";setting.nf=opt.nf?opt.nf:"";setting.max_size=opt.max_size?opt.max_size:"";setting.select_dir=opt.select_dir?1:0;setting.select_one=opt.select_one?1:0;setting.saveFilePathData=opt.saveFilePathData;setting.init_cid=opt.init_cid||"";setting.btn_txt=opt.btn_txt?opt.btn_txt:"移动到这里";setting.select_txt=opt.select_txt?opt.select_txt:"移动";setting.title=opt.title?opt.title:"";setting.not_select_file=opt.not_select_file?opt.not_select_file:"";if(opt.order){setting.order=opt.order}setting.show_copy=opt.show_copy;setting.show_record=opt.show_record;setting.showTopTip=opt.showTopTip||0}_DG.Setting(setting);_DG.Open();try{_DG.CancelCheck(_DG.warp)}catch(e){}_DG.Callback=callback;return _DG},Show:function(users,callback){if(!_DG){_DG=new _model()}_DG.Setting({users:users,type:"send"});_DG.Open();_DG.Callback=callback},EditCover:function(aid,cid){if(!_DG){_DG=new _model()}var setting={type:"cover",select:1,filter:2,cover_aid:aid,cover_cid:cid};if(Number(aid)!=999){Util.Cookie.set("SEL_F_DIR",aid+"|"+cid,24)}_DG.Setting(setting);_DG.Open()},Select:function(arr){if(_DG){_DG.Set(arr)}},MarkDir:function(aid,cid){if(Number(aid)!=999){Util.Cookie.set("SEL_F_DIR",aid+"|"+cid,24)}},SelectDir:function(aid,cid,cname,path){_dirCacheAid=aid;_dirCacheCid=cid;_dirCacheCname=cname;_dirCachePath=path;if(_DG){_DG.CancelCheck(_DG.warp)}},BackPaths:function(paths){_paths=paths},MainAPI:function(api){_api=api;if(_DG){_DG.CancelCheck(_DG.warp)}},GetBackPaths:function(){return _paths},Close:function(){if(_DG){_DG.Close()}}}})();Core.QFileSelectDG=(function(){var _dirCacheCid,_dirCacheCname,_dirCachePath,_paths,_api=false,_qid;var _model=function(){var _self=this,_cache={disClass:"btn-disabled"};var _content=$('<div><div class="dialog-frame"><iframe src="" frameborder="0" rel="js_iframe"></iframe></div><div class="dialog-bottom"><div class="con"><input type="checkbox" id="js_selec_qfile_check_all" rel="check_all"><label for="js_selec_qfile_check_all" rel="check_all">全选</label> <a href="javascript:;" class="button" btn="confirm">确定</a></div></div></div>');Core.DialogBase.call(this,{title:"请选择圈子文件",content:_content});var _frame=_content.find("[rel='js_iframe']");var changeURL=function(cid,opt){var select=0,filter="",nf="",select_dir="",not_select_file="";if(opt){select=opt.select_one?1:0;filter=opt.filter?opt.filter:"";nf=opt.nf?opt.nf:"";select_dir=opt.select_dir?1:0;not_select_file=opt.not_select_file?opt.not_select_file:""}
1_api=false;var url=Core.CONFIG.Path.G+"/"+_qid+"/space?is_sel=1&select="+select+"&nf="+nf+"&filter="+filter+"&select_dir="+select_dir+"&cid="+cid+"&nsf="+not_select_file+"&_t="+new Date().getTime();_frame.attr("src","");_frame.attr("src",url)};this.Initial=function(){_self.warp.addClass("file-select");window.DBLClick_BACK_Q=function(node){_cache.list=[node];_content.find("[btn='confirm']").click()};_self.warp.find("[rel='check_all']").on("click",function(){if(_api.SelectAll){$(this).attr("checked")?_api.SelectAll():_api.CancelSelect()}});_content.find("[btn]").off("click").on("click",function(){switch($(this).attr("btn")){case"confirm":if(_cache.nf){if(_dirCacheCid===false){Core.MinMessage.Show({text:"请等待进入文件夹",timeout:Core.CONFIG.MsgTimeout,window:_self});return}}else{if(!_cache.not_select_file){if(!_cache.list||!_cache.list.length){Core.MinMessage.Show({text:"请选择圈子文件",timeout:Core.CONFIG.MsgTimeout,window:_self});return}}}var arr=[];if(_cache.nf){arr.push({cid:_dirCacheCid,cname:_dirCacheCname,path:_dirCachePath})}else{if(_cache.list&&_cache.list.length){for(var i=0,len=_cache.list.length;i<len;i++){var item=_cache.list[i];if(item.attr("file_type")=="1"){arr.push({file_id:item.attr("file_id"),file_size:item.attr("file_size"),file_name:item.find('[field="file_name"]').attr("title"),cid:item.attr("p_id"),ico:item.attr("ico"),sha1:item.attr("sha1"),pick_code:item.attr("pick_code"),path:item.attr("path")})}else{if(_cache.select_dir){arr.push({cid:item.attr("cate_id"),cate_name:item.attr("cate_name"),pick_code:item.attr("pick_code"),is_dir:1})}else{arr.push({cid:item.attr("cate_id")})}}}}else{arr.push({cid:_dirCacheCid,cname:_dirCacheCname,path:_dirCachePath})}}_self.Callback&&_self.Callback(arr,false);window.setTimeout(function(){_self.Close()},10);break;case"cancel":_self.Close();break}return false});var oldCid=0;var oldCookie=Util.Cookie.get("SEL_QF_DIR");if(oldCookie){oldCid=Number(oldCookie)}if(_cache.nf){_self.warp.find("[btn='add_dir']").show()}else{_self.warp.find("[btn='add_dir']").hide()}changeURL(oldCid,{select_one:_cache.select_one,filter:_cache.filter,nf:_cache.nf,select_dir:_cache.select_dir,not_select_file:_cache.not_select_file})};this.Setting=function(obj){_cache.list=false;_cache.select_one=obj.select;_cache.filter=obj.filter;_cache.nf=obj.nf;_cache.select_dir=obj.select_dir;_cache.btn_txt=obj.btn_txt;_cache.select_txt=obj.select_txt;_cache.title=obj.title;_cache.not_select_file=obj.not_select_file};var _closeEvent=_self.Close;this.Close=function(){_frame.attr("src","");_closeEvent();_self.Callback=false};var _openEvent=_self.Open;this.CancelCheck=function(){_content.find("#js_selec_qfile_check_all").attr("checked",false)};this.Open=function(){_dirCacheCid=false;_openEvent();if(_cache.nf){_self.warp.find('[rel="base_title"]').html("打开要"+_cache.select_txt+"的目标文件夹");_self.warp.find('[btn="confirm"]').html(_cache.btn_txt);_self.warp.find("[rel='check_all']").hide()}else{_self.warp.find("[rel='check_all']").show();_self.warp.find('[rel="base_title"]').html("请选择圈子文件");_self.warp.find('[btn="confirm"]').html("确定")}if(_cache.title){_self.warp.find('[rel="base_title"]').html(_cache.title)}if(_cache.select_one){_self.warp.find("[rel='check_all']").hide()}else{_self.warp.find("[rel='check_all']").show()}};this.Set=function(arr){_cache.list=arr};this.Callback=false};var _DG;return{Open:function(qid,callback,opt){_qid=qid;if(!_DG){_DG=new _model()}var setting={};if(opt){setting.select=opt.select?1:0;setting.filter=opt.filter?opt.filter:"";setting.nf=opt.nf?opt.nf:"";setting.select_dir=opt.select_dir?1:0;setting.btn_txt=opt.btn_txt?opt.btn_txt:"移动到这里";setting.select_txt=opt.select_txt?opt.select_txt:"移动";setting.title=opt.title?opt.title:"";setting.not_select_file=opt.not_select_file?opt.not_select_file:""}_DG.Setting(setting);_DG.Open();_DG.Callback=callback},Select:function(arr){if(_DG){_DG.Set(arr)}},MarkDir:function(cid){Util.Cookie.set("SEL_QF_DIR",cid,24)},SelectDir:function(cid,cname,path){_dirCacheCid=cid;_dirCacheCname=cname;_dirCachePath=path;if(_DG){_DG.CancelCheck()}},BackPaths:function(paths){_paths=paths},MainAPI:function(api){_api=api;if(_DG){_DG.warp.find("input[rel='check_all']").attr("checked",false)}},GetBackPaths:function(){return _paths},Close:function(){if(_DG){_DG.Close()}}}})();Core.FriendDG=(function(){return{Add:function(){Core.FrameDG.Open(Core.CONFIG.Path.My+"/?ct=friend&ac=search&v=2.0",{title:"添加老乡",height:90,ready:function(win){win.SET_HEIGHT=function(h){Core.FrameDG.Reset(false,h)}}})}}})();Core.FileResultDG=(function(){var _model;var showBtn=function(opt){var gotoBtn=_model.warp.find("[btn='goto']");if(opt.aid){gotoBtn.show();if(opt.cid==undefined){opt.cid=0}gotoBtn.off("click").on("click",function(){if(window.PageCTL&&window.location.host==document.domain){PageCTL.GOTO(opt.aid,opt.cid);window.setTimeout(function(){_model.Close();Core.OnlyFrame.Close()},1);return false}else{$(this).attr("href",PAGE_PATHS.U+"?ac=goto_dir&aid="+opt.aid+"&cid="+opt.cid).attr("target","_blank");
1window.setTimeout(function(){_model.Close();Core.OnlyFrame.Close()},1);return true}});window.setTimeout(function(){gotoBtn.focus();Core.FileConfig&&Core.FileConfig.DataAPI&&Core.FileConfig.DataAPI.Reload(opt.aid,opt.cid)},800)}else{gotoBtn.hide();if(opt.is_msg){var key="API_GET_MSG_ID_"+new Date().getTime();$.getScript(PAGE_PATHS.U+"/?ct=msg&ac=get_id&js_return="+key,function(){var r=window[key];if(r){opt.aid=1;opt.cid=r.cid;showBtn(opt)}})}}};return{Show:function(list,opt){if(!_model){var _content=$('<dl class="file-copy" rel="con"></dl><div class="dialog-bottom"><div class="con"><a href="javascript:;" class="button" btn="goto" style="display:none;">打开文件目录</a></div></div>');_model=new Core.DialogBase({title:"结果",content:_content})}if(!opt){opt={}}if(!opt.name){opt.name="file_name"}if(!opt.msg){opt.msg="msg"}_model.Open(function(){var closeBtn=_model.warp.find("[btn='close_btn']");closeBtn.off("click").on("click",function(){_model.Close();return false});var html=[];for(var k in list){var item=list[k];var fileName=item[opt.name];var result=item.state?"<em>成功</em>":item[opt.msg];html.push("<dd "+(!item.state?'class="err" title="'+item[opt.msg]+'"':"")+'><ul><li class="file-name" style="width:310px;">'+fileName+'</li><li class="file-rate" style="width:170px;">'+result+"</li></ul></dd>")}_model.warp.find("[rel='con']").html('<dt><ul><li class="file-name" style="width:310px;">文件名</li><li class="file-rate" style="width:170px;">操作结果</li></ul></dt>'+html.join(""));_model.warp.find("[btn='cancel']").off("click").on("click",function(){_model.Close();return false});showBtn(opt)})}}})();Core.TreeWin=(function(){return{Show:function(callback){Core.FileSelectDG.Open(function(list){if(list.length){var item=list[0];var aid=item.aid,cid=item.cid;callback&&callback(aid,cid)}},{select:1,nf:1,btn_txt:"接收到这里",select_txt:"接收"})},Hide:function(){Core.FileSelectDG.Close()}}})();Core.TreeDG=(function(){var _cache={};var _pro_local_key="__MOVE_PRO_ID_"+(window.USER_ID||window.user_id)+"_";function createProId(){if(!_cache.pro_key){_cache.pro_key=~(100*Math.random());_cache.pro_index=0}return(+new Date())+"_"+_cache.pro_key+"_"+_cache.pro_index++}function showDoing(type,progress){if(!showDoing.$hint){showDoing.$hint=top.$('<div class="btn-hint-wrap" style="display: none;">\n        <a href="javascript:;" class="button btn-hint-load"><i class="icon-load"></i><span>正在移动文件,请稍后…</span></a>\n    </div>');showDoing.$hint.appendTo(top.document.body)}showDoing.timer&&clearTimeout(showDoing.timer);showDoing.$hint.show();if(type=="success"){showDoing.$hint.html('<a href="javascript:;" class="button btn-hint-suc"><i class="icon-suc"></i><span>文件移动成功</span></a>');showDoing.timer=setTimeout(function(){stop()},2000)}else{showDoing.$hint.html('<a href="javascript:;" class="button btn-hint-load"><i class="icon-load"></i><span>'+(progress!=-1&&(new Date-_cache.pro_id_time>2000)?"正在移动"+progress+"%":"正在移动文件,请稍后...")+"</span></a>")}}function stop(){localStorage.removeItem(_pro_local_key);showDoing.$hint&&showDoing.$hint.hide()}function start(pro_id,aid,cid){if(!pro_id){try{pro_id=localStorage.getItem(_pro_local_key);if(!pro_id){return}pro_id=JSON.parse(pro_id);_cache.pro_id_time=pro_id.time;_cache.pro_id_aid=pro_id.aid;_cache.pro_id_cid=pro_id.cid;pro_id=pro_id.pro_id}catch(e){}}else{_cache.pro_id_time=+new Date;_cache.pro_id_aid=aid;_cache.pro_id_cid=cid;localStorage.setItem(_pro_local_key,JSON.stringify({time:_cache.pro_id_time,aid:aid,cid:cid,pro_id:pro_id}))}wait(pro_id)}function wait(pro_id){wait.timer&&clearTimeout(wait.timer);$.ajax({url:"//webapi.115.com/files/move_progress",data:{move_proid:pro_id},xhrFields:{withCredentials:true},dataType:"json",success:function(json){if(json.state){if(json.progress==100){if(Core.FileConfig.DataAPI){if(Core.FileConfig.aid==_cache.pro_id_aid&&Core.FileConfig.cid==_cache.pro_id_cid){Core.FileConfig.DataAPI.Reload(Core.FileConfig.aid,Core.FileConfig.cid)}}showDoing("success");localStorage.removeItem(_pro_local_key)}else{showDoing("doing",json.progress);wait.timer=setTimeout(function(){wait(pro_id)},500)}}else{if(json.errno=="990003"){}else{Core.MinMessage.Show({text:json.error,type:"err",timeout:Core.CONFIG.MsgTimeout})}stop()}},error:function(){Core.MinMessage.Show({text:"网络异常请刷新重试",type:"err",timeout:Core.CONFIG.MsgTimeout});stop()}})}start();
1return{Show:function(obj){if(!obj.list||!obj.list.length){Core.MinMessage.Show({text:"请选择文件",timeout:Core.CONFIG.MsgTimeout});return}_cache.setting=obj;var type=_cache.setting.type;var arr=obj.list;var isDir=obj.has_dir;var tid=[];var dir=[];for(var i=0,len=arr.length;i<len;i++){if(arr[i].attr("file_type")=="1"){tid.push(arr[i].attr("file_id"))}else{dir.push(arr[i].attr("cate_id"))}}_cache.list=tid;_cache.dir_list=dir;_cache.doms=arr;Core.FileSelectDG.Open(function(list,is_copy){if(list.length){var item=list[0];var aid=item.aid,cid=item.cid;_cache.aid=aid;_cache.cid=cid;if(is_copy==undefined){is_copy=false}_cache.is_copy=is_copy;var data={pid:_cache.cid};if(_cache.is_copy){data.copy=1}else{data.move_proid=createProId()}var ind=0;for(var i=0,len=_cache.list.length;i<len;i++){data["fid["+ind+"]"]=_cache.list[i];ind++}for(var i=0,len=_cache.dir_list.length;i<len;i++){data["fid["+ind+"]"]=_cache.dir_list[i];ind++}if(isDir){var paths=Core.FileSelectDG.GetBackPaths();if(paths){var res=true;for(var i=0,len=paths.length;i<len;i++){var item=paths[i];for(var j=0,jlen=_cache.doms.length;j<jlen;j++){var node=_cache.doms[j];if(node.attr("file_type")=="0"){var form_aid=node.attr("area_id");var form_cid=node.attr("cate_id");if(Number(form_aid)==Number(item.aid)&&form_cid==item.cid){res=false}}}}if(!res){Core.MinMessage.Show({text:"文件夹不能移动到子目录里",type:"war",timeout:Core.CONFIG.MsgTimeout});return false}}}if(!_cache.is_copy){showDoing("loading",-1)}UA$.ajax({url:"/files/move",type:"POST",data:data,dataType:"json",success:function(r){if(r.state){if(!_cache.is_copy){try{setTimeout(function(){start(data.move_proid,Core.FileConfig.aid,Core.FileConfig.cid)},200);if(obj.callback){obj.callback()}else{if(Core.FileConfig.DataAPI){Core.FileConfig.DataAPI.Reload(Core.FileConfig.aid,Core.FileConfig.cid)}}}catch(e){}}else{try{if(obj.callback){obj.callback()}else{if(Core.FileConfig.DataAPI){Core.FileConfig.DataAPI.Reload(Core.FileConfig.aid,Core.FileConfig.cid)}}window.setTimeout(function(){Core.MinMessage.Show({text:"成功复制文件",type:"suc",timeout:Core.CONFIG.MsgTimeout})},500)}catch(e){}}_cache.setting.callback&&_cache.setting.callback(r)}else{stop();Core.MinMessage.Show({text:r.error,type:"err",timeout:Core.CONFIG.MsgTimeout})}}})}},{select:1,nf:1,show_record:type=="move"?1:0,show_copy:!isDir?1:0})}}})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.