1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[101],{101(e,t,n){n.r(t),n.d(t,{default:()=>i});var r=n(220);class i extends r.A{init(){if(this.contentContainer=document.querySelector("main.content-main"),this.config=this._getConfig(),!this.contentContainer){console.warn("Table of Contents: main.content-main container not found");return}let e=this._collectHeadlines();0!==e.length&&(this._processHeadlines(e),this._renderTableOfContents(e))}_getConfig(){let e={layoutType:"number",includeHeadlines:[],excludeCssSelectors:[],includeCssSelectors:[]};try{return{...e,...JSON.parse(this.el.dataset.tableOfContentsConfig)}}catch{return console.warn("Table of Contents: Error parsing config."),e}}_collectHeadlines(){let{includeHeadlines:e,includeCssSelectors:t,excludeCssSelectors:n}=this.config,r=[];return e.length&&r.push(...this.contentContainer.querySelectorAll(e.join(", "))),t.forEach(e=>{r.push(...this.contentContainer.querySelectorAll(e))}),[...new Set(r)].filter(e=>!e.closest("[data-table-of-contents]")).filter(e=>!e.closest(".cms-element-rhweb-table-of-contents")).filter(e=>!n.some(t=>e.matches(t)||e.closest(t))).sort((e,t)=>e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}_processHeadlines(e){e.forEach((e,t)=>e.setAttribute("data-rhweb-toc-anchor",`rhweb-toc-${t}`))}_renderTableOfContents(e){let t=this._buildHierarchicalList(e);this.el.appendChild(t)}_buildHierarchicalList(e){let t=document.createElement("ul");t.className=`rhweb-table-of-contents-list rhweb-toc-layout-${this.config.layoutType} rhweb-toc-level-1`;let n="number"===this.config.layoutType?this._calculateNumbering(e):null,r=[t],i=[0];return e.forEach((e,t)=>{let s=this._getHeadingLevel(e.tagName);for(;i.length>1&&i[i.length-1]>=s;)r.pop(),i.pop();let o=r[r.length-1];if(s>i[i.length-1]){if(o.lastElementChild){let e=document.createElement("ul");e.className=`rhweb-table-of-contents-sublist rhweb-toc-layout-${this.config.layoutType} rhweb-toc-level-${r.length+1}`,o.lastElementChild.appendChild(e),r.push(e),i.push(s),o=e}else i[i.length-1]=s}let l=document.createElement("li");l.className=`rhweb-toc-item rhweb-toc-level-${s}`;let a=document.createElement("a");a.href="#",a.dataset.rhwebTocTarget=e.getAttribute("data-rhweb-toc-anchor"),a.textContent=n?`${n[t]}. ${e.textContent.trim()}`:e.textContent.trim(),a.className=`rhweb-toc-link rhweb-toc-${e.tagName.toLowerCase()}`,a.addEventListener("click",t=>{t.preventDefault(),this._scrollToElement(e)}),l.appendChild(a),o.appendChild(l)}),t}_calculateNumbering(e){let t=[],n={};return e.forEach((e,r)=>{let i=this._getHeadingLevel(e.tagName);n[i]=(n[i]||0)+1,Object.keys(n).forEach(e=>{parseInt(e)>i&&delete n[e]});let s=[];for(let e=1;e<=i;e++)n[e]&&s.push(n[e]);t[r]=s.join(".")}),t}_getHeadingLevel(e){return/^H[1-6]$/.test(e)?parseInt(e[1]):3}_scrollToElement(e){e.scrollIntoView({behavior:"smooth",block:"start"}),e.style.cssText="transition: background-color 0.3s ease; background-color: #fff3cd;",setTimeout(()=>e.style.backgroundColor="",1e3)}}},156(e){var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==n},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l(Array.isArray(e)?[]:{},e,t):e}function i(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function l(e,n,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=r;var c,u,h=Array.isArray(n);return h!==Array.isArray(e)?r(n,a):h?a.arrayMerge(e,n,a):(u={},(c=a).isMergeableObject(e)&&s(e).forEach(function(t){u[t]=r(e[t],c)}),s(n).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&c.isMergeableObject(n[t])?u[t]=(function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}
1)(t,c)(e[t],n[t],c):u[t]=r(n[t],c))}),u)}l.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e.exports=l},220(e,t,n){n.d(t,{A:()=>l});var r=n(156),i=n.n(r),s=n(707),o=n(308);class l{constructor(e,t={},n=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${n}".`);return}this.el=e,this.$emitter=new o.A(this.el),this._pluginName=this._getPluginName(n),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),i().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=s.A.toDashCase(this._pluginName),n=this.el.getAttribute(`data-${t}-config`);return n?window.PluginConfigManager.get(this._pluginName,n):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=s.A.toDashCase(this._pluginName),n=this.el.getAttribute(`data-${t}-options`);if(n)try{return JSON.parse(n)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}},308(e,t,n){n.d(t,{A:()=>r});class r{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(e,{detail:t,cancelable:n});return this.el.dispatchEvent(r),r}subscribe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,i=e.split("."),s=n.scope?t.bind(n.scope):t;if(n.once&&!0===n.once){let t=s;s=function(n){r.unsubscribe(e),t(n)}}return this.el.addEventListener(i[0],s),this.listeners.push({splitEventName:i,opts:n,cb:s}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,n)=>([...n.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(n.splitEventName[0],n.cb):e.push(n),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}},707(e,t,n){n.d(t,{A:()=>r});class r{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let n=r.toUpperCamelCase(e,t);return r.lcFirst(n)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>r.ucFirst(e.toLowerCase())).join(""):r.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.