var Microsoft,__extends,WindowsFeedback,Feedback;(function(n){var t;(function(t){"use strict";function e(t){for(var f=null,r,i,u=0;u0){f=i;break}}return f}function p(t){var u=t.querySelectorAll('input[type="radio"][required][name]'),i=!0,r;return n.Core.ForEach(u,function(n){var r=n.getAttribute("name"),u='input[type="radio"][required][name="'+r+'"]:checked',f=t.querySelector(u)!==null;i=i&&f}),r=t.querySelectorAll('input[type="checkbox"][required][groupname]'),n.Core.ForEach(r,function(n){var r=n.getAttribute("groupname"),u='input[type="checkbox"][required][groupname="'+r+'"]:checked',f=t.querySelector(u)!==null;i=i&&f}),i}function l(t,i){var r,u;return t===window?t.document.documentElement["client"+i]:t.nodeType===9?(r=t.documentElement,u=t.body,Math.max(u["scroll"+i],u["offset"+i],r["scroll"+i],r["offset"+i],r["client"+i])):parseFloat(n.Core.GetComputedStyle(t)[i.toLowerCase()])}function a(n,t,i){var u={},f;for(var r in t)u[r]=n.style[r],n.style[r]=t[r];f=i(n);for(r in t)n.style[r]=u[r];return f}function w(){y(!1)}function v(n){y(!0,n)}function y(t,i){n.Core.ForEach(_d.querySelectorAll('input[type="text"], input[type="search"]'),function(n){n.hasAttribute("data-depends-on")||t&&n===i||(n.disabled=t)})}function i(n){var t=String(n);return t.length===1&&(t="0"+t),t}var f,r,o,s,h,c,u;t.selectedElementClass="hlsrc";t.menuListClass="hlselcxmnlist";t.menuButtonClass="hlselcxmnbt";t.verbatimTxtId="fbpgdgtx";window._w=window._w||window;window._d=window._d||_w.document;f=_d.documentElement.matches||_d.documentElement.webkitMatchesSelector||_d.documentElement.mozMatchesSelector||_d.documentElement.oMatchesSelector||_d.documentElement.msMatchesSelector;r=document.compatMode==="CSS1Compat";t.spokenQuery=null;n.Core.GenerateString=function(n){for(var i="",r="abcdefghijklmnopqrstuvwxyz0123456789",t=0;t0&&(i+=","),i+=n.Core.Stringify(t[r]);i+="]"}else if(t instanceof Boolean||t instanceof Date||t instanceof Number||t instanceof String)i=t.toString();else{i+="{";for(r in t)t.hasOwnProperty(r)&&(u>0&&(i+=","),i+='"'+r+'":'+n.Core.Stringify(t[r]),u++);i+="}"}return i;case"boolean":case"number":return t.toString();case"string":return'"'+t.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\/]/g,"\\/").replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t")+'"';default:return null}};n.Core.FetchLocalStorage=function(){try{if(_w.localStorage){var n="CB47C15FA3044AB884F7E32B9FD32ED2";return _w.localStorage.setItem(n,"1"),_w.localStorage.removeItem(n),_w.localStorage}}catch(t){return undefined}};o=[{name:"page",provide:function(){var n=_ge("sb_form_q");return n&&n.value}},{name:"threshold",provide:function(){var t="ThresholdUtilities",n=_w[t]||_w.parent[t];return n&&n.getDecodedQuery&&n.getDecodedQuery()}},{name:"cortana",provide:function(){var t="SearchAppWrapper",i=_w[t]||_w.parent[t],r=i&&i.CortanaApp,n=r&&r.searchBox;return n&&n.getQueryText&&n.getQueryText().queryText}},{name:"spokenquery",provide:function(){return t.spokenQuery}},{name:"urlparam",provide:function(){if(typeof URL!="function")return null;var n=new URL(t.GetLocation()),i;return n&&n.search&&n.search.match&&(i=n.search.match(/[?&]q=([^?&#]*)/i))&&i.length>=2?decodeURI(i[1]):null}}];n.Core.GetUserQuery=function(){return e(o)};s=[{name:"locmet",provide:function(){var n="sj_locmet";return typeof _w[n]=="object"&&_w[n].GetCurrentUrl()}},{name:"miniSerp",provide:function(){var t=window.self!==window.top,n;return t?(n=_d.querySelector("base[href]"),n&&n.href):null}},{name:"location",provide:function(){return location.href}}];n.Core.GetLocation=function(){return e(s)};n.Core.GetISODate=function(n){return Date.prototype.toISOString?n.toISOString():n.getUTCFullYear()+"-"+i(n.getUTCMonth()+1)+"-"+i(n.getUTCDate())+"T"+i(n.getUTCHours())+":"+i(n.getUTCMinutes())+":"+i(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"};n.Core.AddUrlParam=function(n,t,i){var r=n;return t&&t.length>0&&i&&(r=r+(r.indexOf("?")>=0?"&":"?")+t+"="+encodeURIComponent(i)),r};n.Core.AddInstToUrl=function(t){var u=_w.feedback,i,f,r;return u&&u.config&&u.config.postIgEnabled&&(t=n.Core.AddUrlParam(t,"IG",_G.IG),i=_w.fbpkgiid,f=i&&i.page,f&&(t=n.Core.AddUrlParam(t,"iid",f),r=i&&i.sfx,isNaN(r)?r=1:r++,i.sfx=r,t=n.Core.AddUrlParam(t,"sfx",r))),t};n.Core.IsEmptyObject=function(n){for(var t in n)return!1;return!0};h=/\s+$/;c=/^\s+/;n.Core.Trim=function(n){return n.trim?n.trim():n.replace(c,"").replace(h,"")};n.Core.IndexOf=function(n,t){var i;if(n.indexOf)i=n.indexOf(t);else{for(i=0;i0&&_ge(e),s=f.value;if(o&&!o.checked||!o&&f.getAttribute("data-optional")){t.RemoveTextError(f);return}f.id===n.Core.verbatimTxtId&&n.CheckboxMenus&&n.CheckboxMenus.IsAtLeastOneItemChecked()||(t.GetTextInputValue(f).length===0||n.Core.Trim(s)==="")&&(feedback.config.dialog.dynamicSubmitButton||(t.AddTextError(f),r||(r=f,r.focus())),u=!1)}),u&&p(i)};n.Core.GetTextInputValue=function(n){if(!n)return"";var t=n.value;return(t===n.getAttribute("data-txt")||t===n.getAttribute("data-err"))&&(t=""),t};n.Core.GetTextInputErrorElement=function(n){return!n||!n.id?null:_ge(n.id+"_error")};n.Core.RemoveTextError=function(n){Lib.CssClass.remove(n,"error");var i=t.GetTextInputErrorElement(n);i&&!t.IsHidden(i)&&t.Hide(i)};n.Core.AddTextError=function(n){Lib.CssClass.add(n,"error");var i=t.GetTextInputErrorElement(n);i&&t.IsHidden(i)&&t.Show(i,"inline-block")};n.Core.LoopFocus=function(n){var e,i,o,h,s,r,l;if(n){var u=null,f=null,c=n.querySelectorAll("*");for(e=0;e=this.maxSendTries?this.OnOnlineSendFailure(n,t,r):(typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{error:"Will need to retry sending the payload because not all of them reached the live bing.com servers"},"Feedback.Error",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when we wanted to log that we will resend the payload"},"Feedback.Error",null,null,null,null,null),this.SendAttempt(n,t,++i,r,u)))}.bind(this);f.send(JSON.stringify(n))},n.prototype.OnSendSuccess=function(n,t,i){i===void 0&&(i=undefined);delete n.html;typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",JSON.stringify(n),"Feedback.Online",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when submitting feedback online"},"Feedback.Error",null,null,null,null,null);typeof i!="undefined"&&i(t)},n.prototype.OnOnlineSendFailure=function(n,t,i){i===void 0&&(i=undefined);delete n.html;typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",JSON.stringify(n),"Feedback.Offline",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when submitting feedback offline"},"Feedback.Error",null,null,null,null,null);typeof i!="undefined"&&i(t)},n}();_w.WindowsFeedbackProtocol=new n}(WindowsFeedback||(WindowsFeedback={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.base64ImageBlobs=this.GetImageBlobsAsBase64(n)}return n.prototype.Manipulate=function(n){if(n instanceof HTMLImageElement){var t=n;t.src&&this.base64ImageBlobs[t.src]&&(t.src=this.base64ImageBlobs[t.src])}},n.prototype.GetImageBlobsAsBase64=function(n){for(var u=n.querySelectorAll("img[src^='blob:']"),f={},t,i,e,o,r=0;r0&&i(o+" feedback files not returned in time for feedback submit.");n(t.filter(function(n){return!!n}))},function(){})}):{then:function(n){n&&n([])}}},t.prototype.collect=function(n){var t,i;this.recreateFilePromisesMap();this.filesRequested=!0;try{t=_w.SearchAppWrapper&&SearchAppWrapper.CortanaApp;t&&t.getFeedbackFilesAsync?(i=this,t.getFeedbackFilesAsync().then(function(t){if(t)for(var r=0;r0&&(n.Core.spokenQuery=i)},t}();n.FeedbackFiles=t;n.files=new t}(Feedback||(Feedback={})),function(n){var t;(function(){"use strict";function u(t,i){var u=t.getAttribute("id"),f;u||(u="genId"+n.length,t.setAttribute("id",u));f=new r(u,i,t.getAttribute(i));n.push(f)}function i(n,t,i){i===null?n.removeAttribute(t):n.setAttribute(t,i)}function t(n,t,r,f){for(var e,s=_d.querySelectorAll(r),o=0;o-1},n.prototype.IsWSBCobalt=function(){return _w.WSB&&_w.WSB.config&&_w.WSB.config.useCobaltCSS},n.prototype.Show=function(t,i){function p(n,t){return n?n.replace(y,function(n,i){return t[i]}):n}var e=this,s,v;t===void 0&&(t=null);i===void 0&&(i=!1);var w=!!this.fbcfg.capturePage,y=/{([0-9]+)}/g,o=function(n,t){var i=parseInt(n.substr(1),16),r=i>>16&255,u=i>>8&255,f=i&255;return"rgba("+r+","+u+","+f+","+t+")"};if(SearchAppWrapper!=null&&SearchAppWrapper.CortanaApp!=null&&SearchAppWrapper.CortanaApp.themeColors&&SearchAppWrapper.CortanaApp.themeColors.accent!=this.lastAccentColor){this.lastAccentColor=SearchAppWrapper.CortanaApp.themeColors.accent;var l=!1,a="feedback-accent-style",u=_ge(a);u||(u=_d.createElement("style"),u.setAttribute("id",a),u.type="text/css",l=!0);var f=SearchAppWrapper.CortanaApp.themeColors,r="",k="#"+f.accent.substr(3),h="#"+f.accentDark1.substr(3),d="#"+f.accentDark2.substr(3),g="#"+f.accentLight1.substr(3),c="#"+f.accentLight2.substr(3);this.IsWSBCobalt()?this.IsDarkMode()?(r+="#fbpgdg.darkTheme19H1 a { color: {1} }",r+="#fbpgdg.darkTheme19H1 a:hover { color: {4} }",r+="#fbpgdg.darkTheme19H1 a:active { color: {5} }",r+="#fbpgdg.darkTheme19H1 input[type= radio ]:checked ~ .radioDecoration, #fbpgdg input[type= checkbox ]:checked ~ .checkboxDecoration { background-color: {1} }",r+="#fbpgdg.darkTheme19H1 .button.send input[type= submit ] { background-color: {1} ; border: {1} }",r+="#fbpgdg.darkTheme19H1 .button.send input[type= submit ]:hover { background-color: {4} ; border-color: {4} }",r+="#fbpgdg.darkTheme19H1 .button.send input[type= submit ]:active { background-color: {5} ; border-color: {5} }",r+="#fbpgdg.darkTheme19H1 :first-child.button.send { background-color: {1} ; border: 1px solid {1} }",r+="#fbpgdg.darkTheme19H1 textarea.hlig:focus { border-bottom: 2px solid {1}}",r+="#fbml input[type= text].hlig:focus { border-bottom: 2px solid {1}; margin-bottom: 0;}"):(r+="#fbpgdg a { color: {0} }",r+="#fbpgdg a:hover { color: {2} }",r+="#fbpgdg a:active { color: {3} }",r+="#fbpgdg input[type= radio ]:checked ~ .radioDecoration, #fbpgdg input[type= checkbox ]:checked ~ .checkboxDecoration { background-color: {0} }",r+="#fbpgdg .button.send input[type= submit ] { background-color: {0} }",r+="#fbpgdg .button.send input[type= submit ]:hover { background-color: {2} ; border-color: {3} }",r+="#fbpgdg .button.send input[type= submit ]:active { background-color: {3} ; border-color: {3} }",r+="#fbpgdg :first-child.button.send { background-color: {0}; border: 1px solid {0} }",r+="#fbpgdg textarea.hlig:focus { border-bottom: 2px solid {0} }",r+="#fbml input[type= text].hlig:focus { border-bottom: 2px solid {0}; margin-bottom: 0 }"):(s="#"+f.accentDark1.substr(3),r="#fbpgdg a { color: "+s+"}"+("#fbpgdg :first-child.button a, #fbpgdg :first-child.button input {background-color: "+s+"; border-color: "+s+"}"));u.innerHTML=p(r,[h,c,o(h,.9),o(h,.8),o(c,.9),o(c,.8),]);l&&_d.head.appendChild(u)}typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",null,"FeedbackStarted",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{type:"ImpressionSubmitError",error:"_G.IG was not available when showing form"},"Feedback.Error",null,null,null,null,null);this.requestScreenshotAPIAllowed?(this.onScreenshotCompletedInitFeedbackForm=function(){e.InitFeedbackForm(t,i);e.onScreenshotCompletedInitFeedbackForm=null},v=2e3,setTimeout(function(){e.onScreenshotCompletedInitFeedbackForm&&e.onScreenshotCompletedInitFeedbackForm()},v),this.cortanaApp.requestScreenshot(null)):this.InitFeedbackForm(t,i);Feedback.files.collect(n.LogError)},n.prototype.AddFocusEventForWSB=function(){if(this.IsWSBCobalt()){var t=0,n=function(n){var t=_ge(n);t.addEventListener("blur",function(){t.parentElement.classList.remove("selectedLabel")});t.addEventListener("focus",function(){t.parentElement.classList.add("selectedLabel")})},i=this.GetFormValue(this.sendmailChkName,"checked");_ge("fbpgdg").tabIndex=0;n("fbpgdgtp1");n("fbpgdgtp2");n("fbpgdgtp3");n("fbpgdgsschk");i&&n("fbpgdgml");sj_be(_d,"keydown",function(n){switch(n.keyCode){case 37:case 38:case 39:case 40:case 9:t=Date.now()}})}},n.prototype.InitFeedbackForm=function(n,t){n===void 0&&(n=null);t===void 0&&(t=!1);sj_evt.fire("onFeedbackStarting",t);var i=_ge(this.feedbackContainerId);i===null?this.CreateShowForm(n):this.ResetShowForm();this.IsDarkMode()&&(i=_ge(this.feedbackContainerId),i.classList.add("darkTheme19H1"));Feedback.CortanaState.SetForFeedback();this.AddFocusEventForWSB();_ge("fbpgdg").setAttribute("aria-label",this.GetLocString("WINDOWS_TITLE_TEXT"));_ge("fbpgdg").focus();sj_evt.fire("ajax.feedback.initialized",Feedback)},n.prototype.Hide=function(){var n=_ge(this.feedbackContainerId);n&&(sj_evt.fire("onFeedbackClosing"),this.HideForm());this.FeedbackFormCleanup()},n.prototype.Remove=function(){var n=_ge(this.feedbackContainerId);n&&(sj_evt.fire("onFeedbackClosing"),this.RemoveForm());this.FeedbackFormCleanup()},n.prototype.FeedbackFormCleanup=function(){var n=_ge("fbpgdgsbbt");n&&Lib.CssClass.remove(n.parentElement,"inactive");Feedback.CortanaState.Reset();Feedback.files.clear()},n.prototype.CheckInternal=function(n){var t=sj_gx(),i=Feedback.Core.AddInstToUrl(this.internalCheckUrl),r=this;t.open("HEAD",i,!0);t.timeout=this.internalCheckRequestTimeout;t.onreadystatechange=function(){t.readyState===t.DONE&&t.status===204&&r.AddInternalFormElements(n)}.bind(this);t.send()},n.prototype.AddLabeledInput=function(n,t,i,r,u,f,e,o,s,h,c){var v,l,a;return r===void 0&&(r=undefined),u===void 0&&(u=undefined),f===void 0&&(f=undefined),e===void 0&&(e="inputwrapper"),o===void 0&&(o=null),s===void 0&&(s=null),h===void 0&&(h=null),v=sj_ce("div",null,e),l=sj_ce("input",h,o),l.type=t,u===!0&&(l.checked=!0),typeof r=="string"&&(l.name=r),typeof f=="string"&&(l.value=f),typeof c=="string"&&l.setAttribute("aria-label",c),a=sj_ce("label",null,s),a.appendChild(l),a.appendChild(_d.createTextNode(i)),v.appendChild(a),n.appendChild(v),l},n.prototype.AddLink=function(n,t,i,r){var u=sj_ce("a",t);return u.href=i,u.target="_blank",u.innerText=r,n.appendChild(u),u},n.prototype.AddTextArea=function(n,t,i,r){r===void 0&&(r=!0);var u=sj_ce("textarea",t);return u.placeholder=i,u.required=!0,n.appendChild(u),u},n.prototype.AddText=function(n,t,i,r){var u=sj_ce(t);return u.innerText=i,typeof r!="undefined"&&(u.className=r),n.appendChild(u),u},n.prototype.AddButton=function(n,t,i){var r=sj_ce("input");return r.type=t,r.value=i,n.appendChild(r),r},n.prototype.OnSubmitForm=function(t){var e,o,c,l,a,v,w,u;if(t.preventDefault(),Feedback.Core.ValidateInputs(_ge(this.feedbackContainerId))!==!1){Lib.CssClass.add(_ge("fbpgdgsbbt").parentElement,"inactive");var b=!!this.fbcfg.capturePage,s=this.GetFormValue(this.screenshotChkName,"checked"),h=b&&(!this.FormElementExists(this.screenshotChkName)||s),f=Feedback.debugCollector.collect(h),i={partner:"BingLegacy",feedbackType:"feedback",trafficType:this.fbcfg.internal?"MSCorp":"External",feedbackPackage:"bing.feedback.qf",url:location.href,width:Math.round(_w.innerWidth),height:Math.round(_w.innerHeight),source:typeof f.source=="undefined"?"windows":f.source,send_mail:!0};s!==null&&(i.screenshotAllowed=s);e=this.GetFormValue(this.sendmailChkName,"checked");e!==null&&(i.send_mail=e);o=this.GetFormValue(this.aliasTxtName,"value");o&&(!e||(i.alias=o),this.SetAlias(o));typeof _G!="undefined"&&(_G.IG&&(i.impression_guid=_G.IG),_G.EventID&&(i.traceId=_G.EventID),_G.ST&&(i.timeStamp=Feedback.Core.GetISODate(_G.ST)),_G.V?i.vertical=_G.V:_G.P&&(i.vertical=_G.P),_G.PN!==undefined&&(i.canvas=_G.PN));var y=window.frames.miniIframeSerp,p=y&&y.contentWindow,r=p&&p._G;r&&(r.IG||r.EventID)&&(c=i.structured_data=i.structured_data||{},r.IG&&(c.impression_guid_miniSerp=r.IG),r.EventID&&(c.traceId_miniSerp=r.EventID));l=Feedback.Core.GetUserQuery();l!==null&&(i.query=l);for(a in f)i[a]=f[a];i.canvas!==undefined&&(i.vertical=i.canvas);v=this.GetFormValue(Feedback.Core.verbatimTxtId,"value");typeof v=="string"&&(i.text=v);i.type=this.DetermineFeedbackType();w=function(t){n.LogError("OnSubmitForm","FeedbackFileTimeoutError",t)};u=this;Feedback.files.getFiles(h,function(){return!0},w).then(function(n){u.requestScreenshotAPIAllowed&&u.screenshotFile&&(n.push(u.screenshotFile),u.screenshotFile=null);u.ContinueSubmit(i,h,n)},function(t){n.LogError("OnSubmitForm","FeedbackFileGetError",t.toString())})}},n.prototype.ContinueSubmit=function(n,t,i){if(t){var r=new Microsoft.Search.DOMCopyManipulator(_d.documentElement);r.DeleteElementsBySelector("script");r.DeleteElementsBySelector("#aRmsDefer");r.DeleteElementsBySelector(".fbig");r.ManipulateElementsBySelector("img",[new Microsoft.Search.InlineImagesManipulator(r.DocumentFragment)]);r.ApplyStyle("body","background-color","#303030");n.html=r.SerializeToHtml(this.InlineIFramesAndAbsoluteURLs)}i.length>0&&(n.feedbackFiles=i);_w.WindowsFeedbackProtocol&&WindowsFeedbackProtocol.Send(n);this.Hide();typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{target:"Submit"},"Feedback.Click",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{type:"ImpressionSubmitError",error:"_G.IG was not available when clicking on Submit button"},"Feedback.Error",null,null,null,null,null)},n.prototype.OnCloseForm=function(n){n.preventDefault();this.Hide();typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{target:"Cancel"},"Feedback.Click",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{type:"ImpressionCloseError",error:"_G.IG was not available when clicking on Cancel button"},"Feedback.Error",null,null,null,null,null)},n.prototype.GetCategoryRadioButtons=function(n){return n.querySelectorAll('input[name="type"]')},n.prototype.DetermineFeedbackType=function(){for(var r=_ge(this.feedbackContainerId),t=this.GetCategoryRadioButtons(r),i=1,n=0,u=t.length;n]*id="'+e+'"[^>]*>)(<\/iframe>)'),t=t.replace(s,function(n,t,i){return t.replace("iframe","div")+o+i.replace("iframe","div")}));return t.replace(/(src="|href="|url\()\//g,"$1https://www.bing.com/")},n}();n.WindowsFeedbackFormBase=t;typeof sj_evt!="undefined"&&(sj_evt.bind("WindowsFeedback.Form.Show",function(){_w.WindowsFeedbackForm.Show()},1),sj_evt.bind("WindowsFeedback.Form.Hide",function(){_w.WindowsFeedbackForm.Hide()}));typeof SearchAppWrapper!="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.addEventListener&&SearchAppWrapper.CortanaApp.addEventListener("feedbackformrequested",function(n){typeof n!="undefined"&&n!==null&&(n.isHandled=!0);_w.WindowsFeedbackForm.Show(null,!0)})}(WindowsFeedback||(WindowsFeedback={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){"use strict";var t=function(n){function t(){var t=n.call(this)||this;return t.modalShieldId="feedbackModalShield",t}return __extends(t,n),t.prototype.CreateShowForm=function(n){var g=sj_ce("div",this.modalShieldId,"modalShield hlig"),nt,h,i,c,u,l,tt,a,v,y,p,o,w,it,b,f,d,e,ut;sj_be(g,"click",this.OnCloseForm.bind(this));var r=sj_ce("div",this.feedbackContainerId,"modal hlig"),t=sj_ce("div",null,null),s=sj_ce("div","fbpgdghd","hlig");t.appendChild(s);s.appendChild(sj_ce("div",null,"padding hlig"));nt=this.AddText(s,"h2",this.GetLocString("WINDOWS_TITLE_TEXT"),"step1 hlig");h=sj_ce("div","fbctgrs");t.appendChild(h);i=sj_ce("div",null,"hlig step1 fbctgcntsdk");i.setAttribute("role","radiogroup");i.setAttribute("aria-label",this.GetLocString("DIALOG_COMMENT_TYPE_LABEL"));var ft=this.AddLabeledInputSdk(i,"radio",this.GetLocString("DIALOG_COMMENT_TYPE4"),"type",this.selectedByDefaultCatIdx==0,"1","inline hlig fbctgctlsdk","hlig","hlig","fbpgdgtp1"),et=this.AddLabeledInputSdk(i,"radio",this.GetLocString("DIALOG_COMMENT_TYPE5"),"type",this.selectedByDefaultCatIdx==1,"2","inline hlig fbctgctlsdk","hlig","hlig","fbpgdgtp2"),ot=this.AddLabeledInputSdk(i,"radio",this.GetLocString("DIALOG_COMMENT_TYPE6"),"type",this.selectedByDefaultCatIdx==2,"3","inline hlig fbctgctlsdk","hlig","hlig","fbpgdgtp3");h.appendChild(i);c=sj_ce("div","fbvrbtm","hlig");t.appendChild(c);u=this.AddTextArea(c,Feedback.Core.verbatimTxtId,this.GetLocString("WINDOWS_DIALOG_COMMENT_TEXT"));u.setAttribute("maxlength","1200");u.className="step1 hlig";u.setAttribute("aria-label",this.GetLocString("DIALOG_COMMENT_LABEL"));u.setAttribute("data-err",this.GetLocString("DIALOG_COMMENT_ERROR_TEXT"));l=sj_ce("div","fbpgdgpnl","step1");t.appendChild(l);tt=this.AddLabeledInputSdk(l,"checkbox",this.GetLocString("DIALOG_INCLUDE_SCREENSHOT"),this.screenshotChkName,!0,undefined,"hlig fb-t-small fb-mrg-med","hlig","hlig","fbpgdgsschk");a=sj_ce("div","fbml");t.appendChild(a);this.CheckInternal(a);v=sj_ce("div","fbpgdgpnlrp");t.appendChild(v);y=sj_ce("p");v.appendChild(y);this.AddLink(y,"fbpgdgpslk",this.reportPrivacyPolicyUrl,this.GetLocString("REPORT_LEGAL_OR_PRIVACY_CONCERN"));p=sj_ce("div","fbpgdgpnl2","step1");t.appendChild(p);o=sj_ce("div");p.appendChild(o);w=sj_ce("p");o.appendChild(w);it=this.AddLink(w,"fbpgdgpslk",this.privacyPolicyUrl,this.GetLocString("PRIVACY_STATEMENT_LINK_TEXT"));b=sj_ce("p");o.appendChild(b);var st=this.AddLink(b,"fbpgdgplmlk",this.learnMoreLinkUrl,this.GetLocString("LEARN_MORE_LINK_TEXT")),k=sj_ce("div",null,"container"),rt=sj_ce("div",null,"button step1 hlig send");return k.appendChild(rt),f=sj_ce("input","fbpgdgsbbt","hlig"),f.type="submit",f.value=this.GetLocString("DIALOG_SEND_BUTTON_TEXT"),rt.appendChild(f),d=sj_ce("div",null,"button step1 hlig cancel"),k.appendChild(d),e=sj_ce("input","fbpgdgcnclbt","hlig"),e.type="button",e.value=this.GetLocString("DIALOG_CANCEL_BUTTON_TEXT"),d.appendChild(e),t.appendChild(k),sj_be(e,"click",this.OnCloseForm.bind(this)),sj_be(f,"click",this.OnSubmitForm.bind(this)),r.appendChild(t),Feedback.Core.EnableValidation(r,!1),Feedback.Core.LoopFocus(r),_d.body.appendChild(g),ut=_ge(n)||_d.body,ut.appendChild(r),typeof TestHooksEnabled!="undefined"&&TestHooksEnabled===!0&&(r.setAttribute("data-tag","WindowsFeedback.Form"),nt.setAttribute("data-tag","WindowsFeedback.FormTitle"),ft.setAttribute("data-tag","WindowsFeedback.SuggestRadioButton"),et.setAttribute("data-tag","WindowsFeedback.LikeRadioButton"),ot.setAttribute("data-tag","WindowsFeedback.DislikeRadioButton"),u.setAttribute("data-tag","WindowsFeedback.VerbatimTextArea"),tt.setAttribute("data-tag","WindowsFeedback.IncludeScreenshotCheckbox"),it.setAttribute("data-tag","WindowsFeedback.PrivacyLink"),st.setAttribute("data-tag","WindowsFeedback.LearnMoreLink"),f.setAttribute("data-tag","WindowsFeedback.SubmitButton"),e.setAttribute("data-tag","WindowsFeedback.CloseButton")),r},t.prototype.AddInternalFormElements=function(n){var h=this.GetAlias(),c="fbpgdgml",r=sj_ce("div",null,"hlig step1 internal fb-t-small"),l,u,i,a,f,o,v,e,y,s,t;this.AddText(r,"h3",this.GetLocString("DIALOG_MSFT_INTERNAL"));n.appendChild(r);l=sj_ce("div",null,"hlig fb-mrg-med");u=sj_ce("label",null,"hlig outerlabel");u.htmlFor=c;l.appendChild(u);i=sj_ce("input",c,"hlig");i.type="checkbox";i.name=this.sendmailChkName;i.checked=!0;u.appendChild(i);a=sj_ce("span",null,i.type+"Decoration");u.appendChild(a);f=sj_ce("div",null,"SendMailText");u.appendChild(f);o=sj_ce("label",null,"hlig");o.htmlFor=c;v=this.GetLocString("DIALOG_SEND_EMAIL_LABEL").replace("{0}","Bing");o.appendChild(_d.createTextNode(v));f.appendChild(o);e=sj_ce("span");e.dir="ltr";e.innerHTML+=" (";y=this.AddLink(e,null,this.dlLink,this.dlAlias);y.className="hlig";e.innerHTML+=")";f.appendChild(e);s=sj_ce("label",null,"hlig");s.htmlFor="fbpgdgal";s.appendChild(_d.createTextNode(this.GetLocString("DIALOG_ALIAS_LABEL")));f.appendChild(s);f.appendChild(sj_ce("br",null,"hlig"));r.appendChild(l);t=sj_ce("input","fbpgdgal","hlig");t.type="text";t.placeholder=this.GetLocString("DIALOG_ALIAS_TEXT");t.name=this.aliasTxtName;t.setAttribute("data-err",this.GetLocString("DIALOG_ALIAS_ERROR_TEXT"));t.setAttribute("data-depends-on",c);t.required=!0;r.appendChild(t);h!=null&&h!=t.placeholder&&h!=t.getAttribute("data-err")&&(t.value=h);n.appendChild(r);sj_be(i,"click",function(){i.checked?t.removeAttribute("disabled"):(t.setAttribute("disabled","true"),Lib.CssClass.remove(t,"error"),t.value==t.getAttribute("data-err")&&(t.value=""));Lib.CssClass.toggle(s,"disabled");Lib.CssClass.toggle(o,"disabled")});Feedback.Core.EnableValidation(r,!1)},t.prototype.ResetShowForm=function(){for(var u,n=_ge(this.feedbackContainerId),f=this.GetCategoryRadioButtons(n),e=n.querySelector('input[name="screenshot"]'),o=n.querySelector('input[name="sendmail"]'),t=n.querySelector('input[name="alias"]'),r=this.GetAlias(),i=0,s=f.length;i