cryptalk/public/js/vendor/fandango.v20140921.min.js

20 lines
10 KiB
JavaScript
Raw Normal View History

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