| 1 |
/* |
| 2 |
* Copyright 2016 Small Batch, Inc. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 5 |
* use this file except in compliance with the License. You may obtain a copy of |
| 6 |
* the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 |
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 |
* License for the specific language governing permissions and limitations under |
| 14 |
* the License. |
| 15 |
*/ |
| 16 |
/* Web Font Loader v1.6.26 - (c) Adobe Systems, Google. License: Apache 2.0 */ |
| 17 |
(function () { |
| 18 |
function aa(a, b, c) { |
| 19 |
return a.call.apply(a.bind, arguments); |
| 20 |
} |
| 21 |
function ba(a, b, c) { |
| 22 |
if (!a) throw Error(); |
| 23 |
if (2 < arguments.length) { |
| 24 |
var d = Array.prototype.slice.call(arguments, 2); |
| 25 |
return function () { |
| 26 |
var c = Array.prototype.slice.call(arguments); |
| 27 |
Array.prototype.unshift.apply(c, d); |
| 28 |
return a.apply(b, c); |
| 29 |
}; |
| 30 |
} |
| 31 |
return function () { |
| 32 |
return a.apply(b, arguments); |
| 33 |
}; |
| 34 |
} |
| 35 |
function p(a, b, c) { |
| 36 |
p = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? aa : ba; |
| 37 |
return p.apply(null, arguments); |
| 38 |
} |
| 39 |
var q = |
| 40 |
Date.now || |
| 41 |
function () { |
| 42 |
return +new Date(); |
| 43 |
}; |
| 44 |
function ca(a, b) { |
| 45 |
this.a = a; |
| 46 |
this.m = b || a; |
| 47 |
this.c = this.m.document; |
| 48 |
} |
| 49 |
var da = !!window.FontFace; |
| 50 |
function t(a, b, c, d) { |
| 51 |
b = a.c.createElement(b); |
| 52 |
if (c) for (var e in c) c.hasOwnProperty(e) && ("style" == e ? (b.style.cssText = c[e]) : b.setAttribute(e, c[e])); |
| 53 |
d && b.appendChild(a.c.createTextNode(d)); |
| 54 |
return b; |
| 55 |
} |
| 56 |
function u(a, b, c) { |
| 57 |
a = a.c.getElementsByTagName(b)[0]; |
| 58 |
a || (a = document.documentElement); |
| 59 |
a.insertBefore(c, a.lastChild); |
| 60 |
} |
| 61 |
function v(a) { |
| 62 |
a.parentNode && a.parentNode.removeChild(a); |
| 63 |
} |
| 64 |
function w(a, b, c) { |
| 65 |
b = b || []; |
| 66 |
c = c || []; |
| 67 |
for (var d = a.className.split(/\s+/), e = 0; e < b.length; e += 1) { |
| 68 |
for (var f = !1, g = 0; g < d.length; g += 1) |
| 69 |
if (b[e] === d[g]) { |
| 70 |
f = !0; |
| 71 |
break; |
| 72 |
} |
| 73 |
f || d.push(b[e]); |
| 74 |
} |
| 75 |
b = []; |
| 76 |
for (e = 0; e < d.length; e += 1) { |
| 77 |
f = !1; |
| 78 |
for (g = 0; g < c.length; g += 1) |
| 79 |
if (d[e] === c[g]) { |
| 80 |
f = !0; |
| 81 |
break; |
| 82 |
} |
| 83 |
f || b.push(d[e]); |
| 84 |
} |
| 85 |
a.className = b |
| 86 |
.join(" ") |
| 87 |
.replace(/\s+/g, " ") |
| 88 |
.replace(/^\s+|\s+$/, ""); |
| 89 |
} |
| 90 |
function y(a, b) { |
| 91 |
for (var c = a.className.split(/\s+/), d = 0, e = c.length; d < e; d++) if (c[d] == b) return !0; |
| 92 |
return !1; |
| 93 |
} |
| 94 |
function z(a) { |
| 95 |
if ("string" === typeof a.f) return a.f; |
| 96 |
var b = a.m.location.protocol; |
| 97 |
"about:" == b && (b = a.a.location.protocol); |
| 98 |
return "https:" == b ? "https:" : "http:"; |
| 99 |
} |
| 100 |
function ea(a) { |
| 101 |
return a.m.location.hostname || a.a.location.hostname; |
| 102 |
} |
| 103 |
function A(a, b, c) { |
| 104 |
function d() { |
| 105 |
k && e && f && (k(g), (k = null)); |
| 106 |
} |
| 107 |
b = t(a, "link", { rel: "stylesheet", href: b, media: "all" }); |
| 108 |
var e = !1, |
| 109 |
f = !0, |
| 110 |
g = null, |
| 111 |
k = c || null; |
| 112 |
da |
| 113 |
? ((b.onload = function () { |
| 114 |
e = !0; |
| 115 |
d(); |
| 116 |
}), |
| 117 |
(b.onerror = function () { |
| 118 |
e = !0; |
| 119 |
g = Error("Stylesheet failed to load"); |
| 120 |
d(); |
| 121 |
})) |
| 122 |
: setTimeout(function () { |
| 123 |
e = !0; |
| 124 |
d(); |
| 125 |
}, 0); |
| 126 |
u(a, "head", b); |
| 127 |
} |
| 128 |
function B(a, b, c, d) { |
| 129 |
var e = a.c.getElementsByTagName("head")[0]; |
| 130 |
if (e) { |
| 131 |
var f = t(a, "script", { src: b }), |
| 132 |
g = !1; |
| 133 |
f.onload = f.onreadystatechange = function () { |
| 134 |
g || (this.readyState && "loaded" != this.readyState && "complete" != this.readyState) || ((g = !0), c && c(null), (f.onload = f.onreadystatechange = null), "HEAD" == f.parentNode.tagName && e.removeChild(f)); |
| 135 |
}; |
| 136 |
e.appendChild(f); |
| 137 |
setTimeout(function () { |
| 138 |
g || ((g = !0), c && c(Error("Script load timeout"))); |
| 139 |
}, d || 5e3); |
| 140 |
return f; |
| 141 |
} |
| 142 |
return null; |
| 143 |
} |
| 144 |
function C() { |
| 145 |
this.a = 0; |
| 146 |
this.c = null; |
| 147 |
} |
| 148 |
function D(a) { |
| 149 |
a.a++; |
| 150 |
return function () { |
| 151 |
a.a--; |
| 152 |
E(a); |
| 153 |
}; |
| 154 |
} |
| 155 |
function F(a, b) { |
| 156 |
a.c = b; |
| 157 |
E(a); |
| 158 |
} |
| 159 |
function E(a) { |
| 160 |
0 == a.a && a.c && (a.c(), (a.c = null)); |
| 161 |
} |
| 162 |
function G(a) { |
| 163 |
this.a = a || "-"; |
| 164 |
} |
| 165 |
G.prototype.c = function (a) { |
| 166 |
for (var b = [], c = 0; c < arguments.length; c++) b.push(arguments[c].replace(/[\W_]+/g, "").toLowerCase()); |
| 167 |
return b.join(this.a); |
| 168 |
}; |
| 169 |
function H(a, b) { |
| 170 |
this.c = a; |
| 171 |
this.f = 4; |
| 172 |
this.a = "n"; |
| 173 |
var c = (b || "n4").match(/^([nio])([1-9])$/i); |
| 174 |
c && ((this.a = c[1]), (this.f = parseInt(c[2], 10))); |
| 175 |
} |
| 176 |
function fa(a) { |
| 177 |
return I(a) + " " + (a.f + "00") + " 300px " + J(a.c); |
| 178 |
} |
| 179 |
function J(a) { |
| 180 |
var b = []; |
| 181 |
a = a.split(/,\s*/); |
| 182 |
for (var c = 0; c < a.length; c++) { |
| 183 |
var d = a[c].replace(/['"]/g, ""); |
| 184 |
-1 != d.indexOf(" ") || /^\d/.test(d) ? b.push("'" + d + "'") : b.push(d); |
| 185 |
} |
| 186 |
return b.join(","); |
| 187 |
} |
| 188 |
function K(a) { |
| 189 |
return a.a + a.f; |
| 190 |
} |
| 191 |
function I(a) { |
| 192 |
var b = "normal"; |
| 193 |
"o" === a.a ? (b = "oblique") : "i" === a.a && (b = "italic"); |
| 194 |
return b; |
| 195 |
} |
| 196 |
function ga(a) { |
| 197 |
var b = 4, |
| 198 |
c = "n", |
| 199 |
d = null; |
| 200 |
a && |
| 201 |
((d = a.match(/(normal|oblique|italic)/i)) && d[1] && (c = d[1].substr(0, 1).toLowerCase()), |
| 202 |
(d = a.match(/([1-9]00|normal|bold)/i)) && d[1] && (/bold/i.test(d[1]) ? (b = 7) : /[1-9]00/.test(d[1]) && (b = parseInt(d[1].substr(0, 1), 10)))); |
| 203 |
return c + b; |
| 204 |
} |
| 205 |
function ha(a, b) { |
| 206 |
this.c = a; |
| 207 |
this.f = a.m.document.documentElement; |
| 208 |
this.h = b; |
| 209 |
this.a = new G("-"); |
| 210 |
this.j = !1 !== b.events; |
| 211 |
this.g = !1 !== b.classes; |
| 212 |
} |
| 213 |
function ia(a) { |
| 214 |
a.g && w(a.f, [a.a.c("wf", "loading")]); |
| 215 |
L(a, "loading"); |
| 216 |
} |
| 217 |
function M(a) { |
| 218 |
if (a.g) { |
| 219 |
var b = y(a.f, a.a.c("wf", "active")), |
| 220 |
c = [], |
| 221 |
d = [a.a.c("wf", "loading")]; |
| 222 |
b || c.push(a.a.c("wf", "inactive")); |
| 223 |
w(a.f, c, d); |
| 224 |
} |
| 225 |
L(a, "inactive"); |
| 226 |
} |
| 227 |
function L(a, b, c) { |
| 228 |
if (a.j && a.h[b]) |
| 229 |
if (c) a.h[b](c.c, K(c)); |
| 230 |
else a.h[b](); |
| 231 |
} |
| 232 |
function ja() { |
| 233 |
this.c = {}; |
| 234 |
} |
| 235 |
function ka(a, b, c) { |
| 236 |
var d = [], |
| 237 |
e; |
| 238 |
for (e in b) |
| 239 |
if (b.hasOwnProperty(e)) { |
| 240 |
var f = a.c[e]; |
| 241 |
f && d.push(f(b[e], c)); |
| 242 |
} |
| 243 |
return d; |
| 244 |
} |
| 245 |
function N(a, b) { |
| 246 |
this.c = a; |
| 247 |
this.f = b; |
| 248 |
this.a = t(this.c, "span", { "aria-hidden": "true" }, this.f); |
| 249 |
} |
| 250 |
function O(a) { |
| 251 |
u(a.c, "body", a.a); |
| 252 |
} |
| 253 |
function P(a) { |
| 254 |
return ( |
| 255 |
"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:" + |
| 256 |
J(a.c) + |
| 257 |
";" + |
| 258 |
("font-style:" + I(a) + ";font-weight:" + (a.f + "00") + ";") |
| 259 |
); |
| 260 |
} |
| 261 |
function Q(a, b, c, d, e, f) { |
| 262 |
this.g = a; |
| 263 |
this.j = b; |
| 264 |
this.a = d; |
| 265 |
this.c = c; |
| 266 |
this.f = e || 3e3; |
| 267 |
this.h = f || void 0; |
| 268 |
} |
| 269 |
Q.prototype.start = function () { |
| 270 |
var a = this.c.m.document, |
| 271 |
b = this, |
| 272 |
c = q(), |
| 273 |
d = new Promise(function (d, e) { |
| 274 |
function k() { |
| 275 |
q() - c >= b.f |
| 276 |
? e() |
| 277 |
: a.fonts.load(fa(b.a), b.h).then( |
| 278 |
function (a) { |
| 279 |
1 <= a.length ? d() : setTimeout(k, 25); |
| 280 |
}, |
| 281 |
function () { |
| 282 |
e(); |
| 283 |
} |
| 284 |
); |
| 285 |
} |
| 286 |
k(); |
| 287 |
}), |
| 288 |
e = new Promise(function (a, d) { |
| 289 |
setTimeout(d, b.f); |
| 290 |
}); |
| 291 |
Promise.race([e, d]).then( |
| 292 |
function () { |
| 293 |
b.g(b.a); |
| 294 |
}, |
| 295 |
function () { |
| 296 |
b.j(b.a); |
| 297 |
} |
| 298 |
); |
| 299 |
}; |
| 300 |
function R(a, b, c, d, e, f, g) { |
| 301 |
this.v = a; |
| 302 |
this.B = b; |
| 303 |
this.c = c; |
| 304 |
this.a = d; |
| 305 |
this.s = g || "BESbswy"; |
| 306 |
this.f = {}; |
| 307 |
this.w = e || 3e3; |
| 308 |
this.u = f || null; |
| 309 |
this.o = this.j = this.h = this.g = null; |
| 310 |
this.g = new N(this.c, this.s); |
| 311 |
this.h = new N(this.c, this.s); |
| 312 |
this.j = new N(this.c, this.s); |
| 313 |
this.o = new N(this.c, this.s); |
| 314 |
a = new H(this.a.c + ",serif", K(this.a)); |
| 315 |
a = P(a); |
| 316 |
this.g.a.style.cssText = a; |
| 317 |
a = new H(this.a.c + ",sans-serif", K(this.a)); |
| 318 |
a = P(a); |
| 319 |
this.h.a.style.cssText = a; |
| 320 |
a = new H("serif", K(this.a)); |
| 321 |
a = P(a); |
| 322 |
this.j.a.style.cssText = a; |
| 323 |
a = new H("sans-serif", K(this.a)); |
| 324 |
a = P(a); |
| 325 |
this.o.a.style.cssText = a; |
| 326 |
O(this.g); |
| 327 |
O(this.h); |
| 328 |
O(this.j); |
| 329 |
O(this.o); |
| 330 |
} |
| 331 |
var S = { D: "serif", C: "sans-serif" }, |
| 332 |
T = null; |
| 333 |
function U() { |
| 334 |
if (null === T) { |
| 335 |
var a = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent); |
| 336 |
T = !!a && (536 > parseInt(a[1], 10) || (536 === parseInt(a[1], 10) && 11 >= parseInt(a[2], 10))); |
| 337 |
} |
| 338 |
return T; |
| 339 |
} |
| 340 |
R.prototype.start = function () { |
| 341 |
this.f.serif = this.j.a.offsetWidth; |
| 342 |
this.f["sans-serif"] = this.o.a.offsetWidth; |
| 343 |
this.A = q(); |
| 344 |
la(this); |
| 345 |
}; |
| 346 |
function ma(a, b, c) { |
| 347 |
for (var d in S) if (S.hasOwnProperty(d) && b === a.f[S[d]] && c === a.f[S[d]]) return !0; |
| 348 |
return !1; |
| 349 |
} |
| 350 |
function la(a) { |
| 351 |
var b = a.g.a.offsetWidth, |
| 352 |
c = a.h.a.offsetWidth, |
| 353 |
d; |
| 354 |
(d = b === a.f.serif && c === a.f["sans-serif"]) || (d = U() && ma(a, b, c)); |
| 355 |
d ? (q() - a.A >= a.w ? (U() && ma(a, b, c) && (null === a.u || a.u.hasOwnProperty(a.a.c)) ? V(a, a.v) : V(a, a.B)) : na(a)) : V(a, a.v); |
| 356 |
} |
| 357 |
function na(a) { |
| 358 |
setTimeout( |
| 359 |
p(function () { |
| 360 |
la(this); |
| 361 |
}, a), |
| 362 |
50 |
| 363 |
); |
| 364 |
} |
| 365 |
function V(a, b) { |
| 366 |
setTimeout( |
| 367 |
p(function () { |
| 368 |
v(this.g.a); |
| 369 |
v(this.h.a); |
| 370 |
v(this.j.a); |
| 371 |
v(this.o.a); |
| 372 |
b(this.a); |
| 373 |
}, a), |
| 374 |
0 |
| 375 |
); |
| 376 |
} |
| 377 |
function W(a, b, c) { |
| 378 |
this.c = a; |
| 379 |
this.a = b; |
| 380 |
this.f = 0; |
| 381 |
this.o = this.j = !1; |
| 382 |
this.s = c; |
| 383 |
} |
| 384 |
var X = null; |
| 385 |
W.prototype.g = function (a) { |
| 386 |
var b = this.a; |
| 387 |
b.g && w(b.f, [b.a.c("wf", a.c, K(a).toString(), "active")], [b.a.c("wf", a.c, K(a).toString(), "loading"), b.a.c("wf", a.c, K(a).toString(), "inactive")]); |
| 388 |
L(b, "fontactive", a); |
| 389 |
this.o = !0; |
| 390 |
oa(this); |
| 391 |
}; |
| 392 |
W.prototype.h = function (a) { |
| 393 |
var b = this.a; |
| 394 |
if (b.g) { |
| 395 |
var c = y(b.f, b.a.c("wf", a.c, K(a).toString(), "active")), |
| 396 |
d = [], |
| 397 |
e = [b.a.c("wf", a.c, K(a).toString(), "loading")]; |
| 398 |
c || d.push(b.a.c("wf", a.c, K(a).toString(), "inactive")); |
| 399 |
w(b.f, d, e); |
| 400 |
} |
| 401 |
L(b, "fontinactive", a); |
| 402 |
oa(this); |
| 403 |
}; |
| 404 |
function oa(a) { |
| 405 |
0 == --a.f && a.j && (a.o ? ((a = a.a), a.g && w(a.f, [a.a.c("wf", "active")], [a.a.c("wf", "loading"), a.a.c("wf", "inactive")]), L(a, "active")) : M(a.a)); |
| 406 |
} |
| 407 |
function pa(a) { |
| 408 |
this.j = a; |
| 409 |
this.a = new ja(); |
| 410 |
this.h = 0; |
| 411 |
this.f = this.g = !0; |
| 412 |
} |
| 413 |
pa.prototype.load = function (a) { |
| 414 |
this.c = new ca(this.j, a.context || this.j); |
| 415 |
this.g = !1 !== a.events; |
| 416 |
this.f = !1 !== a.classes; |
| 417 |
qa(this, new ha(this.c, a), a); |
| 418 |
}; |
| 419 |
function ra(a, b, c, d, e) { |
| 420 |
var f = 0 == --a.h; |
| 421 |
(a.f || a.g) && |
| 422 |
setTimeout(function () { |
| 423 |
var a = e || null, |
| 424 |
k = d || null || {}; |
| 425 |
if (0 === c.length && f) M(b.a); |
| 426 |
else { |
| 427 |
b.f += c.length; |
| 428 |
f && (b.j = f); |
| 429 |
var h, |
| 430 |
m = []; |
| 431 |
for (h = 0; h < c.length; h++) { |
| 432 |
var l = c[h], |
| 433 |
n = k[l.c], |
| 434 |
r = b.a, |
| 435 |
x = l; |
| 436 |
r.g && w(r.f, [r.a.c("wf", x.c, K(x).toString(), "loading")]); |
| 437 |
L(r, "fontloading", x); |
| 438 |
r = null; |
| 439 |
null === X && (X = window.FontFace ? ((x = /Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent)) ? 42 < parseInt(x[1], 10) : !0) : !1); |
| 440 |
X ? (r = new Q(p(b.g, b), p(b.h, b), b.c, l, b.s, n)) : (r = new R(p(b.g, b), p(b.h, b), b.c, l, b.s, a, n)); |
| 441 |
m.push(r); |
| 442 |
} |
| 443 |
for (h = 0; h < m.length; h++) m[h].start(); |
| 444 |
} |
| 445 |
}, 0); |
| 446 |
} |
| 447 |
function qa(a, b, c) { |
| 448 |
var d = [], |
| 449 |
e = c.timeout; |
| 450 |
ia(b); |
| 451 |
var d = ka(a.a, c, a.c), |
| 452 |
f = new W(a.c, b, e); |
| 453 |
a.h = d.length; |
| 454 |
b = 0; |
| 455 |
for (c = d.length; b < c; b++) |
| 456 |
d[b].load(function (b, d, c) { |
| 457 |
ra(a, f, b, d, c); |
| 458 |
}); |
| 459 |
} |
| 460 |
function sa(a, b) { |
| 461 |
this.c = a; |
| 462 |
this.a = b; |
| 463 |
} |
| 464 |
function ta(a, b, c) { |
| 465 |
var d = z(a.c); |
| 466 |
a = (a.a.api || "fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/, ""); |
| 467 |
return d + "//" + a + "/" + b + ".js" + (c ? "?v=" + c : ""); |
| 468 |
} |
| 469 |
sa.prototype.load = function (a) { |
| 470 |
function b() { |
| 471 |
if (f["__mti_fntLst" + d]) { |
| 472 |
var c = f["__mti_fntLst" + d](), |
| 473 |
e = [], |
| 474 |
h; |
| 475 |
if (c) |
| 476 |
for (var m = 0; m < c.length; m++) { |
| 477 |
var l = c[m].fontfamily; |
| 478 |
void 0 != c[m].fontStyle && void 0 != c[m].fontWeight ? ((h = c[m].fontStyle + c[m].fontWeight), e.push(new H(l, h))) : e.push(new H(l)); |
| 479 |
} |
| 480 |
a(e); |
| 481 |
} else |
| 482 |
setTimeout(function () { |
| 483 |
b(); |
| 484 |
}, 50); |
| 485 |
} |
| 486 |
var c = this, |
| 487 |
d = c.a.projectId, |
| 488 |
e = c.a.version; |
| 489 |
if (d) { |
| 490 |
var f = c.c.m; |
| 491 |
B(this.c, ta(c, d, e), function (e) { |
| 492 |
e |
| 493 |
? a([]) |
| 494 |
: ((f["__MonotypeConfiguration__" + d] = function () { |
| 495 |
return c.a; |
| 496 |
}), |
| 497 |
b()); |
| 498 |
}).id = "__MonotypeAPIScript__" + d; |
| 499 |
} else a([]); |
| 500 |
}; |
| 501 |
function ua(a, b) { |
| 502 |
this.c = a; |
| 503 |
this.a = b; |
| 504 |
} |
| 505 |
ua.prototype.load = function (a) { |
| 506 |
var b, |
| 507 |
c, |
| 508 |
d = this.a.urls || [], |
| 509 |
e = this.a.families || [], |
| 510 |
f = this.a.testStrings || {}, |
| 511 |
g = new C(); |
| 512 |
b = 0; |
| 513 |
for (c = d.length; b < c; b++) A(this.c, d[b], D(g)); |
| 514 |
var k = []; |
| 515 |
b = 0; |
| 516 |
for (c = e.length; b < c; b++) |
| 517 |
if (((d = e[b].split(":")), d[1])) for (var h = d[1].split(","), m = 0; m < h.length; m += 1) k.push(new H(d[0], h[m])); |
| 518 |
else k.push(new H(d[0])); |
| 519 |
F(g, function () { |
| 520 |
a(k, f); |
| 521 |
}); |
| 522 |
}; |
| 523 |
function va(a, b, c) { |
| 524 |
a ? (this.c = a) : (this.c = b + wa); |
| 525 |
this.a = []; |
| 526 |
this.f = []; |
| 527 |
this.g = c || ""; |
| 528 |
} |
| 529 |
var wa = "//fonts.googleapis.com/css"; |
| 530 |
function xa(a, b) { |
| 531 |
for (var c = b.length, d = 0; d < c; d++) { |
| 532 |
var e = b[d].split(":"); |
| 533 |
3 == e.length && a.f.push(e.pop()); |
| 534 |
var f = ""; |
| 535 |
2 == e.length && "" != e[1] && (f = ":"); |
| 536 |
a.a.push(e.join(f)); |
| 537 |
} |
| 538 |
} |
| 539 |
function ya(a) { |
| 540 |
if (0 == a.a.length) throw Error("No fonts to load!"); |
| 541 |
if (-1 != a.c.indexOf("kit=")) return a.c; |
| 542 |
for (var b = a.a.length, c = [], d = 0; d < b; d++) c.push(a.a[d].replace(/ /g, "+")); |
| 543 |
b = a.c + "?family=" + c.join("%7C"); |
| 544 |
0 < a.f.length && (b += "&subset=" + a.f.join(",")); |
| 545 |
0 < a.g.length && (b += "&text=" + encodeURIComponent(a.g)); |
| 546 |
return b; |
| 547 |
} |
| 548 |
function za(a) { |
| 549 |
this.f = a; |
| 550 |
this.a = []; |
| 551 |
this.c = {}; |
| 552 |
} |
| 553 |
var Aa = { latin: "BESbswy", "latin-ext": "\u00e7\u00f6\u00fc\u011f\u015f", cyrillic: "\u0439\u044f\u0416", greek: "\u03b1\u03b2\u03a3", khmer: "\u1780\u1781\u1782", Hanuman: "\u1780\u1781\u1782" }, |
| 554 |
Ba = { |
| 555 |
thin: "1", |
| 556 |
extralight: "2", |
| 557 |
"extra-light": "2", |
| 558 |
ultralight: "2", |
| 559 |
"ultra-light": "2", |
| 560 |
light: "3", |
| 561 |
regular: "4", |
| 562 |
book: "4", |
| 563 |
medium: "5", |
| 564 |
"semi-bold": "6", |
| 565 |
semibold: "6", |
| 566 |
"demi-bold": "6", |
| 567 |
demibold: "6", |
| 568 |
bold: "7", |
| 569 |
"extra-bold": "8", |
| 570 |
extrabold: "8", |
| 571 |
"ultra-bold": "8", |
| 572 |
ultrabold: "8", |
| 573 |
black: "9", |
| 574 |
heavy: "9", |
| 575 |
l: "3", |
| 576 |
r: "4", |
| 577 |
b: "7", |
| 578 |
}, |
| 579 |
Ca = { i: "i", italic: "i", n: "n", normal: "n" }, |
| 580 |
Da = /^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/; |
| 581 |
function Ea(a) { |
| 582 |
for (var b = a.f.length, c = 0; c < b; c++) { |
| 583 |
var d = a.f[c].split(":"), |
| 584 |
e = d[0].replace(/\+/g, " "), |
| 585 |
f = ["n4"]; |
| 586 |
if (2 <= d.length) { |
| 587 |
var g; |
| 588 |
var k = d[1]; |
| 589 |
g = []; |
| 590 |
if (k) |
| 591 |
for (var k = k.split(","), h = k.length, m = 0; m < h; m++) { |
| 592 |
var l; |
| 593 |
l = k[m]; |
| 594 |
if (l.match(/^[\w-]+$/)) { |
| 595 |
var n = Da.exec(l.toLowerCase()); |
| 596 |
if (null == n) l = ""; |
| 597 |
else { |
| 598 |
l = n[2]; |
| 599 |
l = null == l || "" == l ? "n" : Ca[l]; |
| 600 |
n = n[1]; |
| 601 |
if (null == n || "" == n) n = "4"; |
| 602 |
else |
| 603 |
var r = Ba[n], |
| 604 |
n = r ? r : isNaN(n) ? "4" : n.substr(0, 1); |
| 605 |
l = [l, n].join(""); |
| 606 |
} |
| 607 |
} else l = ""; |
| 608 |
l && g.push(l); |
| 609 |
} |
| 610 |
0 < g.length && (f = g); |
| 611 |
3 == d.length && ((d = d[2]), (g = []), (d = d ? d.split(",") : g), 0 < d.length && (d = Aa[d[0]]) && (a.c[e] = d)); |
| 612 |
} |
| 613 |
a.c[e] || ((d = Aa[e]) && (a.c[e] = d)); |
| 614 |
for (d = 0; d < f.length; d += 1) a.a.push(new H(e, f[d])); |
| 615 |
} |
| 616 |
} |
| 617 |
function Fa(a, b) { |
| 618 |
this.c = a; |
| 619 |
this.a = b; |
| 620 |
} |
| 621 |
var Ga = { Arimo: !0, Cousine: !0, Tinos: !0 }; |
| 622 |
Fa.prototype.load = function (a) { |
| 623 |
var b = new C(), |
| 624 |
c = this.c, |
| 625 |
d = new va(this.a.api, z(c), this.a.text), |
| 626 |
e = this.a.families; |
| 627 |
xa(d, e); |
| 628 |
var f = new za(e); |
| 629 |
Ea(f); |
| 630 |
A(c, ya(d), D(b)); |
| 631 |
F(b, function () { |
| 632 |
a(f.a, f.c, Ga); |
| 633 |
}); |
| 634 |
}; |
| 635 |
function Ha(a, b) { |
| 636 |
this.c = a; |
| 637 |
this.a = b; |
| 638 |
} |
| 639 |
Ha.prototype.load = function (a) { |
| 640 |
var b = this.a.id, |
| 641 |
c = this.c.m; |
| 642 |
b |
| 643 |
? B( |
| 644 |
this.c, |
| 645 |
(this.a.api || "https://use.typekit.net") + "/" + b + ".js", |
| 646 |
function (b) { |
| 647 |
if (b) a([]); |
| 648 |
else if (c.Typekit && c.Typekit.config && c.Typekit.config.fn) { |
| 649 |
b = c.Typekit.config.fn; |
| 650 |
for (var e = [], f = 0; f < b.length; f += 2) for (var g = b[f], k = b[f + 1], h = 0; h < k.length; h++) e.push(new H(g, k[h])); |
| 651 |
try { |
| 652 |
c.Typekit.load({ events: !1, classes: !1, async: !0 }); |
| 653 |
} catch (m) {} |
| 654 |
a(e); |
| 655 |
} |
| 656 |
}, |
| 657 |
2e3 |
| 658 |
) |
| 659 |
: a([]); |
| 660 |
}; |
| 661 |
function Ia(a, b) { |
| 662 |
this.c = a; |
| 663 |
this.f = b; |
| 664 |
this.a = []; |
| 665 |
} |
| 666 |
Ia.prototype.load = function (a) { |
| 667 |
var b = this.f.id, |
| 668 |
c = this.c.m, |
| 669 |
d = this; |
| 670 |
b |
| 671 |
? (c.__webfontfontdeckmodule__ || (c.__webfontfontdeckmodule__ = {}), |
| 672 |
(c.__webfontfontdeckmodule__[b] = function (b, c) { |
| 673 |
for (var g = 0, k = c.fonts.length; g < k; ++g) { |
| 674 |
var h = c.fonts[g]; |
| 675 |
d.a.push(new H(h.name, ga("font-weight:" + h.weight + ";font-style:" + h.style))); |
| 676 |
} |
| 677 |
a(d.a); |
| 678 |
}), |
| 679 |
B(this.c, z(this.c) + (this.f.api || "//f.fontdeck.com/s/css/js/") + ea(this.c) + "/" + b + ".js", function (b) { |
| 680 |
b && a([]); |
| 681 |
})) |
| 682 |
: a([]); |
| 683 |
}; |
| 684 |
var Y = new pa(window); |
| 685 |
Y.a.c.custom = function (a, b) { |
| 686 |
return new ua(b, a); |
| 687 |
}; |
| 688 |
Y.a.c.fontdeck = function (a, b) { |
| 689 |
return new Ia(b, a); |
| 690 |
}; |
| 691 |
Y.a.c.monotype = function (a, b) { |
| 692 |
return new sa(b, a); |
| 693 |
}; |
| 694 |
Y.a.c.typekit = function (a, b) { |
| 695 |
return new Ha(b, a); |
| 696 |
}; |
| 697 |
Y.a.c.google = function (a, b) { |
| 698 |
return new Fa(b, a); |
| 699 |
}; |
| 700 |
var Z = { load: p(Y.load, Y) }; |
| 701 |
"function" === typeof define && define.amd |
| 702 |
? define(function () { |
| 703 |
return Z; |
| 704 |
}) |
| 705 |
: "undefined" !== typeof module && module.exports |
| 706 |
? (module.exports = Z) |
| 707 |
: ((window.WebFont = Z), window.eshb_webFontConfig && Y.load(window.eshb_webFontConfig)); |
| 708 |
})(); |
| 709 |
|