(function(){'use strict';var f,g=[];function l(a){g.push(a);1==g.length&&f()}function m(){for(;g.length;)g[0](),g.shift()}f=function(){settimeout(m)};function n(a){this.a=p;this.b=void 0;this.f=[];var b=this;try{a(function(a){q(b,a)},function(a){r(b,a)})}catch(c){r(b,c)}}var p=2;function t(a){return new n(function(b,c){c(a)})}function u(a){return new n(function(b){b(a)})}function q(a,b){if(a.a==p){if(b==a)throw new typeerror;var c=!1;try{var d=b&&b.then;if(null!=b&&"object"==typeof b&&"function"==typeof d){d.call(b,function(b){c||q(a,b);c=!0},function(b){c||r(a,b);c=!0});return}}catch(e){c||r(a,e);return}a.a=0;a.b=b;v(a)}} function r(a,b){if(a.a==p){if(b==a)throw new typeerror;a.a=1;a.b=b;v(a)}}function v(a){l(function(){if(a.a!=p)for(;a.f.length;){var b=a.f.shift(),c=b[0],d=b[1],e=b[2],b=b[3];try{0==a.a?"function"==typeof c?e(c.call(void 0,a.b)):e(a.b):1==a.a&&("function"==typeof d?e(d.call(void 0,a.b)):b(a.b))}catch(h){b(h)}}})}n.prototype.g=function(a){return this.c(void 0,a)};n.prototype.c=function(a,b){var c=this;return new n(function(d,e){c.f.push([a,b,d,e]);v(c)})};function w(a){return new n(function(b,c){function d(c){return function(d){h[c]=d;e+=1;e==a.length&&b(h)}}var e=0,h=[];0==a.length&&b(h);for(var k=0;kparseint(a[1],10)}else c=!1;return c}function j(){null===f&&(f=!!document.fonts);return f} function k(){if(null===e){var a=document.createelement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}e=""!==a.style.font}return e}function l(a,b){return[a.style,a.weight,k()?a.stretch:"","100px",b].join(" ")} a.prototype.load=function(a,b){var c=this,k=a||"besbswy",q=0,d=b||3e3,h=(new date).gettime();return new promise(function(a,b){if(j()&&!g()){var m=new promise(function(a,b){function e(){(new date).gettime()-h>=d?b():document.fonts.load(l(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():settimeout(e,25)},function(){b()})}e()}),n=new promise(function(a,c){q=settimeout(c,d)});promise.race([n,m]).then(function(){cleartimeout(q);a(c)},function(){b(c)})}else m(function(){function u(){var b;if(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===b&&(b=/applewebkit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.useragent),b=!!b&&(536>parseint(b[1],10)||536===parseint(b[1],10)&&11>=parseint(b[2],10))),b=b&&(f==v&&g==v&&h==v||f==w&&g==w&&h==w||f==x&&g==x&&h==x)),b=!b;b&&(d.parentnode&&d.parentnode.removechild(d),cleartimeout(q),a(c))}function i(){if((new date).gettime()-h>=d)d.parentnode&&d.parentnode.removechild(d),b(c);else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetwidth,g=n.a.offsetwidth,h=p.a.offsetwidth,u();q=settimeout(i,50)}}var e=new r(k),n=new r(k),p=new r(k),f=-1,g=-1,h=-1,v=-1,w=-1,x=-1,d=document.createelement("div");d.dir="ltr";t(e,l(c,"sans-serif"));t(n,l(c,"serif"));t(p,l(c,"monospace"));d.appendchild(e.a);d.appendchild(n.a);d.appendchild(p.a);document.body.appendchild(d);v=e.a.offsetwidth;w=n.a.offsetwidth;x=p.a.offsetwidth;i();z(e,function(a){f=a;u()});t(e,l(c,'"'+c.family+'",sans-serif'));z(n,function(a){g=a;u()});t(n,l(c,'"'+c.family+'",serif'));z(p,function(a){h=a;u()});t(p,l(c,'"'+c.family+'",monospace'))})})};"object"===typeof module?module.exports=a:(window.fontfaceobserver=a,window.fontfaceobserver.prototype.load=a.prototype.load)}())