21 lines
10 KiB
JavaScript
21 lines
10 KiB
JavaScript
|
(function(q){function C(e){this.name="TimeoutError";this.message=e||""}function D(e){this.name="RejectedError";this.message=e||""}function G(e,d,g,h){var c,a,b=[],f=0,m,l,p,s=function(a){return function(c,l){b[a]=n[c].exports;e.length===++f&&(!l&&h&&clearTimeout(m),d&&d(b))}};h=h||x.timeout;for(p=0;l=e[p++];)if((c=n[l])&&1!==c.state)if(2===c.state)if(a=new D('Could resolve all dependencies; dependency "'+l+'" has been rejected.'),g)g(a);else throw a;else 3===c.state&&s(p-1)(l,1);else v[l]||(v[l]=
|
||
|
[]),v[l].unshift(s(p-1));h&&e.length<b.length&&(m=setTimeout(function(){for(var c,d,f=0,l=0;c=e[f++];)for(l=0;d=b[l++];)c===d&&(b.splice(--l,1),e.splice(--f,1));a=new C("Load timeout of "+h+'ms exceeded for module(s) "'+e.join('", "')+'".');if(g)g(a);else throw a;},h))}function y(){var e=!1,d,g,h,c,a,b,f,m;if(arguments[0]!==E){for(d=0;(g=arguments[d++])&&(_type=(typeof g)[0]||(typeof g).slice(0,1));)"s"===_type?a?h=1:a=g:"f"===_type?f?m?h=1:m=g:f=g:"o"===_type&&(k.is(g,"array")?(b={requires:g},e=
|
||
|
!0):b?f=g:b=g),h&&(c=new TypeError("define called with unrecognized signature; `"+Array.prototype.join.call(arguments,", ")+"`."));b=b||{};a=a||b.UID;f=f||b.factory;m=m||b.onRejected}else(d=z.pop())?(a=arguments[1],b=d[0],f=d[1],m=d[2],e=d[3]):c=Error("Inconsistent naming queue");c||f||(b?(f=b,b={}):c=Error('Missing factory for module "'+a+'"'));!c&&n[a]&&(c=Error('Duplicate entry for module "'+a+'"'));if(c)if(m=m||arguments[2])m(c);else throw c;else a?(d=n[a]=b,d.UID=a,d.amdStyle=e,d.factory=f,d.state=
|
||
|
1,d.requires=k.is(d.requires,"array")&&!!d.requires.length&&d.requires,d.inherits=k.is(d.inherits,"array")&&!!d.inherits.length&&d.inherits,d.compiles=k.is(d.compiles,"array")&&!!d.compiles.length&&d.compiles,d.instances||(d.instances={instance1:{}})):z.unshift([b,f,m,e])}var n={},x={deepCopy:!0,baseUrl:"",namespace:"default",timeout:1E3,paths:{},shim:{}},k={},E={a:1},v={},z=[],A=Array.prototype.push;C.prototype=Error.prototype;D.prototype=Error.prototype;k.is=function(){var e=Object.prototype.hasOwnProperty,
|
||
|
d=Object.prototype.toString,g={array:Array.isArray||function(a){return"[object Array]"==d.call(a)},arraylike:function(a){if(!a||!a.length&&0!==a.length||g.window(a))return!1;var b=a.length;return 1===a.nodeType||g.array(a)||!g["function"](a)&&(0===b||"number"===typeof b&&0<b&&!k.is(a,"primitive")&&b-1 in a)},"boolean":function(a){return!0===a||!1===a},element:function(a){return!(!a||1!==a.nodeType)},finite:function(a){return isFinite(a)&&!isNaN(parseFloat(a))},integer:Number.isInteger||function(a){return"number"===
|
||
|
typeof a&&g.finite(a)&&-9007199254740992<a&&9007199254740992>a&&Math.floor(a)===a},iterable:function(a){try{1 in obj}catch(b){return!1}return!0},nan:function(a){return g.number(a)&&a!=+a},number:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},object:function(a){return a===Object(a)},primitive:function(a){return!0===a||!1===a||null==a||!!{string:1,number:1}[typeof a]},string:function(a){return"string"==typeof a||a instanceof String},undefined:function(a){return void 0===a},untyped:function(a){if(!a||
|
||
|
a.nodeType||"[object Object]"!==d.call(a)||g.window(a))return!1;try{if(a.constructor&&!e.call(a,"constructor")&&!e.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}for(var c in a);return void 0===c||e.call(a,c)},window:function(a){return null!=a&&a==a.window},empty:function(a){if(a){if(k.is(a,"array"))return 0===a.length;for(var b in a)if(e.call(a,b))return!1}return!0}},h=0,c=["Arguments","Date","Function","RegExp"];for(;4>h;h++)g[c[h].toLowerCase()]=function(a){a="[object "+
|
||
|
a+"]";return function(b){return d.call(b)==a}}(c[h]);g.args=g.arguments;g.bool=g["boolean"];g.plain=g.untyped;return function(a,b){if(g["function"](b))return a===b(a);if(!g.string(b))return a===b;if((b=b.toLowerCase())&&g[b])return g[b](a);throw'Unknown type "'+b+'"';}}();k.each=function(){var e=Array.prototype.some;return function(d,g,h){var c,a;if(void 0===d)return obj;h=h||k;if(e&&d.some===e)return d.some(g,h),d;if(k.is(d,"array")||k.is(d,"arraylike")){c=0;for(a=d.length;c<a&&(void 0===d[c]||!g.call(h,
|
||
|
d[c],c,d));c++);return d}for(c in d)if(d.hasOwnProperty(c)&&g.call(h,d[c],c,d))break;return d}}();k.merge=function(e){var d,g,h,c,a,b=arguments.length,f=!1;e=arguments[0];var m=1,l,p,s=0;if(!0===e||!1===e)f=e,e=arguments[m],m++;k.is(arguments[b-1],"function")&&(a=arguments[b-1],b--);if(void 0===e)e={};else if(k.is(e,"primitive"))throw new TypeError("Cannot merge primitive data types: merge("+Array.prototype.join.call(arguments,", ")+")");p=k.is(e,"array");if(m<b)for(;m<=b;)if(c=arguments[m++]){p=
|
||
|
p&&k.is(c,"array");for(h in c)g=e[h],d=c[h],void 0===d||d===e?p&&s--:(f&&d&&((l=k.is(d,"array"))||k.is(d,"untyped"))&&(d=k.merge(f,g||(l?k.is(g,"array")?g:[]:k.is(g,"untyped")?g:{}),d,a)),a&&a(h,e,c)||(s&&(h=+h+s),e[h]=d));s=0}return e};k.subordinate=function(){function e(b){if(!b||b.data===c&&b.source&&(d===b.source||d.self&&d.self===b.source)){var e=a.shift();b=e[0];var e=e[1],l=e.length;l?1===l?b(e[0]):2===l?b(e[0],e[1]):3===l?b(e[0],e[1],e[2]):4===l?b(e[0],e[1],e[2],e[3]):b.apply(0,e):b()}}var d=
|
||
|
window,g=Array.prototype.slice,h=d.postMessage,c="__fandango@"+Math.random().toString(36),a=[],b=function(){return h?function(){h(c,"*")}:function(){setTimeout(e)}}();h&&(d.addEventListener?d.addEventListener("message",e,!1):d.attachEvent&&d.attachEvent("onmessage",e));return function(c){b(a.push([arguments[arguments.length-1],g.call(arguments).slice(0,-1)])-1)}}();var H=function(){var e={},d=[].slice,g=function(){return[]};return function(h,c){function a(a,c){return new b(a,c)}function b(a,b){var c=
|
||
|
0,d=f(a,b),e=d.length;this.context=b||document;this.selector=a;for(this.length=e;c<e;c++)this[c]=d[c];return this}var f,k,l,p;if(e[h])return e[h];for(p=c.length;k=c[--p];){k.selector&&(f=k.selector);if(source=k.prototype)if("function"===typeof source)source.call(b.prototype);else if(b.prototype.prototype)for(l in source)source.hasOwnProperty(l)&&(b.prototype[l]=source[l]);else b.prototype=source;if(source=k.utilities)if("function"===typeof source)source.utilities.call(a);else for(l in source)source.hasOwnProperty(l)&&
|
||
|
(a[l]=source[l])}b.prototype.length=0;b.prototype.selector="";b.prototype.splice=d;b.prototype.fandango=1;f||(f=g);return e[h]=a}}(),F=function(){function e(d,e,h,c){var a,b=n[d],f=k.is(b.factory,"function"),m=f?b.factory.length:0,l=b.amdStyle,p,s;c&&(a=H(b.compiles+"",c));for(s in b.instances)c=b.instances[s],c.context=void 0===c.context?b.context:c.context,c.deepCopy=void 0===c.deepCopy?b.deepCopy:c.deepCopy,c.namespace=void 0===c.namespace?b.namespace:c.namespace,p=[],l?p=e||[]:(a&&p.push(a),e&&
|
||
|
p.push(e),m>p.length&&p.push(c.data?k.merge(c.deepCopy,{},c.data,b.data):b.data),m>p.length&&p.push(k.merge(c.deepCopy,{},c,b))),c.exports=f?b.factory.apply(c.context,p)||{}:b.factory,void 0===b.exports&&(b.exports=h?c.exports?k.merge(!0,{},h,c.exports):h:c.exports);b.state=3;if(e=v[d])for(;e.length;)e.pop()(d)}return function g(h,c,a){var b,f;f=n[h];var m,l,p,s;b=[];var r;if(f){a=k.is(f.factory,"function")?f.factory.length:0;m=f.amdStyle;if(!c&&(f.requires||f.compiles||f.inherits)){f.requires&&A.apply(b,
|
||
|
f.requires);f.inherits&&A.apply(b,f.inherits);f.compiles&&A.apply(b,f.compiles);for(c=0;r=b[c++];)if(n[r])if(3===n[r].state)b.splice(--c,1);else if(2===n[r].state)throw Error('Could not instantiate "'+UID+'"; dependency "'+dependency+'" has been rejected.');if(0<b.length){k.subordinate(b,function(){g(h,!0)},B);return}}void 0===(b=f.deepCopy)&&(b=x.deepCopy);f=n[h]=k.merge(b,{},x,f);if(a&&f.requires)for(p=f.requires&&(m?[]:{}),c=0;r=f.requires[c++];)m?p.push(n[r].exports):k.is(n[r].exports,"function")?
|
||
|
p[r]=n[r].exports:k.merge(b,p[r]={},n[r].exports);if(f.inherits)for(s=f.inherits&&{},c=0;r=f.inherits[c++];)k.merge(b,s,n[r].exports);if(a&&f.compiles)for(l=f.compiles&&[],c=0;r=f.compiles[c++];)l.push(n[r].exports);e(h,p,s,l)}else if(f=Error('Tried to invoke non-existent module "'+h+'"'),a)a(f);else throw f;}}();y.amd={};var B=function(){var e={},d=document.getElementsByTagName("head")[0],g="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),h=function(a){var b=document.createElement("script");
|
||
|
b.setAttribute("id",a);b.type="text/javascript";b.charset="utf-8";b.async=!0;return b},c=!(!(c=h())||!c.attachEvent||c.attachEvent.toString&&0>c.attachEvent.toString().indexOf("[native code")||g),a=function(){var a={"http://":1,"https://":1,"file://":1};return function(b){var c=b.toLowerCase(),e=c[0]||c.slice(0,1);"/"===e||"\\"===e||"h"===e&&(a[c.slice(0,7)]||a[c.slice(0,8)])||"f"===e&&a[c.slice(0,7)]||(b=x.baseUrl+b);".js"!==b.slice(-3)&&(b+=".js");return b}}(),b=function(a,b,c,d){return function(f){e[b]=
|
||
|
0;a.error=f||!0;d.parentElement.removeChild(d);if(a.onError)a.onError(f,c,b)}},f=function(a,b,c,d,f){return function(){if((!f||"loaded"===d.readyState||"complete"===d.readyState)&&2===e[b]){e[b]=3;if(a.onPartial)a.onPartial(b,c,d);f?d.detachEvent("onreadystatechange",a.loadListener):(d.removeEventListener("load",a.loadListener),d.removeEventListener("error",a.errorListener));if(a.loaded.push(b)===a.paths.length&&a.onDone)a.onDone(a.load)}}},m=function(a){for(var g=0,k,m,n;!a.error&&(k=a.paths[g++]);)m=
|
||
|
a.names[g-1],e[k]=2,n=h(k),c?n.attachEvent("onreadystatechange",f(a,k,m,n,!0)):(a.loadListener=f(a,k,m,n),a.errorListener=b(a,k,m,n),n.addEventListener("load",a.loadListener,!1),n.addEventListener("error",a.errorListener,!1)),n.src=k,d.appendChild(n)};return function(b,c,d,f){var g=[],h=[],t={paths:[],names:[],loaded:[],error:null,loadListener:null,errorListener:null},v,u,w,z,A;t.onError=function(a,b,c){a instanceof Error||(a=Error('Could require "'+b+'"; an error occurred while trying to load "'+
|
||
|
c+'".'));if(d)d(a);else throw a;};for(A=0;u=b[A++];)if(n[u])if(3===n[u].state)h.push(n[u].exports);else{if(2===n[u].state)throw Error("require(): Rejected dependency. Cannot continue.");F(u,null,t.onError);g.push(u)}else v=a(x.paths[u]||u),e[v]||(t.paths.push(v),t.names.push(u),e[v]=2),g.push(u);g.length?(t.paths&&(t.onPartial=function(a,b,c){n[b]||((w=x.shim[b])?(z=k.is(w.exports,"function")?w.exports:function(){return q[w.exports]},y(b,z,t.onError)):y(E,b,t.onError));F(b,null,t.onError);f&&f(a,
|
||
|
c)},m(t)),G(g,function(a){c.apply(null,a)},t.onError)):c&&c.apply(null,h)}}();y("fandango",k);var I=q.fandango,J=q.define,K=q.require,w={fn:k,define:y,require:B,noConflict:function(e){q.define===y&&(q.define=J);q.require===B&&(q.require=K);e&&q.fandango===w&&(q.fandango=I);return w},defaults:function(e){return e?k.merge(x,e):x}};q.define||(q.define=w.define);q.require||(q.require=w.require);q.fandango=w;q.modules=n;q.awaitingDependency=v;q.awaitingName=z})(this);
|