Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Facebook Audience Network
/*1484157874,,JIT Construction: v2773152,en_US*/
/**
* Copyright Facebook Inc.
*
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*/
try {
window.AudienceNetworkPrebid || (function(window, fb_fif_window) {
var apply = Function.prototype.apply;
function bindContext(fn, thisArg) {
return function _sdkBound() {
return apply.call(fn, thisArg, arguments);
};
}
var global = {
__type: 'JS_SDK_SANDBOX',
window: window,
document: window.document
};
var sandboxWhitelist = ['setTimeout', 'setInterval', 'clearTimeout', 'clearInterval'];
for (var i = 0; i < sandboxWhitelist.length; i++) {
global[sandboxWhitelist[i]] = bindContext(window[sandboxWhitelist[i]], window);
}(function() {
var self = window;
var __DEV__ = 0;
function emptyFunction() {};
var __transform_includes = {};
var __annotator, __bodyWrapper;
var __w, __t;
var undefined;
with(this) {
(function() {
var a = {},
b = function i(j, k) {
if (!j && !k) return null;
var l = {};
if (typeof j !== 'undefined') l.type = j;
if (typeof k !== 'undefined') l.signature = k;
return l;
},
c = function i(j, k) {
return b(j && /^[A-Z]/.test(j) ? j : undefined, k && (k.params && k.params.length || k.returns) ? 'function(' + (k.params ? k.params.map(function(l) {
return /\?/.test(l) ? '?' + l.replace('?', '') : l;
}).join(',') : '') + ')' + (k.returns ? ':' + k.returns : '') : undefined);
},
d = function i(j, k, l) {
return j;
},
e = function i(j, k, l) {
if ('sourcemeta' in __transform_includes) j.__SMmeta = k;
if ('typechecks' in __transform_includes) {
var m = c(k ? k.name : undefined, l);
if (m) __w(j, m);
}
return j;
},
f = function i(j, k, l) {
return l.apply(j, k);
},
g = function i(j, k, l, m) {
if (m && m.params) __t.apply(j, m.params);
var n = l.apply(j, k);
if (m && m.returns) __t([n, m.returns]);
return n;
},
h = function i(j, k, l, m, n) {
if (n) {
if (!n.callId) n.callId = n.module + ':' + (n.line || 0) + ':' + (n.column || 0);
var o = n.callId;
a[o] = (a[o] || 0) + 1;
}
return l.apply(j, k);
};
if (typeof __transform_includes === 'undefined') {
__annotator = d;
__bodyWrapper = f;
} else {
__annotator = e;
if ('codeusage' in __transform_includes) {
__annotator = d;
__bodyWrapper = h;
__bodyWrapper.getCodeUsage = function() {
return a;
};
__bodyWrapper.clearCodeUsage = function() {
a = {};
};
} else if ('typechecks' in __transform_includes) {
__bodyWrapper = g;
} else __bodyWrapper = f;
}
})();
__t = function(a) {
return a[0];
};
__w = function(a) {
return a;
};
var require, __d;
(function(a) {
var b = {},
c = {},
d = ['global', 'require', 'requireDynamic', 'requireLazy', 'module', 'exports'];
require = function(e, f) {
if (c.hasOwnProperty(e)) return c[e];
if (!b.hasOwnProperty(e)) {
if (f) return null;
throw new Error('Module ' + e + ' has not been defined');
}
var g = b[e],
h = g.deps,
i = g.factory.length,
j, k = [];
for (var l = 0; l < i; l++) {
switch (h[l]) {
case 'module':
j = g;
break;
case 'exports':
j = g.exports;
break;
case 'global':
j = a;
break;
case 'require':
j = require;
break;
case 'requireDynamic':
j = null;
break;
case 'requireLazy':
j = null;
break;
default:
j = require.call(null, h[l]);
}
k.push(j);
}
g.factory.apply(a, k);
c[e] = g.exports;
return g.exports;
};
__d = function(e, f, g, h) {
if (typeof g == 'function') {
b[e] = {
factory: g,
deps: d.concat(f),
exports: {}
};
if (h === 3) require.call(null, e);
} else c[e] = g;
};
})(this);
__d('ES5Array', [], (function a(b, c, d, e, f, g) {
var h = {};
h.isArray = function(i) {
return Object.prototype.toString.call(i) == '[object Array]';
};
f.exports = h;
}), null);
__d('ES5ArrayPrototype', [], (function a(b, c, d, e, f, g) {
var h = {};
h.map = function(i, j) {
if (typeof i != 'function') throw new TypeError();
var k, l = this.length,
m = new Array(l);
for (k = 0; k < l; ++k)
if (k in this) m[k] = i.call(j, this[k], k, this);
return m;
};
h.forEach = function(i, j) {
h.map.call(this, i, j);
};
h.filter = function(i, j) {
if (typeof i != 'function') throw new TypeError();
var k, l, m = this.length,
n = [];
for (k = 0; k < m; ++k)
if (k in this) {
l = this[k];
if (i.call(j, l, k, this)) n.push(l);
}
return n;
};
h.every = function(i, j) {
if (typeof i != 'function') throw new TypeError();
var k = new Object(this),
l = k.length;
for (var m = 0; m < l; m++)
if (m in k)
if (!i.call(j, k[m], m, k)) return false;
return true;
};
h.some = function(i, j) {
if (typeof i != 'function') throw new TypeError();
var k = new Object(this),
l = k.length;
for (var m = 0; m < l; m++)
if (m in k)
if (i.call(j, k[m], m, k)) return true;
return false;
};
h.indexOf = function(i, j) {
var k = this.length;
j |= 0;
if (j < 0) j += k;
for (; j < k; j++)
if (j in this && this[j] === i) return j;
return -1;
};
f.exports = h;
}), null);
__d("ES5Date", [], (function a(b, c, d, e, f, g) {
var h = {};
h.now = function() {
return new Date().getTime();
};
f.exports = h;
}), null);
__d('ES5FunctionPrototype', [], (function a(b, c, d, e, f, g) {
var h = {};
h.bind = function(i) {
if (typeof this != 'function') throw new TypeError('Bind must be called on a function');
var j = this,
k = Array.prototype.slice.call(arguments, 1);
function l() {
return j.apply(i, k.concat(Array.prototype.slice.call(arguments)));
}
l.displayName = 'bound:' + (j.displayName || j.name || '(?)');
l.toString = function m() {
return 'bound: ' + j;
};
return l;
};
f.exports = h;
}), null);
__d('ie8DontEnum', [], (function a(b, c, d, e, f, g) {
var h = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'prototypeIsEnumerable', 'constructor'],
i = {}.hasOwnProperty,
j = function k() {};
if ({
toString: true
}.propertyIsEnumerable('toString')) j = function k(l, m) {
for (var n = 0; n < h.length; n++) {
var o = h[n];
if (i.call(l, o)) m(o);
}
};
f.exports = j;
}), null);
__d('ES5Object', ['ie8DontEnum'], (function a(b, c, d, e, f, g, h) {
var i = {}.hasOwnProperty,
j = {};
function k() {}
j.create = function(l) {
var m = typeof l;
if (m != 'object' && m != 'function') throw new TypeError('Object prototype may only be a Object or null');
k.prototype = l;
return new k();
};
j.keys = function(l) {
var m = typeof l;
if (m != 'object' && m != 'function' || l === null) throw new TypeError('Object.keys called on non-object');
var n = [];
for (var o in l)
if (i.call(l, o)) n.push(o);
h(l, function(p) {
return n.push(p);
});
return n;
};
f.exports = j;
}), null);
__d('ES5StringPrototype', [], (function a(b, c, d, e, f, g) {
var h = {};
h.trim = function() {
if (this == null) throw new TypeError('String.prototype.trim called on null or undefined');
return String.prototype.replace.call(this, /^\s+|\s+$/g, '');
};
h.startsWith = function(i) {
var j = String(this);
if (this == null) throw new TypeError('String.prototype.startsWith called on null or undefined');
var k = arguments.length > 1 ? Number(arguments[1]) : 0;
if (isNaN(k)) k = 0;
var l = Math.min(Math.max(k, 0), j.length);
return j.indexOf(String(i), k) == l;
};
h.endsWith = function(i) {
var j = String(this);
if (this == null) throw new TypeError('String.prototype.endsWith called on null or undefined');
var k = j.length,
l = String(i),
m = arguments.length > 1 ? Number(arguments[1]) : k;
if (isNaN(m)) m = 0;
var n = Math.min(Math.max(m, 0), k),
o = n - l.length;
if (o < 0) return false;
return j.lastIndexOf(l, o) == o;
};
h.includes = function(i) {
if (this == null) throw new TypeError('String.prototype.contains called on null or undefined');
var j = String(this),
k = arguments.length > 1 ? Number(arguments[1]) : 0;
if (isNaN(k)) k = 0;
return j.indexOf(String(i), k) != -1;
};
h.contains = h.includes;
h.repeat = function(i) {
if (this == null) throw new TypeError('String.prototype.repeat called on null or undefined');
var j = String(this),
k = i ? Number(i) : 0;
if (isNaN(k)) k = 0;
if (k < 0 || k === Infinity) throw RangeError();
if (k === 1) return j;
if (k === 0) return '';
var l = '';
while (k) {
if (k & 1) l += j;
if (k >>= 1) j += j;
}
return l;
};
f.exports = h;
}), null);
__d('ES6Array', [], (function a(b, c, d, e, f, g) {
'use strict';
var h = {
from: function i(j) {
if (j == null) throw new TypeError('Object is null or undefined');
var k = arguments[1],
l = arguments[2],
m = this,
n = Object(j),
o = typeof Symbol === 'function' ? typeof Symbol === 'function' ? Symbol.iterator : '@@iterator' : '@@iterator',
p = typeof k === 'function',
q = typeof n[o] === 'function',
r = 0,
s = void 0,
t = void 0;
if (q) {
s = typeof m === 'function' ? new m() : [];
var u = n[o](),
v = void 0;
while (!(v = u.next()).done) {
t = v.value;
if (p) t = k.call(l, t, r);
s[r] = t;
r += 1;
}
s.length = r;
return s;
}
var w = n.length;
if (isNaN(w) || w < 0) w = 0;
s = typeof m === 'function' ? new m(w) : new Array(w);
while (r < w) {
t = n[r];
if (p) t = k.call(l, t, r);
s[r] = t;
r += 1;
}
s.length = r;
return s;
}
};
f.exports = h;
}), null);
__d('ES6ArrayPrototype', [], (function a(b, c, d, e, f, g) {
var h = {
find: function i(j, k) {
if (this == null) throw new TypeError('Array.prototype.find called on null or undefined');
if (typeof j !== 'function') throw new TypeError('predicate must be a function');
var l = h.findIndex.call(this, j, k);
return l === -1 ? void 0 : this[l];
},
findIndex: function i(j, k) {
if (this == null) throw new TypeError('Array.prototype.findIndex called on null or undefined');
if (typeof j !== 'function') throw new TypeError('predicate must be a function');
var l = Object(this),
m = l.length >>> 0;
for (var n = 0; n < m; n++)
if (j.call(k, l[n], n, l)) return n;
return -1;
},
fill: function i(j) {
if (this == null) throw new TypeError('Array.prototype.fill called on null or undefined');
var k = Object(this),
l = k.length >>> 0,
m = arguments[1],
n = m >> 0,
o = n < 0 ? Math.max(l + n, 0) : Math.min(n, l),
p = arguments[2],
q = p === undefined ? l : p >> 0,
r = q < 0 ? Math.max(l + q, 0) : Math.min(q, l);
while (o < r) {
k[o] = j;
o++;
}
return k;
}
};
f.exports = h;
}), null);
__d('ES6DatePrototype', [], (function a(b, c, d, e, f, g) {
function h(j) {
return (j < 10 ? '0' : '') + j;
}
var i = {
toISOString: function j() {
if (!isFinite(this)) throw new Error('Invalid time value');
var k = this.getUTCFullYear();
k = (k < 0 ? '-' : k > 9999 ? '+' : '') + ('00000' + Math.abs(k)).slice(0 <= k && k <= 9999 ? -4 : -6);
return k + '-' + h(this.getUTCMonth() + 1) + '-' + h(this.getUTCDate()) + 'T' + h(this.getUTCHours()) + ':' + h(this.getUTCMinutes()) + ':' + h(this.getUTCSeconds()) + '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';
}
};
f.exports = i;
}), null);
__d('ES6Number', [], (function a(b, c, d, e, f, g) {
var h = Math.pow(2, -52),
i = Math.pow(2, 53) - 1,
j = -1 * i,
k = {
isFinite: function(l) {
function m(n) {
return l.apply(this, arguments);
}
m.toString = function() {
return l.toString();
};
return m;
}(function(l) {
return typeof l == 'number' && isFinite(l);
}),
isNaN: function(l) {
function m(n) {
return l.apply(this, arguments);
}
m.toString = function() {
return l.toString();
};
return m;
}(function(l) {
return typeof l == 'number' && isNaN(l);
}),
isInteger: function l(m) {
return this.isFinite(m) && Math.floor(m) === m;
},
isSafeInteger: function l(m) {
return this.isFinite(m) && m >= this.MIN_SAFE_INTEGER && m <= this.MAX_SAFE_INTEGER && Math.floor(m) === m;
},
EPSILON: h,
MAX_SAFE_INTEGER: i,
MIN_SAFE_INTEGER: j
};
f.exports = k;
}), null);
__d('ES6Object', ['ie8DontEnum'], (function a(b, c, d, e, f, g, h) {
var i = {}.hasOwnProperty,
j = {
assign: function k(l) {
if (l == null) throw new TypeError('Object.assign target cannot be null or undefined');
l = Object(l);
for (var m = arguments.length, n = Array(m > 1 ? m - 1 : 0), o = 1; o < m; o++) n[o - 1] = arguments[o];
for (var p = 0; p < n.length; p++) {
var q = n[p];
if (q == null) continue;
q = Object(q);
for (var r in q)
if (i.call(q, r)) l[r] = q[r];
h(q, function(s) {
return l[s] = q[s];
});
}
return l;
},
is: function k(l, m) {
if (l === m) {
return l !== 0 || 1 / l === 1 / m;
} else return l !== l && m !== m;
}
};
f.exports = j;
}), null);
__d('ES7Object', ['ie8DontEnum'], (function a(b, c, d, e, f, g, h) {
var i = {}.hasOwnProperty,
j = {};
j.entries = function(k) {
if (k == null) throw new TypeError('Object.entries called on non-object');
var l = [];
for (var m in k)
if (i.call(k, m)) l.push([m, k[m]]);
h(k, function(n) {
return l.push([n, k[n]]);
});
return l;
};
j.values = function(k) {
if (k == null) throw new TypeError('Object.values called on non-object');
var l = [];
for (var m in k)
if (i.call(k, m)) l.push(k[m]);
h(k, function(n) {
return l.push(k[n]);
});
return l;
};
f.exports = j;
}), null);
__d('ES7StringPrototype', [], (function a(b, c, d, e, f, g) {
var h = {};
h.trimLeft = function() {
return this.replace(/^\s+/, '');
};
h.trimRight = function() {
return this.replace(/\s+$/, '');
};
f.exports = h;
}), null);
/**
* @providesModule JSON3
* @preserve-header
*
*! JSON v3.2.3 | http://bestiejs.github.com/json3 | Copyright 2012, Kit Cambridge | http://kit.mit-license.org
*/
__d("JSON3", [], (function a(b, c, d, e, f, g) {
(function() {
var h = {}.toString,
i, j, k, l = f.exports = {},
m = '{"A":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}',
n, o, p, q, r, s, t, u, v, w, x, y, z, aa, ba, ca = new Date(-3509827334573292),
da, ea, fa;
try {
ca = ca.getUTCFullYear() == -109252 && ca.getUTCMonth() === 0 && ca.getUTCDate() == 1 && ca.getUTCHours() == 10 && ca.getUTCMinutes() == 37 && ca.getUTCSeconds() == 6 && ca.getUTCMilliseconds() == 708;
} catch (ga) {}
if (!ca) {
da = Math.floor;
ea = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
fa = function(ha, ia) {
return ea[ia] + 365 * (ha - 1970) + da((ha - 1969 + (ia = +(ia > 1))) / 4) - da((ha - 1901 + ia) / 100) + da((ha - 1601 + ia) / 400);
};
}
if (typeof JSON == "object" && JSON) {
l.stringify = JSON.stringify;
l.parse = JSON.parse;
}
if ((n = typeof l.stringify == "function" && !fa)) {
(ca = function() {
return 1;
}).toJSON = ca;
try {
n = l.stringify(0) === "0" && l.stringify(new Number()) === "0" && l.stringify(new String()) == '""' && l.stringify(h) === k && l.stringify(k) === k && l.stringify() === k && l.stringify(ca) === "1" && l.stringify([ca]) == "[1]" && l.stringify([k]) == "[null]" && l.stringify(null) == "null" && l.stringify([k, h, null]) == "[null,null,null]" && l.stringify({
result: [ca, true, false, null, "\0\b\n\f\r\t"]
}) == m && l.stringify(null, ca) === "1" && l.stringify([1, 2], null, 1) == "[\n 1,\n 2\n]" && l.stringify(new Date(-8.64e+15)) == '"-271821-04-20T00:00:00.000Z"' && l.stringify(new Date(8.64e+15)) == '"+275760-09-13T00:00:00.000Z"' && l.stringify(new Date(-62198755200000)) == '"-000001-01-01T00:00:00.000Z"' && l.stringify(new Date(-1)) == '"1969-12-31T23:59:59.999Z"';
} catch (ga) {
n = false;
}
}
if (typeof l.parse == "function") try {
if (l.parse("0") === 0 && !l.parse(false)) {
ca = l.parse(m);
if ((s = ca.A.length == 5 && ca.A[0] == 1)) {
try {
s = !l.parse('"\t"');
} catch (ga) {}
if (s) try {
s = l.parse("01") != 1;
} catch (ga) {}
}
}
} catch (ga) {
s = false;
}
ca = m = null;
if (!n || !s) {
if (!(i = {}.hasOwnProperty)) i = function(ha) {
var ia = {},
ja;
if ((ia.__proto__ = null, ia.__proto__ = {
toString: 1
}, ia).toString != h) {
i = function(ka) {
var la = this.__proto__,
ma = ka in (this.__proto__ = null, this);
this.__proto__ = la;
return ma;
};
} else {
ja = ia.constructor;
i = function(ka) {
var la = (this.constructor || ja).prototype;
return ka in this && !(ka in la && this[ka] === la[ka]);
};
}
ia = null;
return i.call(this, ha);
};
j = function(ha, ia) {
var ja = 0,
ka, la, ma, na;
(ka = function() {
this.valueOf = 0;
}).prototype.valueOf = 0;
la = new ka();
for (ma in la)
if (i.call(la, ma)) ja++;
ka = la = null;
if (!ja) {
la = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"];
na = function(oa, pa) {
var qa = h.call(oa) == "[object Function]",
ra, sa;
for (ra in oa)
if (!(qa && ra == "prototype") && i.call(oa, ra)) pa(ra);
for (sa = la.length; ra = la[--sa]; i.call(oa, ra) && pa(ra));
};
} else if (ja == 2) {
na = function(oa, pa) {
var qa = {},
ra = h.call(oa) == "[object Function]",
sa;
for (sa in oa)
if (!(ra && sa == "prototype") && !i.call(qa, sa) && (qa[sa] = 1) && i.call(oa, sa)) pa(sa);
};
} else na = function(oa, pa) {
var qa = h.call(oa) == "[object Function]",
ra, sa;
for (ra in oa)
if (!(qa && ra == "prototype") && i.call(oa, ra) && !(sa = ra === "constructor")) pa(ra);
if (sa || i.call(oa, (ra = "constructor"))) pa(ra);
};
return na(ha, ia);
};
if (!n) {
o = {
"\\": "\\\\",
'"': '\\"',
"\b": "\\b",
"\f": "\\f",
"\n": "\\n",
"\r": "\\r",
"\t": "\\t"
};
p = function(ha, ia) {
return ("000000" + (ia || 0)).slice(-ha);
};
q = function(ha) {
var ia = '"',
ja = 0,
ka;
for (; ka = ha.charAt(ja); ja++) ia += '\\"\b\f\n\r\t'.indexOf(ka) > -1 ? o[ka] : ka < " " ? "\\u00" + p(2, ka.charCodeAt(0).toString(16)) : ka;
return ia + '"';
};
r = function(ha, ia, ja, ka, la, ma, na) {
var oa = ia[ha],
pa, qa, ra, sa, ta, ua, va, wa, xa, ya, za, ab, bb, cb, db;
if (typeof oa == "object" && oa) {
pa = h.call(oa);
if (pa == "[object Date]" && !i.call(oa, "toJSON")) {
if (oa > -1 / 0 && oa < 1 / 0) {
if (fa) {
sa = da(oa / 86400000);
for (qa = da(sa / 365.2425) + 1970 - 1; fa(qa + 1, 0) <= sa; qa++);
for (ra = da((sa - fa(qa, 0)) / 30.42); fa(qa, ra + 1) <= sa; ra++);
sa = 1 + sa - fa(qa, ra);
ta = (oa % 86400000 + 86400000) % 86400000;
ua = da(ta / 3600000) % 24;
va = da(ta / 60000) % 60;
wa = da(ta / 1000) % 60;
xa = ta % 1000;
} else {
qa = oa.getUTCFullYear();
ra = oa.getUTCMonth();
sa = oa.getUTCDate();
ua = oa.getUTCHours();
va = oa.getUTCMinutes();
wa = oa.getUTCSeconds();
xa = oa.getUTCMilliseconds();
}
oa = (qa <= 0 || qa >= 10000 ? (qa < 0 ? "-" : "+") + p(6, qa < 0 ? -qa : qa) : p(4, qa)) + "-" + p(2, ra + 1) + "-" + p(2, sa) + "T" + p(2, ua) + ":" + p(2, va) + ":" + p(2, wa) + "." + p(3, xa) + "Z";
} else oa = null;
} else if (typeof oa.toJSON == "function" && ((pa != "[object Number]" && pa != "[object String]" && pa != "[object Array]") || i.call(oa, "toJSON"))) oa = oa.toJSON(ha);
}
if (ja) oa = ja.call(ia, ha, oa);
if (oa === null) return "null";
pa = h.call(oa);
if (pa == "[object Boolean]") {
return "" + oa;
} else if (pa == "[object Number]") {
return oa > -1 / 0 && oa < 1 / 0 ? "" + oa : "null";
} else if (pa == "[object String]") return q(oa);
if (typeof oa == "object") {
for (bb = na.length; bb--;)
if (na[bb] === oa) throw TypeError();
na.push(oa);
ya = [];
cb = ma;
ma += la;
if (pa == "[object Array]") {
for (ab = 0, bb = oa.length; ab < bb; db || (db = true), ab++) {
za = r(ab, oa, ja, ka, la, ma, na);
ya.push(za === k ? "null" : za);
}
return db ? (la ? "[\n" + ma + ya.join(",\n" + ma) + "\n" + cb + "]" : ("[" + ya.join(",") + "]")) : "[]";
} else {
j(ka || oa, function(eb) {
var fb = r(eb, oa, ja, ka, la, ma, na);
if (fb !== k) ya.push(q(eb) + ":" + (la ? " " : "") + fb);
db || (db = true);
});
return db ? (la ? "{\n" + ma + ya.join(",\n" + ma) + "\n" + cb + "}" : ("{" + ya.join(",") + "}")) : "{}";
}
na.pop();
}
};
l.stringify = function(ha, ia, ja) {
var ka, la, ma, na, oa, pa;
if (typeof ia == "function" || typeof ia == "object" && ia)
if (h.call(ia) == "[object Function]") {
la = ia;
} else if (h.call(ia) == "[object Array]") {
ma = {};
for (na = 0, oa = ia.length; na < oa; pa = ia[na++], ((h.call(pa) == "[object String]" || h.call(pa) == "[object Number]") && (ma[pa] = 1)));
}
if (ja)
if (h.call(ja) == "[object Number]") {
if ((ja -= ja % 1) > 0)
for (ka = "", ja > 10 && (ja = 10); ka.length < ja; ka += " ");
} else if (h.call(ja) == "[object String]") ka = ja.length <= 10 ? ja : ja.slice(0, 10);
return r("", (pa = {}, pa[""] = ha, pa), la, ma, ka, "", []);
};
}
if (!s) {
t = String.fromCharCode;
u = {
"\\": "\\",
'"': '"',
"/": "/",
b: "\b",
t: "\t",
n: "\n",
f: "\f",
r: "\r"
};
v = function() {
aa = ba = null;
throw SyntaxError();
};
w = function() {
var ha = ba,
ia = ha.length,
ja, ka, la, ma, na;
while (aa < ia) {
ja = ha.charAt(aa);
if ("\t\r\n ".indexOf(ja) > -1) {
aa++;
} else if ("{}[]:,".indexOf(ja) > -1) {
aa++;
return ja;
} else if (ja == '"') {
for (ka = "@", aa++; aa < ia;) {
ja = ha.charAt(aa);
if (ja < " ") {
v();
} else if (ja == "\\") {
ja = ha.charAt(++aa);
if ('\\"/btnfr'.indexOf(ja) > -1) {
ka += u[ja];
aa++;
} else if (ja == "u") {
la = ++aa;
for (ma = aa + 4; aa < ma; aa++) {
ja = ha.charAt(aa);
if (!(ja >= "0" && ja <= "9" || ja >= "a" && ja <= "f" || ja >= "A" && ja <= "F")) v();
}
ka += t("0x" + ha.slice(la, aa));
} else v();
} else {
if (ja == '"') break;
ka += ja;
aa++;
}
}
if (ha.charAt(aa) == '"') {
aa++;
return ka;
}
v();
} else {
la = aa;
if (ja == "-") {
na = true;
ja = ha.charAt(++aa);
}
if (ja >= "0" && ja <= "9") {
if (ja == "0" && (ja = ha.charAt(aa + 1), ja >= "0" && ja <= "9")) v();
na = false;
for (; aa < ia && (ja = ha.charAt(aa), ja >= "0" && ja <= "9"); aa++);
if (ha.charAt(aa) == ".") {
ma = ++aa;
for (; ma < ia && (ja = ha.charAt(ma), ja >= "0" && ja <= "9"); ma++);
if (ma == aa) v();
aa = ma;
}
ja = ha.charAt(aa);
if (ja == "e" || ja == "E") {
ja = ha.charAt(++aa);
if (ja == "+" || ja == "-") aa++;
for (ma = aa; ma < ia && (ja = ha.charAt(ma), ja >= "0" && ja <= "9"); ma++);
if (ma == aa) v();
aa = ma;
}
return +ha.slice(la, aa);
}
if (na) v();
if (ha.slice(aa, aa + 4) == "true") {
aa += 4;
return true;
} else if (ha.slice(aa, aa + 5) == "false") {
aa += 5;
return false;
} else if (ha.slice(aa, aa + 4) == "null") {
aa += 4;
return null;
}
v();
}
}
return "$";
};
x = function(ha) {
var ia, ja, ka;
if (ha == "$") v();
if (typeof ha == "string") {
if (ha.charAt(0) == "@") return ha.slice(1);
if (ha == "[") {
ia = [];
for (;; ja || (ja = true)) {
ha = w();
if (ha == "]") break;
if (ja)
if (ha == ",") {
ha = w();
if (ha == "]") v();
} else v();
if (ha == ",") v();
ia.push(x(ha));
}
return ia;
} else if (ha == "{") {
ia = {};
for (;; ja || (ja = true)) {
ha = w();
if (ha == "}") break;
if (ja)
if (ha == ",") {
ha = w();
if (ha == "}") v();
} else v();
if (ha == "," || typeof ha != "string" || ha.charAt(0) != "@" || w() != ":") v();
ia[ha.slice(1)] = x(w());
}
return ia;
}
v();
}
return ha;
};
z = function(ha, ia, ja) {
var ka = y(ha, ia, ja);
if (ka === k) {
delete ha[ia];
} else ha[ia] = ka;
};
y = function(ha, ia, ja) {
var ka = ha[ia],
la;
if (typeof ka == "object" && ka)
if (h.call(ka) == "[object Array]") {
for (la = ka.length; la--;) z(ka, la, ja);
} else j(ka, function(ma) {
z(ka, ma, ja);
});
return ja.call(ha, ia, ka);
};
l.parse = function(ha, ia) {
aa = 0;
ba = ha;
var ja = x(w());
if (w() != "$") v();
aa = ba = null;
return ia && h.call(ia) == "[object Function]" ? y((ca = {}, ca[""] = ja, ca), "", ia) : ja;
};
}
}
}).call(this);
}), null);
__d('ES', ['ES5ArrayPrototype', 'ES5FunctionPrototype', 'ES5StringPrototype', 'ES5Array', 'ES5Object', 'ES5Date', 'JSON3', 'ES6Array', 'ES6Object', 'ES6ArrayPrototype', 'ES6DatePrototype', 'ES6Number', 'ES7StringPrototype', 'ES7Object'], (function a(b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) {
var v = {}.toString,
w = {
'JSON.stringify': n.stringify,
'JSON.parse': n.parse
},
x = {
'Array.prototype': h,
'Function.prototype': i,
'String.prototype': j,
Object: l,
Array: k,
Date: m
},
y = {
Object: p,
'Array.prototype': q,
'Date.prototype': r,
Number: s,
Array: o
},
z = {
Object: u,
'String.prototype': t
};
function aa(ca) {
for (var da in ca) {
if (!ca.hasOwnProperty(da)) continue;
var ea = ca[da],
fa = da.split('.');
if (fa.length === 2) {
var ga = fa[0],
ha = fa[1];
if (!ga || !ha || !window[ga] || !window[ga][ha]) {
var ia = ga ? window[ga] : '-',
ja = ga && window[ga] && ha ? window[ga][ha] : '-';
throw new Error('Unexpected state (t11975770): ' + (ga + ', ' + ha + ', ' + ia + ', ' + ja + ', ' + da));
}
}
var ka = fa.length === 2 ? window[fa[0]][fa[1]] : window[da];
for (var la in ea) {
if (!ea.hasOwnProperty(la)) continue;
if (typeof ea[la] !== 'function') {
w[da + '.' + la] = ea[la];
continue;
}
var ma = ka[la];
w[da + '.' + la] = ma && /\{\s+\[native code\]\s\}/.test(ma) ? ma : ea[la];
}
}
}
aa(x);
aa(y);
aa(z);
function ba(ca, da, ea) {
var fa = ea ? v.call(ca).slice(8, -1) + '.prototype' : ca,
ga = w[fa + '.' + da] || ca[da];
if (typeof ga === 'function') {
for (var ha = arguments.length, ia = Array(ha > 3 ? ha - 3 : 0), ja = 3; ja < ha; ja++) ia[ja - 3] = arguments[ja];
return ga.apply(ca, ia);
} else if (ga) return ga;
throw new Error('Polyfill ' + fa + ' does not have implementation of ' + da);
}
f.exports = ba;
}), null);
__d('sdk.babelHelpers', ['ES5FunctionPrototype', 'ES5Object', 'ES6Object'], (function a(b, c, d, e, f, g, h, i, j) {
var k = {},
l = Object.prototype.hasOwnProperty;
k.inherits = function(m, n) {
j.assign(m, n);
m.prototype = i.create(n && n.prototype);
m.prototype.constructor = m;
m.__superConstructor__ = n;
return n;
};
k._extends = j.assign;
k['extends'] = k._extends;
k.objectWithoutProperties = function(m, n) {
var o = {};
for (var p in m) {
if (!l.call(m, p) || n.indexOf(p) >= 0) continue;
o[p] = m[p];
}
return o;
};
k.taggedTemplateLiteralLoose = function(m, n) {
m.raw = n;
return m;
};
k.bind = h.bind;
f.exports = k;
}), null);
var ES = require('ES');
var babelHelpers = require('sdk.babelHelpers');
__d("UrlMapConfig", [], {
"www": "www.facebook.com",
"m": "m.facebook.com",
"connect": "connect.facebook.net",
"business": "business.facebook.com",
"api_https": "api.facebook.com",
"api_read_https": "api-read.facebook.com",
"graph_https": "graph.facebook.com",
"an_https": "an.facebook.com",
"fbcdn_http": "static.xx.fbcdn.net",
"fbcdn_https": "static.xx.fbcdn.net",
"cdn_http": "staticxx.facebook.com",
"cdn_https": "staticxx.facebook.com"
});
__d('Rectangle.adquality', [], function a(b, c, d, e, f, g) {
'use strict';
function h(i, j, k, l) {
this.x = i || 0;
this.y = j || 0;
this.width = k || 0;
this.height = l || 0;
}
h.RectangleZero = function() {
return new h(0, 0, 0, 0);
};
h.RectangleFromClientRect = function(i) {
return new h(i.left || 0, i.top || 0, i.width || i.right - i.left || 0, i.height || i.bottom - i.top || 0);
};
h.ClientRectFromRectangle = function(i) {
return {
width: i.width,
height: i.height,
left: i.x,
top: i.y,
right: i.x + i.width,
bottom: i.y + i.height
};
};
h.RectangleFromWindow = function(i) {
try {
var k = i.document,
l = i.document.documentElement,
m = l.hasOwnProperty ? l.hasOwnProperty('ontouchstart') : false,
n = k.compatMode === 'BackCompat',
o = void 0,
p = void 0;
if (m) {
o = i.innerWidth;
p = i.innerHeight;
} else if (n) {
o = k.body.clientWidth;
p = k.body.clientHeight;
} else {
o = l.clientWidth;
p = l.clientHeight;
}
return new h(0, 0, o, p);
} catch (j) {
return null;
}
};
h.prototype.area = function() {
return this.width * this.height;
};
h.prototype.getData = function() {
return {
x: this.x,
y: this.y,
width: this.width,
height: this.height
};
};
h.prototype.intersection = function(i) {
var j = Math.max(this.x, i.x),
k = Math.max(this.y, i.y),
l = Math.min(this.x + this.width, i.x + i.width),
m = Math.min(this.y + this.height, i.y + i.height);
if (l >= j && m >= k) return new h(j, k, l - j, m - k);
return null;
};
h.prototype.offset = function(i, j) {
return new h(this.x + i, this.y + j, this.width, this.height);
};
f.exports = h;
}, null);
__d('HTMLElementFrameContextResult.adquality', ['Rectangle.adquality'], function a(b, c, d, e, f, g, h) {
'use strict';
function i() {
this.crossDomainWindowCount = 0;
this.error = null;
this.focus = null;
this.locations = [];
this.offsetHeight = null;
this.offsetRect = null;
this.offsetWidth = null;
this.pageURL = null;
this.parentWindow = null;
this.topLocationURL = null;
this.topReferrerURL = null;
this.topURL = null;
this.topWindow = null;
this.topWindowLevel = 0;
this.type = null;
this.viewportRect = null;
this.windowCount = 0;
this.domainDetectionMethod = i.DOMAIN_DETECTION_UNKNOWN;
this.pageDomain = null;
this.transparent = null;
}
i.prototype.getData = function() {
var j = null;
if (this.error) try {
j = this.error.toString();
} catch (k) {
j = 'Unknown error';
}
return {
crossDomainWindowCount: this.crossDomainWindowCount,
error: j,
focus: this.focus,
locations: this.locations,
offsetHeight: this.offsetHeight,
offsetRect: this.offsetRect ? this.offsetRect.getData() : null,
offsetWidth: this.offsetWidth,
pageDomain: this.pageDomain,
pageURL: this.pageURL,
domainDetectionMethod: this.domainDetectionMethod,
topWindowLevel: this.topWindowLevel,
topLocationURL: this.topLocationURL,
topReferrerURL: this.topReferrerURL,
topURL: this.topURL,
type: this.type,
viewportRect: this.viewportRect ? this.viewportRect.getData() : null,
windowCount: this.windowCount,
transparent: this.transparent
};
};
i.TYPE_NONE = 0;
i.TYPE_SAME_ORIGIN = 1;
i.TYPE_CROSS_ORIGIN = 2;
i.DOMAIN_DETECTION_UNKNOWN = 0;
i.DOMAIN_DETECTION_LOCATION = 1;
i.DOMAIN_DETECTION_REFERRER = 2;
i.DOMAIN_DETECTION_ANCESTOR_ORIGINS = 3;
f.exports = i;
}, null);
__d("ManagedError", [], function a(b, c, d, e, f, g) {
function h(i, j) {
Error.prototype.constructor.call(this, i);
this.message = i;
this.innerError = j;
}
h.prototype = new Error();
h.prototype.constructor = h;
f.exports = h;
}, null);
__d('AssertionError', ['ManagedError'], function a(b, c, d, e, f, g, h) {
function i(j) {
h.prototype.constructor.apply(this, arguments);
}
i.prototype = new h();
i.prototype.constructor = i;
f.exports = i;
}, null);
__d("sprintf", [], (function a(b, c, d, e, f, g) {
function h(i) {
for (var j = arguments.length, k = Array(j > 1 ? j - 1 : 0), l = 1; l < j; l++) k[l - 1] = arguments[l];
var m = 0;
return i.replace(/%s/g, function() {
return String(k[m++]);
});
}
f.exports = h;
}), null);
__d('Assert', ['AssertionError', 'sprintf'], function a(b, c, d, e, f, g, h, i) {
function j(o, p) {
if (typeof o !== 'boolean' || !o) throw new h(p);
return o;
}
function k(o, p, q) {
var r;
if (p === undefined) {
r = 'undefined';
} else if (p === null) {
r = 'null';
} else {
var s = Object.prototype.toString.call(p);
r = /\s(\w*)/.exec(s)[1].toLowerCase();
}
j(ES(o, 'indexOf', true, r) !== -1, q || i('Expression is of type %s, not %s', r, o));
return p;
}
function l(o, p, q) {
j(p instanceof o, q || 'Expression not instance of type');
return p;
}
function m(o, p) {
n['is' + o] = p;
n['maybe' + o] = function(q, r) {
if (q != null) p(q, r);
};
}
var n = {
isInstanceOf: l,
isTrue: j,
isTruthy: function o(p, q) {
return j(!!p, q);
},
type: k,
define: function o(p, q) {
p = p.substring(0, 1).toUpperCase() + p.substring(1).toLowerCase();
m(p, function(r, s) {
j(q(r), s);
});
}
};
ES(['Array', 'Boolean', 'Date', 'Function', 'Null', 'Number', 'Object', 'Regexp', 'String', 'Undefined'], 'forEach', true, function(o) {
m(o, ES(k, 'bind', true, null, o.toLowerCase()));
});
f.exports = n;
}, null);
__d('QueryString', [], function a(b, c, d, e, f, g) {
function h(l) {
var m = [];
ES(ES('Object', 'keys', false, l).sort(), 'forEach', true, function(n) {
var o = l[n];
if (typeof o === 'undefined') return;
if (o === null) {
m.push(n);
return;
}
m.push(encodeURIComponent(n) + '=' + encodeURIComponent(o));
});
return m.join('&');
}
function i(l, m) {
var n = {};
if (l === '') return n;
var o = l.split('&');
for (var p = 0; p < o.length; p++) {
var q = o[p].split('=', 2),
r = decodeURIComponent(q[0]);
if (m && n.hasOwnProperty(r)) throw new URIError('Duplicate key: ' + r);
n[r] = q.length === 2 ? decodeURIComponent(q[1]) : null;
}
return n;
}
function j(l, m) {
return l + (ES(l, 'indexOf', true, '?') !== -1 ? '&' : '?') + (typeof m === 'string' ? m : k.encode(m));
}
var k = {
encode: h,
decode: i,
appendToUrl: j
};
f.exports = k;
}, null);
__d('URIRFC3986', [], function a(b, c, d, e, f, g) {
var h = new RegExp('^' + '([^:/?#]+:)?' + '(//' + '([^\\\\/?#@]*@)?' + '(' + '\\[[A-Fa-f0-9:.]+\\]|' + '[^\\/?#:]*' + ')' + '(:[0-9]*)?' + ')?' + '([^?#]*)' + '(\\?[^#]*)?' + '(#.*)?'),
i = {
parse: function j(k) {
if (ES(k, 'trim', true) === '') return null;
var l = k.match(h);
if (l == null) return null;
var m = {};
m.uri = l[0] ? l[0] : null;
m.scheme = l[1] ? l[1].substr(0, l[1].length - 1) : null;
m.authority = l[2] ? l[2].substr(2) : null;
m.userinfo = l[3] ? l[3].substr(0, l[3].length - 1) : null;
m.host = l[2] ? l[4] : null;
m.port = l[5] ? l[5].substr(1) ? parseInt(l[5].substr(1), 10) : null : null;
m.path = l[6] ? l[6] : null;
m.query = l[7] ? l[7].substr(1) : null;
m.fragment = l[8] ? l[8].substr(1) : null;
m.isGenericURI = m.authority === null && !!m.scheme;
return m;
}
};
f.exports = i;
}, null);
__d('createObjectFrom', [], function a(b, c, d, e, f, g) {
function h(i, j) {
var k = {},
l = ES('Array', 'isArray', false, j);
if (j === undefined) j = true;
for (var m = i.length - 1; m >= 0; m--) k[i[m]] = l ? j[m] : j;
return k;
}
f.exports = h;
}, null);
__d('URISchemes', ['createObjectFrom'], function a(b, c, d, e, f, g, h) {
var i = h(['blob', 'cmms', 'fb', 'fbatwork', 'fb-ama', 'fb-messenger', 'fb-page-messages', 'fb-pma', 'fbcf', 'fbconnect', 'fbmobilehome', 'fbrpc', 'file', 'ftp', 'http', 'https', 'mailto', 'ms-app', 'intent', 'itms', 'itms-apps', 'itms-services', 'market', 'svn+ssh', 'fbstaging', 'tel', 'sms', 'pebblejs', 'sftp', 'whatsapp', 'moments', 'fblite', 'chrome-extension', 'webcal', 'fb124024574287414', 'fb124024574287414rc', 'fb124024574287414master', 'fb1576585912599779', 'fb929757330408142', 'designpack']),
j = {
isAllowed: function k(l) {
if (!l) return true;
return i.hasOwnProperty(l.toLowerCase());
}
};
f.exports = j;
}, null);
__d('eprintf', [], function a(b, c, d, e, f, g) {
function h(i) {
for (var j = arguments.length, k = Array(j > 1 ? j - 1 : 0), l = 1; l < j; l++) k[l - 1] = arguments[l];
var m = ES(k, 'map', true, function(p) {
return String(p);
}),
n = i.split('%s').length - 1;
if (n !== m.length) return h('eprintf args number mismatch: %s', ES('JSON', 'stringify', false, [i].concat(m)));
var o = 0;
return i.replace(/%s/g, function() {
return String(m[o++]);
});
}
f.exports = h;
}, null);
__d('ex', ['eprintf'], function a(b, c, d, e, f, g, h) {
function i(j) {
for (var k = arguments.length, l = Array(k > 1 ? k - 1 : 0), m = 1; m < k; m++) l[m - 1] = arguments[m];
var n = ES(l, 'map', true, function(p) {
return String(p);
}),
o = j.split('%s').length - 1;
if (o !== n.length) return i('ex args number mismatch: %s', ES('JSON', 'stringify', false, [j].concat(n)));
return i._prefix + ES('JSON', 'stringify', false, [j].concat(n)) + i._suffix;
}
i._prefix = '<![EX[';
i._suffix = ']]>';
f.exports = i;
}, null);
__d('invariant', ['ex', 'sprintf'], (function a(b, c, d, e, f, g, h, i) {
'use strict';
var j = h;
function k(l, m) {
if (!l) {
var n = void 0;
if (m === undefined) {
n = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
for (var o = arguments.length, p = Array(o > 2 ? o - 2 : 0), q = 2; q < o; q++) p[q - 2] = arguments[q];
n = new Error(j.apply(undefined, [m].concat(p)));
n.name = 'Invariant Violation';
n.messageWithParams = [m].concat(p);
}
n.framesToPop = 1;
throw n;
}
}
f.exports = k;
}), null);
__d('setHostSubdomain', [], (function a(b, c, d, e, f, g) {
function h(i, j) {
var k = i.split('.');
if (k.length < 3) {
k.unshift(j);
} else k[0] = j;
return k.join('.');
}
f.exports = h;
}), null);
__d('URIBase', ['URIRFC3986', 'URISchemes', 'ex', 'invariant', 'setHostSubdomain'], function a(b, c, d, e, f, g, h, i, j, k, l) {
var m = new RegExp('[\\x00-\\x2c\\x2f\\x3b-\\x40\\x5c\\x5e\\x60\\x7b-\\x7f' + '\\uFDD0-\\uFDEF\\uFFF0-\\uFFFF' + '\\u2047\\u2048\\uFE56\\uFE5F\\uFF03\\uFF0F\\uFF1F]'),
n = new RegExp('^(?:[^/]*:|' + '[\\x00-\\x1f]*/[\\x00-\\x1f]*/)');
function o(r, s, t, u) {
if (!s) return true;
if (s instanceof q) {
r.setProtocol(s.getProtocol());
r.setDomain(s.getDomain());
r.setPort(s.getPort());
r.setPath(s.getPath());
r.setQueryData(u.deserialize(u.serialize(s.getQueryData())));
r.setFragment(s.getFragment());
r.setIsGeneric(s.getIsGeneric());
r.setForceFragmentSeparator(s.getForceFragmentSeparator());
return true;
}
s = ES(s.toString(), 'trim', true);
var v = h.parse(s) || {
fragment: null,
scheme: null
};
if (!t && !i.isAllowed(v.scheme)) return false;
r.setProtocol(v.scheme || '');
if (!t && m.test(v.host || '')) return false;
r.setDomain(v.host || '');
r.setPort(v.port || '');
r.setPath(v.path || '');
if (t) {
r.setQueryData(u.deserialize(v.query || '') || {});
} else try {
r.setQueryData(u.deserialize(v.query || '') || {});
} catch (w) {
return false;
}
r.setFragment(v.fragment || '');
if (v.fragment === '') r.setForceFragmentSeparator(true);
r.setIsGeneric(v.isGenericURI || false);
if (v.userinfo !== null)
if (t) {
throw new Error(j('URI.parse: invalid URI (userinfo is not allowed in a URI): %s', r.toString()));
} else return false;
if (!r.getDomain() && ES(r.getPath(), 'indexOf', true, '\\') !== -1)
if (t) {
throw new Error(j('URI.parse: invalid URI (no domain but multiple back-slashes): %s', r.toString()));
} else return false;
if (!r.getProtocol() && n.test(s))
if (t) {
throw new Error(j('URI.parse: invalid URI (unsafe protocol-relative URLs): %s', r.toString()));
} else return false;
if (r.getDomain() && r.getPath() && !ES(r.getPath(), 'startsWith', true, '/'))
if (t) {
throw new Error(j('URI.parse: invalid URI (domain and path where path lacks leading slash): %s', r.toString()));
} else return false;
return true;
}
var p = [];
q.isValidURI = function(r, s) {
'use strict';
return o(new q(null, s), r, false, s);
};
function q(r, s) {
'use strict';
s || k(0);
this.$URIBase9 = s;
this.$URIBase7 = '';
this.$URIBase1 = '';
this.$URIBase6 = '';
this.$URIBase5 = '';
this.$URIBase3 = '';
this.$URIBase4 = false;
this.$URIBase8 = {};
this.$URIBase2 = false;
o(this, r, true, s);
}
q.prototype.setProtocol = function(r) {
'use strict';
i.isAllowed(r) || k(0);
this.$URIBase7 = r;
return this;
};
q.prototype.getProtocol = function() {
'use strict';
return (this.$URIBase7 || '').toLowerCase();
};
q.prototype.setSecure = function(r) {
'use strict';
return this.setProtocol(r ? 'https' : 'http');
};
q.prototype.isSecure = function() {
'use strict';
return this.getProtocol() === 'https';
};
q.prototype.setDomain = function(r) {
'use strict';
if (m.test(r)) throw new Error(j('URI.setDomain: unsafe domain specified: %s for url %s', r, this.toString()));
this.$URIBase1 = r;
return this;
};
q.prototype.getDomain = function() {
'use strict';
return this.$URIBase1;
};
q.prototype.setPort = function(r) {
'use strict';
this.$URIBase6 = r;
return this;
};
q.prototype.getPort = function() {
'use strict';
return this.$URIBase6;
};
q.prototype.setPath = function(r) {
'use strict';
this.$URIBase5 = r;
return this;
};
q.prototype.getPath = function() {
'use strict';
return this.$URIBase5;
};
q.prototype.addQueryData = function(r, s) {
'use strict';
if (Object.prototype.toString.call(r) === '[object Object]') {
ES('Object', 'assign', false, this.$URIBase8, r);
} else this.$URIBase8[r] = s;
return this;
};
q.prototype.setQueryData = function(r) {
'use strict';
this.$URIBase8 = r;
return this;
};
q.prototype.getQueryData = function() {
'use strict';
return this.$URIBase8;
};
q.prototype.removeQueryData = function(r) {
'use strict';
if (!ES('Array', 'isArray', false, r)) r = [r];
for (var s = 0, t = r.length; s < t; ++s) delete this.$URIBase8[r[s]];
return this;
};
q.prototype.setFragment = function(r) {
'use strict';
this.$URIBase3 = r;
this.setForceFragmentSeparator(false);
return this;
};
q.prototype.getFragment = function() {
'use strict';
return this.$URIBase3;
};
q.prototype.setForceFragmentSeparator = function(r) {
'use strict';
this.$URIBase2 = r;
return this;
};
q.prototype.getForceFragmentSeparator = function() {
'use strict';
return this.$URIBase2;
};
q.prototype.setIsGeneric = function(r) {
'use strict';
this.$URIBase4 = r;
return this;
};
q.prototype.getIsGeneric = function() {
'use strict';
return this.$URIBase4;
};
q.prototype.isEmpty = function() {
'use strict';
return !(this.getPath() || this.getProtocol() || this.getDomain() || this.getPort() || ES('Object', 'keys', false, this.getQueryData()).length > 0 || this.getFragment());
};
q.prototype.toString = function() {
'use strict';
var r = this;
for (var s = 0; s < p.length; s++) r = p[s](r);
return r.$URIBase10();
};
q.prototype.$URIBase10 = function() {
'use strict';
var r = '',
s = this.getProtocol();
if (s) r += s + ':' + (this.getIsGeneric() ? '' : '//');
var t = this.getDomain();
if (t) r += t;
var u = this.getPort();
if (u) r += ':' + u;
var v = this.getPath();
if (v) {
r += v;
} else if (r) r += '/';
var w = this.$URIBase9.serialize(this.getQueryData());
if (w) r += '?' + w;
var x = this.getFragment();
if (x) {
r += '#' + x;
} else if (this.getForceFragmentSeparator()) r += '#';
return r;
};
q.registerFilter = function(r) {
'use strict';
p.push(r);
};
q.prototype.getOrigin = function() {
'use strict';
var r = this.getPort();
return this.getProtocol() + '://' + this.getDomain() + (r ? ':' + r : '');
};
q.prototype.getQualifiedURIBase = function() {
'use strict';
return new q(this, this.$URIBase9).qualify();
};
q.prototype.qualify = function() {
'use strict';
if (!this.getDomain()) {
var r = new q(window.location.href, this.$URIBase9);
this.setProtocol(r.getProtocol()).setDomain(r.getDomain()).setPort(r.getPort());
}
return this;
};
q.prototype.setSubdomain = function(r) {
'use strict';
var s = this.qualify().getDomain();
return this.setDomain(l(s, r));
};
q.prototype.getSubdomain = function() {
'use strict';
if (!this.getDomain()) return '';
var r = this.getDomain().split('.');
if (r.length <= 2) {
return '';
} else return r[0];
};
f.exports = q;
}, null);
__d('sdk.URI', ['Assert', 'QueryString', 'URIBase'], function a(b, c, d, e, f, g, h, i, j) {
var k, l, m = /\.facebook\.com$/,
n = {
serialize: function p(q) {
return q ? i.encode(q) : '';
},
deserialize: function p(q) {
return q ? i.decode(q) : {};
}
};
k = babelHelpers.inherits(o, j);
l = k && k.prototype;
function o(p) {
'use strict';
h.isString(p, 'The passed argument was of invalid type.');
l.constructor.call(this, p, n);
}
o.prototype.isFacebookURI = function() {
'use strict';
return m.test(this.getDomain());
};
o.prototype.valueOf = function() {
'use strict';
return this.toString();
};
f.exports = o;
}, null);
__d('sdk.XFBML.Ad.NoThrowURI', ['sdk.URI'], function a(b, c, d, e, f, g, h) {
'use strict';
function i(j) {
try {
this.$NoThrowURI1 = new h(j);
} catch (k) {
this.$NoThrowURI1 = new h('');
}
}
i.prototype.getDomain = function() {
return this.$NoThrowURI1.getDomain();
};
i.prototype.getOrigin = function() {
return this.$NoThrowURI1.getOrigin();
};
f.exports = i;
}, null);
__d('HTMLElementFrameContext.adquality', ['HTMLElementFrameContextResult.adquality', 'Rectangle.adquality', 'sdk.XFBML.Ad.NoThrowURI'], function a(b, c, d, e, f, g, h, i, j) {
'use strict';
function k(l, m) {
this.$HTMLElementFrameContext1 = l;
this.$HTMLElementFrameContext2 = m;
}
k.prototype.getContext = function(l) {
var m = new h();
try {
try {
m.offsetHeight = this.$HTMLElementFrameContext1.offsetHeight;
m.offsetWidth = this.$HTMLElementFrameContext1.offsetWidth;
} catch (o) {}
var p = this.$HTMLElementFrameContext1.ownerDocument;
m.parentWindow = this.$HTMLElementFrameContext2 || this.$HTMLElementFrameContext1.ownerDocument.defaultView || p.parentWindow;
if (m.parentWindow) {
var q = this.$HTMLElementFrameContext1,
r = m.parentWindow;
while (r && m.windowCount < 100) {
m.windowCount++;
var s = null,
t = null;
try {
t = r.document.referrer;
s = r.location.href || r.document.location.href;
m.topReferrerURL = t;
m.topLocationURL = s;
m.topWindow = r;
m.topWindowLevel = m.windowCount;
} catch (o) {
m.crossDomainWindowCount++;
}
m.locations.push(s);
var u = null;
try {
if (q && this.isElementVisible(q) === false) m.transparent = true;
} catch (o) {}
var v = null;
if (q && q.getBoundingClientRect && m.crossDomainWindowCount === 0) try {
v = q.getBoundingClientRect();
} catch (o) {}
if (v && m.crossDomainWindowCount === 0)
if (!m.offsetRect) {
m.offsetRect = i.RectangleFromClientRect(v);
} else m.offsetRect = m.offsetRect.offset(v.left, v.top);
if (!m.parentWindow || !m.parentWindow.top) {
r = null;
} else if (r === m.parentWindow.top) {
if (s) {
m.pageURL = s;
m.pageDomain = new j(s).getDomain();
m.domainDetectionMethod = h.DOMAIN_DETECTION_LOCATION;
m.focus = u;
}
if (m.windowCount > 1) {
if (s) {
m.type = h.TYPE_SAME_ORIGIN;
} else m.type = h.TYPE_CROSS_ORIGIN;
} else m.type = h.TYPE_NONE;
if (m.type !== h.TYPE_CROSS_ORIGIN) {
m.viewportRect = i.RectangleFromWindow(r);
if (m.transparent === null) m.transparent = false;
}
r = null;
} else {
if (t && r.parent === m.parentWindow.top) {
m.pageURL = t;
m.pageDomain = new j(t).getDomain();
m.domainDetectionMethod = h.DOMAIN_DETECTION_REFERRER;
}
q = null;
try {
q = r.frameElement;
} catch (o) {}
r = r.parent;
}
}
m.topURL = m.pageURL || m.topReferrerURL || m.topLocationURL;
if (!m.pageURL) {
var w = window.location.ancestorOrigins;
if (w && w.length > 0) {
m.pageDomain = new j(w[w.length - 1]).getDomain();
m.domainDetectionMethod = h.DOMAIN_DETECTION_ANCESTOR_ORIGINS;
}
}
}
} catch (n) {
m.error = n;
}
l(m);
};
k.prototype.isElementVisible = function(l) {
if (!l.style) return true;
if (l.style.opacity && l.style.opacity < '0.9') return false;
if (l.style.visibility && l.style.visibility === 'hidden') return false;
if (l.parentElement) return this.isElementVisible(l.parentElement);
return true;
};
f.exports = k;
}, null);
__d('UrlMap', ['UrlMapConfig'], function a(b, c, d, e, f, g, h) {
var i = {
resolve: function j(k, l) {
var m = typeof l == 'undefined' ? location.protocol.replace(':', '') : l ? 'https' : 'http';
if (k in h) return m + '://' + h[k];
if (typeof l == 'undefined' && k + '_' + m in h) return m + '://' + h[k + '_' + m];
if (l !== true && k + '_http' in h) return 'http://' + h[k + '_http'];
if (l !== false && k + '_https' in h) return 'https://' + h[k + '_https'];
}
};
f.exports = i;
}, null);
__d('legacy:fb.AudienceNetworkPrebid', ['HTMLElementFrameContext.adquality', 'QueryString', 'UrlMap'], (function a(b, c, d, e, f, g, h, i, j) {
var k = '/v1/prebid.json',
l = 'nobid',
m = 60 * 60 * 1000,
n = 24 * 7 * m,
o = 24 * m,
p = 24 * m,
q = 6 * m,
r = {},
s = {};
function t(u, v) {
'use strict';
this.$AudienceNetworkPrebid1 = u;
this.$AudienceNetworkPrebid2 = v;
}
t.prototype.$AudienceNetworkPrebid3 = function() {
'use strict';
return 'adnw_prebid';
};
t.prototype.$AudienceNetworkPrebid4 = function() {
'use strict';
var u = null;
try {
u = window.localStorage.getItem(this.$AudienceNetworkPrebid3());
} catch (v) {
u = r[this.$AudienceNetworkPrebid3()];
}
if (u) {
u = JSON.parse(u);
if (u.hasToken) {
if (u.createdTime > Date.now() - n) return {
token: u.token,
refresh: u.createdTime < Date.now() - o
};
} else if (u.createdTime > Date.now() - p) return {
token: u.token,
refresh: u.createdTime < Date.now() - q
};
}
return null;
};
t.prototype.$AudienceNetworkPrebid5 = function(u) {
'use strict';
var v = JSON.stringify({
hasToken: u !== l,
token: u,
createdTime: Date.now()
});
try {
window.localStorage.setItem(this.$AudienceNetworkPrebid3(), v);
} catch (w) {
r[this.$AudienceNetworkPrebid3()] = v;
}
};
t.prototype.getProfile = function(u) {
'use strict';
var v = this.$AudienceNetworkPrebid4();
if (v) {
try {
u({
token: v.token
});
} catch (w) {}
if (!v.refresh) return;
}
var x = function ca() {
u({
token: l
});
},
y = function(ca) {
var da = JSON.parse(ca),
ea = l;
if (typeof da === 'object' && typeof da.token === 'string') ea = da.token;
this.$AudienceNetworkPrebid5(ea);
try {
u({
token: ea
});
} catch (fa) {}
}.bind(this),
z = {
placementid: this.$AudienceNetworkPrebid1
},
aa = new h(this.$AudienceNetworkPrebid2, window);
aa.getContext(function(ca) {
z.pagedomain = ca.pageDomain;
z.pageurl = ca.pageURL;
});
var ba = function() {
var ca, da = this;
try {
var ca = function() {
var fa = s[da.$AudienceNetworkPrebid3()];
if (!fa) {
fa = [];
s[da.$AudienceNetworkPrebid3()] = fa;
}
fa.push({
onError: x,
onLoad: y
});
if (fa.length > 1) return {
v: void 0
};
var ga = new XMLHttpRequest();
if (!('withCredentials' in ga)) {
x();
return {
v: void 0
};
}
ga.open('POST', j.resolve('an', true) + k, true);
ga.withCredentials = true;
ga.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
ga.onreadystatechange = function() {
if (ga.readyState === 4) {
s[this.$AudienceNetworkPrebid3()] = [];
fa.forEach(function(ha) {
if (ga.status === 200) {
ha.onLoad(ga.responseText);
} else ha.onError();
});
}
}.bind(da);
ga.send(i.encode(z));
}();
if (typeof ca === "object") return ca.v;
} catch (ea) {
x();
}
}.bind(this);
ba();
};
b.window.AudienceNetworkPrebid = t;
b.window.AudienceNetworkPrebid_NoBid = l;
if (b.window.anPrebidAsyncInit) b.window.anPrebidAsyncInit();
}), 3);
}
}).call(global);
})(window.inDapIF ? parent.window : window, window);
} catch (e) {
new Image().src = "https:\/\/www.facebook.com\/" + 'common/scribe_endpoint.php?c=jssdk_error&m=' + encodeURIComponent('{"error":"LOAD", "extra": {"name":"' + e.name + '","line":"' + (e.lineNumber || e.line) + '","script":"' + (e.fileName || e.sourceURL || e.script) + '","stack":"' + (e.stackTrace || e.stack) + '","revision":"2773152","namespace":"AudienceNetworkPrebid","message":"' + e.message + '"}}');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment