import{S as t,i as e,a as n,b as l,s as o,e as i,n as r,d as s,h as c,j as a,o as u,t as d,c as f,w as m,f as h,m as p,p as g,k as b,r as w,x as y,H as x}from"./index-01c5cbf1.js";import{getData as v}from"../../../../../../../../../js/libraries/serverTools.js";function k(t,e,n){const l=t.slice();return l[22]=e[n],l[23]=e,l[24]=n,l}function I(t,e,n){const l=t.slice();return l[25]=e[n],l}function L(t,e,n){const l=t.slice();return l[25]=e[n],l}function T(t,e,n){const l=t.slice();return l[30]=e[n],l[31]=e,l[32]=n,l}function j(t,e,n){const l=t.slice();return l[33]=e[n],l[34]=e,l[35]=n,l}function z(t){let e,n,o,r,u,m,h=t[30].name+"",p=t[30];const b=()=>t[15](n,p),w=()=>t[15](null,p);function y(){return t[16](t[30])}return{c(){e=i("div"),n=i("button"),o=d(h),r=f(),s(n,"class","level0 heading-button"),s(e,"class","heading-button-wrapper")},m(t,i){l(t,e,i),c(e,n),c(n,o),b(),c(e,r),u||(m=g(n,"click",y),u=!0)},p(e,n){p!==(t=e)[30]&&(w(),p=t[30],b())},d(t){t&&a(e),w(),u=!1,m()}}}function A(t){let e,n=t[30],o=[];for(let e=0;et[13](n,p),w=()=>t[13](null,p);function y(){return t[14](t[33])}return{c(){e=i("div"),n=i("button"),o=d(h),r=f(),s(n,"class","level1 heading-button"),s(e,"class","heading-button-wrapper")},m(t,i){l(t,e,i),c(e,n),c(n,o),b(),c(e,r),u||(m=g(n,"click",y),u=!0)},p(e,n){p!==(t=e)[33]&&(w(),p=t[33],b())},d(t){t&&a(e),w(),u=!1,m()}}}function M(t){let e;let n=function(t,e){return Array.isArray(t[30])?A:z}(t),o=n(t);return{c(){o.c(),e=m()},m(t,n){o.m(t,n),l(t,e,n)},p(t,e){o.p(t,e)},d(t){o.d(t),t&&a(e)}}}function S(t){let e,n,o,u=t[22]+"";return{c(){e=i("p"),n=new x(!1),o=f(),n.a=o,s(e,"class","margin-end")},m(t,i){l(t,e,i),n.m(u,e),c(e,o)},p:r,d(t){t&&a(e)}}}function V(t){let e,n=t[22].slice(2,t[22].length)+"";return{c(){e=i("h1")},m(t,o){l(t,e,o),e.innerHTML=n},p:r,d(t){t&&a(e)}}}function C(t){let e,n,o,r,u,d=t[22].line+"",m=t[22];const h=()=>t[20](n,m),b=()=>t[20](null,m);return{c(){e=i("button"),n=i("h2"),o=f(),s(n,"id",t[22].id),p(e,"display","block"),p(e,"width","100%")},m(i,s){l(i,e,s),c(e,n),n.innerHTML=d,h(),c(e,o),r||(u=g(e,"click",(function(){y(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),r=!0)},p(e,n){m!==(t=e)[22]&&(b(),m=t[22],h())},d(t){t&&a(e),b(),r=!1,u()}}}function E(t){let e,n,o,r,u,d=t[22].line+"",m=t[22];const h=()=>t[19](n,m),b=()=>t[19](null,m);return{c(){e=i("button"),n=i("h3"),o=f(),s(n,"id",t[22].id),p(e,"display","block")},m(i,s){l(i,e,s),c(e,n),n.innerHTML=d,h(),c(e,o),r||(u=g(e,"click",(function(){y(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),r=!0)},p(e,n){m!==(t=e)[22]&&(b(),m=t[22],h())},d(t){t&&a(e),b(),r=!1,u()}}}function N(t){let e,n,o=t[22].ol,r=[];for(let e=0;en.includes("<"+t+">"))).findIndex((t=>t));if(-1!=l){let e=m[l],i={};i[e]=[];let r="";for(;;){if(t+=1,n=o[t],n.includes(r)){c.push(i);break}i[e].push(n)}}else if("###"==n.slice(0,3)){let t=n.slice(4,n.length),l=t.toLowerCase().trim().replaceAll(" ","-");e.push({id:l,name:t,index:i}),i+=1,c.push({type:"h3",id:l,line:t,index:i})}else if("##"==n.slice(0,2)){let t=n.slice(3,n.length),l=t.toLowerCase().trim().replaceAll(" ","-");f.push({id:t.toLowerCase().trim().replaceAll(" ","-"),name:t,index:i}),i+=1,e=[],f.push(e),c.push({type:"h2",id:l,line:t,index:i})}else c.push(n)}n(0,l+=1)})),u((()=>{let t=localStorage.getItem("manifesto-hide-content");null!=t&&null!=t&&"true"==t&&q(i,r)}));return[l,o,i,r,a,d,s,c,f,h,function(t){w[t?"unshift":"push"]((()=>{i=t,n(2,i)}))},function(t){w[t?"unshift":"push"]((()=>{o=t,n(1,o)}))},()=>q(i,r),function(t,e){w[t?"unshift":"push"]((()=>{a[e.index]=t,n(4,a)}))},t=>h(t.id),function(t,e){w[t?"unshift":"push"]((()=>{a[e.index]=t,n(4,a)}))},t=>h(t.id),function(t){w[t?"unshift":"push"]((()=>{r=t,n(3,r)}))},function(t){w[t?"unshift":"push"]((()=>{s=t,n(6,s)}))},function(t,e){w[t?"unshift":"push"]((()=>{d[e.id]=t,n(5,d)}))},function(t,e){w[t?"unshift":"push"]((()=>{d[e.id]=t,n(5,d)}))}]}class G extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},D,F,o,{},null,[-1,-1]),t&&t.target&&l(t.target,this,t.anchor)}}customElements.define("manifesto-component",G);export{G as default};