(function(){function o(){var i,u,f;n&&(n.value.length>0||((i=t===null||t===void 0?void 0:t.isImageAttached)===null||i===void 0?void 0:i.call(t))?(u=Lib===null||Lib===void 0?void 0:Lib.CssClass)===null||u===void 0?void 0:u.add(sj_b,r):(f=Lib===null||Lib===void 0?void 0:Lib.CssClass)===null||f===void 0?void 0:f.remove(sj_b,r))}function s(i){var o,s,h;n.value="";n.innerText="";n.setAttribute("value","");(o=t===null||t===void 0?void 0:t.removeAttachments)===null||o===void 0?void 0:o.call(t);f&&e&&(f.innerText="",e.classList.remove("nudgeVisible"));(s=Lib===null||Lib===void 0?void 0:Lib.CssClass)===null||s===void 0?void 0:s.remove(sj_b,r);sj_log("CI.XButton","Clicked","1");u&&((h=Lib===null||Lib===void 0?void 0:Lib.CssClass)===null||h===void 0?void 0:h.add(u,"b_focus"));n.focus();n.click();i&&(i.preventDefault(),i.stopPropagation())}var u=_ge("b_header"),n=_ge("sb_form_q"),i=_ge("sb_clt"),f=_qs(".qfc.b_searchbox .ghost"),e=_qs(".qfc.b_searchbox .nudge"),t=typeof SearchBoxImageManager!="undefined"?SearchBoxImageManager:null,r="b_sbText";n&&i&&(sj_be(i,"click",s),sj_be(i,"keydown",function(n){var t=n.code||n.key;t==="Enter"&&s(n)}),sj_be(n,"keyup",o),o())})()