'use strict';hb("mr.TestProvider");var Qx,xx,Rx=hb("mr.Init"),Pba=function(a){void 0!==a.use_views_dialog&&Rx.info("Using the "+(a.use_views_dialog?"Views (Harmony)":"WebUI")+" dialog.");void 0!==a.enable_cast_sink_query&&Rx.info("Native Cast MRP is "+(a.enable_cast_sink_query?"disabled":"enabled")+".");void 0!==a.enable_dial_sink_query&&Rx.info("Native DIAL MRP is "+(a.enable_dial_sink_query?"disabled":"enabled")+".");void 0!==a.use_mirroring_service&&Rx.info("Native Mirroring Service is "+(a.use_mirroring_service?"enabled":"disabled")+
".")};rs().init();Qx=new wb("MediaRouter.Provider.WakeDuration");xx=new Ix;
var Qba=(new Promise(function(a,c){switch(window.location.host){case "enhhojjnijigcajfphajepfemndkmdlo":a();break;case "pkedcjkdefgpdelpbcmbmeomcjbeemfm":chrome.management.get("enhhojjnijigcajfphajepfemndkmdlo",function(b){chrome.runtime.lastError||!b.enabled?a():c(Error("Dev extension is enabled"))});break;default:c(Error("Unknown extension id"))}})).then(function(){return chrome.mojoPrivate&&chrome.mojoPrivate.requireAsync?new Promise(function(a){chrome.mojoPrivate.requireAsync("media_router_bindings").then(function(c){mojo=c.getMojoExports&&
c.getMojoExports();c.start().then(function(b){a({mrService:c,mrInstanceId:b.instance_id||b,mrConfig:b.config})})})}):Promise.reject(Error("No mojo service loaded"))}).then(function(a){if(!a.mrService)throw Error("Failed to get MR service");var c=a.mrInstanceId;if(!c)throw Error("Failed to get MR instance ID.");Rx.info("MR instance ID: "+c);Pba(a.mrConfig);var b=a.mrService;if(!xx)throw Error("providerManager not initialized.");b.setHandlers(xx);cm(c)&&(Qx.b="MediaRouter.Provider.FirstWakeDuration");
chrome.runtime.onSuspend.addListener(Qx.end.bind(Qx));gm(c);us();c=Fba();window.addEventListener("unhandledrejection",function(d){d=d.reason;d.stack||(d=Error(d));Rx.error("Unhandled promise rejection.",d)});xx.initialize(b,c,a.mrConfig)}).then(void 0,function(a){Rx.G(a.message);throw a;});[].concat(n([wx(),tx()].concat(n(Ep()),n([Dv(),zv()])))).forEach(function(a){am(a)});wx().addListener();tx().addListener();chrome.runtime.onStartup.addListener(function(){});Qba.then(void 0,function(){return window.close()});
