(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const r of l)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function i(l){const r={};return l.integrity&&(r.integrity=l.integrity),l.referrerpolicy&&(r.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?r.credentials="include":l.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(l){if(l.ep)return;l.ep=!0;const r=i(l);fetch(l.href,r)}})();function N(){}function Ce(t){return t()}function fe(){return Object.create(null)}function H(t){t.forEach(Ce)}function Ee(t){return typeof t=="function"}function K(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function De(t){return Object.keys(t).length===0}function a(t,e){t.appendChild(e)}function E(t,e,i){t.insertBefore(e,i||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function we(t,e){for(let i=0;it.removeEventListener(e,i,n)}function m(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}function Te(t){return Array.from(t.childNodes)}function R(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function U(t,e){t.value=e==null?"":e}function O(t,e,i,n){i===null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function de(t,e){for(let i=0;i{const l=t.$$.callbacks[e];if(l){const r=Me(e,i,{cancelable:n});return l.slice().forEach(s=>{s.call(t,r)}),!r.defaultPrevented}return!0}}const Q=[],me=[],ne=[],_e=[],Ie=Promise.resolve();let ce=!1;function Pe(){ce||(ce=!0,Ie.then(Ae))}function le(t){ne.push(t)}const se=new Set;let te=0;function Ae(){const t=W;do{for(;te{ie.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function X(t){t&&t.c()}function G(t,e,i,n){const{fragment:l,after_update:r}=t.$$;l&&l.m(e,i),n||le(()=>{const s=t.$$.on_mount.map(Ce).filter(Ee);t.$$.on_destroy?t.$$.on_destroy.push(...s):H(s),t.$$.on_mount=[]}),r.forEach(le)}function J(t,e){const i=t.$$;i.fragment!==null&&(H(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function He(t,e){t.$$.dirty[0]===-1&&(Q.push(t),Pe(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const v=b.length?b[0]:_;return u.ctx&&l(u.ctx[f],u.ctx[f]=v)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](v),p&&He(t,f)),_}):[],u.update(),p=!0,H(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){const f=Te(e.target);u.fragment&&u.fragment.l(f),f.forEach(C)}else u.fragment&&u.fragment.c();e.intro&&w(t.$$.fragment),G(t,e.target,e.anchor,e.customElement),Ae()}V(o)}class Z{$destroy(){J(this,1),this.$destroy=N}$on(e,i){if(!Ee(i))return N;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const l=n.indexOf(i);l!==-1&&n.splice(l,1)}}$set(e){this.$$set&&!De(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function qe(t){let e,i,n,l,r;return{c(){e=d("i"),e.textContent="close",i=T(),n=d("i"),n.textContent="construction",m(e,"class","action-icon svelte-k7xnb2"),O(e,"cursor","pointer"),m(n,"class","action-icon svelte-k7xnb2"),O(n,"cursor","pointer")},m(s,c){E(s,e,c),E(s,i,c),E(s,n,c),l||(r=[L(e,"click",t[4]),L(n,"click",t[5])],l=!0)},p:N,d(s){s&&C(e),s&&C(i),s&&C(n),l=!1,H(r)}}}function je(t){let e,i,n;return{c(){e=d("i"),e.textContent="save",m(e,"class","action-icon svelte-k7xnb2"),O(e,"cursor","pointer")},m(l,r){E(l,e,r),i||(n=L(e,"click",t[6]),i=!0)},p:N,d(l){l&&C(e),i=!1,n()}}}function Be(t){let e,i,n,l,r;return{c(){e=d("div"),i=d("span"),n=d("input"),m(n,"type","text"),m(n,"class","site-input svelte-k7xnb2"),m(e,"class","site-data site-domain svelte-k7xnb2")},m(s,c){E(s,e,c),a(e,i),a(i,n),U(n,t[0].domain),l||(r=[L(n,"input",t[8]),L(e,"click",t[9])],l=!0)},p(s,c){c&1&&n.value!==s[0].domain&&U(n,s[0].domain)},d(s){s&&C(e),l=!1,H(r)}}}function ze(t){let e,i,n=t[0].domain+"",l,r,s;return{c(){e=d("div"),i=d("span"),l=P(n),m(e,"class","site-data site-domain svelte-k7xnb2")},m(c,o){E(c,e,o),a(e,i),a(i,l),r||(s=L(e,"click",t[7]),r=!0)},p(c,o){o&1&&n!==(n=c[0].domain+"")&&R(l,n)},d(c){c&&C(e),r=!1,s()}}}function Fe(t){let e,i,n,l,r,s;return{c(){e=d("select"),i=d("option"),i.textContent=`Development `,n=d("option"),n.textContent=`Staging `,l=d("option"),l.textContent="Production",i.__value="Development",i.value=i.__value,n.__value="Staging",n.value=n.__value,l.__value="Production",l.value=l.__value,m(e,"class","site-input svelte-k7xnb2"),t[0].siteType===void 0&&le(()=>t[10].call(e))},m(c,o){E(c,e,o),a(e,i),a(e,n),a(e,l),de(e,t[0].siteType),r||(s=[L(e,"change",t[10]),L(e,"change",t[11])],r=!0)},p(c,o){o&1&&de(e,c[0].siteType)},d(c){c&&C(e),r=!1,H(s)}}}function Re(t){let e,i,n=t[0].siteType+"",l;return{c(){e=d("div"),i=d("span"),l=P(n),m(e,"class","site-data")},m(r,s){E(r,e,s),a(e,i),a(i,l)},p(r,s){s&1&&n!==(n=r[0].siteType+"")&&R(l,n)},d(r){r&&C(e)}}}function pe(t){let e;function i(r,s){return r[1]?Ue:Ke}let n=i(t),l=n(t);return{c(){l.c(),e=re()},m(r,s){l.m(r,s),E(r,e,s)},p(r,s){n===(n=i(r))&&l?l.p(r,s):(l.d(1),l=n(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){l.d(r),r&&C(e)}}}function Ue(t){let e,i,n,l,r,s,c,o,u,p=t[0].createdDate+"",f,_,b;return{c(){e=d("div"),i=d("div"),n=d("span"),l=P("UrlAddress: "),r=d("input"),s=T(),c=d("div"),o=d("span"),u=P("Created date: "),f=P(p),m(r,"type","text"),m(r,"class","site-input svelte-k7xnb2"),m(i,"class","site-text svelte-k7xnb2"),m(c,"class","site-text svelte-k7xnb2"),m(e,"class","row site-display svelte-k7xnb2")},m(v,S){E(v,e,S),a(e,i),a(i,n),a(n,l),a(n,r),U(r,t[0].urlAddress),a(e,s),a(e,c),a(c,o),a(o,u),a(o,f),_||(b=L(r,"input",t[12]),_=!0)},p(v,S){S&1&&r.value!==v[0].urlAddress&&U(r,v[0].urlAddress),S&1&&p!==(p=v[0].createdDate+"")&&R(f,p)},d(v){v&&C(e),_=!1,b()}}}function Ke(t){let e,i,n,l,r=t[0].urlAddress+"",s,c,o,u,p,f=t[0].createdDate+"",_;return{c(){e=d("div"),i=d("div"),n=d("span"),l=P("UrlAddress: "),s=P(r),c=T(),o=d("div"),u=d("span"),p=P("Created date: "),_=P(f),m(i,"class","site-text svelte-k7xnb2"),m(o,"class","site-text svelte-k7xnb2"),m(e,"class","row site-display svelte-k7xnb2")},m(b,v){E(b,e,v),a(e,i),a(i,n),a(n,l),a(n,s),a(e,c),a(e,o),a(o,u),a(u,p),a(u,_)},p(b,v){v&1&&r!==(r=b[0].urlAddress+"")&&R(s,r),v&1&&f!==(f=b[0].createdDate+"")&&R(_,f)},d(b){b&&C(e)}}}function Ge(t){let e,i,n,l,r,s,c,o;function u(g,D){return g[1]?je:qe}let p=u(t),f=p(t);function _(g,D){return g[1]?Be:ze}let b=_(t),v=b(t);function S(g,D){return g[1]?Fe:Re}let h=S(t),y=h(t),k=t[2]&&pe(t);return{c(){e=d("div"),i=d("div"),n=d("div"),f.c(),l=T(),r=d("div"),v.c(),s=T(),c=d("div"),y.c(),o=T(),k&&k.c(),m(n,"class","col"),O(n,"display","flex"),m(r,"class","col no-margin svelte-k7xnb2"),m(c,"class","col"),m(i,"class","row site-row svelte-k7xnb2"),m(e,"class","site-item svelte-k7xnb2")},m(g,D){E(g,e,D),a(e,i),a(i,n),f.m(n,null),a(i,l),a(i,r),v.m(r,null),a(i,s),a(i,c),y.m(c,null),a(e,o),k&&k.m(e,null)},p(g,[D]){p===(p=u(g))&&f?f.p(g,D):(f.d(1),f=p(g),f&&(f.c(),f.m(n,null))),b===(b=_(g))&&v?v.p(g,D):(v.d(1),v=b(g),v&&(v.c(),v.m(r,null))),h===(h=S(g))&&y?y.p(g,D):(y.d(1),y=h(g),y&&(y.c(),y.m(c,null))),g[2]?k?k.p(g,D):(k=pe(g),k.c(),k.m(e,null)):k&&(k.d(1),k=null)},i:N,o:N,d(g){g&&C(e),f.d(),v.d(),y.d(),k&&k.d()}}}function Je(t,e,i){let{site:n}=e,l=!1,r=!1;const s=y=>{if(y=="domain"){if(l)return;i(2,r=!r)}},c=Se();function o(){c("removed",{id:n.id})}function u(){i(1,l=!l),l&&!r&&i(2,r=!0),c("edit",{id:n.id})}function p(){console.log(n),c("save",{id:n.id,site:n}),i(1,l=!1)}const f=()=>s("domain");function _(){n.domain=this.value,i(0,n)}const b=()=>s("domain");function v(){n.siteType=xe(this),i(0,n)}const S=()=>answer="";function h(){n.urlAddress=this.value,i(0,n)}return t.$$set=y=>{"site"in y&&i(0,n=y.site)},[n,l,r,s,o,u,p,f,_,b,v,S,h]}class Qe extends Z{constructor(e){super(),Y(this,e,Je,Ge,K,{site:0})}}function ve(t,e,i){const n=t.slice();return n[5]=e[i],n}function Ve(t){let e;return{c(){e=d("div"),e.innerHTML="
The site list is empty.
",m(e,"class","no-sites-display svelte-14ayx1a")},m(i,n){E(i,e,n)},p:N,i:N,o:N,d(i){i&&C(e)}}}function We(t){let e,i,n=t[0].sites,l=[];for(let s=0;sx(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s0?0:1}return o=S(t),u=v[o]=b[o](t),{c(){e=d("div"),i=d("div"),n=d("div"),n.innerHTML='

Sites

',l=T(),r=d("div"),r.innerHTML="
Add new site
",s=T(),c=d("div"),u.c(),m(n,"class","col"),m(r,"class","col new-site-button-section svelte-14ayx1a"),O(r,"cursor","pointer"),m(i,"class","row"),m(c,"class","site-manager-container svelte-14ayx1a"),m(e,"class","site-container svelte-14ayx1a"),O(e,"text-align","left")},m(h,y){E(h,e,y),a(e,i),a(i,n),a(i,l),a(i,r),a(e,s),a(e,c),v[o].m(c,null),p=!0,f||(_=L(r,"click",t[3]),f=!0)},p(h,[y]){let k=o;o=S(h),o===k?v[o].p(h,y):(j(),x(v[k],1,1,()=>{v[k]=null}),B(),u=v[o],u?u.p(h,y):(u=v[o]=b[o](h),u.c()),w(u,1),u.m(c,null))},i(h){p||(w(u),p=!0)},o(h){x(u),p=!1},d(h){h&&C(e),v[o].d(),f=!1,_()}}}function Ye(t,e,i){let{environment:n}=e;const l=Se();function r(o){const u=o.detail.id;l("removed",{id:u})}function s(o){const u=o.detail.id;l("edit",{id:u,site:o.detail.site})}const c=()=>{};return t.$$set=o=>{"environment"in o&&i(0,n=o.environment)},[n,r,s,c]}class Ne extends Z{constructor(e){super(),Y(this,e,Ye,Xe,K,{environment:0})}}function he(t){let e,i,n;return i=new Ne({props:{environment:t[0]}}),{c(){e=d("div"),X(i.$$.fragment),m(e,"class","environment-data")},m(l,r){E(l,e,r),G(i,e,null),n=!0},p(l,r){const s={};r&1&&(s.environment=l[0]),i.$set(s)},i(l){n||(w(i.$$.fragment,l),n=!0)},o(l){x(i.$$.fragment,l),n=!1},d(l){l&&C(e),J(i)}}}function Ze(t){let e,i,n,l,r=t[0].environmentName+"",s,c,o,u,p,f=t[1]&&he(t);return{c(){e=d("div"),i=d("div"),n=d("div"),l=d("h4"),s=P(r),c=T(),f&&f.c(),O(l,"cursor","pointer"),m(n,"class","actual-data"),m(i,"class","environment-data"),m(e,"class","environment-item svelte-vhp27k")},m(_,b){E(_,e,b),a(e,i),a(i,n),a(n,l),a(l,s),a(e,c),f&&f.m(e,null),o=!0,u||(p=L(l,"click",t[2]),u=!0)},p(_,[b]){(!o||b&1)&&r!==(r=_[0].environmentName+"")&&R(s,r),_[1]?f?(f.p(_,b),b&2&&w(f,1)):(f=he(_),f.c(),w(f,1),f.m(e,null)):f&&(j(),x(f,1,1,()=>{f=null}),B())},i(_){o||(w(f),o=!0)},o(_){x(f),o=!1},d(_){_&&C(e),f&&f.d(),u=!1,p()}}}function et(t,e,i){let{environment:n}=e,l=!1;const r=()=>{i(1,l=!l)};return t.$$set=s=>{"environment"in s&&i(0,n=s.environment)},[n,l,r]}class tt extends Z{constructor(e){super(),Y(this,e,et,Ze,K,{environment:0})}}function ge(t,e,i){const n=t.slice();return n[1]=e[i],n}function nt(t){return{c:N,m:N,p:N,i:N,o:N,d:N}}function it(t){let e,i,n=t[0],l=[];for(let s=0;sx(l[s],1,1,()=>{l[s]=null});return{c(){e=d("div");for(let s=0;s0?0:1}return e=c(t),i=s[e]=r[e](t),{c(){i.c(),n=re()},m(o,u){s[e].m(o,u),E(o,n,u),l=!0},p(o,[u]){let p=e;e=c(o),e===p?s[e].p(o,u):(j(),x(s[p],1,1,()=>{s[p]=null}),B(),i=s[e],i?i.p(o,u):(i=s[e]=r[e](o),i.c()),w(i,1),i.m(n.parentNode,n))},i(o){l||(w(i),l=!0)},o(o){x(i),l=!1},d(o){s[e].d(o),o&&C(n)}}}function rt(t,e,i){let{environments:n}=e;return t.$$set=l=>{"environments"in l&&i(0,n=l.environments)},[n]}class st extends Z{constructor(e){super(),Y(this,e,rt,lt,K,{environments:0})}}const F=[];function ue(t,e=N){let i;const n=new Set;function l(c){if(K(t,c)&&(t=c,i)){const o=!F.length;for(const u of n)u[1](),F.push(u,t);if(o){for(let u=0;u{n.delete(u),n.size===0&&(i(),i=null)}}return{set:l,update:r,subscribe:s}}const ot=ue([{id:0,urlAddress:"https://localhost:7022",domain:"dev.example1.com",createdDate:new Date().toDateString(),siteType:"Development"},{id:1,urlAddress:"https://localhost:7022",domain:"stage.example1.com",createdDate:new Date().toDateString(),siteType:"Staging"},{id:2,urlAddress:"https://localhost:7022",domain:"prod.example1.com",createdDate:new Date().toDateString(),siteType:"Production"}]),ye=ue([]),oe=ue({environmentName:"My Environment",sites:[]});function ct(t){let e;return{c(){e=d("div"),e.innerHTML="

The environment list is empty.

",m(e,"class","no-environments-diplay svelte-r2bb58")},m(i,n){E(i,e,n)},p:N,i:N,o:N,d(i){i&&C(e)}}}function ut(t){let e,i,n,l;return n=new st({props:{environments:t[0]}}),{c(){e=d("h4"),e.textContent="Environments",i=T(),X(n.$$.fragment)},m(r,s){E(r,e,s),E(r,i,s),G(n,r,s),l=!0},p(r,s){const c={};s&1&&(c.environments=r[0]),n.$set(c)},i(r){l||(w(n.$$.fragment,r),l=!0)},o(r){x(n.$$.fragment,r),l=!1},d(r){r&&C(e),r&&C(i),J(n,r)}}}function $e(t){let e,i,n,l,r,s,c,o,u,p,f,_,b,v,S,h,y,k,g,D,z,A,$,I;return h=new Ne({props:{environment:t[1]}}),h.$on("removed",t[6]),{c(){e=d("div"),i=d("nav"),n=d("button"),n.innerHTML="close",l=T(),r=d("div"),s=d("div"),s.innerHTML="

Environment Setup

",c=T(),o=d("div"),u=d("div"),p=d("input"),f=T(),_=d("label"),_.textContent="Environment Name",b=T(),v=d("span"),v.textContent="Please type the environment name.",S=T(),X(h.$$.fragment),y=T(),k=d("div"),g=d("button"),g.textContent="Create",D=T(),z=d("button"),z.textContent="Reset",m(n,"data-ui","#modal"),m(n,"class","square round flat close-button"),m(i,"class","right-align"),m(s,"class","form-title"),m(p,"type","text"),m(p,"id","envName"),m(p,"name","envName"),m(p,"class","text-white"),O(p,"clip-path","polygon(0% 0%, 12rem 0%, 12rem 8rem, 49rem 8rem, 49rem 0%, 100% 0%, 100% 100%, 0% 100%)"),m(_,"for","envName"),m(_,"class","active text-white"),m(v,"class","helper text-white"),m(u,"class","field label border"),m(k,"class","buttons-area"),O(k,"margin-top","30px"),m(r,"class","modal-content svelte-r2bb58"),m(e,"class","modal")},m(M,ee){E(M,e,ee),a(e,i),a(i,n),a(e,l),a(e,r),a(r,s),a(r,c),a(r,o),a(o,u),a(u,p),U(p,t[1].environmentName),a(u,f),a(u,_),a(u,b),a(u,v),a(r,S),G(h,r,null),a(r,y),a(r,k),a(k,g),a(k,D),a(k,z),A=!0,$||(I=[L(n,"click",t[5]),L(p,"input",t[7]),L(g,"click",t[4])],$=!0)},p(M,ee){ee&2&&p.value!==M[1].environmentName&&U(p,M[1].environmentName);const ae={};ee&2&&(ae.environment=M[1]),h.$set(ae)},i(M){A||(w(h.$$.fragment,M),A=!0)},o(M){x(h.$$.fragment,M),A=!1},d(M){M&&C(e),J(h),$=!1,H(I)}}}function at(t){let e,i,n,l,r,s,c,o,u,p,f,_,b,v,S,h,y,k;const g=[ut,ct],D=[];function z($,I){return $[0]&&$[0].length&&$[0].length>0?0:1}_=z(t),b=D[_]=g[_](t);let A=t[2]&&$e(t);return{c(){e=d("div"),i=d("div"),n=d("div"),l=d("button"),l.textContent="Create Environment",r=T(),s=d("button"),s.textContent="Standalone Sites",c=T(),o=d("button"),o.textContent="Apache Manager",u=T(),p=d("div"),f=d("div"),b.c(),v=T(),A&&A.c(),S=re(),m(l,"class","env-button primary svelte-r2bb58"),m(s,"class","env-button primary svelte-r2bb58"),m(o,"class","env-button primary svelte-r2bb58"),m(n,"class","actions-menu svelte-r2bb58"),m(i,"class","col"),m(f,"class","col"),O(f,"width","100%"),m(p,"class","environments-container svelte-r2bb58"),m(e,"class","page-container svelte-r2bb58")},m($,I){E($,e,I),a(e,i),a(i,n),a(n,l),a(n,r),a(n,s),a(n,c),a(n,o),a(e,u),a(e,p),a(p,f),D[_].m(f,null),E($,v,I),A&&A.m($,I),E($,S,I),h=!0,y||(k=L(l,"click",t[3]),y=!0)},p($,[I]){let M=_;_=z($),_===M?D[_].p($,I):(j(),x(D[M],1,1,()=>{D[M]=null}),B(),b=D[_],b?b.p($,I):(b=D[_]=g[_]($),b.c()),w(b,1),b.m(f,null)),$[2]?A?(A.p($,I),I&4&&w(A,1)):(A=$e($),A.c(),w(A,1),A.m(S.parentNode,S)):A&&(j(),x(A,1,1,()=>{A=null}),B())},i($){h||(w(b),w(A),h=!0)},o($){x(b),x(A),h=!1},d($){$&&C(e),D[_].d(),$&&C(v),A&&A.d($),$&&C(S),y=!1,k()}}}function ft(t,e,i){let n=[],l;ye.subscribe(_=>{i(0,n=_)}),oe.subscribe(_=>{i(1,l=_)});let r=!1,s=[];ot.subscribe(_=>{s=_});const c=()=>{oe.set({environmentName:"My Environment",sites:s||[]}),i(2,r=!0)},o=()=>{i(2,r=!1),ye.set([...n,l])},u=()=>{i(2,r=!1)},p=_=>{const b=_.detail.id,v=l.sites.filter(S=>S.id!==b);i(1,l.sites=v,l),oe.set(l)};function f(){l.environmentName=this.value,i(1,l)}return[n,l,r,c,o,u,p,f]}class dt extends Z{constructor(e){super(),Y(this,e,ft,at,K,{})}}new dt({target:document.getElementById("app")}); //# sourceMappingURL=envs.js.map