⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsx.js

📁 加密算法,基于MVC模式开发的!希望大家指正
💻 JS
📖 第 1 页 / 共 5 页
字号:
if(window["jsx3"]==null)window["jsx3"]=new window.Object();if(jsx3.lang==null)jsx3.lang=new window.Object();jsx3.lang.Class=jsx3.lang.jK();jsx3.lang.Class.prototype=new jsx3.lang.Object();jsx3.lang.Class.prototype.__jsxclass__=jsx3.lang.Class;window._jsxho=function(o,j){o.fz={};o.fz["jsx3.lang.Object"]=1;o.fz["jsx3.lang.Method"]=1;o.fz["jsx3.lang.Class"]=2;o.hl=["toString","valueOf"];o.AD=["constructor","prototype","jsxclass","__jsxclass__"];o.gr=null;o.defineClass=function(e,n,s,m){this.Sd(e,n,s,m,false);};o.defineInterface=function(m,e,c){this.Sd(m,e,null,c,true);};o.Sd=function(i,r,k,c,b){if(o.gr==null&&o.forName&&o.forName("jsx3.util.Logger.Manager")&&jsx3.util.Logger.Manager.getManager())o.gr=jsx3.util.Logger.getLogger("jsx3.lang.Class");var vc=i.split(".");var Bc=vc.pop();var P=this.I8(vc);var fb=this.fz[i]!=null;var db=null;if(r==null){db=b||i=="jsx3.lang.Object"?window.Object:jsx3.lang.Object;}else{if(r instanceof o){db=r.getConstructor();}else{if(typeof(r)=="function"&&r.prototype!=null){db=r;}else{o.NC("bad objExtends argument: "+r);}}}var nc=false;if(!fb){if(db.jsxclass!=null){if(b&&!db.jsxclass.isInterface())o.NC("interface may not extend a class "+db.jsxclass);if(!b&&db.jsxclass.isInterface())o.NC("class may not extend an interface "+db.jsxclass);}if(typeof(P[Bc])=="function"){nc=true;}else{if(b){P[Bc]=jsx3.lang.jK();}else{if(typeof(P[Bc])=="object"){var B=P[Bc];P[Bc]=jsx3.lang.NI();for(var cb in B)P[Bc][cb]=B[cb];}else{P[Bc]=jsx3.lang.NI();}}}P[Bc].prototype=this.hG(db,b);P[Bc].prototype.__jsxclass__=P[Bc];}var zc=P[Bc];if(vc.join(".")=="jsx3.lang")jsx3[Bc]=zc;var Dc=o.B8(o);Dc.Ok=i;Dc.ex=zc;if(db!=null)Dc.Cw=db.jsxclass;Dc.Iq=b;Dc.dd=[];Dc.Ee=[];Dc.Bw=[];Dc.Cd=[];Dc.pw=[];Dc.Gy={};Dc.oE={};if(zc.jsxclass!=null)o.NC("attempt to redefine class "+i);zc.jsxclass=Dc;try{c(zc,zc.prototype);}catch(Kc){var lb=jsx3.NativeError?jsx3.NativeError.wrap(Kc):null;o.NC("Error defining class "+i+": "+Kc.description,lb);}for(var cb in zc){if(o.AD.indexOf(cb)>=0)continue;if(typeof(zc[cb])=="function"){this.GB(zc[cb],Dc,cb,true);}else{Dc.Cd.push(cb);}}for(var Cb=0;Cb<o.hl.length;Cb++){var Db=o.hl[Cb];if(zc[Db]!=null&&zc[Db]!=window.Function.prototype[Db]&&zc[Db].jsxmethod==null)this.GB(zc[Db],Dc,Db,true);}for(var cb in zc.prototype){if(o.AD.indexOf(cb)>=0)continue;var yb=zc.prototype[cb];if(typeof(yb)=="function"){if(db==null||yb!=db.prototype[cb])this.GB(yb,Dc,cb,false);}else{Dc.pw.push(cb);}}for(var Cb=0;Cb<o.hl.length;Cb++){var Db=o.hl[Cb];if(zc.prototype[Db]!=null&&zc.prototype[Db]!=window.Object.prototype[Db]&&zc.prototype[Db].jsxmethod==null)this.GB(zc.prototype[Db],Dc,Db,false);}if(!nc&&!b&&!(typeof(zc.prototype.init)=="function"))o.NC("class "+i+" does not define an init() method");if(k instanceof Array){for(var Cb=k.length-1;Cb>=0;Cb--)o.Ct(Dc,zc,k[Cb]);}if(o.gr)o.gr.trace("loaded "+i);jsx3.CLASS_LOADER.XV(Dc);};o.Ct=function(c,r,p){if(typeof(p)=="function"&&p.jsxclass!=null)p=p.jsxclass;else{if(!(p instanceof o))o.NC("Invalid interface argument while defining "+c.getName()+": "+p);}if(!p.isInterface())o.NC("Class "+c.getName()+" may not implement class "+p+".");var Ib=p.getConstructor().prototype;for(var _b in Ib){var tc=typeof(Ib[_b])=="function"?Ib[_b].jsxmethod:null;if(tc==null)continue;var A=r.prototype[_b];if(A==null){r.prototype[_b]=tc.getFunction();}else{if(!A.jsxmethod.getDeclaringClass().equals(c)){r.prototype[_b]=tc.getFunction();}}}c.dd.unshift(p);};o.I8=function(g){var Ib=window;for(var Vb=0;Vb<g.length;Vb++){var Eb=g[Vb];if(Ib[Eb]==null)Ib[Eb]=new window.Object();Ib=Ib[Eb];}return Ib;};o.GB=function(p,c,h,d){if(p.jsxmethod instanceof jsx3.lang.Method){if(p.jsxmethod.getDeclaringClass().equals(c))o.NC("attempt to re-bless method "+p.jsxmethod+" as "+c+"."+h);else return;}var jc=o.B8(jsx3.lang.Method);jc._function=p;jc.Ph=c;jc.Ok=h;jc.SC=d;jc.te=p.te;p.jsxmethod=jc;if(d)c.Ee.push(jc);else c.Bw.push(jc);};o.hG=function(h,e){if(h==Object)return {};return new h(e?jsx3.lang.zU:jsx3.lang.vV);};o.B8=function(d){return new d(jsx3.lang.zU);};o.NC=function(d,n){if(o.gr)o.gr.fatal(d,n);else window.alert(d);};};window._jsxho(jsx3.lang.Class,jsx3.lang.Class.prototype);window._jsxho=null;jsx3.lang.Class.defineClass("jsx3.lang.Class",null,null,function(n,k){n.forName=function(q){var Wb=q.split(/\./g);var y=window;var _;for(var Yb=0;Yb<Wb.length;Yb++){var C=Wb[Yb];if(!C)return null;_=typeof(y);if(_=="object"||_=="function"){y=y[C];}else{return null;}}_=typeof(y);return _=="object"||_=="function"?y.jsxclass:null;};k.getName=function(){return this.Ok;};k.getPackage=function(){var qc=this.Ok;while(true){var Ub=qc.lastIndexOf(".");if(Ub<0)break;qc=qc.substring(0,Ub);var wb=jsx3.lang.Package.forName(qc);if(wb!=null)return wb;if(n.forName(qc)==null)break;}return null;};k.getPackageName=function(){var Sb=this.getPackage();if(Sb){return Sb.getName();}else{var zb=this.Ok.lastIndexOf(".")+1;return zb>=0?this.Ok.substring(0,zb-1):"";}};k.getConstructor=function(){if(this.ex!=null)return this.ex;try{return jsx3.eval(this.Ok);}catch(Kc){}return null;};k.getSuperClass=function(){return this.Cw;};k.isInterface=function(){return this.Iq;};k.toString=function(){return this.Ok;};k.newInstance=function(p){if(arguments.length>10)throw new jsx3.Exception("method jsx3.lang.Class.newInstance() does not support passing more than 10 arguments to the class constructor");var lb=arguments;var mc=this.getConstructor();return new mc(lb[0],lb[1],lb[2],lb[3],lb[4],lb[5],lb[6],lb[7],lb[8],lb[9]);};k.isInstance=function(q){var x=q.__jsxclass__.jsxclass;return x!=null&&this.isAssignableFrom(x);};k.isAssignableFrom=function(g){if(this.equals(g))return true;if(g.el==null)g.hA();return g.el[this.getName()]==true;};k.hA=function(){this.el={};for(var hb=0;hb<this.dd.length;hb++){var kb=this.dd[hb];this.el[kb.getName()]=true;if(kb.el==null)kb.hA();for(var wc in kb.el)this.el[wc]=true;}if(this.Cw!=null){this.el[this.Cw.getName()]=true;if(this.Cw.el==null)this.Cw.hA();for(var wc in this.Cw.el)this.el[wc]=true;}};k.mixin=function(d,g){for(var Lb=0;Lb<this.Bw.length;Lb++){var Y=this.Bw[Lb];if(d[Y.getName()]==null||!g)d[Y.getName()]=Y.getFunction();}};k.bless=function(g){if(this.isInterface())throw new jsx3.Exception("may not call bless() on an interface: "+this);var Jb=n.hG(this.getConstructor());if(g!=null){for(var Mc in g){if(!(typeof(g[Mc])=="function"))Jb[Mc]=g[Mc];}}return Jb;};k.newInnerClass=function(a){if(this.isInterface()){return n.B8(this.getConstructor());}else{if(arguments.length>10)throw new jsx3.Exception("method jsx3.lang.Class.newInnerClass() does not support passing more than 10 arguments to the class constructor");var gc=arguments;var bc=this.getConstructor();return new bc(gc[0],gc[1],gc[2],gc[3],gc[4],gc[5],gc[6],gc[7],gc[8],gc[9]);}};k.getStaticMethods=function(){return this.Ee.clone();};k.getInstanceMethods=function(){return this.Bw.clone();};k.getStaticMethod=function(i){for(var Lc=0;Lc<this.Ee.length;Lc++){if(i==this.Ee[Lc].getName())return this.Ee[Lc];}return null;};k.getInstanceMethod=function(d){for(var dc=0;dc<this.Bw.length;dc++){if(d==this.Bw[dc].getName())return this.Bw[dc];}return null;};k.getGetter=function(d){d=d.charAt(0).toUpperCase()+d.substring(1);return this.to("get"+d)||this.to("is"+d);};k.getSetter=function(e){e=e.charAt(0).toUpperCase()+e.substring(1);return this.to("set"+e);};k.getStaticFieldNames=function(){return this.Cd.clone();};k.getInstanceFieldNames=function(){return this.pw.clone();};k.getInterfaces=function(){return this.dd.clone();};k.addInterface=function(m){if(this.isInterface())throw new jsx3.Exception("Interface "+this+" cannot implement interface "+m+".");if(!m.isInterface())throw new jsx3.Exception("Class "+this+" cannot implement class "+m+".");if(this.dd.indexOf(m)>=0)throw new jsx3.Exception("Class "+this+" already implements interface "+m+".");n.Ct(this,this.getConstructor(),m);delete this.el;};k.getInheritance=function(){var K=[];K.pushAll(this.dd);if(this.Cw!=null){K.push(this.Cw);K.pushAll(this.Cw.getInheritance());}return K;};k.getClasses=function(){var kb=this.getConstructor();var U=[];for(var oc in kb){if(typeof(kb[oc])=="function"&&kb[oc].jsxclass instanceof n){U.push(kb[oc].jsxclass);U.pushAll(kb[oc].jsxclass.getClasses());}}return U;};k.to=function(g,j){var eb=null;if(!j)eb=this.getInstanceMethod(g);var Vb=this.getInheritance();for(var y=0;eb==null&&y<Vb.length;y++){eb=Vb[y].getInstanceMethod(g);}return eb;};k.Vh=function(i,l){var K=null;if(!l)K=this.getInstanceMethod(i);if(K==null&&this.Cw!=null)K=this.Cw.Vh(i);return K;};k.sv=function(q){var tb=null;for(var Cc=0;Cc<this.dd.length&&tb==null;Cc++)tb=this.dd[Cc].getInstanceMethod(q);if(tb==null&&this.Cw!=null)tb=this.Cw.sv(q);return tb;};k.WM=function(s){var rb=s.getName();var Kc=this.Gy["m:"+rb];if(typeof(Kc)=="undefined"){this.Gy["m:"+rb]=Kc=this.Vh(rb,true);}return Kc;};k.t6=function(l){var Xb=l.getName();var Zb=this.oE["m:"+Xb];if(typeof(Zb)=="undefined"){this.oE["m:"+Xb]=Zb=this.sv(Xb);}return Zb;};});jsx3.lang.Class.defineClass("jsx3.lang.Object",null,null,function(){});jsx3.lang.Class.defineClass("jsx3.lang.Method",null,null,function(){});jsx3.lang.Class.defineClass("jsx3.lang.ClassLoader",null,null,function(){});jsx3.lang.Class.jsxclass.Cw=jsx3.lang.Object.jsxclass;jsx3.Class.defineClass("jsx3.lang.Exception",null,null,function(n,o){var xc=jsx3.lang.Method;n.Ny=false;n.RN=null;o.init=function(f,l){n.RN=this;this.Sm=f;this.Yq=l;this.Bi=[];this.ZB();if(n.Ny&&window.onerror==null)window.alert(f+this.printStackTrace());};o.toString=function(){return this.Sm;};o.getMessage=function(){return this.Sm;};o.getCause=function(){return this.Yq;};o.getStack=function(){return this.Bi;};n.Io=[jsx3.Object.jsxclass.getInstanceMethod("jsxsuper"),jsx3.Object.jsxclass.getInstanceMethod("jsxsupermix"),jsx3.Object.jsxclass.getInstanceMethod("__noSuchMethod__")];n.formatStack=function(k){var Ic="";for(var oc=0;oc<k.length;oc++){var yb=k[oc];if(yb==null)continue;if(yb.jsxmethod instanceof xc){var wb=k[oc+1];if(wb!=null&&n.Io.indexOf(wb.jsxmethod)>=0){if(yb==xc.prototype.apply)continue;}if(n.Io.indexOf(yb.jsxmethod)>=0)continue;if(Ic.length>0)Ic=Ic+"\n";Ic=Ic+"    at ";Ic=Ic+yb.jsxmethod.getDeclaringClass().getName();Ic=Ic+(yb.jsxmethod.isStatic()?"#":".");Ic=Ic+(yb.jsxmethod.getName()+"()");}else{if(Ic.length>0)Ic=Ic+"\n";Ic=Ic+"    at ";if(yb.jsxclass instanceof jsx3.lang.Class){Ic=Ic+(yb.jsxclass.getName()+"()");}else{var Y=yb.toString();if(Y.match(new RegExp("^function(\\s+\\w+)?\\s*\\(([^\\)]*)\\)\\s*{"))){var rb=RegExp.$1||"anonymous";var Kb=RegExp.$2;var V=RegExp.rightContext;V=V.trim().replace(/\s+/g," ").doTruncate(70);Ic=Ic+(rb.trim()+"("+Kb.trim().split(/\s*,\s*/).join(", ")+")"+(V?" { "+V:""));}else{Ic=Ic+"anonymous()";}}}}return Ic;};o.printStackTrace=function(){var B=this.getClass().getName()+": "+this+"\n"+n.formatStack(this.Bi);if(this.Yq!=null)B=B+("\nCaused By:\n"+this.Yq.printStackTrace());return B;};o.ZB=function(){var Fb=jsx3.lang.getStack(1);var y=-1;for(var X=0;X<Fb.length;X++){if(Fb[X].jsxclass!=null){y=X;break;}}if(y>=0)Fb.splice(0,y+1);this.Bi=Fb;};});jsx3.Class.defineClass("jsx3.lang.IllegalArgumentException",jsx3.lang.Exception,null,function(p,h){h.init=function(r,c){this.jsxsuper("Illegal value for argument "+r+": "+c);};});jsx3.Class.defineClass("jsx3.lang.NativeError",jsx3.lang.Exception,null,function(r,b){var bc=jsx3.Exception;r.Xi=false;r.Bt=true;r.wrap=function(j){if(j instanceof Error)return new r(j);else{if(j instanceof bc)return j;else{if(j instanceof Object)return new bc(j.toString());else return new bc(""+j);}}};r.initErrorCapture=function(){window.onerror=r.Lr;};r.ei="thrown and not caught";r.Lr=function(j,e,o){try{if(!r.Xi&&jsx3.Class.forName("jsx3.util.Logger")!=null&&jsx3.util.Logger.GLOBAL!=null){if(j.indexOf(r.ei)>=0){if(bc.RN!=null){var eb=jsx3.lang.getStack(0);if(eb.length<2||eb.contentsEqual(bc.RN.getStack())){if(eb.length<2)jsx3.util.Logger.GLOBAL.logStack(jsx3.util.Logger.ERROR,"Uncaught Exception: "+j+" (line: "+r.Sh(o)+", file: "+e+")",1);jsx3.util.Logger.GLOBAL.error("Uncaught Exception",bc.RN);bc.RN=true;return true;}}}jsx3.util.Logger.GLOBAL.logStack(jsx3.util.Logger.ERROR,"Uncaught Exception: "+j+" (line: "+r.Sh(o)+", file: "+e+")",1);return true;}else{if(r.Bt){if(j.indexOf(r.ei)>=0){if(bc.RN!=null){var eb=jsx3.lang.getStack(0);if(eb.contentsEqual(bc.RN.getStack())){window.alert("Uncaught Exception: "+bc.RN.printStackTrace());return true;}}}var eb=jsx3.lang.getStack(0);window.alert("Uncaught Error: "+j+", line "+r.Sh(o)+"\n"+bc.formatStack(eb));return true;}else{return false;}}}catch(Kc){window.alert("Error in errorTrap: "+r.wrap(Kc)+" (original error: "+j+", line "+r.Sh(o)+")");}};b.Zm=null;b.init=function(a){if(!(a instanceof Error))throw new jsx3.IllegalArgumentException("objError",a);this.jsxsuper();this.Zm=a;};b.getMessage=function(){return this.Zm.message!=null?this.Zm.message.replace(/\s*$/,""):"";};b.getFileName=function(){return this.Zm.fileName;};b.getLineNumber=function(){return r.Sh(this.Zm.lineNumber);};r.Sh=function(k){return k-1;};b.getName=function(){return this.Zm.name;};b.isStructural=function(){return this.Zm&&(this.Zm.number&65535)==1009;};b.getType=function(){if(this.Zm instanceof EvalError)return "EvalError";if(this.Zm instanceof RangeError)return "RangeError";if(this.Zm instanceof ReferenceError)return "ReferenceError";if(this.Zm instanceof SyntaxError)return "SyntaxError";if(this.Zm instanceof TypeError)return "TypeError";return "Error";};b.toString=function(){var U=this.getLineNumber();var Ec=this.getFileName();var Lc=this.getMessage();if(U||Ec){Lc=Lc+(" (type:"+this.getType()+", ");if(U)Lc=Lc+("line:"+U);if(Ec){if(U)Lc=Lc+", ";Lc=Lc+("file:"+Ec);}Lc=Lc+")";}return Lc;};});jsx3.lang.Package=jsx3.lang.jK();jsx3.lang.Class.defineClass("jsx3.lang.Package",null,null,function(q,m){var Kb=jsx3.lang.Class;var pb=jsx3.lang.Method;q.Ev=[];q.definePackage=function(f,a){var E=Kb.I8(f.split("."));var Q=false;var gc=null;if(E.jsxpackage!=null){if(jsx3.Class.forName("jsx3.util.Logger"))jsx3.util.Logger.getLogger("jsx3.lang").info("redefinition of package "+f);gc=E.jsxpackage;Q=true;gc.Cd=[];gc.Ee=[];}else{gc=Kb.B8(q);gc.jr=f;gc.Cd=[];gc.Ee=[];E.jsxpackage=gc;}try{a(E);}catch(Kc){throw new jsx3.Exception("error defining package "+f+".",jsx3.NativeError.wrap(Kc));}for(var Mb in E){if(Mb=="jsxpackage")continue;if(typeof(E[Mb])=="function"){if(E[Mb].jsxclass==null)this.GB(E[Mb],gc,Mb);}else{if(E[Mb]==null||typeof(E[Mb])!="object"||E[Mb].jsxpackage==null)gc.Cd.push(Mb);}}if(E.__noSuchMethod__==null)E.__noSuchMethod__=function(o,s){throw new jsx3.Exception("No such method: "+f+"#"+o+"()");};q.Ev.push(gc);jsx3.CLASS_LOADER.wQ(gc);};q.GB=function(s,h,l){if(s.jsxmethod instanceof pb){if(s.jsxmethod.getDeclaringClass().equals(h)&&s.jsxmethod.getName()!=l){throw new jsx3.Exception("attempt to re-bless method "+s.jsxmethod+" as "+h+"."+l);}else{if(s.jsxmethod.getDeclaringClass().equals(h)&&h.Ee.indexOf(s.jsxmethod)<0)h.Ee.push(s.jsxmethod);return;}}var hc=Kb.B8(pb);hc.Ph=h;hc.Ok=l;hc.SC=true;s.jsxmethod=hc;h.Ee.push(hc);};q.forName=function(h){try{var x=jsx3.eval(h);if(typeof(x)=="object")return x.jsxpackage;}catch(Kc){}return null;};q.getPackages=function(){return q.Ev.clone();};m.jr=null;m.sk=null;m.Ee=null;m.Cd=null;m.getName=function(){return this.jr;};m.getNamespace=function(){if(this.sk!=null)return this.sk;try{return jsx3.eval(this.jr);}catch(Kc){}return null;};m.getClasses=function(){var Dc=[];var nc=this.getNamespace();for(var Mb in nc){if(typeof(nc[Mb])=="function"&&nc[Mb].jsxclass instanceof Kb){if(nc[Mb].jsxclass.getPackage()==this&&this.getName()+"."+Mb==nc[Mb].jsxclass.getName()){Dc.push(nc[Mb].jsxclass);Dc.pushAll(nc[Mb].jsxclass.getClasses());}}}return Dc;};m.getStaticMethods=function(){return this.Ee.clone();};m.getStaticMethod=function(d){for(var Ac=0;Ac<this.Ee.length;Ac++){if(d==this.Ee[Ac].getName())return this.Ee[Ac];}return null;};m.getStaticFieldNames=function(){return this.Cd.clone();};m.toString=function(){return this.jr;};});

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -