'use strict';var Cx,$w,Dx=Pa("mr.Init");vr().init();Cx=new bb("MediaRouter.Provider.WakeDuration");$w=new ox;
var Ex=(new Promise(function(a,b){switch(window.location.host){case "enhhojjnijigcajfphajepfemndkmdlo":a();break;case "pkedcjkdefgpdelpbcmbmeomcjbeemfm":chrome.management.get("enhhojjnijigcajfphajepfemndkmdlo",function(c){chrome.runtime.lastError||!c.enabled?a():b(Error("Dev extension is enabled"))});break;default:b(Error("Unknown extension id"))}})).then(function(){return chrome.mojoPrivate&&chrome.mojoPrivate.requireAsync?new Promise(function(a){chrome.mojoPrivate.requireAsync("media_router_bindings").then(function(b){mojo=b.getMojoExports&&
b.getMojoExports();b.start().then(function(c){a({mrService:b,mrInstanceId:c.instance_id||c,mrConfig:c.config})})})}):Promise.reject(Error("No mojo service loaded"))}).then(function(a){if(!a.mrService)throw Error("Failed to get MR service");var b=a.mrInstanceId;if(!b)throw Error("Failed to get MR instance ID.");Dx.info("MR instance ID: "+b);var c=a.mrService;if(!$w)throw Error("providerManager not initialized.");c.setHandlers($w);Lg(b)&&(Cx.b="MediaRouter.Provider.FirstWakeDuration");chrome.runtime.onSuspend.addListener(Cx.a.bind(Cx));
Pg(b);yr();b=Zw();window.addEventListener("unhandledrejection",function(a){a=a.reason;a.stack||(a=Error(a));Dx.error("Unhandled promise rejection.",a)});$w.Ga(c,b,a.mrConfig)}).then(void 0,function(a){v(Dx,a.message);throw a;});[].concat(k(um()),k([].concat([Yw(),Vw()],k([].concat([mk(),ok()],k(rk()))),k([Gr()])))).forEach(function(a){Jg(a)});Yw().addListener();Vw().addListener();Ex.then(void 0,function(){return window.close()});
