You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
38 KiB
1 line
38 KiB
5 months ago
|
!function(n){function s(e,t){var n,i,r;if("string"==typeof e)return o(e);for(n=[],i=e.length,r=0;r<i;r++)n.push(o(e[r]));return t.apply(null,n)}var e,b,t,i,a={},r=function(e,t,n){var i,r={exports:t};"function"==typeof t&&(n.length||(n=[s,r.exports,r]),void 0!==(i=t.apply(null,n))&&(r.exports=i)),a[e]=r.exports},o=function(e){var t=a[e]||n[e];if(!t)throw new Error("`"+e+"` is undefined");return t},u=(b=n,i=s,(t=function(e,t,n){2===arguments.length&&(n=t,t=null),s(t||[],function(){r(e,n,arguments)})})("dollar-third",[],function(){return b.jQuery||b.Zepto}),t("dollar",["dollar-third"],function(e){return e}),t("promise-third",["dollar"],function(e){return{Deferred:e.Deferred,when:e.when,isPromise:function(e){return e&&"function"==typeof e.then}}}),t("promise",["promise-third"],function(e){return e}),t("base",["dollar","promise"],function(o,e){function t(){}var i,n,r,s,a,u,c,l,d,p,h,f,g,m,v=Function.call;function _(e,t){return function(){return e.apply(t,arguments)}}return{version:"0.1.2",$:o,Deferred:e.Deferred,isPromise:e.isPromise,when:e.when,browser:(c=navigator.userAgent,l={},d=c.match(/WebKit\/([\d.]+)/),p=c.match(/Chrome\/([\d.]+)/)||c.match(/CriOS\/([\d.]+)/),h=c.match(/MSIE\s([\d\.]+)/)||c.match(/(?:trident)(?:.*rv:([\w.]+))?/i),f=c.match(/Firefox\/([\d.]+)/),g=c.match(/Safari\/([\d.]+)/),m=c.match(/OPR\/([\d.]+)/),d&&(l.webkit=parseFloat(d[1])),p&&(l.chrome=parseFloat(p[1])),h&&(l.ie=parseFloat(h[1])),f&&(l.firefox=parseFloat(f[1])),g&&(l.safari=parseFloat(g[1])),m&&(l.opera=parseFloat(m[1])),l),os:(r=navigator.userAgent,s={},a=r.match(/(?:Android);?[\s\/]+([\d.]+)?/),u=r.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/),a&&(s.android=parseFloat(a[1])),u&&(s.ios=parseFloat(u[1].replace(/_/g,"."))),s),inherits:function(e,t,n){var i,r,s;return"function"==typeof t?(i=t,t=null):i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},o.extend(!0,i,e,n||{}),i.__super__=e.prototype,i.prototype=(r=e.prototype,Object.create?Object.create(r):((s=function(){}).prototype=r,new s)),t&&o.extend(!0,i.prototype,t),i},noop:t,bindFn:_,log:b.console?_(console.log,console):t,nextTick:function(e){setTimeout(e,1)},slice:(n=[].slice,function(){return v.apply(n,arguments)}),guid:(i=0,function(e){for(var t=(+new Date).toString(32),n=0;n<5;n++)t+=Math.floor(65535*Math.random()).toString(32);return(e||"wu_")+t+(i++).toString(32)}),formatSize:function(e,t,n){var i;for(n=n||["B","K","M","G","TB"];(i=n.shift())&&1024<e;)e/=1024;return("B"===i?e:e.toFixed(t||2))+i}}}),t("mediator",["base"],function(e){var t,r=e.$,s=[].slice,o=/\s+/;function a(e,t,n,i){return r.grep(e,function(e){return e&&(!t||e.e===t)&&(!n||e.cb===n||e.cb._cb===n)&&(!i||e.ctx===i)})}function u(e,n,i){r.each((e||"").split(o),function(e,t){i(t,n)})}function c(e,t){for(var n,i=!1,r=-1,s=e.length;++r<s;)if(!1===(n=e[r]).cb.apply(n.ctx2,t)){i=!0;break}return!i}return t={on:function(e,t,i){var r,s=this;return t&&(r=this._events||(this._events=[]),u(e,t,function(e,t){var n={e:e};n.cb=t,n.ctx=i,n.ctx2=i||s,n.id=r.length,r.push(n)})),this},once:function(e,t,i){var r=this;return t&&u(e,t,function(e,t){var n=function(){return r.off(e,n),t.apply(i||r,arguments)};n._cb=t,r.on(e,n,i)}),r},off:function(e,t,n){var i=this._events;return i&&(e||t||n?u(e,t,function(e,t){r.each(a(i,e,t,n),function(){delete i[this.id]})}):this._events=[]),this},trigger:function(e){var t,n,i;return this._events&&e?(t=s.call(arguments,1),n=a(this._events,e),i=a(this._events,"all"),c(n,t)&&c(i,arguments)):this}},r.extend({installTo:function(e){return r.extend(e,t)}},t)}),t("uploader",["base","mediator"],function(e,r){var s=e.$;function n(e){this.options=s.extend(!0,{},n.options,e),this._init(this.options)}return n.options={},r.installTo(n.prototype),s.each({upload:"start-upload",stop:"stop-upload",getFile:"get-file",getFiles:"get-files",addFile:"add-file",addFiles:"add-file",sort:"sort-files",removeFile:"remove-file",skipFile:"skip-file",retry:"retry",isInProgress:"is-in-progress",makeThumb:"make-thumb",getDimension:"get-dimension",addButton:"add-btn",getRuntimeType:"get-runtime-type",r
|