__d('initXdArbiter',['QueryString','resolveWindow','Log','XDM','XDMConfig'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();(function(){var h=c('QueryString'),i=c('resolveWindow'),j=c('Log'),k=c('XDM'),l=c('XDMConfig');function m(aa){return aa?aa.replace(/["'<>\(\)\\@]/g,''):aa;}function n(){if(!window.chrome||!location.ancestorOrigins)return false;return !/\.facebook\.com$/.test(location.ancestorOrigins[1]);}function o(aa,ba){if(n())return '';if(window!=parent&&window.parent!=window.parent.parent)try{return parent.parent.XdArbiter.register(window,aa,ba);}catch(ca){j.error('Could not register with XdArbiter in parent.parent');}return '';}function p(aa,ba,ca){if(!aa&&n()){j.error('Can not use parent.parent to reach facebook.com');return;}var da=aa?i(aa):parent.parent;try{da.XdArbiter.handleMessage(ba,ca,window);}catch(ea){j.error('Could not reach facebook.com using %s',aa);}}function q(aa,ba){var ca=50,da=function(){if(!--ca)clearInterval(ea);try{aa();clearInterval(ea);}catch(fa){}},ea=setInterval(da,50);da();}function r(){var aa=/^https?:\/\/[^\/]*/.exec(u.origin)[0];q(function(){var ba=i(u.relation).frames['fb_xdm_frame_'+v];if(typeof ba.location.search==='undefined')throw new Error('Proxy not ready');if(location.search===ba.location.search){ba.proxyMessage(t,aa);}else j.error('Version mismatch: %s, %s',location.search,ba.location.search);},50);}function s(){var aa=/^(.*)\/(.*)$/.exec(u.origin)[1];if(window.__fbNative&&window.__fbNative.postMessage){window.__fbNative.postMessage(t,aa);}else{var ba=function(ca){window.removeEventListener('fbNativeReady',ba);window.__fbNative.postMessage(t,aa);};window.addEventListener('fbNativeReady',ba);}}var t=/#(.*)|$/.exec(location.href)[1];if(window==top)location.hash='';if(!t){j.error('xd_arbiter.php loaded without a valid hash, referrer: %s',document.referrer);return;}var u=h.decode(t,true),v=location.protocol.replace(':','');if(window.name.substring(0,6)==='blank_'){parent.frames[u.forIframe].require('Arbiter').inform('blankIframeAck',window);return;}if(u.relation){if(window==top&&/FBAN\/\w+;/i.test(navigator.userAgent)){j.info('Native proxy');s();}else{j.info('Legacy proxy to %s',u.relation);r();}return;}if(v!=/https?/.exec(window.name)[0]){j.info('Redirection to %s detected, aborting',v);return;}var w=m(u.transport),x=m(u.channel),y=m(u.origin),z=m(u.xd_name);if(!/^https?/.test(y)){j.error('Invalid origin presented, aborting.');return;}k.create({root:document.body,transport:w,channel:x+'_'+v,flashUrl:l.Flash.path,onMessage:function(aa,ba){if(y!==ba){j.info('Received message from unknown origin %s, expected %s.',ba,y);return;}if(!/^FB_RPC:/.test(aa))aa=h.decode(aa);p(aa.relation,aa,y);},whenReady:function(aa){window.proxyMessage=function(ea,fa){if(fa===y){aa.send(ea,y,parent,x);}else j.error('Failed proxying to %s, expected %s',fa,y);};var ba=null,ca={xd_action:'proxy_ready',logged_in:/\bc_user=/.test(document.cookie),data:ba},da=o(z,y);if(da)ca.registered=da;aa.send(h.encode(ca),y,parent,x);}});})();},null);__d("XDMConfig",[],{"Flash":{"path":"https:\/\/connect.facebook.net\/rsrc.php\/v1\/yW\/r\/yOZN1vHw3Z_.swf"}});require("initXdArbiter"); require('initXdArbiter');