Скачиваний:
7
Добавлен:
18.09.2018
Размер:
27.74 Кб
Скачать

Facebook Cross-Domain Messaging helper document.domain = 'facebook.com'; if(!Array.from)Array.from=function(a){if(a==null)throw new TypeError('Object is null or undefined');var b=arguments[1],c=arguments[2],d=this,e=Object(a),f=typeof Symbol==='function'?Symbol.iterator:'@@iterator',g=typeof b==='function',h=typeof e[f]==='function',i=0,j,k;if(h){j=typeof d==='function'?new d():[];var l=e[f](),m;while(!(m=l.next()).done){k=m.value;if(g)k=b.call(c,k,i);j[i]=k;i+=1;}j.length=i;return j;}var n=e.length;if(isNaN(n)||n>0;for(var g=0;g0||-1)*Math.floor(Math.abs(e));return e;}if(!Array.prototype.map)Array.prototype.map=function(e,f){if(typeof e!='function')throw new TypeError();var g,h=this.length,i=new Array(h);for(g=0;g=0;h--)if(h in f&&e===f[h])return h;return -1;};if(!Array.prototype.reduce)Array.prototype.reduce=function(e){if(typeof e!=='function')throw new TypeError(e+' is not a function');var f=this.length>>>0,g,h,i=arguments.length===2;if(i)g=arguments[1];for(h=0;h>>0,g,h,i=arguments.length===2;if(i)g=arguments[1];for(h=f-1;h>-1;--h)if(this.hasOwnProperty(h))if(i===false){g=this[h];i=true;}else g=e(g,this[h],h,this);if(i===false)throw new TypeError('Reduce of empty array with no initial value');return g;};})(); if(!Date.now)Date.now=function(){return new Date().getTime();}; (function(){if(!Date.prototype.toISOString){var a=function(b){if(b=9)g.add(window,'unload',r);o=true;}n[v]=v;}var u={embed:function(v,w,x,y){var z=l();v=m(v).replace(/&/g,'&');x=k({allowscriptaccess:'always',flashvars:y,movie:v},x||{});if(typeof x.flashvars=='object')x.flashvars=i.encode(x.flashvars);var aa=[];for(var ba in x)if(x.hasOwnProperty(ba)&&x[ba])aa.push('');var ca=w.appendChild(p.createElement('span')),da=''+aa.join('')+'';ca.innerHTML=da;var ea=ca.firstChild;t(z);return ea;},remove:q,getVersion:function(){var v='Shockwave Flash',w='application/x-shockwave-flash',x='ShockwaveFlash.ShockwaveFlash',y;if(navigator.plugins&&typeof navigator.plugins[v]=='object'){var z=navigator.plugins[v].description;if(z&&navigator.mimeTypes&&navigator.mimeTypes[w]&&navigator.mimeTypes[w].enabledPlugin)y=z.match(/\d+/g);}if(!y)try{y=(new ActiveXObject(x)).GetVariable('$version').match(/(\d+),(\d+),(\d+),(\d+)/);y=Array.prototype.slice.call(y,1);}catch(aa){}return y;},checkMinVersion:function(v){var w=u.getVersion();if(!w)return false;return s(w.join('.'))>=s(v);},isAvailable:function(){return !!u.getVersion();}};e.exports=u;},null); __d("dotAccess",[],function(a,b,c,d,e,f){function g(h,i,j){var k=i.split('.');do{var l=k.shift();h=h[l]||j&&(h[l]={});}while(k.length&&h);return h;}e.exports=g;},null); __d("GlobalCallback",["DOMWrapper","dotAccess","guid","wrapFunction"],function(a,b,c,d,e,f,g,h,i,j){var k,l,m={setPrefix:function(n){k=h(g.getWindow(),n,true);l=n;},create:function(n,o){if(!k)this.setPrefix('__globalCallbacks');var p=i();k[p]=j(n,'entry',o||'GlobalCallback');return l+'.'+p;},remove:function(n){var o=n.substring(l.length+1);delete k[o];}};e.exports=m;},null); __d("XDM",["DOMEventListener","DOMWrapper","emptyFunction","Flash","GlobalCallback","guid","Log","UserAgent_DEPRECATED","wrapFunction"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p={},q={transports:[]},r=h.getWindow();function s(u){var v={},w=u.length,x=q.transports;while(w--)v[u[w]]=1;w=x.length;while(w--){var y=x[w],z=p[y];if(!v[y]&&z.isAvailable())return y;}}var t={register:function(u,v){m.debug('Registering %s as XDM provider',u);q.transports.push(u);p[u]=v;},create:function(u){if(!u.whenReady&&!u.onMessage){m.error('An instance without whenReady or onMessage makes no sense');throw new Error('An instance without whenReady or '+'onMessage makes no sense');}if(!u.channel){m.warn('Missing channel name, selecting at random');u.channel=l();}if(!u.whenReady)u.whenReady=i;if(!u.onMessage)u.onMessage=i;var v=u.transport||s(u.blacklist||[]),w=p[v];if(w&&w.isAvailable()){m.debug('%s is available',v);w.init(u);return v;}}};t.register('flash',(function(){var u=false,v,w=false,x=15000,y;return {isAvailable:function(){return j.checkMinVersion('8.0.24');},init:function(z){m.debug('init flash: '+z.channel);var aa={send:function(da,ea,fa,ga){m.debug('sending to: %s (%s)',ea,ga);v.postMessage(da,ea,ga);}};if(u){z.whenReady(aa);return;}var ba=z.root.appendChild(r.document.createElement('div')),ca=k.create(function(){k.remove(ca);clearTimeout(y);m.info('xdm.swf called the callback');var da=k.create(function(ea,fa){ea=decodeURIComponent(ea);fa=decodeURIComponent(fa);m.debug('received message %s from %s',ea,fa);z.onMessage(ea,fa);},'xdm.swf:onMessage');v.init(z.channel,da);z.whenReady(aa);},'xdm.swf:load');v=j.embed(z.flashUrl,ba,null,{protocol:location.protocol.replace(':',''),host:location.host,callback:ca,log:w});y=setTimeout(function(){m.warn('The Flash component did not load within %s ms - '+'verify that the container is not set to hidden or invisible '+'using CSS as this will cause some browsers to not load '+'the components',x);},x);u=true;}};})());t.register('postmessage',(function(){var u=false;return {isAvailable:function(){return !!r.postMessage;},init:function(v){m.debug('init postMessage: '+v.channel);var w='_FB_'+v.channel,x={send:function(y,z,aa,ba){if(r===aa){m.error('Invalid windowref, equal to window (self)');throw new Error();}m.debug('sending to: %s (%s)',z,ba);var ca=function(){aa.postMessage('_FB_'+ba+y,z);};if(n.ie()==8||n.ieCompatibilityMode()){setTimeout(ca,0);}else ca();}};if(u){v.whenReady(x);return;}g.add(r,'message',o(function(event){var y=event.data,z=event.origin||'native';if(!/^(https?:\/\/|native$)/.test(z)){m.debug('Received message from invalid origin type: %s',z);return;}if(typeof y!='string'){m.warn('Received message of type %s from %s, expected a string',typeof y,z);return;}m.debug('received message %s from %s',y,z);if(y.substring(0,w.length)==w)y=y.substring(w.length);v.onMessage(y,z);},'entry','onMessage'));v.whenReady(x);u=true;}};})());e.exports=t;},null); __d("initXdArbiter",["QueryString","resolveWindow","Log","XDM","XDMConfig"],function(a,b,c,d,e,f){(function(){var g=b('QueryString'),h=b('resolveWindow'),i=b('Log'),j=b('XDM'),k=b('XDMConfig');function l(z){return z?z.replace(/["'\(\)\\@]/g,''):z;}function m(){if(!window.chrome||!location.ancestorOrigins)return false;return !/\.facebook\.com$/.test(location.ancestorOrigins[1]);}function n(z,aa){if(m())return '';if(window!=parent&&window.parent!=window.parent.parent)try{return parent.parent.XdArbiter.register(window,z,aa);}catch(ba){i.error('Could not register with XdArbiter in parent.parent');}return '';}function o(z,aa,ba){if(!z&&m()){i.error('Can not use parent.parent to reach facebook.com');return;}var ca=z?h(z):parent.parent;try{ca.XdArbiter.handleMessage(aa,ba,window);}catch(da){i.error('Could not reach facebook.com using %s',z);}}function p(z,aa){var ba=50,ca=function(){if(!--ba)clearInterval(da);try{z();clearInterval(da);}catch(ea){}},da=setInterval(ca,50);ca();}function q(){var z=/^https?:\/\/[^\/]*/.exec(t.origin)[0];p(function(){var aa=h(t.relation).frames['fb_xdm_frame_'+u];if(typeof aa.location.search==='undefined')throw new Error('Proxy not ready');if(location.search===aa.location.search){aa.proxyMessage(s,z);}else i.error('Version mismatch: %s, %s',location.search,aa.location.search);},50);}function r(){var z=/^(.*)\/(.*)$/.exec(t.origin)[1];if(window.__fbNative&&window.__fbNative.postMessage){window.__fbNative.postMessage(s,z);}else{var aa=function(ba){window.removeEventListener('fbNativeReady',aa);window.__fbNative.postMessage(s,z);};window.addEventListener('fbNativeReady',aa);}}var s=/#(.*)|$/.exec(location.href)[1];if(window==top)location.hash='';if(!s){i.error('xd_arbiter.php loaded without a valid hash, referrer: %s',document.referrer);return;}var t=g.decode(s,true),u=location.protocol.replace(':','');if(t.relation){if(window==top&&/FBAN\/\w+;/i.test(navigator.userAgent)){i.info('Native proxy');r();}else{i.info('Legacy proxy to %s',t.relation);q();}return;}if(u!=/https?/.exec(window.name)[0]){i.info('Redirection to %s detected, aborting',u);return;}var v=l(t.transport),w=l(t.channel),x=l(t.origin),y=l(t.xd_name);if(!/^https?/.test(x)){i.error('Invalid origin presented, aborting.');return;}j.create({root:document.body,transport:v,channel:w+'_'+u,flashUrl:k.Flash.path,onMessage:function(z,aa){if(x!==aa){i.info('Received message from unknown origin %s, expected %s.',aa,x);return;}if(!/^FB_RPC:/.test(z))z=g.decode(z);o(z.relation,z,x);},whenReady:function(z){window.proxyMessage=function(da,ea){if(ea===x){z.send(da,x,parent,w);}else i.error('Failed proxying to %s, expected %s',ea,x);};var aa=null,ba={xd_action:'proxy_ready',data:aa},ca=n(y,x);if(ca)ba.registered=ca;z.send(g.encode(ba),x,parent,w);}});})();},null);__d("XDMConfig",[],{"Flash":{"path":"https:\/\/connect.facebook.net\/rsrc.php\/v1\/yR\/r\/ks_9ZXiQ0GL.swf"}}); require('initXdArbiter'); SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone. See the Facebook Help Center for more information. if (window == top) { setTimeout(function() { document.getElementById("warning").style.display = 'block'; }, 2000);}

Соседние файлы в папке Онлайн калькулятор Расширенный алгоритм Евклида_files