function zc(){this.Init()}m("AdfSvgCacheManager",zc);r.v(zc);zc.prototype.Init=function(){zc.h.Init.call(this);this.epa=Wf.$()};r.a("AdfSvgCacheManager.prototype.Init",{Init:zc.prototype.Init});zc.prototype.Iqa=function(a,b,d){u.assert(null!=a);u.u(b);u.J(d);d=Xf(d);var e=this.epa.I9(d);e?(a=b.parentNode,zc.tIa(b,e),a.replaceChild(e,b)):this.AX(a,b,d)};r.a("AdfSvgCacheManager.prototype.embedSVG",{Iqa:zc.prototype.Iqa});zc.prototype.lRa=function(a){this.epa.e$(a)};
r.a("AdfSvgCacheManager.prototype.clearSvgIcon",{lRa:zc.prototype.lRa});zc.prototype.AX=function(a,b,d){var e=d.split("#"),f=e[0],g=e[1],h=new Gf,l=this;h.kQ(function(h){if(0==Yf(l,a,b,d,g,h)){var t=a.getAltSource&&null!=a.getAltSource()?A.c.ml(a.getAltSource()):null;null!=t&&(u.J(t),t=Xf(t),e=t.split("#"),t=e[0],f!=t&&(f=t,h.send(f,null,!0)))}});a.VQa=!0;A.c.jv(a);h.send(f,null,!0)};
function Yf(a,b,d,e,f,g){if(g.KO()==Gf.LQ){b.VQa=!1;if(200!=g.se()&&304!=g.se())return v.l.fine("AdfRichUIPeer#_inlineSVGCallback - xhr status not OK ("+g.se()+") in response of this url: "+e),!1;var h=g.qo();if(!h){var l;try{l=(new DOMParser).parseFromString(g.po(),"text/xml")}catch(B){return v.l.warning("AdfRichUIPeer#_inlineSVGCallback - failed to parse svg to xml in response of this url : "+e),!1}if(!l)return v.l.warning("AdfRichUIPeer#_inlineSVGCallback - failed to get svg as xml in response of this url : "+
e),!1;h=l}var n;try{if(f){var t=h.getElementById(f);if(!t.childNodes.length)return v.l.fine("AdfRichUIPeer#_inlineSVGCallback - child for svg symbol not found in response of this url : "+e),!1;n=document.createElementNS("http://www.w3.org/2000/svg","svg");C.rRa(t,n);for(var y=document.createDocumentFragment();t.childNodes.length;)y.appendChild(t.childNodes[0]);n.appendChild(y)}else{var z=h.getElementsByTagName("svg")[0];if(!z)return v.l.warning("AdfRichUIPeer#_inlineSVGCallback - svg node not found in response of this url: "+
e),!1;n=document.importNode(z,!0)}}catch(B){return v.l.error("AdfRichUIPeer#_inlineSVGCallback - invalid svg url: "+e),!1}f=n.cloneNode(!0);a.epa.raa(e,f);zc.tIa(d,n);a=q.b;a.yc(d);d.parentNode.replaceChild(n,d);a.Ia(n);A.c.uq(b);return!0}}
function Xf(a){try{var b=q.b,d=b.fP();-1===a.indexOf("://")&&-1===a.indexOf("//")&&("/"!=a.charAt(0)&&(a=A.c.ml("/"+a)),d&&(a=d+a));var e;b.S()==q.ia?(e=document.createElement("a"),e.href=a,d=(d?d.toLowerCase():"")+"/"):(e=new URL(a),d=d?d.toLowerCase():"");return d+e.pathname+e.hash+e.search}catch(f){v.l.warning("Invalid url could not normalize the url: "+f+"url: "+a)}return a}
zc.tIa=function(a,b){for(var d=0;d<a.attributes.length;d++){var e=a.attributes[d];if("src"!=e.name){var f=b.getAttribute(e.name);if(f&&"class"==e.name)f=f+" "+e.value;else if(f&&"style"==e.name)f=f+";"+e.value;else if("title"==e.name&&""!=e.value){b.setAttribute("role","img");f=e.value;b.setAttribute("aria-label",f);e=document.createElementNS("http://www.w3.org/2000/svg","title");e.textContent=f;b.insertBefore(e,b.firstChild);continue}else f=e.value;b.setAttribute(e.name,f)}}};