1"use strict";(self.webpackChunkswt_blocks=self.webpackChunkswt_blocks||[]).push([[101],{4101:(e,t,n)=>{n.r(t),n.d(t,{SwtMainnavigationFixed:()=>h,SwtMainnavigationFlyout:()=>p,SwtMainnavigationModal:()=>v});var a=n(9307),l=n(7462),r=n(2255),i=n(4355);function c(e){const[t,n]=(0,a.useState)(!1);return e.onSetup({trigger:()=>(n(!t),!t)}),t?(0,a.createElement)(o,{html:e.html}):(0,a.createElement)(a.Fragment,null)}function o(e){let[t,n]=(0,a.useState)(),[c,o]=(0,a.useState)(),{styles:s,attributes:u,update:d}=(0,i.D)(t,c,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,16]}},{name:"preventOverflow",options:{padding:8}}]});const m=()=>{d&&d()};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{ref:n}),(0,a.createElement)("div",(0,l.Z)({ref:o,style:s.popper},u.popper),(0,a.createElement)(r.u,{appear:!0,show:!0,as:a.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 -translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-1",beforeEnter:()=>m(),afterEnter:()=>m()},(0,a.createElement)("div",{className:"z-10 transform shadow-lg"},(0,a.createElement)("div",{dangerouslySetInnerHTML:{__html:e.html}})))))}var s=n(2510);function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}function d(e){let t=!1;e.item.children.length>0&&e.item.children.forEach((e=>{e.active&&(t=!0)}));let[n,l]=(0,a.useState)(t);const r=(e,t)=>{let l="";return e.active&&(l+=" font-bold"),(0,a.createElement)("a",{href:e.href,onClick:(e=>t=>"#"!=e.href||(t.preventDefault(),!1))(e),className:u(t?"bg-primary-200 text-gray-900":"text-gray-700","block px-4 py-2 text-sm",l)},((e,t)=>e.children.length>0&&e.icon?(0,a.createElement)(a.Fragment,null,e.title,t?(0,a.createElement)("i",{className:e.icon.close}):(0,a.createElement)("i",{className:e.icon.open})):(0,a.createElement)(a.Fragment,null,e.title))(e,n))};return(0,a.createElement)(a.Fragment,null,e.item.children.length>0?(0,a.createElement)("div",{onClick:t=>((e,t)=>0==t.children.length||(e.preventDefault(),l(!n),!1))(t,e.item)},(0,a.createElement)(s.v.Item,{disabled:!0},(t=>{let{active:n}=t;return r(e.item,n)}))):(0,a.createElement)(s.v.Item,null,(t=>{let{active:n}=t;return r(e.item,n)})),n&&e.item.children.map(((e,t)=>(0,a.createElement)(s.v.Item,{key:t},(t=>{let{active:n}=t;return(0,a.createElement)("div",{className:"pl-4"},r(e,n))})))))}function m(e){const[t,n]=(0,a.useState)(!0);return(0,a.createElement)(s.v,{as:"div"},(0,a.createElement)(s.v.Button,{className:"focus:outline-none"},e.button&&(0,a.createElement)("div",{onClick:()=>n(!t)},(0,a.createElement)("div",{dangerouslySetInnerHTML:(l=e.button,{__html:l})}))),t&&(0,a.createElement)(s.v.Items,{static:!0,className:"z-30 origin-top-right absolute right-6 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},(0,a.createElement)("div",{className:"py-1"},e.items.map(((e,t)=>(0,a.createElement)(d,{item:e,key:t}))))));var l}let f=null;const p={connectedCallback(e){const t=e.querySelector("a");let n="";const l=e.querySelector("template");let r,i;l&&(n=l.innerHTML);const o=t.querySelector("i");let s;o&&(i=o.getAttribute("data-close"),r=o.getAttribute("class")),e.bodyClickEvent=()=>{t.click()},t.onclick=n=>{n.preventDefault(),n.stopPropagation();const a=s.trigger();o&&(a?(o.setAttribute("class",i),document.body.addEventListener("click",e.bodyClickEvent),f&&f.click(),f=t):(o.setAttribute("class",r),document.body.removeEventListener("click",e.bodyClickEvent),f=null))},e.onclick=e=>{e.stopPropagation()};const u=document.createElement("div");e.appendChild(u),(0,a.render)((0,a.createElement)(a.StrictMode,null,(0,a.createElement)(c,{onSetup:e=>{s=e},html:n})),u)}},v={connectedCallback(e){const t=e=>{const n=e.querySelector("a");let a=!1;n.hasAttribute("aria-current")&&(a=!0);let l=null;const r=n.querySelector("i");r&&(l={open:r.getAttribute("class"),close:r.getAttribute("data-close")});const i={title:n.textContent,href:n.getAttribute("href"),active:a,icon:l,children:[]};return e.querySelectorAll("ul > li").forEach((e=>{i.children.push(t(e))})),i},n=()=>{const e=[];return document.querySelectorAll("nav#swt-mainnavigation > ul > li").forEach((n=>{const a=t(n);e.push(a)})),e};e.onclick=()=>{e.onclick=null;const t=e.innerHTML;(0,a.render)((0,a.createElement)(a.StrictMode,null,(0,a.createElement)(m,{button:t,items:n()})),e)}}},h={connectedCallback(e){let t=window.pageYOffset>=50;const n=[];e.querySelectorAll(".swt-mainnavigation-fixed").forEach((e=>{(e.hasAttribute("data-fixed-on")||e.hasAttribute("data-fixed-off"))&&n.push(e)}));const a=()=>
1{n.forEach((e=>{f&&f.click(),t?(e.hasAttribute("data-fixed-off")&&e.classList.remove(...e.getAttribute("data-fixed-off").split(" ")),e.hasAttribute("data-fixed-on")&&e.classList.add(...e.getAttribute("data-fixed-on").split(" "))):(e.hasAttribute("data-fixed-off")&&e.classList.add(...e.getAttribute("data-fixed-off").split(" ")),e.hasAttribute("data-fixed-on")&&e.classList.remove(...e.getAttribute("data-fixed-on").split(" ")))}))};window.addEventListener("scroll",(()=>{window.pageYOffset>=50?t||(t=!0,a()):t&&(t=!1,a())})),t&&a()}}}}]);
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.