You are on page 1of 7

var Microsoft,__extends,WindowsFeedback,Feedback;(function(n){var t;(function(t)

{"use strict";function s(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 h(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 a(){l(!1)}function c(n){l(!0,n)}function l(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,e,o,u;t.selectedElementClass="hlsrc";t.menuListClass="hlselcxmnlist";t.menuButt
onClass="hlselcxmnbt";t.verbatimTxtId="fbpgdgtx";f=_d.documentElement.matches||
_d.documentElement.webkitMatchesSelector||_d.documentElement.mozMatchesSelector||
_d.documentElement.oMatchesSelector||
_d.documentElement.msMatchesSelector;r=document.compatMode==="CSS1Compat";n.Core.Ge
nerateString=function(n){for(var
i="",r="abcdefghijklmnopqrstuvwxyz0123456789",t=0;t<n;+
+t)i+=r.charAt(Math.floor(Math.random()*r.length));return
i};n.Core.GenerateHtmlId=function(t){return"f"+n.Core.GenerateString(t-
1)};n.Core.Stringify=function(t){var i="",u=0,r;switch(typeof t){case"object":if(t
instanceof Array){for(i+="[",r=0;r<t.length;r+
+)r>0&&(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;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}};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.IsEmpty
Object=function(n){for(var t in n)return!1;return!0};e=/\s+
$/;o=/^\s+/;n.Core.Trim=function(n){return n.trim?
n.trim():n.replace(o,"").replace(e,"")};n.Core.IndexOf=function(n,t){var
i;if(n.indexOf)i=n.indexOf(t);else{for(i=0;i<n.length;i+
+)if(n[i]===t)break;i=i<n.length?i:-1}return
i};n.Core.EnableValidation=function(t,i){var r=function(t){var r=sj_et(t);r&&(!!
i==!
1&&c(r),n.Core.GetTextInputValue(r).length===0&&(Lib.CssClass.remove(r,"error"),Lib
.CssClass.add(r,"active"),r.value=""))},u=function(n){var
t=sj_et(n),i;t&&(a(),i=_w.feedback&&_w.feedback.config&&_w.feedback.config.dialog&&
_w.feedback.config.dialog.emulatePlaceholderText,t.value.length===0&&i&&(Lib.CssCla
ss.remove(t,"active"),t.value=t.getAttribute("data-txt")))},f=function(n){var
t=sj_et(n);t&&c(t)};n.Core.ForEach(t.querySelectorAll('textarea,
input[type="text"]'),function(n){sj_be(n,"blur",u);sj_be(n,"change",u);i?
(sj_be(n,"focus",f),sj_be(n,"keydown",r),sj_be(n,"tap",r),sj_be(n,"taphold",r),sj_b
e(n,"mouseup",r),sj_be(n,"click",r)):sj_be(n,"focus",r)})};n.Core.ValidateInputs=fu
nction(i){var u=i.querySelectorAll('input[type="text"][data-err], textarea[data-
err]'),r=!0;return n.Core.ForEach(u,function(i){var u=i,f=_ge(u.getAttribute("data-
depends-on")),e=u.value;(!f||
f.checked)&&(u.id===n.Core.verbatimTxtId&&n.CheckboxMenus&&n.CheckboxMenus.IsAtLeas
tOneItemChecked()||(t.GetTextInputValue(u).length===0||
n.Core.Trim(e)==="")&&(Lib.CssClass.add(u,"error"),u.value=u.getAttribute("data-
err"),r=!1))}),r};n.Core.GetTextInputValue=function(n){var
t=n&&n.value;return(t===n.getAttribute("data-txt")||t===n.getAttribute("data-
err"))&&(t=""),t};n.Core.ForEach=function(n,t){for(var r,u,i=0;i<n.length;i+
+)if(r=n[i],u=t(r),u===!1)break};n.Core.WindowScrollTop=function(){return
_w.pageYOffset||r&&_d.documentElement.scrollTop||
_d.body.scrollTop};n.Core.WindowScrollLeft=function(){return _w.pageXOffset||
r&&_d.documentElement.scrollLeft||_d.body.scrollLeft};n.Core.Width=function(n)
{return s(n,"Width")};n.Core.Height=function(n){return
s(n,"Height")};n.Core.Remove=function(n)
{n&&n.parentNode&&n.parentNode.removeChild&&n.parentNode.removeChild(n)};n.Core.For
EachChildren=function(n,t){for(var
i=n.firstChild;i;i=i.nextSibling)i.nodeType===1&&t(i)};n.Core.Matches=function(n,t)
{return f.call(n,t)};n.Core.Offset=function(t){var i,r,u,f;if(t)return
t.getClientRects().length?(i=t.getBoundingClientRect(),r=i.height!==undefined?
i.height||i.width:i.bottom-i.top||i.right-i.left,!r)?i:
(u=_d.documentElement.clientTop||_d.body.clientTop||
0,f=_d.documentElement.clientLeft||_d.body.clientLeft||0,
{top:i.top+n.Core.WindowScrollTop()-u,left:i.left+n.Core.WindowScrollLeft()-f}):
{top:0,left:0}};u={position:"absolute",visibility:"hidden",display:"block"};n.Core.
GetComputedStyle=function(n){return!n||!n.style?undefined:_w.getComputedStyle?
_w.getComputedStyle(n):n.currentStyle};n.Core.ApplyCss=function(n,t)
{if(n&&n.style&&typeof t=="object")for(var i in
t)n.style[i]=t[i]};n.Core.OuterWidth=function(t){return!t||!t.style?
undefined:n.Core.IsHidden(t)?h(t,u,function(n){return
n.offsetWidth}):t.offsetWidth};n.Core.OuterHeight=function(t){return!t||!t.style?
undefined:n.Core.IsHidden(t)?h(t,u,function(n){return
n.offsetHeight}):t.offsetHeight};n.Core.Show=function(n,t){n&&n.style&&t!
==undefined&&t!==null&&(n.style.display=t)};n.Core.Hide=function(n)
{n&&n.style&&(n.style.display="none")};n.Core.IsHidden=function(t){return!t||!
t.style?
undefined:n.Core.GetComputedStyle(t).display==="none"};n.Core.GetElementByHlid=func
tion(n,t){return _d.querySelector('[hlid="'+n+'"]'+(t?"."+t:""))||
undefined};n.Core.GetAllElementsByHlid=function(n){return
_d.querySelectorAll('[hlid="'+n+'"]')};n.Core.GetHlid=function(n){return
n&&(n.getAttribute("hlid")||undefined)};n.Core.SetHlid=function(n,t)
{n&&n.setAttribute("hlid",t)};n.Core.GetSelectedElements=function(){return
_d.querySelectorAll("."+n.Core.selectedElementClass)}})(t=n.Core||(n.Core={}))})
(Feedback||(Feedback={})),function(){"use strict";var n=function(){function n()
{this.maxSizeBytes=35e5;this.feedbackUploadUrl="/feedback/submission";this.maxSendT
ries=3;this.requestTimeout=1e4}return n.prototype.Send=function(n,t,i,r){t===void
0&&(t=undefined);i===void 0&&(i=undefined);r===void 0&&(r=undefined);var u=typeof
t=="undefined"?Feedback.Core.GenerateString(32):t;return
this.SendAttempt(n,u,1,i,r)},n.prototype.SendAttempt=function(n,t,i,r,u){var
f=sj_gx();f.open("POST",this.AppendParameter(this.feedbackUploadUrl,"debugid",t),!
0);f.timeout=this.requestTimeout;f.setRequestHeader("Content-
Type","application/json; charset=UTF-8");f.onreadystatechange=function()
{f.readyState==f.DONE&&(f.status==204||f.status==1223?
this.OnSendSuccess(n,t,r):i>=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,nul
l,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.prototype.AppendParameter=function(n,t,i){return n+
(n.indexOf("?")>=0?"&":"?")+t+"="+encodeURIComponent(i)},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.p
rototype.GetImageBlobsAsBase64=function(n){for(var
u=n.querySelectorAll("img[src^='blob:']"),f={},t,i,e,o,r=0;r<u.length;r+
+)t=u[r],i=document.createElement("canvas"),i.width=t.width,i.height=t.height,e=i.g
etContext("2d"),e.drawImage(t,0,0),o=i.toDataURL(),f[t.src]=o;return f},n}
();n.InlineImagesManipulator=t})(t=n.Search||(n.Search={}))}(Microsoft||
(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function()
{function n(n)
{this.DocumentFragment=document.createDocumentFragment();this.DocumentFragment.appe
ndChild(n.cloneNode(!0))}return
n.prototype.ManipulateElementsBySelector=function(n,t){var
u,i,e,f,r,o;if(t)for(u=this.DocumentFragment.querySelectorAll(n),i=0,e=u.length;i<e
;i++)for(f=u[i],r=0;r<t.length;r++)o=t[r],typeof f!
="undefined"&&o.Manipulate(f)},n.prototype.DeleteElementsBySelector=function(n)
{for(var
t;t=this.DocumentFragment.querySelector(n);)t&&t.parentNode.removeChild(t)},n.proto
type.SerializeToHtml=function(){return
this.DocumentFragment.firstChild.outerHTML},n}();n.DOMCopyManipulator=t})
(t=n.Search||(n.Search={}))}(Microsoft||(Microsoft={})),function(n){"use
strict";var t=function(){function n(n,t){this.fileName=n;this.contentType=t}return
n}();n.FeedbackFile=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<s.length;o++)(e=s[o],f&&e.id&&f[e.id])||
(u(e,n),i(e,n,t))}function f(n){for(var
u=_d.querySelectorAll(n),e=1,f={},t,i,r=0;r<u.length;++r){if(t=u[r],!t.id)
{for(;;)if(i="fbpgdgelem"+e++,!_ge(i))break;t.id=i}f[t.id]=t}return f}function e()
{var i="tabindex",r="-1",n=f("#fbpgdg, #fbpgdg
*");t(i,r,"div",n);t(i,r,"svg",n);t(i,r,"a",n);t(i,r,"li",n);t(i,r,"input",n);t(i,r
,"select",n);t("aria-hidden","true","body :not(script):not(style)",n)}function o()
{for(var r,t=0;t<n.length;t+
+)r=_d.getElementById(n[t].id),r&&i(r,n[t].attributeName,n[t].originalAttributeValu
e);n.length=0}function s(){typeof sj_evt!
="undefined"&&(sj_evt.bind("onFeedbackStarting",function()
{e()}),sj_evt.bind("onFeedbackClosing",function(){o()}))}var n=[],r=function()
{function n(n,t,i)
{this.id=n;this.attributeName=t;this.originalAttributeValue=i}return n}();s()})
(t=n.Accessibility||(n.Accessibility={}))}(Feedback||(Feedback={})),function(n)
{"use strict";var t=function(){function n()
{this.callbacks=[];this.debugValues={}}return
n.prototype.setContextValue=function(n,t){typeof n!="string"||n.length<1||
(this.debugValues[n]=t)},n.prototype.setContextValues=function(n){if(n)for(var t in
n)n.hasOwnProperty(t)&&this.setContextValue(t,n[t])},n.prototype.registerCollection
Callback=function(n){n&&this.callbacks.push(n)},n.prototype.collect=function(n)
{for(var u=this.getStaticValues(),f,i,r,t=0;t<this.callbacks.length;t++)
{f=this.callbacks[t];i=f(n);for(r in i)i.hasOwnProperty(r)&&(u[r]=i[r])}return
u},n.prototype.clear=function(){for(var n in this.debugValues)delete
this.debugValues[n];this.callbacks=[]},n.prototype.getStaticValues=function(){var
t={};for(var n in
this.debugValues)this.debugValues.hasOwnProperty(n)&&(t[n]=this.debugValues[n]);ret
urn t},n}();n.debugCollector=new t}(Feedback||(Feedback={})),function(n){"use
strict";var t=Feedback.FeedbackFile,i=function(){function n()
{this.feedbackContainerId="fbpgdg";this.screenshotChkName="screenshot";this.sendmai
lChkName="sendmail";this.aliasTxtName="alias";this.privacyPolicyUrl="http://go.micr
osoft.com/fwlink/?
LinkId=521839";this.learnMoreLinkUrl="http://go.microsoft.com/fwlink/?
LinkID=618051";this.internalCheckUrl="/feedback/internal";this.internalCheckRequest
Timeout=2e3;this.dlAlias="sfeed";this.dlLink="mailto:"+this.dlAlias;this.localStora
ge=Feedback.Core.FetchLocalStorage();this.selectedByDefaultCatIdx=0}return
n.prototype.ResetShowForm=function(){},n.prototype.CreateShowForm=function()
{},n.prototype.AddInternalFormElements=function(){},n.prototype.HideForm=function()
{},n.prototype.GetFeedbackFile=function(n,i){var
r=this;try{i.getBase64ContentAsync().done(function(u){var f=new
t(i.fileName,i.contentType);f.base64Content=u;r.feedbackFiles[n]=f})}catch(u)
{Log2.LogEvent("ClientInst",
{source:"GetFeedbackFile",type:"FeedbackFileFetchSingleError",error:"GetFeedbackFil
e: Could not get feedback file
content"},"Feedback.Error",null,null,_G.IG,null,null)}},n.prototype.GetFeedbackFile
s=function(){var n=this;try{typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.getFeedbackF
ilesAsync&&SearchAppWrapper.CortanaApp.getFeedbackFilesAsync().done(function(t){var
i,r;if(typeof t!="undefined"&&t!==null)for(n.feedbackFiles=new
Array(t.length),i=0;i<t.length;i++)r=t[i],n.GetFeedbackFile(i,r)})}catch(t)
{Log2.LogEvent("ClientInst",
{source:"GetFeedbackFiles",type:"FeedbackFileFetchAllError",error:"Could not get
feedback
files"},"Feedback.Error",null,null,_G.IG,null,null)}},n.prototype.Show=function()
{sj_evt.fire("onFeedbackStarting");var n=_ge(this.feedbackContainerId);n===null?
this.CreateShowForm():this.ResetShowForm();Feedback.CortanaState.SetForFeedback();_
ge("fbpgdgtp1").focus();sj_evt.fire("ajax.feedback.initialized",Feedback);this.GetF
eedbackFiles()},n.prototype.Hide=function(){var
n=_ge(this.feedbackContainerId);n&&(sj_evt.fire("onFeedbackClosing"),this.HideForm(
));Feedback.CortanaState.Reset()},n.prototype.CheckInternal=function(n){var
t=sj_gx(),i=this;t.open("HEAD",this.internalCheckUrl,!
0);t.timeout=this.internalCheckRequestTimeout;t.onreadystatechange=function()
{t.readyState===t.DONE&&t.status===204&&i.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.AddTextAre
a=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(n){var
f,h,c,l,r,e,o,s,i;if(n.preventDefault(),Feedback.Core.ValidateInputs(_ge(this.feedb
ackContainerId))!==!1){var a=!this.FormElementExists(this.screenshotChkName)||
this.GetFormValue(this.screenshotChkName,"checked"),u=Feedback.debugCollector.colle
ct(a),t={partner:"BingLegacy",feedbackType:"feedback",url:location.href,width:_w.in
nerWidth,height:_w.innerHeight,source:typeof
u.source=="undefined"?"windows":u.source,send_mail:!
0},v=this.GetFormValue(this.sendmailChkName,"checked");v!
==null&&(t.send_mail=v);f=this.GetFormValue(this.aliasTxtName,"value");f&&(t.alias=
f,this.SetAlias(f));typeof _G!
="undefined"&&(_G.IG&&(t.impression_guid=_G.IG),_G.ST&&(t.timeStamp=Feedback.Core.G
etISODate(_G.ST)),_G.V?t.vertical=_G.V:_G.P&&(t.vertical=_G.P),_G.PN!
==undefined&&(t.canvas=_G.PN));h=this.DetermineQuery();h&&(t.query=h);for(c in
u)t[c]=u[c];if(t.canvas!
==undefined&&(t.vertical=t.canvas),l=this.GetFormValue(Feedback.Core.verbatimTxtId,
"value"),typeof
l=="string"&&(t.text=l),t.type=this.DetermineFeedbackType(),a&&(r=new
Microsoft.Search.DOMCopyManipulator(_d.documentElement),r.DeleteElementsBySelector(
"script"),r.DeleteElementsBySelector("#aRmsDefer"),r.ManipulateElementsBySelector("
img",[new
Microsoft.Search.InlineImagesManipulator(r.DocumentFragment)]),t.html=r.SerializeTo
Html(),this.feedbackFiles!==undefined&&this.feedbackFiles.length>0))
{for(e=0,o=[],s=0;s<this.feedbackFiles.length;s++)i=this.feedbackFiles[s],typeof i!
="undefined"&&i.base64Content&&i.contentType&&i.fileName&&i.base64Content.length>0?
o.push(i):e++;e>0&&Log2.LogEvent("ClientInst",
{source:"OnSubmitForm",type:"FeedbackFileTimeoutError",error:e+" feedback files not
returned in time for feedback
submit."},"Feedback.Error",null,null,_G.IG,null,null);o.length>0&&(t.feedbackFiles=
o)}_w.WindowsFeedbackProtocol&&WindowsFeedbackProtocol.Send(t);this.Hide();typeof
_G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",
{target:"Submit"},"Feedback.Click",null,null,_G.IG,null,null):Log2.LogEvent("Client
Inst",{type:"ImpressionSubmitError",error:"_G.IG was not available when clicking on
Submit
button"},"Feedback.Error",null,null,null,null,null)}},n.prototype.DetermineQuery=fu
nction(){var n;return typeof ThresholdUtilities!
="undefined"&&(n=ThresholdUtilities.getDecodedQuery(),typeof n=="string")?n:typeof
SearchAppWrapper.CortanaApp!
="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.searchBox&&S
earchAppWrapper.CortanaApp.searchBox.getQueryText?
SearchAppWrapper.CortanaApp.searchBox.getQueryText().queryText:null},n.prototype.On
CloseForm=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("Client
Inst",{type:"ImpressionCloseError",error:"_G.IG was not available when clicking on
Cancel
button"},"Feedback.Error",null,null,null,null,null)},n.prototype.GetCategoryRadioBu
ttons=function(n){return
n.querySelectorAll('input[name="type"]')},n.prototype.DetermineFeedbackType=functio
n(){for(var
r=_ge(this.feedbackContainerId),t=this.GetCategoryRadioButtons(r),i=1,n=0,u=t.lengt
h;n<u;n++)if(t[n].checked){i=+t[n].value;break}return
i},n.prototype.GetFormValue=function(n,t){var
r=_ge(this.feedbackContainerId),i=r.querySelector('[id="'+n+'"],
[name="'+n+'"]');return i&&(!i.placeholder||i.placeholder!==i[t])?
i[t]:null},n.prototype.FormElementExists=function(n){var
t=_ge(this.feedbackContainerId),i=t.querySelector('input[name="'+n+'"]');return i?!
0:!1},n.prototype.GetLocString=function(n){return
LocStringManager.getLocString({uiCulture:SearchAppWrapper.CortanaApp.uiLanguage,nam
e:"LocStrings",namespace:"Feedback"})[n]},n.prototype.GetAlias=function(){return
this.localStorage?
this.localStorage.getItem(this.aliasTxtName):null},n.prototype.SetAlias=function(n)
{this.localStorage&&this.localStorage.setItem(this.aliasTxtName,n)},n}
();n.WindowsFeedbackFormBase=i;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.addEventList
ener&&SearchAppWrapper.CortanaApp.addEventListener("feedbackformrequested",function
(n){typeof
n!="undefined"&&n!==null&&(n.isHandled=!0);_w.WindowsFeedbackForm.Show()})}
(WindowsFeedback||(WindowsFeedback={}));__extends=this&&this.__extends||
function(n,t){function r(){this.constructor=n}for(var i in
t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):
(r.prototype=t.prototype,new r)},function(n){"use strict";var t=function(n)
{function t(){var t=n.call(this)||this;return
t.feedbackFormId="fdbkfrm",t.privacyLinkId="fdbkpplink",t.learnMoreLinkId="fdbklmli
nk",t}return __extends(t,n),t.prototype.CreateShowForm=function(){var
n=sj_ce("form",this.feedbackFormId),h=this.AddText(n,"h1",this.GetLocString("WINDOW
S_TITLE_TEXT")),t=sj_ce("div"),u,o,f,s,e,i;t.setAttribute("role","radiogroup");t.se
tAttribute("aria-label",this.GetLocString("DIALOG_COMMENT_TYPE_LABEL"));var
c=this.AddLabeledInput(t,"radio",this.GetLocString("DIALOG_COMMENT_TYPE4"),"type",t
his.selectedByDefaultCatIdx==0,"1",null,null,null,"fbpgdgtp1"),l=this.AddLabeledInp
ut(t,"radio",this.GetLocString("DIALOG_COMMENT_TYPE5"),"type",this.selectedByDefaul
tCatIdx==1,"2",null,null,null,"fbpgdgtp2"),a=this.AddLabeledInput(t,"radio",this.Ge
tLocString("DIALOG_COMMENT_TYPE6"),"type",this.selectedByDefaultCatIdx==2,"3",null,
null,null,"fbpgdgtp3");n.appendChild(t);u=this.AddTextArea(n,Feedback.Core.verbatim
TxtId,this.GetLocString("DIALOG_COMMENT_TEXT"),!0);u.setAttribute("aria-
label",this.GetLocString("DIALOG_COMMENT_LABEL"));o=this.AddLabeledInput(n,"checkbo
x",this.GetLocString("DIALOG_INCLUDE_SCREENSHOT"),this.screenshotChkName,!
0,undefined,"fdbkss");f=sj_ce("div","fdbkinternal","inputwrapper");n.appendChild(f)
;this.CheckInternal(f);var
v=this.AddLink(n,this.privacyLinkId,this.privacyPolicyUrl,this.GetLocString("PRIVAC
Y_STATEMENT_LINK_TEXT")),y=this.AddLink(n,this.learnMoreLinkId,this.learnMoreLinkUr
l,this.GetLocString("LEARN_MORE_LINK_TEXT")),r=sj_ce("div");return
r.className="fdbkactionbtns",s=this.AddButton(r,"submit",this.GetLocString("DIALOG_
SUBMIT_BUTTON_TEXT")),e=this.AddButton(r,"button",this.GetLocString("DIALOG_CANCEL_
BUTTON_TEXT")),sj_be(e,"click",this.OnCloseForm.bind(this)),n.appendChild(r),i=sj_c
e("div",this.feedbackContainerId),sj_be(i,"submit",this.OnSubmitForm.bind(this)),i.
appendChild(n),_d.body.appendChild(i),typeof TestHooksEnabled!
="undefined"&&TestHooksEnabled===!0&&(n.setAttribute("data-
tag","WindowsFeedback.Form"),h.setAttribute("data-
tag","WindowsFeedback.FormTitle"),c.setAttribute("data-
tag","WindowsFeedback.SuggestRadioButton"),l.setAttribute("data-
tag","WindowsFeedback.LikeRadioButton"),a.setAttribute("data-
tag","WindowsFeedback.DislikeRadioButton"),u.setAttribute("data-
tag","WindowsFeedback.VerbatimTextArea"),o.setAttribute("data-
tag","WindowsFeedback.IncludeScreenshotCheckbox"),v.setAttribute("data-
tag","WindowsFeedback.PrivacyLink"),y.setAttribute("data-
tag","WindowsFeedback.LearnMoreLink"),s.setAttribute("data-
tag","WindowsFeedback.SubmitButton"),e.setAttribute("data-
tag","WindowsFeedback.CloseButton"),i.setAttribute("data-
tag","WindowsFeedback.FeedbackContainer")),n},t.prototype.AddInternalFormElements=f
unction(n){var
h=_ge(this.feedbackFormId),c=_ge(Feedback.Core.verbatimTxtId),i=_ge(this.privacyLin
kId),r=_ge(this.learnMoreLinkId),e=h.elements[this.screenshotChkName],u=this.GetAli
as(),o,f;c.classList.add("smallverbatim");i&&i.parentNode.removeChild(i);r&&r.paren
tNode.removeChild(r);e&&(o=e.parentNode,f=o.parentNode,f.parentNode.removeChild(f))
;var
v=this.AddText(n,"div",this.GetLocString("DIALOG_MSFT_INTERNAL"),"medium"),l=this.G
etLocString("DIALOG_SEND_EMAIL_LABEL").replace("{0}","Bing")+"
"+this.GetLocString("DIALOG_ALIAS_LABEL"),a=this.GetLocString("DIALOG_SEND_EMAIL_LA
BEL").replace("{0}","Bing"),s=this.AddLabeledInput(n,"checkbox",l,this.sendmailChkN
ame,!
0,undefined,null,null,"medium",null,a),t=sj_ce("input");t.type="text";t.name=this.a
liasTxtName;t.required=!0;t.setAttribute("aria-
label",this.GetLocString("DIALOG_ALIAS_LABEL"));t.placeholder=this.GetLocString("DI
ALOG_ALIAS_TEXT");u!=null&&u!=t.placeholder&&(t.value=u);sj_be(s,"click",function()
{s.checked?
t.removeAttribute("disabled"):t.setAttribute("disabled","true")});n.appendChild(t)}
,t.prototype.ResetShowForm=function(){var
n=_ge(this.feedbackFormId),u=this.GetCategoryRadioButtons(n),f=n.elements[this.scre
enshotChkName],e=n.elements[this.sendmailChkName],i=n.elements[this.aliasTxtName],r
=this.GetAlias(),t,o;for(n.reset(),t=0,o=u.length;t<o;t+
+)u[t].checked=t==this.selectedByDefaultCatIdx?!0:!1;f&&(f.checked=!
0);e&&(e.checked=!0);i&&(i.value=r&&r!=i.placeholder?
r:"");_ge(this.feedbackContainerId).style.display="block"},t.prototype.HideForm=fun
ction(){_ge(this.feedbackContainerId).style.display="none"},t}
(n.WindowsFeedbackFormBase);_w.WindowsFeedbackForm=new t}(WindowsFeedback||
(WindowsFeedback={})),function(n){var t;(function(t){"use strict";function u()
{typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.setChromeSta
te&&SearchAppWrapper.CortanaApp.setChromeState(7);r=n.Core.GetComputedStyle(_d.docu
mentElement)["overflow-y"];_d.documentElement.style["overflow-y"]="hidden";i=!
0}function f(){i&&(typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&(SearchAppWrapper.CortanaApp.restorePrev
iousChromeState&&SearchAppWrapper.CortanaApp.restorePreviousChromeState(),SearchApp
Wrapper.CortanaApp.closeFeedbackPage&&SearchAppWrapper.CortanaApp.closeFeedbackPage
(),SearchAppWrapper.CortanaApp.searchBox&&SearchAppWrapper.CortanaApp.searchBox.req
uestFocus&&SearchAppWrapper.CortanaApp.searchBox.requestFocus()),_d.documentElement
.style["overflow-y"]=r,i=!1)}var r,i=!1;t.SetForFeedback=u;t.Reset=f})
(t=n.CortanaState||(n.CortanaState={}))}(Feedback||(Feedback={}))

You might also like