WordPress/wp-includes/js/plupload/moxie.min.js

1 line
111 KiB
JavaScript
Raw Normal View History

var MXI_DEBUG=!1;!function(e){function t(){var e={};return function(){(function(a,w){"use strict";var s={};function n(e,t){var i,n=[];for(var r=0;r<e.length;++r){i=s[e[r]]||o(e[r]);if(!i){throw"module definition dependecy not found: "+e[r]}n.push(i)}t.apply(null,n)}function e(e,t,i){if(typeof e!=="string"){throw"invalid module definition, module id must be defined and be a string"}if(t===w){throw"invalid module definition, dependencies must be specified"}if(i===w){throw"invalid module definition, definition function must be specified"}n(t,function(){s[e]=i.apply(null,arguments)})}function d(e){return!!s[e]}function o(e){var t=a;var i=e.split(/[.\/]/);for(var n=0;n<i.length;++n){if(!t[i[n]]){return}t=t[i[n]]}return t}function t(e){for(var t=0;t<e.length;t++){var i=a;var n=e[t];var r=n.split(/[.\/]/);for(var o=0;o<r.length-1;++o){if(i[r[o]]===w){i[r[o]]={}}i=i[r[o]]}i[r[r.length-1]]=s[n]}}e("moxie/core/utils/Basic",[],function(){function s(e){var t;if(e===t){return"undefined"}else if(e===null){return"null"}else if(e.nodeType){return"node"}return{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()}function t(){return l(false,false,arguments)}function e(){return l(true,false,arguments)}function i(){return l(false,true,arguments)}function n(){return l(true,true,arguments)}function r(e){switch(s(e)){case"array":return l(false,true,[[],e]);case"object":return l(false,true,[{},e]);default:return e}}function u(e){switch(s(e)){case"array":return Array.prototype.slice.call(e);case"object":return t({},e)}return e}function l(n,r,e){var o;var a=e[0];c(e,function(e,t){if(t>0){c(e,function(e,t){var i=m(s(e),["array","object"])!==-1;if(e===o||n&&a[t]===o){return true}if(i&&r){e=u(e)}if(s(a[t])===s(e)&&i){l(n,r,[a[t],e])}else{a[t]=e}})}});return a}function o(t,e){for(var i in e){if({}.hasOwnProperty.call(e,i)){t[i]=e[i]}}function n(){this.constructor=t;if(MXI_DEBUG){var e=function(e){var t=e.toString().match(/^function\s([^\(\s]+)/);return t?t[1]:false};this.ctorName=e(t)}}n.prototype=e.prototype;t.prototype=new n;t.parent=e.prototype;return t}function c(e,t){var i,n,r,o;if(e){try{i=e.length}catch(e){i=o}if(i===o||typeof i!=="number"){for(n in e){if(e.hasOwnProperty(n)){if(t(e[n],n)===false){return}}}}else{for(r=0;r<i;r++){if(t(e[r],r)===false){return}}}}}function a(e){var t;if(!e||s(e)!=="object"){return true}for(t in e){return false}return true}function f(e,i){var t=0,n=e.length;if(s(i)!=="function"){i=function(){}}if(!e||!e.length){i()}function r(t){if(s(e[t])==="function"){e[t](function(e){++t<n&&!e?r(t):i(e)})}}r(t)}function d(e,n){var r=0,o=e.length,a=new Array(o);c(e,function(e,i){e(function(e){if(e){return n(e)}var t=[].slice.call(arguments);t.shift();a[i]=t;r++;if(r===o){a.unshift(null);n.apply(this,a)}})})}function m(e,t){if(t){if(Array.prototype.indexOf){return Array.prototype.indexOf.call(t,e)}for(var i=0,n=t.length;i<n;i++){if(t[i]===e){return i}}}return-1}function h(e,t){var i=[];if(s(e)!=="array"){e=[e]}if(s(t)!=="array"){t=[t]}for(var n in e){if(m(e[n],t)===-1){i.push(e[n])}}return i.length?i:false}function p(e,t){var i=[];c(e,function(e){if(m(e,t)!==-1){i.push(e)}});return i.length?i:null}function g(e){var t,i=[];for(t=0;t<e.length;t++){i[t]=e[t]}return i}var v=function(){var n=0;return function(e){var t=(new Date).getTime().toString(32),i;for(i=0;i<5;i++){t+=Math.floor(Math.random()*65535).toString(32)}return(e||"o_")+t+(n++).toString(32)}}();function x(e){if(!e){return e}return String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,"")}function w(e){if(typeof e!=="string"){return e}var t={t:1099511627776,g:1073741824,m:1048576,k:1024},i;e=/^([0-9\.]+)([tmgk]?)$/.exec(e.toLowerCase().replace(/[^0-9\.tmkg]/g,""));i=e[2];e=+e[1];if(t.hasOwnProperty(i)){e*=t[i]}return Math.floor(e)}function y(e){var n=[].slice.call(arguments,1);return e.replace(/%([a-z])/g,function(e,t){var i=n.shift();switch(t){case"s":return i+"";case"d":return parseInt(i,10);case"f":return parseFloat(i);case"c":return"";default:return i}})}function E(e,t){var i=this;setTimeout(function(){e.call(i)},t||