Ubuntu
!function(n){"use strict";var e={xdm:{},channel:{},xhr:function(n){return this.xdm[n]&&this.iframe(n)?this.xdm[n]:this.xdm[n]=this.create(n)},iframe:function(n){return document.getElementById("easyXDM_"+this.channel[n]+"_provider")},create:function(n){var e=this;return this.loadEasyXDM(),new easyXDM.Rpc({remote:n+"/widget/xdm/index.html",onReady:function(){document.getElementById("easyXDM_"+this.channel+"_provider").setAttribute("style","position:absolute!important;top:-2000px!important;left:0!important;"),e.channel[n]=this.channel}},{remote:{request:{}},serializer:{stringify:function(n){var t={id:n.id,jsonrpc:n.jsonrpc,method:n.method,params:n.params[0]};return e.stringify(t)},parse:function(n){return JSON.parse(n)}}})},get:function(n,e,t,o,r){this.send(n,e,"GET",t,o,r)},send:function(n,e,t,o,r,a){if(o)for(d in o)if(o.hasOwnProperty(d)){var i=o[d];"string"==typeof i?o[d]=this.escape(i):void 0===i&&delete o[d]}this.xhr(n).request({url:e,method:t,headers:{Accept:"application/json;"},data:o},function(n){if(r)if(n.data){var e;try{e=JSON.parse(n.data)}catch(n){}r(e||n.data)}else r();a&&a()},function(n){a&&a()})},loadEasyXDM:function(){!function(n,e,t,o,r,a){var i,c,s,l,u,p=window,f=Math.floor(1e4*Math.random()),d=Function.prototype,h=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,m=/[\-\w]+\/\.\.\//,g=/([^:])\/\//g,v="",y={},w=n.easyXDM,b="easyXDM_",k=!1;function x(n,e){var t=typeof n[e];return"function"==t||!("object"!=t||!n[e])||"unknown"==t}function _(){var n,e="Shockwave Flash",t="application/x-shockwave-flash";if(!D(navigator.plugins)&&"object"==typeof navigator.plugins[e]){var o=navigator.plugins[e].description;o&&!D(navigator.mimeTypes)&&navigator.mimeTypes[t]&&navigator.mimeTypes[t].enabledPlugin&&(c=o.match(/\d+/g))}if(!c)try{n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),c=Array.prototype.slice.call(n.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),n=null}catch(n){}if(!c)return!1;var r=parseInt(c[0],10),a=parseInt(c[1],10);return s=r>9&&a>0,!0}if(x(n,"addEventListener"))l=function(n,e,t){n.addEventListener(e,t,!1)},u=function(n,e,t){n.removeEventListener(e,t,!1)};else{if(!x(n,"attachEvent"))throw new Error("Browser not supported");l=function(n,e,t){n.attachEvent("on"+e,t)},u=function(n,e,t){n.detachEvent("on"+e,t)}}var O,M=!1,E=[];function S(){if(!M){M=!0;for(var n=0;n'):(t=e.createElement("IFRAME")).name=n.props.name,t.id=t.name=n.props.name,delete n.props.name,"string"==typeof n.container&&(n.container=e.getElementById(n.container)),n.container||(I(t.style,{position:"absolute",top:"-2000px",left:"0px"}),n.container=e.body);var o=n.props.src;if(n.props.src="javascript:false",I(t,n.props),t.border=t.frameBorder=0,t.allowTransparency=!0,n.container.appendChild(t),n.onLoad&&l(t,"load",n.onLoad),n.usePost){var r,a=n.container.appendChild(e.createElement("form"));if(a.target=t.name,a.action=o,a.method="POST","object"==typeof n.usePost)for(var c in n.usePost)n.usePost.hasOwnProperty(c)&&(i?r=e.createElement(''):(r=e.createElement("INPUT")).name=c,r.value=n.usePost[c],a.appendChild(r));a.submit(),a.parentNode.removeChild(a)}else t.src=o;return n.props.src=o,t}function J(o){var r,a=o.protocol;if(o.isHost=o.isHost||D(j.xdm_p),k=o.hash||!1,o.props||(o.props={}),o.isHost)o.remote=C(o.remote),o.channel=o.channel||"default"+f++,o.secret=Math.random().toString(16).substring(2),D(a)&&(a=P(t.href)==P(o.remote)?"4":x(n,"postMessage")||x(e,"postMessage")?"1":o.swf&&x(n,"ActiveXObject")&&_()?"6":"Gecko"===navigator.product&&"frameElement"in n&&-1==navigator.userAgent.indexOf("WebKit")?"5":o.remoteHelper?"2":"0");else if(o.channel=j.xdm_c.replace(/["'<>\\]/g,""),o.secret=j.xdm_s,o.remote=j.xdm_e.replace(/["'<>\\]/g,""),a=j.xdm_p,o.acl&&!function(n,e){"string"==typeof n&&(n=[n]);for(var t,o=n.length;o--;)if(t=n[o],(t=new RegExp("^"==t.substr(0,1)?t:"^"+t.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$")).test(e))return!0;return!1}(o.acl,o.remote))throw new Error("Access denied for "+o.remote);switch(o.protocol=a,a){case"0":if(I(o,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),o.isHost){if(!o.local){for(var i,s=t.protocol+"//"+t.host,l=e.body.getElementsByTagName("img"),u=l.length;u--;)if((i=l[u]).src.substring(0,s.length)===s){o.local=i.src;break}o.local||(o.local=n)}var p={xdm_c:o.channel,xdm_p:0};o.local===n?(o.usePolling=!0,o.useParent=!0,o.local=t.protocol+"//"+t.host+t.pathname+t.search,p.xdm_e=o.local,p.xdm_pa=1):p.xdm_e=C(o.local),o.container&&(o.useResize=!1,p.xdm_po=1),o.remote=F(o.remote,p)}else I(o,{channel:j.xdm_c,remote:j.xdm_e,useParent:!D(j.xdm_pa),usePolling:!D(j.xdm_po),useResize:!o.useParent&&o.useResize});r=[new y.stack.HashTransport(o),new y.stack.ReliableBehavior({}),new y.stack.QueueBehavior({encode:!0,maxLength:4e3-o.remote.length}),new y.stack.VerifyBehavior({initiate:o.isHost})];break;case"1":r=[new y.stack.PostMessageTransport(o)];break;case"2":o.isHost&&(o.remoteHelper=C(o.remoteHelper)),r=[new y.stack.NameTransport(o),new y.stack.QueueBehavior,new y.stack.VerifyBehavior({initiate:o.isHost})];break;case"3":r=[new y.stack.NixTransport(o)];break;case"4":r=[new y.stack.SameOriginTransport(o)];break;case"5":r=[new y.stack.FrameElementTransport(o)];break;case"6":c||_(),r=[new y.stack.FlashTransport(o)]}return r.push(new y.stack.QueueBehavior({lazy:o.lazy,remove:!0})),r}function L(n){for(var e,t={incoming:function(n,e){this.up.incoming(n,e)},outgoing:function(n,e){this.down.outgoing(n,e)},callback:function(n){this.up.callback(n)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},o=0,r=n.length;o<\/script>')}},H={},y.Fn={set:function(n,e){H[n]=e},get:function(n,e){if(H.hasOwnProperty(n)){var t=H[n];return e&&delete H[n],t}}},y.Socket=function(n){var e=L(J(n).concat([{incoming:function(e,t){n.onMessage(e,t)},callback:function(e){n.onReady&&n.onReady(e)}}])),t=P(n.remote);this.origin=P(n.remote),this.destroy=function(){e.destroy()},this.postMessage=function(n){e.outgoing(n,t)},e.init()},y.Rpc=function(n,e){if(e.local)for(var t in e.local)if(e.local.hasOwnProperty(t)){var o=e.local[t];"function"==typeof o&&(e.local[t]={method:o})}var r=L(J(n).concat([new y.stack.RpcBehavior(this,e),{callback:function(e){n.onReady&&n.onReady(e)}}]));this.origin=P(n.remote),this.destroy=function(){r.destroy()},r.init()},y.stack.SameOriginTransport=function(n){var e,r,a,i;return e={outgoing:function(n,e,t){a(n),t&&t()},destroy:function(){r&&(r.parentNode.removeChild(r),r=null)},onDOMReady:function(){i=P(n.remote),n.isHost?(I(n.props,{src:F(n.remote,{xdm_e:t.protocol+"//"+t.host+t.pathname,xdm_c:n.channel,xdm_p:4}),name:b+n.channel+"_provider"}),r=A(n),y.Fn.set(n.channel,function(n){return a=n,o(function(){e.up.callback(!0)},0),function(n){e.up.incoming(n,i)}})):(a=function(){var n=parent;if(""!==v)for(var e=0,t=v.split(".");e"}return r={outgoing:function(e,t,o){l.postMessage(n.channel,e.toString()),o&&o()},destroy:function(){try{l.destroyChannel(n.channel)}catch(n){}l=null,i&&(i.parentNode.removeChild(i),i=null)},onDOMReady:function(){c=n.remote,y.Fn.set("flash_"+n.channel+"_init",function(){o(function(){r.up.callback(!0)})}),y.Fn.set("flash_"+n.channel+"_onMessage",f),n.swf=C(n.swf);var e=N(n.swf),a=function(){y.stack.FlashTransport[e].init=!0,(l=y.stack.FlashTransport[e].swf).createChannel(n.channel,n.secret,P(n.remote),n.isHost),n.isHost&&(s&&n.swfNoThrottle&&I(n.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),I(n.props,{src:F(n.remote,{xdm_e:P(t.href),xdm_c:n.channel,xdm_p:6,xdm_s:n.secret}),name:b+n.channel+"_provider"}),i=A(n))};y.stack.FlashTransport[e]&&y.stack.FlashTransport[e].init?a():y.stack.FlashTransport[e]?y.stack.FlashTransport[e].queue.push(a):(y.stack.FlashTransport[e]={queue:[a]},d(e))},init:function(){R(r.onDOMReady,r)}}},y.stack.PostMessageTransport=function(e){var r,a,i,c;function s(n){var o=function(n){if(n.origin)return P(n.origin);if(n.uri)return P(n.uri);if(n.domain)return t.protocol+"//"+n.domain;throw"Unable to retrieve the origin of the event"}(n);o==c&&n.data.substring(0,e.channel.length+1)==e.channel+" "&&r.up.incoming(n.data.substring(e.channel.length+1),o)}return r={outgoing:function(n,t,o){i.postMessage(e.channel+" "+n,t||c),o&&o()},destroy:function(){u(n,"message",s),a&&(i=null,a.parentNode.removeChild(a),a=null)},onDOMReady:function(){if(c=P(e.remote),e.isHost){var p=function(t){t.data==e.channel+"-ready"&&(i="postMessage"in a.contentWindow?a.contentWindow:a.contentWindow.document,u(n,"message",p),l(n,"message",s),o(function(){r.up.callback(!0)},0))};l(n,"message",p),I(e.props,{src:F(e.remote,{xdm_e:P(t.href),xdm_c:e.channel,xdm_p:1}),name:b+e.channel+"_provider"}),a=A(e)}else l(n,"message",s),(i="postMessage"in n.parent?n.parent:n.parent.document).postMessage(e.channel+"-ready",c),o(function(){r.up.callback(!0)},0)},init:function(){R(r.onDOMReady,r)}}},y.stack.FrameElementTransport=function(r){var a,i,c,s;return a={outgoing:function(n,e,t){c.call(this,n),t&&t()},destroy:function(){i&&(i.parentNode.removeChild(i),i=null)},onDOMReady:function(){s=P(r.remote),r.isHost?(I(r.props,{src:F(r.remote,{xdm_e:P(t.href),xdm_c:r.channel,xdm_p:5}),name:b+r.channel+"_provider"}),(i=A(r)).fn=function(n){return delete i.fn,c=n,o(function(){a.up.callback(!0)},0),function(n){a.up.incoming(n,s)}}):(e.referrer&&P(e.referrer)!=j.xdm_e&&(n.top.location=j.xdm_e),c=n.frameElement.fn(function(n){a.up.incoming(n,s)}),a.up.callback(!0))},init:function(){R(a.onDOMReady,a)}}},y.stack.NameTransport=function(n){var e,t,r,a,i,c,s,l;function p(e){var o=n.remoteHelper+(t?"#_3":"#_2")+n.channel;r.contentWindow.sendMessage(e,o)}function f(){t?2!=++i&&t||e.up.callback(!0):(p("ready"),e.up.callback(!0))}function d(n){e.up.incoming(n,s)}function h(){c&&o(function(){c(!0)},0)}return e={outgoing:function(n,e,t){c=t,p(n)},destroy:function(){r.parentNode.removeChild(r),r=null,t&&(a.parentNode.removeChild(a),a=null)},onDOMReady:function(){t=n.isHost,i=0,s=P(n.remote),n.local=C(n.local),t?(y.Fn.set(n.channel,function(e){t&&"ready"===e&&(y.Fn.set(n.channel,d),f())}),l=F(n.remote,{xdm_e:n.local,xdm_c:n.channel,xdm_p:2}),I(n.props,{src:l+"#"+n.channel,name:b+n.channel+"_provider"}),a=A(n)):(n.remoteHelper=n.remote,y.Fn.set(n.channel,d));var e=function(){var t=r||this;u(t,"load",e),y.Fn.set(n.channel+"_load",h),function n(){"function"==typeof t.contentWindow.sendMessage?f():o(n,50)}()};r=A({props:{src:n.local+"#_4"+n.channel},onLoad:e})},init:function(){R(e.onDOMReady,e)}}},y.stack.HashTransport=function(e){var t,r,a,i,c,s,l,u,p,f;function d(){if(l){var n=l.location.href,e="",o=n.indexOf("#");-1!=o&&(e=n.substring(o)),e&&e!=c&&function(n){c=n,t.up.incoming(c.substring(c.indexOf("_")+1),f)}(e)}}function h(){a=setInterval(d,i)}return t={outgoing:function(n,t){!function(n){if(u){var t=e.remote+"#"+s+++"_"+n;(r||!p?u.contentWindow:u).location=t}}(n)},destroy:function(){n.clearInterval(a),!r&&p||u.parentNode.removeChild(u),u=null},onDOMReady:function(){if(r=e.isHost,i=e.interval,c="#"+e.channel,s=0,p=e.useParent,f=P(e.remote),r){if(I(e.props,{src:e.remote,name:b+e.channel+"_provider"}),p)e.onLoad=function(){l=n,h(),t.up.callback(!0)};else{var a=0,d=e.delay/50;!function n(){if(++a>d)throw new Error("Unable to reference listenerwindow");try{l=u.contentWindow.frames[b+e.channel+"_consumer"]}catch(n){}l?(h(),t.up.callback(!0)):o(n,50)}()}u=A(e)}else l=n,h(),p?(u=parent,t.up.callback(!0)):(I(e,{props:{src:e.remote+"#"+e.channel+new Date,name:b+e.channel+"_consumer"},onLoad:function(){t.up.callback(!0)}}),u=A(e))},init:function(){R(t.onDOMReady,t)}}},y.stack.ReliableBehavior=function(n){var e,t,o=0,r=0,a="";return e={incoming:function(n,i){var c=n.indexOf("_"),s=n.substring(0,c).split(",");n=n.substring(c+1),s[0]==o&&(a="",t&&t(!0)),n.length>0&&(e.down.outgoing(s[1]+","+o+"_"+a,i),r!=s[1]&&(r=s[1],e.up.incoming(n,i)))},outgoing:function(n,i,c){a=n,t=c,e.down.outgoing(r+","+ ++o+"_"+n,i)}}},y.stack.QueueBehavior=function(n){var e,t,i=[],c=!0,s="",l=0,u=!1,p=!1;function f(){if(n.remove&&0===i.length)return(r=e).up.down=r.down,r.down.up=r.up,void(r.up=r.down=null);var r;if(!c&&0!==i.length&&!t){c=!0;var a=i.shift();e.down.outgoing(a.data,a.origin,function(n){c=!1,a.callback&&o(function(){a.callback(n)},0),f()})}}return e={init:function(){D(n)&&(n={}),n.maxLength&&(l=n.maxLength,p=!0),n.lazy?u=!0:e.down.init()},callback:function(n){c=!1;var t=e.up;f(),t.callback(n)},incoming:function(t,o){if(p){var a=t.indexOf("_"),i=parseInt(t.substring(0,a),10);s+=t.substring(a+1),0===i&&(n.encode&&(s=r(s)),e.up.incoming(s,o),s="")}else e.up.incoming(t,o)},outgoing:function(t,o,r){n.encode&&(t=a(t));var c,s=[];if(p){for(;0!==t.length;)c=t.substring(0,l),t=t.substring(c.length),s.push(c);for(;c=s.shift();)i.push({data:s.length+"_"+c,origin:o,callback:0===s.length?r:null})}else i.push({data:t,origin:o,callback:r});u?e.down.init():f()},destroy:function(){t=!0,e.down.destroy()}}},y.stack.VerifyBehavior=function(n){var e,t,o;function r(){t=Math.random().toString(16).substring(2),e.down.outgoing(t)}return e={incoming:function(a,i){var c=a.indexOf("_");-1===c?a===t?e.up.callback(!0):o||(o=a,n.initiate||r(),e.down.outgoing(a)):a.substring(0,c)===o&&e.up.incoming(a.substring(c+1),i)},outgoing:function(n,o,r){e.down.outgoing(t+"_"+n,o,r)},callback:function(e){n.initiate&&r()}}},y.stack.RpcBehavior=function(n,e){var t,o=e.serializer||B(),r=0,a={};function i(n){n.jsonrpc="2.0",t.down.outgoing(o.stringify(n))}function c(n,e){var t=Array.prototype.slice;return function(){var o,c=arguments.length,s={method:e};c>0&&"function"==typeof arguments[c-1]?(c>1&&"function"==typeof arguments[c-2]?(o={success:arguments[c-2],error:arguments[c-1]},s.params=t.call(arguments,0,c-2)):(o={success:arguments[c-1]},s.params=t.call(arguments,0,c-1)),a[""+ ++r]=o,s.id=r):s.params=t.call(arguments,0),n.namedParams&&1===s.params.length&&(s.params=s.params[0]),i(s)}}function s(n,e,t,o){if(t){var r,a;e?(r=function(n){r=d,i({id:e,result:n})},a=function(n,t){a=d;var o={id:e,error:{code:-32099,message:n}};t&&(o.error.data=t),i(o)}):r=a=d,function(n){return"[object Array]"===Object.prototype.toString.call(n)}(o)||(o=[o]);try{var c=t.method.apply(t.scope,o.concat([r,a]));D(c)||r(c)}catch(n){a(n.message)}}else e&&i({id:e,error:{code:-32601,message:"Procedure not found."}})}return t={incoming:function(n,t){var r=o.parse(n);if(r.method)e.handle?e.handle(r,i):s(r.method,r.id,e.local[r.method],r.params);else{var c=a[r.id];r.error?c.error&&c.error(r.error):c.success&&c.success(r.result),delete a[r.id]}},init:function(){if(e.remote)for(var o in e.remote)e.remote.hasOwnProperty(o)&&(n[o]=c(e.remote[o],o));t.down.init()},destroy:function(){for(var o in e.remote)e.remote.hasOwnProperty(o)&&n.hasOwnProperty(o)&&delete n[o];t.down.destroy()}}},p.easyXDM=y}(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent)},stringify:function(n){var e=typeof n;if("object"!=e||null===n)return"string"==e&&(n='"'+n+'"'),String(n);var t,o,r=[],a=n&&n.constructor==Array;for(t in n)n.hasOwnProperty(t)&&("string"==(e=typeof(o=n[t]))?o='"'+o+'"':"object"==e&&null!==o&&(o=this.stringify(o)),r.push((a?"":'"'+t+'":')+String(o)));return(a?"[":"{")+String(r)+(a?"]":"}")},afun:function(n){var e="wpac_"+Math.floor(1000001*Math.random());return window[e]=function(t){window[e]=void 0;try{delete window[e]}catch(n){}n(t)},e},params:function(n,e,t){var o=[];if(e)for(var r in e)o.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t&&o.push("callback="+this.afun(t)),0n.indexOf("?")?"?":"&",n+(e+o.join("&"))):n},jsonp:function(n,e,t){var o=document.createElement("script");o.src=this.params(n,e,t),o.type="text/javascript",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(o)}};window.PremiumFbHelper=e}(jQuery);