Files

2 lines
62 KiB
JavaScript
Raw Permalink Normal View History

2023-05-19 16:40:07 +07:00
/*Magic Zoom v4.5.17*/
(function(){if(window.magicJS){return}var b={version:"v2.7.4",UUID:0,storage:{},$uuid:function(d){return(d.$J_UUID||(d.$J_UUID=++a.UUID))},getStorage:function(d){return(a.storage[d]||(a.storage[d]={}))},$F:function(){},$false:function(){return false},defined:function(d){return(undefined!=d)},exists:function(d){return!!(d)},j1:function(d){if(!a.defined(d)){return false}if(d.$J_TYPE){return d.$J_TYPE}if(!!d.nodeType){if(1==d.nodeType){return"element"}if(3==d.nodeType){return"textnode"}}if(d.length&&d.item){return"collection"}if(d.length&&d.callee){return"arguments"}if((d instanceof window.Object||d instanceof window.Function)&&d.constructor===a.Class){return"class"}if(d instanceof window.Array){return"array"}if(d instanceof window.Function){return"function"}if(d instanceof window.String){return"string"}if(a.j21.trident){if(a.defined(d.cancelBubble)){return"event"}}else{if(d===window.event||d.constructor==window.Event||d.constructor==window.MouseEvent||d.constructor==window.UIEvent||d.constructor==window.KeyboardEvent||d.constructor==window.KeyEvent){return"event"}}if(d instanceof window.Date){return"date"}if(d instanceof window.RegExp){return"regexp"}if(d===window){return"window"}if(d===document){return"document"}return typeof(d)},extend:function(j,h){if(!(j instanceof window.Array)){j=[j]}for(var g=0,e=j.length;g<e;g++){if(!a.defined(j)){continue}for(var f in(h||{})){try{j[g][f]=h[f]}catch(d){}}}return j[0]},implement:function(h,g){if(!(h instanceof window.Array)){h=[h]}for(var f=0,d=h.length;f<d;f++){if(!a.defined(h[f])){continue}if(!h[f].prototype){continue}for(var e in(g||{})){if(!h[f].prototype[e]){h[f].prototype[e]=g[e]}}}return h[0]},nativize:function(f,e){if(!a.defined(f)){return f}for(var d in(e||{})){if(!f[d]){f[d]=e[d]}}return f},$try:function(){for(var f=0,d=arguments.length;f<d;f++){try{return arguments[f]()}catch(g){}}return null},$A:function(f){if(!a.defined(f)){return $mjs([])}if(f.toArray){return $mjs(f.toArray())}if(f.item){var e=f.length||0,d=new Array(e);while(e--){d[e]=f[e]}return $mjs(d)}return $mjs(Array.prototype.slice.call(f))},now:function(){return new Date().getTime()},detach:function(h){var f;switch(a.j1(h)){case"object":f={};for(var g in h){f[g]=a.detach(h[g])}break;case"array":f=[];for(var e=0,d=h.length;e<d;e++){f[e]=a.detach(h[e])}break;default:return h}return a.$(f)},$:function(e){if(!a.defined(e)){return null}if(e.$J_EXTENDED){return e}switch(a.j1(e)){case"array":e=a.nativize(e,a.extend(a.Array,{$J_EXTENDED:a.$F}));e.j14=e.forEach;e.contains=a.Array.contains;return e;break;case"string":var d=document.getElementById(e);if(a.defined(d)){return a.$(d)}return null;break;case"window":case"document":a.$uuid(e);e=a.extend(e,a.Doc);break;case"element":a.$uuid(e);e=a.extend(e,a.Element);break;case"event":e=a.extend(e,a.Event);break;case"textnode":return e;break;case"function":case"array":case"date":default:break}return a.extend(e,{$J_EXTENDED:a.$F})},$new:function(d,f,e){return $mjs(a.doc.createElement(d)).setProps(f||{}).j6(e||{})},addCSS:function(e){if(document.styleSheets&&document.styleSheets.length){document.styleSheets[0].insertRule(e,0)}else{var d=$mjs(document.createElement("style"));d.update(e);document.getElementsByTagName("head")[0].appendChild(d)}}};var a=b;window.magicJS=b;window.$mjs=b.$;a.Array={$J_TYPE:"array",indexOf:function(g,h){var d=this.length;for(var e=this.length,f=(h<0)?Math.max(0,e+h):h||0;f<e;f++){if(this[f]===g){return f}}return-1},contains:function(d,e){return this.indexOf(d,e)!=-1},forEach:function(d,g){for(var f=0,e=this.length;f<e;f++){if(f in this){d.call(g,this[f],f,this)}}},filter:function(d,j){var h=[];for(var g=0,e=this.length;g<e;g++){if(g in this){var f=this[g];if(d.call(j,this[g],g,this)){h.push(f)}}}return h},map:function(d,h){var g=[];for(var f=0,e=this.length;f<e;f++){if(f in this){g[f]=d.call(h,this[f],f,this)}}return g}};a.implement(String,{$J_TYPE:"string",j26:function(){return this.replace(/^\s+|\s+$/g,"")},eq:function(d,e){return(e||false)?(this.toString()===d.toString()):(this.toLowerCase().toString()===d.toLowerCase().toString())},j22:function(){re