animatable","");b=_ds.Kd(a.h`animatable`);b(a.background,"animatable","");b(a.m,"animatable","");a.hasAttribute("collapsed")?(_ds.y(a,"aria-expanded","true",a.Nc),_ds.y(a,"aria-label","Hide side navigation",a.Nc),_ds.y(a,"data-title","Hide side navigation",a.Nc),a.removeAttribute("collapsed"),J3(a,
"Expanded book nav")):(a.Nc.removeAttribute("aria-expanded"),_ds.y(a,"aria-label","Show side navigation",a.Nc),_ds.y(a,"data-title","Show side navigation",a.Nc),_ds.y(a,"collapsed",""),J3(a,"Collapsed book nav"));await _ds.ul();b=document.documentElement.scrollHeight-document.documentElement.clientHeight;document.documentElement.scrollTop=Math.round(c*b)},K3=function(a){a.ra=Array.from(a.querySelectorAll(".devsite-mobile-nav-bottom .devsite-nav-list[menu=_book] .devsite-nav-item:not(.devsite-nav-heading)"))},
M3=function(a){const b=_ds.B().searchParams.get("nf");a.g&&b&&(a.g.value=b,L3(a))},L3=function(a){if(a.ra.length){F3(a);G3(a);var b,c,d=null==(b=a.g)?void 0:null==(c=b.value)?void 0:c.trim().toLowerCase();if(d){var e;null==(e=a.ea)||e.classList.remove("hidden");for(const g of a.ra){c=g.querySelectorAll(".devsite-nav-text");b=g.classList.contains("devsite-nav-expandable");var f=e=!1;a=0;let h,k;if(d&&b&&(null==(h=g.querySelector(".devsite-nav-text"))?0:null==(k=h.textContent)?0:k.toLowerCase().includes(d)))f=
e=!0;else for(const l of c){let n;d&&(null==(n=l.textContent)?0:n.toLowerCase().includes(d))&&(e=!0,++a)}if(!0===e){g.classList.remove("hidden");if(f){c=Array.from(g.querySelectorAll(".devsite-nav-item"));for(const l of c){l.classList.remove("hidden");let n;d&&(null==(n=l.textContent)?0:n.toLowerCase().includes(d))&&++a}}c=void 0;(f=g.querySelector(".devsite-nav-text"))&&(e=null==(c=f.textContent)?void 0:c.replace(new RegExp(`(${d})`,"ig"),"<mark>$1</mark>"))&&_ds.Id(f,_ds.fe(e))}b&&0<a&&(b=g.querySelector(".devsite-nav-text"))&&
(a=_ds.M(Tna,{RK:a}),b.appendChild(a))}}else null==(f=a.ea)||f.classList.add("hidden")}},F3=function(a){for(const b of a.ra){let c;b.classList.toggle("hidden",!(null==(c=a.g)||!c.value))}},G3=function(a){if(a.querySelector("mark")){var b=[...a.querySelectorAll(".devsite-nav-text > .devsite-nav-filter-match-count")];for(const c of b)c.remove();a=[...a.querySelectorAll(".devsite-nav-text > mark")];for(const c of a){a=c.parentElement;let d;b=null==(d=a)?void 0:d.textContent;a&&b&&_ds.Id(a,_ds.fe(b))}}},
Yna=async function(a,b){if(a.connected){var c=await _ds.t(),d=new _ds.qS,e=f=>{f=f.target;_ds.pS(d,f);a.v.delete(f);c.unregisterIntersectionForElement(f)};for(const f of b)try{c.registerIntersectionForElement(f,e)}catch(g){e({target:f})}}},E3=function(a,b){let c=!1;if(a.j)for(const d of a.j.querySelectorAll("[menu]"))d.getAttribute("menu")===b?(d.removeAttribute("hidden"),c=!0):_ds.y(a,"hidden","",d);return c},N3=function(a,b=a){b||(b=a);for(const c of b.querySelectorAll(".devsite-nav-active"))c.classList.remove("devsite-nav-active");
a=_ds.Bl(_ds.B().pathname);a=`[href="${_ds.ml(a).href}"], [href="${a}"],
        [alt-paths~="${a}"]`;for(const c of b.querySelectorAll(a))c.classList.add("devsite-nav-active")},O3=function(a,b=a){b||(b=a);if(a=b.querySelector(".devsite-mobile-nav-bottom"))for(a=a.querySelector(".devsite-nav-active");a&&a.parentElement&&a.parentElement!==b;)a.matches(".devsite-expandable-nav:not(.expanded)")&&a.classList.add("expanded"),a=a.parentElement},Zna=async function(a){a.connected&&(a.removeAttribute("user-scrolled"),await _ds.ul(),await P3(a),await a.Ga,await _ds.t(),await _ds.ul(),
await P3(a))},P3=async function(a){if(a.connected&&a.j){await _ds.t();var b=a.j.querySelector(".devsite-nav-active");b&&(a.hasAttribute("user-scrolled")||await $na(a,b))}},$na=async function(a,b){if(a.connected){var c=a.hasAttribute("user-scrolled");a.scrollTop=_ds.cn(b,a,!0).y;await _ds.ul();c&&_ds.y(a,"user-scrolled","")}},J3=function(a,b){a.dispatchEvent(new CustomEvent("devsite-analytics-observation",{detail:{category:"Site-Wide Custom Events",action:"click",label:b},bubbles:!0}))},Q3=class extends _ds.Fi{static get observedAttributes(){return["collapsed",
"fixed","hidden"]}constructor(){super();this.connected=!1;this.ea=this.g=this.oa=this.j=null;this.ra=[];this.eventHandler=new _ds.E;this.Ca=()=>{};this.v=new Set;this.ya=this.Fa=!1;this.background=document.createElement("div");this.background.classList.add("devsite-book-nav-bg");this.Nc=_ds.M(Rna);this.m=_ds.M(Sna);this.Ga=new Promise(a=>{this.Ca=a});this.Ba=new _ds.Hm(()=>{this.connected&&C3(this)},20);this.Ea=new _ds.Hm(()=>{L3(this)},20)}async connectedCallback(){this.connected=!0;_ds.Bi(this,
this.h`animatable`,this.h`aria-expanded`,this.h`aria-label`,this.h`collapsed`,this.h`data-title`,this.h`fixed`,this.h`has-book-nav`,this.h`hidden`,this.h`top-level-nav`,this.h`user-scrolled`,this.h`visually-hidden`);_ds.Oj(this.background,this);this.hasAttribute("hidden")&&(_ds.y(this,"hidden","",this.Nc),_ds.y(this,"hidden","",this.m));const a=await _ds.t();if(this.Fa=a.hasMendelFlagAccess("BookNav","enable_collapsible_book_nav")){let b;null==(b=this.parentElement)||b.insertBefore(this.Nc,this.nextSibling);
_ds.y(this,"aria-label","Hide side navigation",this.Nc);_ds.y(this,"data-title","Hide side navigation",this.Nc);_ds.y(this,"aria-expanded","true",this.Nc);let c;null==(c=this.parentElement)||c.insertBefore(this.m,this.nextSibling)}if(this.ya=a.hasMendelFlagAccess("BookNav","enable_book_nav_filtering"))if(this.oa=this.querySelector(".devsite-book-nav-filter"))this.g=this.oa.querySelector("input[type=text]"),this.ea=this.oa.querySelector(".filter-clear-button"),K3(this),M3(this);C3(this);Xna(this);
await this.init();H3(this)}disconnectedCallback(){this.connected=!1;_ds.G(this.eventHandler);I3(this);this.v.clear();var a=document.querySelector("#devsite-hamburger-menu");a&&_ds.y(this,"visually-hidden","",a);a=[this.background,this.Nc,this.m];for(const b of a)b&&_ds.Qj(b);this.removeAttribute("animatable");this.background.removeAttribute("animatable");this.m.removeAttribute("animatable");this.m.style.removeProperty("--devsite-js-book-nav-scrollbar-width")}attributeChangedCallback(a){"hidden"===
a&&this.dispatchEvent(new CustomEvent(this.hasAttribute("hidden")?"devsite-element-hidden":"devsite-element-visible",{bubbles:!0}));if("hidden"===a||"collapsed"===a){var b=document.querySelector(".devsite-main-content");b&&(this.hasAttribute("collapsed")||this.hasAttribute("hidden")?b.removeAttribute("has-book-nav"):_ds.y(this,"has-book-nav","",b))}if("fixed"===a||"hidden"===a||"collapsed"===a){b=this.hasAttribute(a);const c=[this.background,this.Nc,this.m];for(const d of c)d&&(b?_ds.y(this,a,"",
d):d.removeAttribute(a))}"fixed"===a&&this.Ca()}async init(a=!0){if(this.connected){this.m.style.setProperty("--devsite-js-book-nav-scrollbar-width",`${this.offsetWidth-this.clientWidth}px`);this.j=this.querySelector(".devsite-mobile-nav-bottom");_ds.y(this,"top-level-nav","");this.j&&this.j.querySelector("[menu=_book]")&&this.removeAttribute("top-level-nav");0===this.children.length&&_ds.y(this,"hidden","");if(this.background)for(const b of["hidden","fixed","animatable"])this.hasAttribute(b)&&_ds.y(this,
b,"",this.background);!this.hasAttribute("hidden")&&a?(N3(this),O3(this),await Zna(this)):(await _ds.ul(),await P3(this))}}async Ac(a){a?(a=a.querySelector("nav")||null,N3(this,a),O3(this,a),a&&(await I3(this),this.v.clear(),H3(this,a,!1)),_ds.Ei(this,this.querySelector("nav"),a)):_ds.Nj(this);if(this.ya&&(K3(this),this.g)){this.g.value="";let b;null==(b=this.ea)||b.classList.add("hidden");M3(this)}await _ds.ul();await this.init(!1)}xa(a){this.dispatchEvent(new CustomEvent("devsite-analytics-observation",
{detail:{category:"Site-Wide Custom Events",action:a,label:"focus"===a?"devsite-book-nav-filter input":"devsite-book-nav-filter filter-clear-button"},bubbles:!0}))}};Q3.prototype.updateContent=Q3.prototype.Ac;Q3.prototype.attributeChangedCallback=Q3.prototype.attributeChangedCallback;Q3.prototype.disconnectedCallback=Q3.prototype.disconnectedCallback;Q3.prototype.connectedCallback=Q3.prototype.connectedCallback;var aoa=class extends Q3{async xa(a){super.xa(a);a={eventData:JSON.stringify({type:"devsite-nav-filter",name:"focus"===a?"inputEntered":"filterCleared"})};this.dispatchEvent(new CustomEvent("devsite-analytics-observation-cloudtrack",{detail:a,bubbles:!0}))}};try{window.customElements.define("devsite-book-nav",aoa)}catch(a){console.warn("Unrecognized DevSite custom element - CloudBookNav",a)};})(_ds_www);
ØA
—Eoúô