import{S as t,i as n,a as e,b as i,s as o,e as s,n as r,d as a,c as l,o as m,f as c,t as u,g as p,h as d,j as g,l as h,m as f,q as b,p as v,r as q}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{loadLocaleContent as _}from"../../../../../../../../../js/libraries/serverTools.js";import{shuffleArray as y}from"../../../../../../../../../js/libraries/miscTools.js";function z(t,n,e){const i=t.slice();return i[18]=n[e],i[20]=e,i}function k(t){let n,e,s,r,l,m,b,v,q=t[5].heading+"",x=t[0],_=S(t);return{c(){n=c("div"),e=c("div"),s=c("h1"),r=u(q),l=p(),m=c("img"),v=p(),_.c(),d(m,"id","compass-img"),g(m.src,b="/img/common/compass.svg")||d(m,"src","/img/common/compass.svg"),d(m,"alt","compass"),d(e,"id","text-container"),d(n,"id","container")},m(t,o){i(t,n,o),h(n,e),h(e,s),h(s,r),h(e,l),h(e,m),h(e,v),_.m(e,null)},p(t,n){32&n&&q!==(q=t[5].heading+"")&&f(r,q),1&n&&o(x,x=t[0])?(_.d(1),_=S(t),_.c(),_.m(e,null)):_.p(t,n)},d(t){t&&a(n),_.d(t)}}}function w(t){let n,e,o,s,r,l,m,g,v,q,x,_,y,z,k,w,j,C,S,B,M,O,T,D;return{c(){n=c("p"),n.textContent="You are compatible with ...",e=p(),o=c("ul"),s=c("li"),r=u("capitalism by "),l=c("span"),m=u(t[2]),g=u("%"),v=p(),q=c("li"),x=u("vanguardism by "),_=c("span"),y=u(t[3]),z=u("%"),k=p(),w=c("li"),j=u("libertarian socialism by "),C=c("span"),S=u(t[4]),B=u("%"),M=p(),O=c("button"),O.textContent="back",d(o,"class","results-list"),d(O,"class","quiz-buttons")},m(a,c){i(a,n,c),i(a,e,c),i(a,o,c),h(o,s),h(s,r),h(s,l),h(l,m),h(s,g),h(o,v),h(o,q),h(q,x),h(q,_),h(_,y),h(q,z),h(o,k),h(o,w),h(w,j),h(w,C),h(C,S),h(w,B),i(a,M,c),i(a,O,c),T||(D=b(O,"click",t[15]),T=!0)},p(t,n){4&n&&f(m,t[2]),8&n&&f(y,t[3]),16&n&&f(S,t[4])},d(t){t&&a(n),t&&a(e),t&&a(o),t&&a(M),t&&a(O),T=!1,D()}}}function j(t){let n,e,o,s,r,l,m,g,x,_=t[5].qs[t[0]].q+"",y=t[5].qs[t[0]].as,k=[];for(let n=0;ne(5,i=t))),_(s,"compass-component",o,(function(t){for(let n of t.qs)y(n.as)}));let r=0,a=[],c="",u="",p="";function d(t){null!=a[t]&&rt.includes("C"))).filter(Boolean).length/a.length).toString()),e(3,u=Math.round(100*a.map((t=>t.includes("V"))).filter(Boolean).length/a.length).toString()),e(4,p=Math.round(100*a.map((t=>t.includes("LS"))).filter(Boolean).length/a.length).toString())),e(0,r+=1))}function g(t){0!=r&&e(0,r-=1)}m((()=>{}));return[r,a,c,u,p,i,o,s,d,g,function(){a[r]=this.__value,e(1,a)},[[]],t=>e(1,a[r]=t[1],a),()=>g(),()=>d(r),()=>g()]}class O extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},M,B,o,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("compass-component",O);export{O as default};