'use strict';var Df=function(a){this.pD="number"==typeof a?0<a?1:0>a?-1:null:null==a?null:a?-1:1};Df.prototype.iT=function(a,b){var c=0,e=0,f=!1;a=Nb(a,b).split(Rb);for(b=0;b<a.length;b++){var g=a[b];Pb.test(Nb(g,void 0))?(c++,e++):Qb.test(g)?f=!0:Ob.test(Nb(g,void 0))?e++:Sb.test(g)&&(f=!0)}return 0==e?f?1:0:.4<c/e?-1:1};Df.prototype.BS=function(a,b){return this.M_(this.iT(a,b))};Df.prototype.M_=function(a){return-1==(0==a?this.pD:a)?"rtl":"ltr"};
Df.prototype.mark=function(){switch(this.pD){case 1:return"\u200e";case -1:return"\u200f";default:return""}};if("undefined"!=typeof angular){var Ef=angular.module("chrome_18n",[]);chrome.runtime&&chrome.runtime.getManifest&&chrome.runtime.getManifest().default_locale&&Ef.directive("angularMessage",function(){return{restrict:"E",replace:!0,controller:["$scope",function(a){this.hv=this.ee=null;a.dirForText=v(function(a){this.ee||(this.ee=chrome.i18n.getMessage("@@bidi_dir")||"ltr");this.hv||(this.hv=new Df("rtl"==this.ee));return this.hv.BS(a||"")},this)}],compile:function(a,b){b=b.key;var c=null,e=document.createElement("amr");
b&&!b.match(/^\d+$/)&&(b=chrome.i18n.getMessage(b),null==b&&e.setAttribute("id","missing"));if(b){var f=chrome.i18n.getMessage(b+"_ph"),c=[];if(null!=f)for(c=f.split("\ue000"),f=0;f<c.length;++f)c[f]=c[f].replace(/^{{(.*)}}$/,'<amrp dir="{{dirForText($1)}}">{{$1}}</amrp>');c=chrome.i18n.getMessage(b,c)}else e.setAttribute("r","nokey");c?e.innerHTML=c:(e.setAttribute("tl","false"),e.innerHTML=a.html());a.replaceWith(e)}}})};var Ff=/^[\w+/]+[=]{0,2}$/;var Gf=function(a,b,c){a.timeOfStartCall=(new Date).getTime();var e=c||h,f=e.document,g;(g=(g=(g=(e||h).document.querySelector("script[nonce]"))&&g.getAttribute("nonce"))&&Ff.test(g)?g:void 0)&&(a.nonce=g);if("help"==a.flow){var k=pa("document.location.href",e);!a.helpCenterContext&&k&&(a.helpCenterContext=k.substring(0,1200));k=!0;if(b&&JSON&&JSON.stringify){var p=JSON.stringify(b);(k=1200>=p.length)&&(a.psdJson=p)}k||(b={invalidPsd:!0})}b=[a,b,c];e.GOOGLE_FEEDBACK_START_ARGUMENTS=b;c=a.serverUri||
"//www.google.com/tools/feedback";if(k=e.GOOGLE_FEEDBACK_START)k.apply(e,b);else{var e=c+"/load.js?",q;for(q in a)b=a[q],null!=b&&!wa(b)&&(e+=encodeURIComponent(q)+"="+encodeURIComponent(b)+"&");a=f.createElement("script");g&&a.setAttribute("nonce",g);a.src=e;f.body.appendChild(a)}};m("userfeedback.api.startFeedback",Gf,void 0);var Hf=function(a,b,c,e,f,g){this.userEmail=a;this.aI=b;this.wT=c;this.K0=e;this.modelName=f;this.receiverVersion=g};var If=chrome.i18n.getMessage("4163185390680253103"),Jf=chrome.i18n.getMessage("492097680647953484"),Kf=chrome.i18n.getMessage("2575016469622936324"),Lf=chrome.i18n.getMessage("128276876460319075"),Mf=chrome.i18n.getMessage("3326722026796849289"),Nf=chrome.i18n.getMessage("1018984561488520517"),Of=chrome.i18n.getMessage("8205999658352447129"),Pf=chrome.i18n.getMessage("5723583529370342957"),Qf=chrome.i18n.getMessage("1550904064710828958"),Rf=chrome.i18n.getMessage("5014364904504073524"),Sf=chrome.i18n.getMessage("2194670894476780934"),
Tf=chrome.i18n.getMessage("6614468912728530636"),Uf=chrome.i18n.getMessage("5910595154486533449"),Vf=chrome.i18n.getMessage("5363086287710390513"),Wf=chrome.i18n.getMessage("244647017322945605"),Xf=chrome.i18n.getMessage("5375576275991472719"),Yf=chrome.i18n.getMessage("4592127349908255218"),Zf=chrome.i18n.getMessage("843316808366399491"),$f=chrome.i18n.getMessage("5699813974548050528"),ag=chrome.i18n.getMessage("8515148417333877999"),bg=chrome.i18n.getMessage("1636686747687494376"),cg=chrome.i18n.getMessage("4148300086676792937"),
dg=chrome.i18n.getMessage("3219866268410307919"),eg=chrome.i18n.getMessage("9211708838274008657"),fg=chrome.i18n.getMessage("8706273405040403641"),gg=chrome.i18n.getMessage("4756056595565370923"),hg=chrome.i18n.getMessage("7876724262035435114"),ig=chrome.i18n.getMessage("5485620192329479690"),jg=chrome.i18n.getMessage("6963873398546068901"),kg=chrome.i18n.getMessage("3567591856726172993"),lg=chrome.i18n.getMessage("3239956785410157548");var mg=function(a,b){this.HD=b;this.l=a;this.l.top=a;this.eE=[];this.vB=!1;this.baa();this.V$();this.W$();this.X$();this.Z$();this.yT=Ra();this.l.userEmail="";chrome.identity.getProfileUserInfo(function(a){this.l.userEmail=a.email;this.Oo()}.bind(this));this.l.yourAnswerText=lg;this.l.language=chrome.i18n&&chrome.i18n.getUILanguage?chrome.i18n.getUILanguage():chrome.runtime.getManifest().default_locale;this.l.requestLogsInProgress=!1};
mg.prototype.Au=function(a,b){a.closeWindow=function(){window.close()};a.closeDialog=function(){b.hide()}};mg.prototype.Au.$inject=["$scope","$mdDialog"];mg.prototype.V$=function(){this.eE=[{value:"Bug",desc:If},{value:"FeatureRequest",desc:Jf},{value:"MirroringQuality",desc:Kf},{value:"Discovery",desc:Lf},{value:"Other",desc:Mf}];this.l.feedbackTypes=this.eE};var og=function(a,b){this.id=a;this.desc=b;this.text=0==a?b:a+" ("+b+")"};d=mg.prototype;
d.$A=function(a){for(var b=[],c=1;c<arguments.length;c++)b.push(new og(c,arguments[c]));b.push(new og(0,arguments[0]));return b};d.baa=function(){this.l.videoSmoothnessRatings=this.$A(Sf,Nf,Of,Pf,Qf,Rf);this.l.videoQualityRatings=this.$A(Sf,Tf,Uf,Vf,Wf,Xf);this.l.audioQualityRatings=this.$A(Sf,Yf,Zf,$f,ag,bg)};
d.W$=function(){this.l.includeFineLogs=!0;this.l.feedbackType="Bug";this.l.sendFeedback=v(this.F6,this);this.l.cancel=v(this.dR,this);this.l.attachLogsClick=v(this.pC,this);this.l.viewLogs=v(this.eca,this)};d.X$=function(){this.l.$watchGroup("videoSmoothness videoQuality audioQuality feedbackDescription comments feedbackType".split(" "),v(this.uR,this));this.l.sufficientFeedback=!1};d.Z$=function(){this.l.$watch("attachLogs",v(this.pC,this));this.l.attachLogs=!0};
d.dR=function(){this.l.feedbackDescription&&!confirm(cg)||window.close()};d.uR=function(){var a=this.l.feedbackType;this.l.sufficientFeedback="MirroringQuality"==a?this.l.videoSmoothness||this.l.videoQuality||this.l.audioQuality||this.l.comments:"Discovery"==a?this.l.visibleInSetup||this.l.comments:!!this.l.feedbackDescription};
d.F6=function(){if(this.l.sufficientFeedback){var a=this.l.feedbackType,b="";"MirroringQuality"==a?(this.l.videoSmoothness&&(b+="\nVideo Smoothness: "+this.l.videoSmoothness),this.l.videoQuality&&(b+="\nVideo Quality: "+this.l.videoQuality),this.l.audioQuality&&(b+="\nAudio: "+this.l.audioQuality),this.l.projectedContentUrl&&(b+="\nProjected Content/URL: "+this.l.projectedContentUrl),this.l.comments&&(b+="\nComments: "+this.l.comments)):"Discovery"==a?(this.l.visibleInSetup&&(b+="\nChromecast Visible in Setup: "+
this.l.visibleInSetup),this.l.hasNetworkSoftware&&(b+="\nUsing VPN/proxy/firewall/NAS Software: "+this.l.hasNetworkSoftware),this.l.networkDescription&&(b+="\nNetwork Description: "+this.l.networkDescription),this.l.comments&&(b+="\nComments: "+this.l.comments)):b=this.l.feedbackDescription;this.E6("Type: "+a+"\n\n"+b)}};
d.E6=function(a){this.l.sendDialogText=dg;this.l.okButton=kg;this.l.feedbackSent=!1;this.HD.show({locals:{oka:this.l.feedbackSent,dqa:this.l.sendDialogText,U0:this.l.okButton},scope:this.l,preserveScope:!0,bindToController:!0,template:'<md-dialog id="feedback-confirmation"><md-dialog-content><div id="send-feedback-text">{{sendDialogText}}</div><md-dialog-actions><md-button class="md-raised md-primary"ng-disabled="!feedbackSent" ng-click="closeWindow()">{{okButton}}</md-button></md-dialog-actions></md-dialog-content></md-dialog>',
controller:this.Au});this.IK(a,w())};d.IK=function(a,b){var c=w();!this.l.requestLogsInProgress||5E3<c-b?this.PS(a):setTimeout(v(this.IK,this),1E3,a,b)};
d.PS=function(a){var b=this,c=0,e=function(a,c,e){e?a(!0):(b.l.sendDialogText=gg,b.Oo(),c(Error("Failed to send")))},f=chrome.declarativeWebRequest?"MrTeamfood":"MRStable";(new gf(function(){c++;return new Promise(function(c,k){var g=new Hf(b.l.userEmail||"",b.l.logs||"",b.l.externalLogs||"",b.l.mirrorLogUrl||"",b.l.modelName||"",b.l.receiverVersion||"");c=Ba(e,c,k);k=chrome.runtime.getManifest();Gf({productId:85561,bucket:f,flow:"submit",serverUri:"https://www.google.com/tools/feedback",allowNonLoggedInFeedback:!0,
locale:k.default_locale,enableAnonymousFeedback:!g.userEmail,report:{description:a},callback:c},{version:k.version,description:k.description,user_email:g.userEmail||"NA",logs:g.aI||"NA",external_logs:g.wT||"NA",device_model:g.modelName||"NA",receiver_version:g.receiverVersion||"NA",dash_report_url:g.K0||"NA"})})},1E4,4)).tt(2).start().then(function(){b.l.sendDialogText=fg;b.l.feedbackSent=!0;b.Oo()},function(){b.l.sendDialogText=eg;b.l.feedbackSent=!0;b.Oo()})};
d.pC=function(){this.l.logs="";this.l.externalLogs=null;this.l.mirrorLogUrl="";this.l.modelName="";this.l.receiverVersion="";this.l.attachLogs&&(this.l.requestLogsInProgress=!0,chrome.runtime.sendMessage(new Cf(this.yT,"retrieve_log_data"),v(function(a){this.l.requestLogsInProgress=!1;this.l.logs=a.logs||"no extension";this.l.mirrorLogUrl=a.castStreamingLogs||"";if((a=a.device)&&a.model&&(this.l.modelName=a.model,this.l.receiverVersion=a.version||"",!this.vB)){var b=Ra();this.vB=!0;this.l.externalLogs=
zf(a.ip,b,v(this.r2,this))}},this)))};
d.eca=function(){this.l.logsHeader=hg;this.l.sendLogs=ig;this.l.fineLogsWarning=jg;this.l.okButton=kg;this.HD.show({locals:{cha:this.l.attachLogs,aI:this.l.logs,Fla:this.l.includeFineLogs,yma:this.l.logsHeader,eqa:this.l.sendLogs,qka:this.l.fineLogsWarning,U0:this.l.okButton},scope:this.l,preserveScope:!0,bindToController:!0,clickOutsideToClose:!0,template:'<md-dialog><md-dialog-content id="logs-dialog"><div class="subheading">{{logsHeader}}</div><div ng-show="includeFineLogs && attachLogs"id="feedback-fine-log-warning" class="informative">{{fineLogsWarning}}</div><pre>{{logs}}</pre><div class="send-logs"><md-checkbox type="checkbox" ng-model="attachLogs"ng-change="attachLogsClick()"><span>{{sendLogs}}</span></md-checkbox></div><md-dialog-actions><md-button class="md-raised md-primary"ng-click="closeDialog()">{{okButton}}</md-button></md-dialog-actions></md-dialog-content></md-dialog>',controller:this.Au})};
d.r2=function(a,b){this.vB=!1;this.l.externalLogs="error"==a?null:b;this.l.attachLogs||(this.l.externalLogs=null);this.Oo()};d.Oo=function(){this.l.$$phase||this.l.$apply()};angular.module("feedbackApp","chrome_18n material.components.button material.components.checkbox material.components.dialog material.components.input material.components.radioButton".split(" ")).controller("FeedbackCtrl",["$scope","$mdDialog",mg]);m("ng.safehtml.googSceHelper.isGoogHtmlType",function(a){return a&&a.Tk?!0:!1},void 0);m("ng.safehtml.googSceHelper.isCOMPILED",function(){return!0},void 0);m("ng.safehtml.googSceHelper.unwrapAny",function(a){if(a instanceof hc)return ic(a);if(a instanceof lc)return mc(a);if(a instanceof ec)return fc(a);if(a instanceof bc)return cc(a);if(a instanceof oc)return pc(a);throw Error();},void 0);
m("ng.safehtml.googSceHelper.unwrapGivenContext",function(a,b){if("html"==a)return mc(b);if("resourceUrl"==a||"templateUrl"==a)return ic(b);if("url"==a)return b instanceof hc?ic(b):fc(b);if("css"==a)return cc(b);if("js"==a)return pc(b);throw Error();},void 0);
