text: import{S as e,i as t,s as a,e as s,t as c,k as n,c as l,a as r,g as i,d as o,n as d,b as h,f,F as v,l as u,M as m,N as g,G as p,O as E,h as y,P as b,j as k,L as w,m as T,o as I,v as N,r as S,w as D,Q as B,R as _,z as x,T as A,U as C}from"../../chunks/vendor-5d015fce.js";/* empty css                                                       */import{T as H,x as P,n as O,a as V}from"../../chunks/requests-b02e315d.js";import{s as U,a as L,t as R,b as j}from"../../chunks/store-50f97f41.js";const{document:M}=A;function $(e,t,a){const s=e.slice();return s[31]=t[a],s[33]=a,s}function J(e,t,a){const s=e.slice();return s[34]=t[a],s[33]=a,s}function z(e,t,a){const s=e.slice();return s[36]=t[a][0],s[37]=t[a][1],s}function q(e,t,a){const s=e.slice();return s[40]=t[a].short_id,s[41]=t[a].name,s[42]=t[a].ports,s[33]=a,s}function F(e,t,a){const s=e.slice();return s[44]=t[a],s[33]=a,s}function X(e,t,a){const s=e.slice();return s[36]=t[a][0],s[37]=t[a][1],s}function G(e,t,a){const s=e.slice();return s[36]=t[a][0],s[37]=t[a][1],s}function Q(e){let t,a,u,g,p,E,y,b,k,w,T,I,N,S,D,B=e[0],_=[];for(let s=0;s<B.length;s+=1)_[s]=ee(F(e,B,s));return{c(){t=s("table"),a=s("thead"),u=s("tr"),g=s("th"),p=c("ID"),E=n(),y=s("th"),b=c("Name"),k=n(),w=s("th"),T=c("Activated"),I=n(),N=s("th"),S=c("Actions"),D=n();for(let e=0;e<_.length;e+=1)_[e].c();this.h()},l(e){t=l(e,"TABLE",{id:!0,class:!0});var s=r(t);a=l(s,"THEAD",{});var c=r(a);u=l(c,"TR",{class:!0});var n=r(u);g=l(n,"TH",{});var h=r(g);p=i(h,"ID"),h.forEach(o),E=d(n),y=l(n,"TH",{});var f=r(y);b=i(f,"Name"),f.forEach(o),k=d(n),w=l(n,"TH",{});var v=r(w);T=i(v,"Activated"),v.forEach(o),I=d(n),N=l(n,"TH",{});var m=r(N);S=i(m,"Actions"),m.forEach(o),n.forEach(o),c.forEach(o),D=d(s);for(let t=0;t<_.length;t+=1)_[t].l(s);s.forEach(o),this.h()},h(){h(u,"class","w3-dark-grey"),h(t,"id","scenarioConfigTable"),h(t,"class","w3-table-all w3-centered")},m(e,s){f(e,t,s),v(t,a),v(a,u),v(u,g),v(g,p),v(u,E),v(u,y),v(y,b),v(u,k),v(u,w),v(w,T),v(u,I),v(u,N),v(N,S),v(t,D);for(let a=0;a<_.length;a+=1)_[a].m(t,null)},p(e,a){if(17413&a[0]){let s;for(B=e[0],s=0;s<B.length;s+=1){const c=F(e,B,s);_[s]?_[s].p(c,a):(_[s]=ee(c),_[s].c(),_[s].m(t,null))}for(;s<_.length;s+=1)_[s].d(1);_.length=B.length}},d(e){e&&o(t),m(_,e)}}}function K(e){let t,a,u,m,g,E,y,k,w,T,I,N,S,D=[],_=new Map,x=Object.entries(e[44]);const A=e=>e[36];for(let s=0;s<x.length;s+=1){let t=X(e,x,s),a=A(t);_.set(a,D[s]=Y(a,t))}return{c(){t=s("tr");for(let e=0;e<D.length;e+=1)D[e].c();a=n(),u=s("td"),m=s("div"),g=s("div"),E=s("button"),y=c("Activate"),k=n(),w=s("button"),T=c("Delete"),I=n(),this.h()},l(e){t=l(e,"TR",{index:!0});var s=r(t);for(let t=0;t<D.length;t+=1)D[t].l(s);a=d(s),u=l(s,"TD",{class:!0});var c=r(u);m=l(c,"DIV",{class:!0});var n=r(m);g=l(n,"DIV",{class:!0});var h=r(g);E=l(h,"BUTTON",{});var f=r(E);y=i(f,"Activate"),f.forEach(o),k=d(h),w=l(h,"BUTTON",{});var v=r(w);T=i(v,"Delete"),v.forEach(o),h.forEach(o),n.forEach(o),c.forEach(o),I=d(s),s.forEach(o),this.h()},h(){h(g,"class","w3-bar"),h(m,"class","w3-show-inline-block"),h(u,"class","svelte-83vf4v"),h(t,"index",e[33])},m(s,c){f(s,t,c);for(let e=0;e<D.length;e+=1)D[e].m(t,null);v(t,a),v(t,u),v(u,m),v(m,g),v(g,E),v(E,y),v(g,k),v(g,w),v(w,T),v(t,I),N||(S=[p(E,"click",e[10]),p(w,"click",e[14])],N=!0)},p(e,s){1&s[0]&&(x=Object.entries(e[44]),D=b(D,s,A,1,e,x,_,t,C,Y,a,X))},d(e){e&&o(t);for(let t=0;t<D.length;t+=1)D[t].d();N=!1,B(S)}}}function W(e){let t,a,u,m,E,y,k,w,T,I,N,S,D,_=[],x=new Map,A=Object.entries(e[44]);const H=e=>e[36];for(let s=0;s<A.length;s+=1){let t=G(e,A,s),a=H(t);x.set(a,_[s]=Z(a,t))}return{c(){t=s("tr");for(let e=0;e<_.length;e+=1)_[e].c();a=n(),u=s("td"),m=s("div"),E=s("div"),y=s("button"),k=c("Activate"),w=n(),T=s("button"),I=c("Delete"),N=n(),this.h()},l(e){t=l(e,"TR",{index:!0,style:!0});var s=r(t);for(let t=0;t<_.length;t+=1)_[t].l(s);a=d(s),u=l(s,"TD",{class:!0});var c=r(u);m=l(c,"DIV",{class:!0});var n=r(m);E=l(n,"DIV",{class:!0});var h=r(E);y=l(h,"BUTTON",{});var f=r(y);k=i(f,"Activate"),f.forEach(o),w=d(h),T=l(h,"BUTTON",{});var v=r(T);I=i(v,"Delete"),v.forEach(o),h.forEach(o),n.forEach(o),c.forEach(o),N=d(s),s.forEach(o),this.h()},h(){h(E,"class","w3-bar"),h(m,"class","w3-show-inline-block"),h(u,"class","svelte-83vf4v"),h(t,"index",e[33]),g(t,"background-color","#acddb4")},m(s,c){f(s,t,c);for(let e=0;e<_.length;e+=1)_[e].m(t,null);v(t,a),v(t,u),v(u,m),v(m,E),v(E,y),v(y,k),v(E,w),v(E,T),v(T,I),v(t,N),S||(D=[p(y,"click",e[10]),p(T,"click",e[14])],S=!0)},p(e,s){1&s[0]&&(A=Object.entries(e[44]),_=b(_,s,H,1,e,A,x,t,C,Z,a,G))},d(e){e&&o(t);for(let t=0;t<_.length;t+=1)_[t].d();S=!1,B(D)}}}function Y(e,t){let a,n,d=t[37]+"";return{key:e,first:null,c(){a=s("td"),n=c(d),this.h()},l(e){a=l(e,"TD",{class:!0});var t=r(a);n=i(t,d),t.forEach(o),this.h()},h(){h(a,"class","svelte-83vf4v"),this.first=a},m(e,t){f(e,a,t),v(a,n)},p(e,a){t=e,1&a[0]&&d!==(d=t[37]+"")&&y(n,d)},d(e){e&&o(a)}}}function Z(e,t){let a,n,d=t[37]+"";return{key:e,first:null,c(){a=s("td"),n=c(d),this.h()},l(e){a=l(e,"TD",{class:!0});var t=r(a);n=i(t,d),t.forEach(o),this.h()},h(){h(a,"class","svelte-83vf4v"),this.first=a},m(e,t){f(e,a,t),v(a,n)},p(e,a){t=e,1&a[0]&&d!==(d=t[37]+"")&&y(n,d)},d(e){e&&o(a)}}}function ee(e){let t;function a(e,t){return e[2]==e[33]||e[0][e[33]].activated?W:K}let s=a(e),c=s(e);return{c(){c.c(),t=u()},l(e){c.l(e),t=u()},m(e,a){c.m(e,a),f(e,t,a)},p(e,n){s===(s=a(e))&&c?c.p(e,n):(c.d(1),c=s(e),c&&(c.c(),c.m(t.parentNode,t)))},d(e){c.d(e),e&&o(t)}}}function te(e){let t,a,u,g,p,E,y,b,k,w,T,I,N,S,D,B=e[4],_=[];for(let s=0;s<B.length;s+=1)_[s]=ce(q(e,B,s));return{c(){t=s("table"),a=s("thead"),u=s("tr"),g=s("th"),p=c("ShortID"),E=n(),y=s("th"),b=c("Name"),k=n(),w=s("th"),T=c("Ports"),I=n(),N=s("th"),S=c("Actions"),D=n();for(let e=0;e<_.length;e+=1)_[e].c();this.h()},l(e){t=l(e,"TABLE",{id:!0,class:!0});var s=r(t);a=l(s,"THEAD",{});var c=r(a);u=l(c,"TR",{class:!0});var n=r(u);g=l(n,"TH",{});var h=r(g);p=i(h,"ShortID"),h.forEach(o),E=d(n),y=l(n,"TH",{});var f=r(y);b=i(f,"Name"),f.forEach(o),k=d(n),w=l(n,"TH",{});var v=r(w);T=i(v,"Ports"),v.forEach(o),I=d(n),N=l(n,"TH",{});var m=r(N);S=i(m,"Actions"),m.forEach(o),n.forEach(o),c.forEach(o),D=d(s);for(let t=0;t<_.length;t+=1)_[t].l(s);s.forEach(o),this.h()},h(){h(u,"class","w3-dark-grey"),h(t,"id","selectContainers"),h(t,"class","w3-table-all w3-centered")},m(e,s){f(e,t,s),v(t,a),v(a,u),v(u,g),v(g,p),v(u,E),v(u,y),v(y,b),v(u,k),v(u,w),v(w,T),v(u,I),v(u,N),v(N,S),v(t,D);for(let a=0;a<_.length;a+=1)_[a].m(t,null)},p(e,a){if(6192&a[0]){let s;for(B=e[4],s=0;s<B.length;s+=1){const c=q(e,B,s);_[s]?_[s].p(c,a):(_[s]=ce(c),_[s].c(),_[s].m(t,null))}for(;s<_.length;s+=1)_[s].d(1);_.length=B.length}},d(e){e&&o(t),m(_,e)}}}function ae(e){let t,a,u,m,g,E,b,k,w,T,I,N,S,D,_,x,A,C,H,P,O,V=e[40]+"",U=e[41]+"",L=e[42]+"";return{c(){t=s("tr"),a=s("td"),u=c(V),m=n(),g=s("td"),E=c(U),b=n(),k=s("td"),w=c(L),T=n(),I=s("td"),N=s("div"),S=s("div"),D=s("button"),_=c("Activate"),x=n(),A=s("button"),C=c("Deactivate"),H=n(),this.h()},l(e){t=l(e,"TR",{index:!0});var s=r(t);a=l(s,"TD",{class:!0});var c=r(a);u=i(c,V),c.forEach(o),m=d(s),g=l(s,"TD",{class:!0});var n=r(g);E=i(n,U),n.forEach(o),b=d(s),k=l(s,"TD",{class:!0});var h=r(k);w=i(h,L),h.forEach(o),T=d(s),I=l(s,"TD",{class:!0});var f=r(I);N=l(f,"DIV",{class:!0});var v=r(N);S=l(v,"DIV",{class:!0});var p=r(S);D=l(p,"BUTTON",{});var y=r(D);_=i(y,"Activate"),y.forEach(o),x=d(p),A=l(p,"BUTTON",{});var B=r(A);C=i(B,"Deactivate"),B.forEach(o),p.forEach(o),v.forEach(o),f.forEach(o),H=d(s),s.forEach(o),this.h()},h(){h(a,"class","svelte-83vf4v"),h(g,"class","svelte-83vf4v"),h(k,"class","svelte-83vf4v"),h(S,"class","w3-bar"),h(N,"class","w3-show-inline-block"),h(I,"class","svelte-83vf4v"),h(t,"index",e[33])},m(s,c){f(s,t,c),v(t,a),v(a,u),v(t,m),v(t,g),v(g,E),v(t,b),v(t,k),v(k,w),v(t,T),v(t,I),v(I,N),v(N,S),v(S,D),v(D,_),v(S,x),v(S,A),v(A,C),v(t,H),P||(O=[p(D,"click",e[11]),p(A,"click",e[12])],P=!0)},p(e,t){16&t[0]&&V!==(V=e[40]+"")&&y(u,V),16&t[0]&&U!==(U=e[41]+"")&&y(E,U),16&t[0]&&L!==(L=e[42]+"")&&y(w,L)},d(e){e&&o(t),P=!1,B(O)}}}function se(e){let t,a,u,m,g,E,b,k,w,T,I,N,S,D,_,x,A,C,H,P,O,V,U=e[40]+"",L=e[41]+"",R=e[42]+"";return{c(){t=s("tr"),a=s("td"),u=c(U),m=n(),g=s("td"),E=c(L),b=n(),k=s("td"),w=c(R),T=n(),I=s("td"),N=s("div"),S=s("div"),D=s("button"),_=c("Activate"),x=n(),A=s("button"),C=c("Deactivate"),H=n(),this.h()},l(e){t=l(e,"TR",{index:!0,style:!0});var s=r(t);a=l(s,"TD",{class:!0});var c=r(a);u=i(c,U),c.forEach(o),m=d(s),g=l(s,"TD",{class:!0});var n=r(g);E=i(n,L),n.forEach(o),b=d(s),k=l(s,"TD",{class:!0});var h=r(k);w=i(h,R),h.forEach(o),T=d(s),I=l(s,"TD",{class:!0});var f=r(I);N=l(f,"DIV",{class:!0});var v=r(N);S=l(v,"DIV",{class:!0});var p=r(S);D=l(p,"BUTTON",{});var y=r(D);_=i(y,"Activate"),y.forEach(o),x=d(p),A=l(p,"BUTTON",{});var B=r(A);C=i(B,"Deactivate"),B.forEach(o),p.forEach(o),v.forEach(o),f.forEach(o),H=d(s),s.forEach(o),this.h()},h(){h(a,"class","svelte-83vf4v"),h(g,"class","svelte-83vf4v"),h(k,"class","svelte-83vf4v"),h(S,"class","w3-bar"),h(N,"class","w3-show-inline-block"),h(I,"class","svelte-83vf4v"),h(t,"index",e[33]),h(t,"style",P=e[5][e[33]])},m(s,c){f(s,t,c),v(t,a),v(a,u),v(t,m),v(t,g),v(g,E),v(t,b),v(t,k),v(k,w),v(t,T),v(t,I),v(I,N),v(N,S),v(S,D),v(D,_),v(S,x),v(S,A),v(A,C),v(t,H),O||(V=[p(D,"click",e[11]),p(A,"click",e[12])],O=!0)},p(e,a){16&a[0]&&U!==(U=e[40]+"")&&y(u,U),16&a[0]&&L!==(L=e[41]+"")&&y(E,L),16&a[0]&&R!==(R=e[42]+"")&&y(w,R),32&a[0]&&P!==(P=e[5][e[33]])&&h(t,"style",P)},d(e){e&&o(t),O=!1,B(V)}}}function ce(e){let t;function a(e,t){return e[33]in e[5]?se:ae}let s=a(e),c=s(e);return{c(){c.c(),t=u()},l(e){c.l(e),t=u()},m(e,a){c.m(e,a),f(e,t,a)},p(e,n){s===(s=a(e))&&c?c.p(e,n):(c.d(1),c=s(e),c&&(c.c(),c.m(t.parentNode,t)))},d(e){c.d(e),e&&o(t)}}}function ne(e){let t,a=e[1].configurations.length>0&&le(e);return{c(){a&&a.c(),t=u()},l(e){a&&a.l(e),t=u()},m(e,s){a&&a.m(e,s),f(e,t,s)},p(e,s){e[1].configurations.length>0?a?a.p(e,s):(a=le(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},d(e){a&&a.d(e),e&&o(t)}}}function le(e){let t,a="Communication"==e[1].type&&re(e);return{c(){a&&a.c(),t=u()},l(e){a&&a.l(e),t=u()},m(e,s){a&&a.m(e,s),f(e,t,s)},p(e,s){"Communication"==e[1].type?a?a.p(e,s):(a=re(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},d(e){a&&a.d(e),e&&o(t)}}}function re(e){let t,a=e[1].configurations,s=[];for(let c=0;c<a.length;c+=1)s[c]=ve(J(e,a,c));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=u()},l(e){for(let t=0;t<s.length;t+=1)s[t].l(e);t=u()},m(e,a){for(let t=0;t<s.length;t+=1)s[t].m(e,a);f(e,t,a)},p(e,c){if(514&c[0]){let n;for(a=e[1].configurations,n=0;n<a.length;n+=1){const l=J(e,a,n);s[n]?s[n].p(l,c):(s[n]=ve(l),s[n].c(),s[n].m(t.parentNode,t))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},d(e){m(s,e),e&&o(t)}}}function ie(e){let t,a,u,m,g,p,E,b=e[36]+"";return{c(){t=s("label"),a=s("b"),u=c(b),m=n(),g=s("input"),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=l(s,"B",{});var c=r(a);u=i(c,b),c.forEach(o),s.forEach(o),m=d(e),g=l(e,"INPUT",{class:!0,type:!0,key:!0,value:!0}),this.h()},h(){h(t,"class",""),h(g,"class","w3-input w3-border"),h(g,"type","list"),h(g,"key",p=e[36]),g.value=E=e[37].join()},m(e,s){f(e,t,s),v(t,a),v(a,u),f(e,m,s),f(e,g,s)},p(e,t){2&t[0]&&b!==(b=e[36]+"")&&y(u,b),2&t[0]&&p!==(p=e[36])&&h(g,"key",p),2&t[0]&&E!==(E=e[37].join())&&(g.value=E)},d(e){e&&o(t),e&&o(m),e&&o(g)}}}function oe(e){let t,a,u,m,g,p,E,b=e[36]+"";return{c(){t=s("input"),m=n(),g=s("label"),p=s("b"),E=c(b),this.h()},l(e){t=l(e,"INPUT",{class:!0,type:!0,key:!0,checked:!0}),m=d(e),g=l(e,"LABEL",{class:!0});var a=r(g);p=l(a,"B",{});var s=r(p);E=i(s,b),s.forEach(o),a.forEach(o),this.h()},h(){h(t,"class","w3-check"),h(t,"type","checkbox"),h(t,"key",a=e[36]),t.checked=u=e[37],h(g,"class","")},m(e,a){f(e,t,a),f(e,m,a),f(e,g,a),v(g,p),v(p,E)},p(e,s){2&s[0]&&a!==(a=e[36])&&h(t,"key",a),2&s[0]&&u!==(u=e[37])&&(t.checked=u),2&s[0]&&b!==(b=e[36]+"")&&y(E,b)},d(e){e&&o(t),e&&o(m),e&&o(g)}}}function de(e){let t,a,u,m,g,p,E,b=e[36]+"";return{c(){t=s("label"),a=s("b"),u=c(b),m=n(),g=s("input"),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=l(s,"B",{});var c=r(a);u=i(c,b),c.forEach(o),s.forEach(o),m=d(e),g=l(e,"INPUT",{class:!0,type:!0,key:!0,value:!0}),this.h()},h(){h(t,"class",""),h(g,"class","w3-input w3-border"),h(g,"type","string"),h(g,"key",p=e[36]),g.value=E=e[37]},m(e,s){f(e,t,s),v(t,a),v(a,u),f(e,m,s),f(e,g,s)},p(e,t){2&t[0]&&b!==(b=e[36]+"")&&y(u,b),2&t[0]&&p!==(p=e[36])&&h(g,"key",p),2&t[0]&&E!==(E=e[37])&&(g.value=E)},d(e){e&&o(t),e&&o(m),e&&o(g)}}}function he(e){let t,a,u,m,g,p,E,b=e[36]+"";return{c(){t=s("label"),a=s("b"),u=c(b),m=n(),g=s("input"),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=l(s,"B",{});var c=r(a);u=i(c,b),c.forEach(o),s.forEach(o),m=d(e),g=l(e,"INPUT",{class:!0,type:!0,convert:!0,key:!0,value:!0}),this.h()},h(){h(t,"class",""),h(g,"class","w3-input w3-border"),h(g,"type","string"),h(g,"convert","required"),h(g,"key",p=e[36]),g.value=E=e[37]},m(e,s){f(e,t,s),v(t,a),v(a,u),f(e,m,s),f(e,g,s)},p(e,t){2&t[0]&&b!==(b=e[36]+"")&&y(u,b),2&t[0]&&p!==(p=e[36])&&h(g,"key",p),2&t[0]&&E!==(E=e[37])&&(g.value=E)},d(e){e&&o(t),e&&o(m),e&&o(g)}}}function fe(e,t){let a;function c(e,t){return"number"==typeof e[37]?he:"string"==typeof e[37]?de:"boolean"==typeof e[37]?oe:"object"==typeof e[37]?ie:void 0}let n=c(t),i=n&&n(t);return{key:e,first:null,c(){a=s("p"),i&&i.c(),this.h()},l(e){a=l(e,"P",{});var t=r(a);i&&i.l(t),t.forEach(o),this.h()},h(){this.first=a},m(e,t){f(e,a,t),i&&i.m(a,null)},p(e,s){n===(n=c(t=e))&&i?i.p(t,s):(i&&i.d(1),i=n&&n(t),i&&(i.c(),i.m(a,null)))},d(e){e&&o(a),i&&i.d()}}}function ve(e){let t,a,u,m,k,w,T,I,N,S,D,B,_,x,A,H,P,O,V,U,L,R,j=e[34].container_info.name+"",M=[],$=new Map,J=Object.entries(e[34].configs);const q=e=>e[36];for(let s=0;s<J.length;s+=1){let t=z(e,J,s),a=q(t);$.set(a,M[s]=fe(a,t))}return{c(){t=s("div"),a=s("div"),u=s("h2"),m=c(j),k=n(),w=s("p"),T=c("Description here from application configs"),I=n(),N=s("div"),S=s("form"),D=s("h5"),B=c("Update Form"),_=n();for(let e=0;e<M.length;e+=1)M[e].c();x=n(),A=s("p"),H=s("input"),V=n(),U=s("hr"),this.h()},l(e){t=l(e,"DIV",{class:!0});var s=r(t);a=l(s,"DIV",{class:!0});var c=r(a);u=l(c,"H2",{class:!0,style:!0});var n=r(u);m=i(n,j),n.forEach(o),k=d(c),w=l(c,"P",{});var h=r(w);T=i(h,"Description here from application configs"),h.forEach(o),c.forEach(o),I=d(s),N=l(s,"DIV",{class:!0});var f=r(N);S=l(f,"FORM",{name:!0,port:!0,index:!0,class:!0});var v=r(S);D=l(v,"H5",{class:!0,style:!0});var g=r(D);B=i(g,"Update Form"),g.forEach(o),_=d(v);for(let t=0;t<M.length;t+=1)M[t].l(v);x=d(v),A=l(v,"P",{});var p=r(A);H=l(p,"INPUT",{class:!0,type:!0,value:!0}),p.forEach(o),v.forEach(o),f.forEach(o),s.forEach(o),V=d(e),U=l(e,"HR",{class:!0}),this.h()},h(){h(u,"class","w3-text-orange"),g(u,"text-shadow","1px 1px 0 #444"),h(a,"class","w3-third w3-container w3-blue"),h(D,"class","w3-text-orange"),g(D,"text-shadow","1px 1px 0 #444"),h(H,"class","w3-blue"),h(H,"type","submit"),H.value="Update",h(S,"name",P=e[34].container_info.name),h(S,"port",O=e[34].container_info.ports),h(S,"index",e[33]),h(S,"class","w3-container"),h(N,"class","w3-twothird w3-container w3-gray"),h(t,"class","w3-row w3-border"),h(U,"class","svelte-83vf4v")},m(s,c){f(s,t,c),v(t,a),v(a,u),v(u,m),v(a,k),v(a,w),v(w,T),v(t,I),v(t,N),v(N,S),v(S,D),v(D,B),v(S,_);for(let e=0;e<M.length;e+=1)M[e].m(S,null);v(S,x),v(S,A),v(A,H),f(s,V,c),f(s,U,c),L||(R=p(S,"submit",E(e[9])),L=!0)},p(e,t){2&t[0]&&j!==(j=e[34].container_info.name+"")&&y(m,j),2&t[0]&&(J=Object.entries(e[34].configs),M=b(M,t,q,1,e,J,$,S,C,fe,x,z)),2&t[0]&&P!==(P=e[34].container_info.name)&&h(S,"name",P),2&t[0]&&O!==(O=e[34].container_info.ports)&&h(S,"port",O)},d(e){e&&o(t);for(let t=0;t<M.length;t+=1)M[t].d();e&&o(V),e&&o(U),L=!1,R()}}}function ue(e){let t,a=e[6],s=[];for(let c=0;c<a.length;c+=1)s[c]=me($(e,a,c));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=u()},l(e){for(let t=0;t<s.length;t+=1)s[t].l(e);t=u()},m(e,a){for(let t=0;t<s.length;t+=1)s[t].m(e,a);f(e,t,a)},p(e,c){if(64&c[0]){let n;for(a=e[6],n=0;n<a.length;n+=1){const l=$(e,a,n);s[n]?s[n].p(l,c):(s[n]=me(l),s[n].c(),s[n].m(t.parentNode,t))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},d(e){m(s,e),e&&o(t)}}}function me(e){let t,a,u,m,g,p,E,b=e[31]+"";return{c(){t=s("label"),a=c(b),u=n(),m=s("input"),g=n(),p=s("span"),E=n(),this.h()},l(e){t=l(e,"LABEL",{class:!0});var s=r(t);a=i(s,b),u=d(s),m=l(s,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),g=d(s),p=l(s,"SPAN",{class:!0}),r(p).forEach(o),E=d(s),s.forEach(o),this.h()},h(){h(m,"type","radio"),m.checked="checked",h(m,"name","radio"),h(m,"class","svelte-83vf4v"),h(p,"class","checkmark svelte-83vf4v"),h(t,"class","container svelte-83vf4v")},m(e,s){f(e,t,s),v(t,a),v(t,u),v(t,m),v(t,g),v(t,p),v(t,E)},p(e,t){64&t[0]&&b!==(b=e[31]+"")&&y(a,b)},d(e){e&&o(t)}}}function ge(e){let t,a,u,m,E,y,b,_,x,A,C,P,O,V,U,L,R,j,$,J,z,q,F,X,G,K,W,Y,Z,ee,ae,se,ce,le,re,ie,oe,de,he,fe,ve,me,ge,Ee,ye,be,ke,we,Te,Ie,Ne,Se,De,Be,_e,xe,Ae,Ce,He,Pe,Oe,Ve,Ue,Le,Re,je,Me,$e,Je,ze,qe,Fe,Xe,Ge,Qe,Ke,We,Ye,Ze,et,tt,at,st,ct,nt,lt,rt,it,ot,dt,ht,ft,vt,ut,mt,gt,pt,Et,yt,bt,kt,wt,Tt,It,Nt,St,Dt,Bt,_t,xt,At,Ct,Ht,Pt,Ot,Vt,Ut,Lt,Rt,jt,Mt,$t,Jt,zt,qt,Ft,Xt,Gt,Qt,Kt,Wt,Yt,Zt,ea,ta,aa,sa,ca,na,la,ra,ia,oa,da,ha,fa,va,ua,ma,ga,pa,Ea,ya,ba,ka,wa,Ta,Ia,Na,Sa,Da,Ba,_a,xa,Aa,Ca,Ha,Pa,Oa,Va,Ua,La,Ra,ja,Ma,$a,Ja,za,qa,Fa,Xa,Ga,Qa,Ka,Wa,Ya,Za,es,ts,as,ss,cs,ns,ls,rs,is,os,ds,hs,fs,vs,us,ms,gs,ps,Es,ys,bs,ks,ws,Ts,Is,Ns,Ss;a=new H({});let Ds=e[0].length>0&&Q(e),Bs=e[4].length>0&&te(e),_s="configurations"in e[1]&&ne(e),xs=e[6].length>0&&ue(e);return{c(){t=n(),k(a.$$.fragment),u=n(),m=s("hr"),E=n(),y=s("div"),b=s("h1"),_=s("b"),x=c("Scenario Management"),A=n(),C=s("hr"),P=n(),O=s("section"),V=s("h3"),U=c("Select scenario"),L=n(),R=s("section"),Ds&&Ds.c(),j=n(),$=s("div"),J=s("div"),z=s("button"),q=c("Create Scenario"),F=n(),X=s("div"),G=s("input"),K=n(),W=s("div"),Y=s("div"),Z=s("button"),ee=c("Rename Scenario"),ae=n(),se=s("div"),ce=s("input"),le=n(),re=s("div"),ie=s("input"),oe=n(),de=s("hr"),he=n(),fe=s("div"),ve=s("h1"),me=s("b"),ge=c("Scenario Type"),Ee=n(),ye=s("div"),be=s("div"),ke=s("a"),we=s("div"),Te=c("Communication"),Ie=n(),Ne=s("a"),Se=s("div"),De=c("Static"),Be=n(),_e=s("a"),xe=s("div"),Ae=c("Driving Simulation"),Ce=n(),He=s("div"),Pe=s("hr"),Oe=n(),Ve=s("div"),Ue=s("h1"),Le=s("b"),Re=c("Configuration"),je=n(),Me=s("hr"),$e=n(),Je=s("section"),ze=s("h3"),qe=s("b"),Fe=c("Select containers"),Xe=n(),Ge=s("section"),Bs&&Bs.c(),Qe=n(),Ke=s("hr"),We=n(),Ye=s("section"),Ze=s("h3"),et=s("b"),tt=c("Configure containers"),at=n(),st=s("section"),_s&&_s.c(),nt=n(),lt=s("div"),rt=s("hr"),it=n(),ot=s("div"),dt=s("h1"),ht=s("b"),ft=c("Configuration"),vt=n(),ut=s("hr"),mt=n(),gt=s("section"),pt=s("h3"),Et=s("b"),yt=c("Select Static Datasets"),bt=c(" (folder:number_images)"),kt=n(),wt=s("div"),xs&&xs.c(),Tt=n(),It=s("hr"),Nt=n(),St=s("section"),Dt=s("h3"),Bt=s("b"),_t=c("Select Attack"),xt=n(),At=s("div"),Ct=s("label"),Ht=c("blurring\n                    "),Pt=s("input"),Ot=n(),Vt=s("span"),Ut=n(),Lt=s("label"),Rt=c("blacking\n                    "),jt=s("input"),Mt=n(),$t=s("span"),Jt=n(),zt=s("input"),qt=n(),Ft=s("hr"),Xt=n(),Gt=s("section"),Qt=s("h3"),Kt=s("b"),Wt=c("Validate Dataset"),Yt=n(),Zt=s("div"),ea=s("input"),ta=n(),aa=s("label"),sa=s("b"),ca=c("Long-Short-Histogram-Pool_LDA"),na=n(),la=s("hr"),ia=n(),oa=s("div"),da=s("hr"),ha=n(),fa=s("div"),va=s("h1"),ua=s("b"),ma=c("Configuration"),ga=n(),pa=s("hr"),Ea=n(),ya=s("section"),ba=s("h3"),ka=s("b"),wa=c("Select Driving Path"),Ta=n(),Ia=s("div"),Na=s("label"),Sa=c("testround\n                    "),Da=s("input"),Ba=n(),_a=s("span"),xa=n(),Aa=s("label"),Ca=c("zickzack\n                    "),Ha=s("input"),Pa=n(),Oa=s("span"),Va=n(),Ua=s("input"),La=n(),Ra=s("hr"),ja=n(),Ma=s("section"),$a=s("h3"),Ja=s("b"),za=c("Select Sensors"),qa=n(),Fa=s("h5"),Xa=c("All selected"),Ga=n(),Qa=s("hr"),Ka=n(),Wa=s("section"),Ya=s("h3"),Za=s("b"),es=c("Attack Configuration"),ts=n(),as=s("div"),ss=s("label"),cs=c("No Attack\n                    "),ns=s("input"),ls=n(),rs=s("span"),is=n(),os=s("label"),ds=c("Attack Mode\n                    "),hs=s("input"),fs=n(),vs=s("span"),us=n(),ms=s("input"),ps=n(),Es=s("hr"),ys=n(),bs=s("button"),ks=c("Save Configurations"),ws=n(),Ts=s("hr"),this.h()},l(e){w('[data-svelte="svelte-101i1i0"]',M.head).forEach(o),t=d(e),T(a.$$.fragment,e),u=d(e),m=l(e,"HR",{class:!0}),E=d(e),y=l(e,"DIV",{class:!0});var s=r(y);b=l(s,"H1",{class:!0,style:!0});var c=r(b);_=l(c,"B",{});var n=r(_);x=i(n,"Scenario Management"),n.forEach(o),c.forEach(o),s.forEach(o),A=d(e),C=l(e,"HR",{class:!0}),P=d(e),O=l(e,"SECTION",{class:!0});var h=r(O);V=l(h,"H3",{});var f=r(V);U=i(f,"Select scenario"),f.forEach(o),h.forEach(o),L=d(e),R=l(e,"SECTION",{class:!0});var v=r(R);Ds&&Ds.l(v),j=d(v),$=l(v,"DIV",{class:!0});var g=r($);J=l(g,"DIV",{class:!0});var p=r(J);z=l(p,"BUTTON",{ref:!0,class:!0});var k=r(z);q=i(k,"Create Scenario"),k.forEach(o),p.forEach(o),F=d(g),X=l(g,"DIV",{class:!0});var I=r(X);G=l(I,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),I.forEach(o),g.forEach(o),K=d(v),W=l(v,"DIV",{class:!0});var N=r(W);Y=l(N,"DIV",{class:!0});var S=r(Y);Z=l(S,"BUTTON",{ref:!0,class:!0});var D=r(Z);ee=i(D,"Rename Scenario"),D.forEach(o),S.forEach(o),ae=d(N),se=l(N,"DIV",{class:!0});var B=r(se);ce=l(B,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),B.forEach(o),le=d(N),re=l(N,"DIV",{class:!0});var H=r(re);ie=l(H,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),H.forEach(o),N.forEach(o),v.forEach(o),oe=d(e),de=l(e,"HR",{class:!0}),he=d(e),fe=l(e,"DIV",{class:!0});var Q=r(fe);ve=l(Q,"H1",{class:!0,style:!0});var te=r(ve);me=l(te,"B",{});var ne=r(me);ge=i(ne,"Scenario Type"),ne.forEach(o),te.forEach(o),Q.forEach(o),Ee=d(e),ye=l(e,"DIV",{class:!0});var ue=r(ye);be=l(ue,"DIV",{id:!0,class:!0});var pe=r(be);ke=l(pe,"A",{href:!0});var ct=r(ke);we=l(ct,"DIV",{class:!0});var ra=r(we);Te=i(ra,"Communication"),ra.forEach(o),ct.forEach(o),Ie=d(pe),Ne=l(pe,"A",{href:!0});var gs=r(Ne);Se=l(gs,"DIV",{class:!0});var Is=r(Se);De=i(Is,"Static"),Is.forEach(o),gs.forEach(o),Be=d(pe),_e=l(pe,"A",{href:!0});var Ns=r(_e);xe=l(Ns,"DIV",{class:!0});var Ss=r(xe);Ae=i(Ss,"Driving Simulation"),Ss.forEach(o),Ns.forEach(o),pe.forEach(o),Ce=d(ue),He=l(ue,"DIV",{id:!0,class:!0,style:!0});var As=r(He);Pe=l(As,"HR",{class:!0}),Oe=d(As),Ve=l(As,"DIV",{class:!0});var Cs=r(Ve);Ue=l(Cs,"H1",{class:!0,style:!0});var Hs=r(Ue);Le=l(Hs,"B",{});var Ps=r(Le);Re=i(Ps,"Configuration"),Ps.forEach(o),Hs.forEach(o),Cs.forEach(o),je=d(As),Me=l(As,"HR",{class:!0}),$e=d(As),Je=l(As,"SECTION",{class:!0});var Os=r(Je);ze=l(Os,"H3",{});var Vs=r(ze);qe=l(Vs,"B",{});var Us=r(qe);Fe=i(Us,"Select containers"),Us.forEach(o),Vs.forEach(o),Os.forEach(o),Xe=d(As),Ge=l(As,"SECTION",{class:!0});var Ls=r(Ge);Bs&&Bs.l(Ls),Ls.forEach(o),Qe=d(As),Ke=l(As,"HR",{class:!0}),We=d(As),Ye=l(As,"SECTION",{class:!0});var Rs=r(Ye);Ze=l(Rs,"H3",{});var js=r(Ze);et=l(js,"B",{});var Ms=r(et);tt=i(Ms,"Configure containers"),Ms.forEach(o),js.forEach(o),Rs.forEach(o),at=d(As),st=l(As,"SECTION",{class:!0});var $s=r(st);_s&&_s.l($s),$s.forEach(o),As.forEach(o),nt=d(ue),lt=l(ue,"DIV",{id:!0,class:!0,style:!0});var Js=r(lt);rt=l(Js,"HR",{class:!0}),it=d(Js),ot=l(Js,"DIV",{class:!0});var zs=r(ot);dt=l(zs,"H1",{class:!0,style:!0});var qs=r(dt);ht=l(qs,"B",{});var Fs=r(ht);ft=i(Fs,"Configuration"),Fs.forEach(o),qs.forEach(o),zs.forEach(o),vt=d(Js),ut=l(Js,"HR",{class:!0}),mt=d(Js),gt=l(Js,"SECTION",{class:!0});var Xs=r(gt);pt=l(Xs,"H3",{});var Gs=r(pt);Et=l(Gs,"B",{});var Qs=r(Et);yt=i(Qs,"Select Static Datasets"),Qs.forEach(o),bt=i(Gs," (folder:number_images)"),Gs.forEach(o),kt=d(Xs),wt=l(Xs,"DIV",{class:!0,id:!0});var Ks=r(wt);xs&&xs.l(Ks),Ks.forEach(o),Xs.forEach(o),Tt=d(Js),It=l(Js,"HR",{class:!0}),Nt=d(Js),St=l(Js,"SECTION",{class:!0});var Ws=r(St);Dt=l(Ws,"H3",{});var Ys=r(Dt);Bt=l(Ys,"B",{});var Zs=r(Bt);_t=i(Zs,"Select Attack"),Zs.forEach(o),Ys.forEach(o),xt=d(Ws),At=l(Ws,"DIV",{class:!0,id:!0});var ec=r(At);Ct=l(ec,"LABEL",{class:!0});var tc=r(Ct);Ht=i(tc,"blurring\n                    "),Pt=l(tc,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),Ot=d(tc),Vt=l(tc,"SPAN",{class:!0}),r(Vt).forEach(o),tc.forEach(o),Ut=d(ec),Lt=l(ec,"LABEL",{class:!0});var ac=r(Lt);Rt=i(ac,"blacking\n                    "),jt=l(ac,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),Mt=d(ac),$t=l(ac,"SPAN",{class:!0}),r($t).forEach(o),ac.forEach(o),Jt=d(ec),zt=l(ec,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),ec.forEach(o),Ws.forEach(o),qt=d(Js),Ft=l(Js,"HR",{class:!0}),Xt=d(Js),Gt=l(Js,"SECTION",{class:!0});var sc=r(Gt);Qt=l(sc,"H3",{});var cc=r(Qt);Kt=l(cc,"B",{});var nc=r(Kt);Wt=i(nc,"Validate Dataset"),nc.forEach(o),cc.forEach(o),Yt=d(sc),Zt=l(sc,"DIV",{class:!0,id:!0});var lc=r(Zt);ea=l(lc,"INPUT",{class:!0,type:!0,checked:!0}),ta=d(lc),aa=l(lc,"LABEL",{class:!0});var rc=r(aa);sa=l(rc,"B",{});var ic=r(sa);ca=i(ic,"Long-Short-Histogram-Pool_LDA"),ic.forEach(o),rc.forEach(o),lc.forEach(o),sc.forEach(o),na=d(Js),la=l(Js,"HR",{class:!0}),Js.forEach(o),ia=d(ue),oa=l(ue,"DIV",{id:!0,class:!0,style:!0});var oc=r(oa);da=l(oc,"HR",{class:!0}),ha=d(oc),fa=l(oc,"DIV",{class:!0});var dc=r(fa);va=l(dc,"H1",{class:!0,style:!0});var hc=r(va);ua=l(hc,"B",{});var fc=r(ua);ma=i(fc,"Configuration"),fc.forEach(o),hc.forEach(o),dc.forEach(o),ga=d(oc),pa=l(oc,"HR",{class:!0}),Ea=d(oc),ya=l(oc,"SECTION",{class:!0});var vc=r(ya);ba=l(vc,"H3",{});var uc=r(ba);ka=l(uc,"B",{});var mc=r(ka);wa=i(mc,"Select Driving Path"),mc.forEach(o),uc.forEach(o),Ta=d(vc),Ia=l(vc,"DIV",{class:!0,id:!0});var gc=r(Ia);Na=l(gc,"LABEL",{class:!0});var pc=r(Na);Sa=i(pc,"testround\n                    "),Da=l(pc,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),Ba=d(pc),_a=l(pc,"SPAN",{class:!0}),r(_a).forEach(o),pc.forEach(o),xa=d(gc),Aa=l(gc,"LABEL",{class:!0});var Ec=r(Aa);Ca=i(Ec,"zickzack\n                    "),Ha=l(Ec,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),Pa=d(Ec),Oa=l(Ec,"SPAN",{class:!0}),r(Oa).forEach(o),Ec.forEach(o),Va=d(gc),Ua=l(gc,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),gc.forEach(o),vc.forEach(o),La=d(oc),Ra=l(oc,"HR",{class:!0}),ja=d(oc),Ma=l(oc,"SECTION",{class:!0});var yc=r(Ma);$a=l(yc,"H3",{});var bc=r($a);Ja=l(bc,"B",{});var kc=r(Ja);za=i(kc,"Select Sensors"),kc.forEach(o),bc.forEach(o),qa=d(yc),Fa=l(yc,"H5",{});var wc=r(Fa);Xa=i(wc,"All selected"),wc.forEach(o),yc.forEach(o),Ga=d(oc),Qa=l(oc,"HR",{class:!0}),Ka=d(oc),Wa=l(oc,"SECTION",{class:!0});var Tc=r(Wa);Ya=l(Tc,"H3",{});var Ic=r(Ya);Za=l(Ic,"B",{});var Nc=r(Za);es=i(Nc,"Attack Configuration"),Nc.forEach(o),Ic.forEach(o),ts=d(Tc),as=l(Tc,"DIV",{class:!0,id:!0});var Sc=r(as);ss=l(Sc,"LABEL",{class:!0});var Dc=r(ss);cs=i(Dc,"No Attack\n                    "),ns=l(Dc,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),ls=d(Dc),rs=l(Dc,"SPAN",{class:!0}),r(rs).forEach(o),Dc.forEach(o),is=d(Sc),os=l(Sc,"LABEL",{class:!0});var Bc=r(os);ds=i(Bc,"Attack Mode\n                    "),hs=l(Bc,"INPUT",{type:!0,checked:!0,name:!0,class:!0}),fs=d(Bc),vs=l(Bc,"SPAN",{class:!0}),r(vs).forEach(o),Bc.forEach(o),us=d(Sc),ms=l(Sc,"INPUT",{id:!0,class:!0,name:!0,type:!0,placeholder:!0}),Sc.forEach(o),Tc.forEach(o),oc.forEach(o),ue.forEach(o),ps=d(e),Es=l(e,"HR",{class:!0}),ys=d(e),bs=l(e,"BUTTON",{class:!0});var _c=r(bs);ks=i(_c,"Save Configurations"),_c.forEach(o),ws=d(e),Ts=l(e,"HR",{class:!0}),this.h()},h(){M.title="Configuration and Scheduling",h(m,"class","svelte-83vf4v"),h(b,"class","w3-text-yellow"),g(b,"text-shadow","1px 1px 0 #444"),h(y,"class","w3-panel w3-blue"),h(C,"class","svelte-83vf4v"),h(O,"class","page-headline"),h(z,"ref","createNewScenario"),h(z,"class","w3-col w3-input w3-border"),h(J,"class","w3-third"),h(G,"id","createNewScenario"),h(G,"class","w3-input w3-border"),h(G,"name","name"),h(G,"type","text"),h(G,"placeholder","Scenario Name"),h(X,"class","w3-rest"),h($,"class","w3-row w3-section"),h(Z,"ref","renameScenario"),h(Z,"class","w3-col w3-input w3-border"),h(Y,"class","w3-third"),h(ce,"id","renameScenarioID"),h(ce,"class","w3-input w3-border"),h(ce,"name","id"),h(ce,"type","text"),h(ce,"placeholder","Scenario Identifier"),h(se,"class","w3-third"),h(ie,"id","renameScenario"),h(ie,"class","w3-input w3-border"),h(ie,"name","name"),h(ie,"type","text"),h(ie,"placeholder","Scenario Name"),h(re,"class","w3-rest"),h(W,"class","w3-row w3-section"),h(R,"class","w3-container"),h(de,"class","svelte-83vf4v"),h(ve,"class","w3-text-yellow"),g(ve,"text-shadow","1px 1px 0 #444"),h(fe,"class","w3-panel w3-blue"),h(we,"class","w3-third tablink w3-bottombar w3-hover-light-grey w3-padding w3-border-red"),h(ke,"href","javascript:void(0)"),h(Se,"class","w3-third tablink w3-bottombar w3-hover-light-grey w3-padding"),h(Ne,"href","javascript:void(0)"),h(xe,"class","w3-third tablink w3-bottombar w3-hover-light-grey w3-padding"),h(_e,"href","javascript:void(0)"),h(be,"id","selectConfigTabs"),h(be,"class","w3-row"),h(Pe,"class","svelte-83vf4v"),h(Ue,"class","w3-text-yellow"),g(Ue,"text-shadow","1px 1px 0 #444"),h(Ve,"class","w3-panel w3-blue"),h(Me,"class","svelte-83vf4v"),h(Je,"class","page-headline"),h(Ge,"class","w3-container"),h(Ke,"class","svelte-83vf4v"),h(Ye,"class","page-headline"),h(st,"class","w3-container"),h(He,"id","Communication"),h(He,"class","w3-container city"),h(He,"style",ct=e[3].Communication),h(rt,"class","svelte-83vf4v"),h(dt,"class","w3-text-yellow"),g(dt,"text-shadow","1px 1px 0 #444"),h(ot,"class","w3-panel w3-blue"),h(ut,"class","svelte-83vf4v"),h(wt,"class","w3-container"),h(wt,"id","static_datasets"),h(gt,"class","page-headline"),h(It,"class","svelte-83vf4v"),h(Pt,"type","radio"),Pt.checked="checked",h(Pt,"name","radio2"),h(Pt,"class","svelte-83vf4v"),h(Vt,"class","checkmark svelte-83vf4v"),h(Ct,"class","container svelte-83vf4v"),h(jt,"type","radio"),jt.checked="checked",h(jt,"name","radio2"),h(jt,"class","svelte-83vf4v"),h($t,"class","checkmark svelte-83vf4v"),h(Lt,"class","container svelte-83vf4v"),h(zt,"id","numberImages"),h(zt,"class","w3-input w3-border"),h(zt,"name","numberImg"),h(zt,"type","text"),h(zt,"placeholder","Number of Images to Attack"),h(At,"class","w3-container"),h(At,"id","static_attacks"),h(St,"class","page-headline"),h(Ft,"class","svelte-83vf4v"),h(ea,"class","w3-check"),h(ea,"type","checkbox"),ea.checked="",h(aa,"class",""),h(Zt,"class","w3-container"),h(Zt,"id","static_validation"),h(Gt,"class","page-headline"),h(la,"class","svelte-83vf4v"),h(lt,"id","Static"),h(lt,"class","w3-container city"),h(lt,"style",ra=e[3].Static),h(da,"class","svelte-83vf4v"),h(va,"class","w3-text-yellow"),g(va,"text-shadow","1px 1px 0 #444"),h(fa,"class","w3-panel w3-blue"),h(pa,"class","svelte-83vf4v"),h(Da,"type","radio"),Da.checked="checked",h(Da,"name","driveradio"),h(Da,"class","svelte-83vf4v"),h(_a,"class","checkmark svelte-83vf4v"),h(Na,"class","container svelte-83vf4v"),h(Ha,"type","radio"),Ha.checked="checked",h(Ha,"name","driveradio"),h(Ha,"class","svelte-83vf4v"),h(Oa,"class","checkmark svelte-83vf4v"),h(Aa,"class","container svelte-83vf4v"),h(Ua,"id","driving_time"),h(Ua,"class","w3-input w3-border"),h(Ua,"name","durationAutoPilot"),h(Ua,"type","text"),h(Ua,"placeholder","Duration of Autopilot in X seconds"),h(Ia,"class","w3-container"),h(Ia,"id","driving_path"),h(ya,"class","page-headline"),h(Ra,"class","svelte-83vf4v"),h(Ma,"class","page-headline"),h(Qa,"class","svelte-83vf4v"),h(ns,"type","radio"),ns.checked="checked",h(ns,"name","radio2"),h(ns,"class","svelte-83vf4v"),h(rs,"class","checkmark svelte-83vf4v"),h(ss,"class","container svelte-83vf4v"),h(hs,"type","radio"),hs.checked="checked",h(hs,"name","radio2"),h(hs,"class","svelte-83vf4v"),h(vs,"class","checkmark svelte-83vf4v"),h(os,"class","container svelte-83vf4v"),h(ms,"id","driving_attack_time"),h(ms,"class","w3-input w3-border"),h(ms,"name","driveAttackAfter"),h(ms,"type","text"),h(ms,"placeholder","Launch attack after X seconds"),h(as,"class","w3-container"),h(as,"id","driving_attacks"),h(Wa,"class","page-headline"),h(oa,"id","Driving Simulation"),h(oa,"class","w3-container city"),h(oa,"style",gs=e[3]["Driving Simulation"]),h(ye,"class","w3-container"),h(Es,"class","svelte-83vf4v"),h(bs,"class","w3-col w3-input w3-border w3-margin-top"),h(Ts,"class","svelte-83vf4v")},m(s,c){f(s,t,c),I(a,s,c),f(s,u,c),f(s,m,c),f(s,E,c),f(s,y,c),v(y,b),v(b,_),v(_,x),f(s,A,c),f(s,C,c),f(s,P,c),f(s,O,c),v(O,V),v(V,U),f(s,L,c),f(s,R,c),Ds&&Ds.m(R,null),v(R,j),v(R,$),v($,J),v(J,z),v(z,q),v($,F),v($,X),v(X,G),v(R,K),v(R,W),v(W,Y),v(Y,Z),v(Z,ee),v(W,ae),v(W,se),v(se,ce),v(W,le),v(W,re),v(re,ie),f(s,oe,c),f(s,de,c),f(s,he,c),f(s,fe,c),v(fe,ve),v(ve,me),v(me,ge),f(s,Ee,c),f(s,ye,c),v(ye,be),v(be,ke),v(ke,we),v(we,Te),v(be,Ie),v(be,Ne),v(Ne,Se),v(Se,De),v(be,Be),v(be,_e),v(_e,xe),v(xe,Ae),v(ye,Ce),v(ye,He),v(He,Pe),v(He,Oe),v(He,Ve),v(Ve,Ue),v(Ue,Le),v(Le,Re),v(He,je),v(He,Me),v(He,$e),v(He,Je),v(Je,ze),v(ze,qe),v(qe,Fe),v(He,Xe),v(He,Ge),Bs&&Bs.m(Ge,null),v(He,Qe),v(He,Ke),v(He,We),v(He,Ye),v(Ye,Ze),v(Ze,et),v(et,tt),v(He,at),v(He,st),_s&&_s.m(st,null),v(ye,nt),v(ye,lt),v(lt,rt),v(lt,it),v(lt,ot),v(ot,dt),v(dt,ht),v(ht,ft),v(lt,vt),v(lt,ut),v(lt,mt),v(lt,gt),v(gt,pt),v(pt,Et),v(Et,yt),v(pt,bt),v(gt,kt),v(gt,wt),xs&&xs.m(wt,null),v(lt,Tt),v(lt,It),v(lt,Nt),v(lt,St),v(St,Dt),v(Dt,Bt),v(Bt,_t),v(St,xt),v(St,At),v(At,Ct),v(Ct,Ht),v(Ct,Pt),v(Ct,Ot),v(Ct,Vt),v(At,Ut),v(At,Lt),v(Lt,Rt),v(Lt,jt),v(Lt,Mt),v(Lt,$t),v(At,Jt),v(At,zt),v(lt,qt),v(lt,Ft),v(lt,Xt),v(lt,Gt),v(Gt,Qt),v(Qt,Kt),v(Kt,Wt),v(Gt,Yt),v(Gt,Zt),v(Zt,ea),v(Zt,ta),v(Zt,aa),v(aa,sa),v(sa,ca),v(lt,na),v(lt,la),v(ye,ia),v(ye,oa),v(oa,da),v(oa,ha),v(oa,fa),v(fa,va),v(va,ua),v(ua,ma),v(oa,ga),v(oa,pa),v(oa,Ea),v(oa,ya),v(ya,ba),v(ba,ka),v(ka,wa),v(ya,Ta),v(ya,Ia),v(Ia,Na),v(Na,Sa),v(Na,Da),v(Na,Ba),v(Na,_a),v(Ia,xa),v(Ia,Aa),v(Aa,Ca),v(Aa,Ha),v(Aa,Pa),v(Aa,Oa),v(Ia,Va),v(Ia,Ua),v(oa,La),v(oa,Ra),v(oa,ja),v(oa,Ma),v(Ma,$a),v($a,Ja),v(Ja,za),v(Ma,qa),v(Ma,Fa),v(Fa,Xa),v(oa,Ga),v(oa,Qa),v(oa,Ka),v(oa,Wa),v(Wa,Ya),v(Ya,Za),v(Za,es),v(Wa,ts),v(Wa,as),v(as,ss),v(ss,cs),v(ss,ns),v(ss,ls),v(ss,rs),v(as,is),v(as,os),v(os,ds),v(os,hs),v(os,fs),v(os,vs),v(as,us),v(as,ms),f(s,ps,c),f(s,Es,c),f(s,ys,c),f(s,bs,c),v(bs,ks),f(s,ws,c),f(s,Ts,c),Is=!0,Ns||(Ss=[p(z,"click",e[15]),p(Z,"click",e[13]),p(we,"click",e[7]),p(ke,"click",pe),p(Se,"click",e[7]),p(Ne,"click",pe),p(xe,"click",e[7]),p(_e,"click",pe),p(bs,"click",e[8])],Ns=!0)},p(e,t){e[0].length>0?Ds?Ds.p(e,t):(Ds=Q(e),Ds.c(),Ds.m(R,j)):Ds&&(Ds.d(1),Ds=null),e[4].length>0?Bs?Bs.p(e,t):(Bs=te(e),Bs.c(),Bs.m(Ge,null)):Bs&&(Bs.d(1),Bs=null),"configurations"in e[1]?_s?_s.p(e,t):(_s=ne(e),_s.c(),_s.m(st,null)):_s&&(_s.d(1),_s=null),(!Is||8&t[0]&&ct!==(ct=e[3].Communication))&&h(He,"style",ct),e[6].length>0?xs?xs.p(e,t):(xs=ue(e),xs.c(),xs.m(wt,null)):xs&&(xs.d(1),xs=null),(!Is||8&t[0]&&ra!==(ra=e[3].Static))&&h(lt,"style",ra),(!Is||8&t[0]&&gs!==(gs=e[3]["Driving Simulation"]))&&h(oa,"style",gs)},i(e){Is||(N(a.$$.fragment,e),Is=!0)},o(e){S(a.$$.fragment,e),Is=!1},d(e){e&&o(t),D(a,e),e&&o(u),e&&o(m),e&&o(E),e&&o(y),e&&o(A),e&&o(C),e&&o(P),e&&o(O),e&&o(L),e&&o(R),Ds&&Ds.d(),e&&o(oe),e&&o(de),e&&o(he),e&&o(fe),e&&o(Ee),e&&o(ye),Bs&&Bs.d(),_s&&_s.d(),xs&&xs.d(),e&&o(ps),e&&o(Es),e&&o(ys),e&&o(bs),e&&o(ws),e&&o(Ts),Ns=!1,B(Ss)}}}function pe(){let e=this.firstChild.innerText;var t,a,s;for(a=document.getElementsByClassName("city"),t=0;t<a.length;t++)a[t].style.display="none";for(s=document.getElementsByClassName("tablink"),t=0;t<a.length;t++)s[t].className=s[t].className.replace(" w3-border-red","");document.getElementById(e).style.display="block",this.firstChild.className+=" w3-border-red"}function Ee(e,t,a){let s=[],c={},n=!1,l="Communication";const r=U.subscribe((e=>{a(0,s=e)})),i=L.subscribe((e=>{a(1,c=e)})),o=R.subscribe((e=>{n=e})),d=j.subscribe((e=>{l=e}));let h;_((()=>{r(),i(),o(),d()}));let f={Communication:"display:block",Static:"display:none","Driving Simulation":"display:none"},v=[{short_id:"123",name:"DoS Attack",ports:"8010"},{short_id:"1243",name:"Replay Attack",ports:"8020"},{short_id:"122",name:"MitM",ports:"8030"}],u={},m=[];function g(e){e?(a(1,c={}),a(1,c.ref=s[h]._id,c),a(1,c.name=s[h].name,c),a(1,c.configurations=[],c),L.set(c)):(a(1,c.configurations=[],c),L.set(c))}function p(){let e=!1;for(let t=0;t<s.length;t++)s[t].activated&&(e=!0);return e}return x((async()=>{!async function(e){n?P("/localservices",(function(t){let s=JSON.parse(t.response);s.data&&a(4,v=s.data),e()})):P("/containers",(function(t){let s=JSON.parse(t.response);s.data&&a(4,v=s.data),e()}))}((function(){if(s.length<1)P("/api/db1/scenarios",(function(e){let t=JSON.parse(e.response);if(t.data){for(let e=0;e<t.data.length;e++)t.data[e].activated=!1;U.set(t.data)}}));else if(Object.keys(c).length>0){let t=document.getElementById("scenarioConfigTable").getElementsByTagName("tr");for(var e=0;e<t.length;e++)""!=t.item(e).style.backgroundColor&&(t.item(e).lastElementChild.firstElementChild.firstElementChild.firstElementChild.click(),e=t.length)}})),async function(){P("/staticfiles",(function(e){let t=JSON.parse(e.response);t.data&&a(6,m=t.data)}))}()})),[s,c,h,f,v,u,m,async function(){j.set(this.innerText);for(let s in f)s==this.innerText?a(3,f[s]="display:block",f):a(3,f[s]="display:none",f);g(!1);let e=document.getElementById("selectContainers").getElementsByTagName("tr").length;for(var t=0;t<e;t++)a(5,u[t]="",u)},async function(){if(!p())return void O.danger("please create and activate a scenario first.");let e="/api/db1/scenario_configurations",t="POST";if("_id"in c&&(t="PUT",e="/api/db1/scenario_configurations/"+c._id),"Static"==l){let e=function(){let e={},t=document.getElementById("static_datasets").childNodes,a=document.getElementById("static_attacks").getElementsByTagName("label"),s=document.getElementById("static_validation").getElementsByTagName("input");for(var c=0;c<t.length;c++)t[c].hasChildNodes()&&t[c].firstElementChild.checked&&(e.dataset=t[c].innerText);for(c=0;c<a.length;c++)a.item(c).firstElementChild.checked&&(e.attack=a.item(c).innerText);e.attack_samples=parseInt(document.getElementById("numberImages").value);let n=[];for(c=0;c<s.length;c++)s[c].checked&&n.push(s[c].nextElementSibling.firstElementChild.innerText);return e.validations=n,e}();if(isNaN(e.attack_samples)||parseInt(e.dataset.split(":")[1])<e.attack_samples){let t=e.dataset.split(":")[1];return void O.danger("Please enter a number between 0 and "+t)}c.type==l&&"_id"in c||a(1,c={name:s[h].name,ref:s[h]._id}),a(1,c.configurations=[e],c)}if("Driving Simulation"==l){let e=function(){let e={};e.driving_time=parseInt(document.getElementById("driving_time").value),e.driving_attack_time=parseInt(document.getElementById("driving_attack_time").value);let t=document.getElementById("driving_path").getElementsByTagName("label"),a=document.getElementById("driving_attacks").getElementsByTagName("label");for(var s=0;s<t.length;s++)t.item(s).firstElementChild.checked&&(e.driving_path=t.item(s).innerText);for(s=0;s<a.length;s++)a.item(s).firstElementChild.checked&&(e.driving_attacks=a.item(s).innerText);return e}();if(isNaN(e.driving_time)||isNaN(e.driving_attack_time))return void O.danger("Please provide autopilot duration and time to launch an attack");c.type==l&&"_id"in c||a(1,c={name:s[h].name,ref:s[h]._id}),a(1,c.configurations=[e],c)}a(1,c.type=l,c),V(e,t,c,(function(e){"POST"==t&&a(1,c._id=e.data,c),L.set(c),O.success("Configuration saved successfull.")}))},async function(){if(!p())return void O.danger("please create and activate a scenario first.");let e={},t=parseInt(this.getAttribute("index")),s=this.getAttribute("name"),l=this.getAttribute("port").split(",")[0].split("/")[0],r=this.querySelectorAll("input");for(let a=0;a<r.length;a++){let t=r[a],s=t.getAttribute("type"),c=t.getAttribute("key"),n=t.value;null==n&&(n=""),"submit"!=s&&("checkbox"==s?e[c]=t.checked:"list"==s?e[c]=n.split(","):t.hasAttribute("convert")?e[c]=Number(n):e[c]=n)}let i="/containers/"+s+"/"+l+"/configs",o="POST";n&&(i="/localservices/"+s+"/"+l+"/configs",o="PUT"),V(i,o,e,(function(s){a(1,c.configurations[t].configs=e,c),L.set(c),O.success("Configuration update successfull.")}))},function(){let e,t=this.parentElement.parentElement.parentElement.parentElement.getAttribute("index");for(let c=0;c<s.length;c++)c==t?(a(2,h=c),a(0,s[c].activated=!0,s),e=s[c]):a(0,s[c].activated=!1,s);U.set(s);for(let s of Object.keys(u))a(5,u[s]="",u);g(!0);let n="/api/db1/scenario_configurations/ref-"+e._id;P(n,(function(e){let t=JSON.parse(e.response);if(t.data&&t.data.length>0&&(a(1,c=t.data[0]),"type"in c)){if(function(e){let t=document.getElementById("selectConfigTabs").getElementsByTagName("div");for(var a=0;a<t.length;a++)t[a].innerText==e?t[a].classList.add("w3-border-red"):t[a].classList.remove("w3-border-red");j.set(e),document.getElementById("Communication").style.display="none",document.getElementById("Driving Simulation").style.display="none",document.getElementById("Static").style.display="none",document.getElementById(e).style.display="block"}(c.type),"Communication"==c.type){for(let e=0;e<v.length;e++){let t=e.toString();a(5,u[t]="",u);let s=v[e].short_id;for(let e=0;e<c.configurations.length;e++){s==c.configurations[e].container_info.short_id&&(a(5,u[t]="background-color: #acddb4;",u),e=c.configurations.length)}}L.set(c)}"Static"==c.type&&function(){let e=document.getElementById("static_datasets").childNodes,t=document.getElementById("static_attacks").getElementsByTagName("label"),a=document.getElementById("static_validation").getElementsByTagName("input");for(var s=0;s<e.length;s++)e[s].hasChildNodes()&&(e[s].innerText==c.configurations[0].dataset?e[s].firstElementChild.checked=!0:e[s].firstElementChild.checked=!1);for(s=0;s<t.length;s++)t.item(s).innerText==c.configurations[0].attack?t.item(s).firstElementChild.checked=!0:t.item(s).firstElementChild.checked=!1;document.getElementById("numberImages").value=c.configurations[0].attack_samples;for(s=0;s<a.length;s++){a[s].checked=!1;let e=c.configurations[0].validations;for(var n=0;n<e.length;n++)a[s].nextElementSibling.firstElementChild.innerText==e[n]&&(a[s].checked=!0)}}(),"Driving Simulation"==c.type&&function(){document.getElementById("driving_time").value=c.configurations[0].driving_time.toString(),document.getElementById("driving_attack_time").value=c.configurations[0].driving_attack_time.toString();let e=document.getElementById("driving_path").getElementsByTagName("label"),t=document.getElementById("driving_attacks").getElementsByTagName("input");for(var a=0;a<e.length;a++)e.item(a).innerText==c.configurations[0].driving_path?e.item(a).firstElementChild.checked=!0:e.item(a).firstElementChild.checked=!1;for(a=0;a<t.length;a++)t.item(a).innerText==c.configurations[0].driving_attacks?t.item(a).firstElementChild.checked=!0:t.item(a).firstElementChild.checked=!1}()}}))},function(){if(!p())return void O.danger("please create and activate a scenario first.");c.type!=l&&g(!1);let e=this.parentElement.parentElement.parentElement.parentElement.getAttribute("index");a(5,u[e]="background-color: #acddb4;",u);let t=v[parseInt(e)],s={},r=t.name,i=t.ports.split(",")[0].split("/")[0],o="/containers/"+r+"/"+i+"/configs";n&&(o="/localservices/"+r+"/"+i+"/configs"),P(o,(function(e){let n=JSON.parse(e.response);n.data&&"data"in n.data&&(s=n.data.data),c.configurations.length<1?a(1,c.configurations=[{container_info:t,configs:s}],c):c.configurations.push({container_info:t,configs:s}),L.set(c)}))},function(){if(!p())return void O.danger("please create and activate a scenario first.");let e=this.parentElement.parentElement.parentElement.parentElement.getAttribute("index");a(5,u[e]="",u);let t=v[parseInt(e)].short_id,s=-1;for(let a=0;a<c.configurations.length;a++)c.configurations[a].container_info.short_id==t&&(s=a,a=c.configurations.length);s>-1&&c.configurations.splice(s,1),L.set(c)},function(){let e=this.getAttribute("ref"),t=document.getElementById(e+"ID"),c=document.getElementById(e);if(""!=t.value&&""!=c.value){let e=!1,n=-1;for(let a=0;a<s.length;a++)s[a]._id==t.value&&(e=!0,n=a,a=s.length);if(!e)return void O.danger("scenario identifier does not exist.");let l="/api/db1/scenarios/"+t.value,r={name:c.value};V(l,"PUT",r,(function(e){a(0,s[n].name=c.value,s),U.set(s),O.success("Scenario renamed successfully.")}))}else O.danger("please provide scenario identifier and new name.")},function(){let e=!1,t=parseInt(this.parentElement.parentElement.parentElement.parentElement.getAttribute("index"));s[t].activated&&(e=!0);let n=s[t]._id;if(V("/api/db1/scenarios/"+n,"DELETE",{},(function(e){s.splice(t,1),U.set(s),O.success("Scenario deleted successfully.")})),V("/api/db1/scenario_configurations/ref-"+n,"DELETE",{},(function(e){O.success("Scenario configuration deleted successfully.")})),e){a(1,c={}),L.set(c);for(let e of Object.keys(u))a(5,u[e]="",u)}},function(){let e=this.getAttribute("ref");if(""!=e){let t=document.getElementById(e);if(""!=t.value){let e={name:t.value},a="/api/db1/scenarios";console.log("createNewScenario request with body:",e," and url:",a),V(a,"POST",e,(function(e){console.log(e,"response from createNewScenario"),s.push({_id:e.data,name:t.value,activated:!1}),U.set(s),O.success("New scenario created.")}))}else O.danger("please provide scenario name.")}}]}export default class extends e{constructor(e){super(),t(this,e,Ee,ge,a,{},[-1,-1])}}
  