(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 O(t){t.forEach(Ce)}function Ee(t){return typeof t=="function"}function U(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 w(t,e,i){t.insertBefore(e,i||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function we(t,e){for(let i=0;it.removeEventListener(e,i,n)}function _(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 F(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e){t.value=e==null?"":e}function P(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=Le(e,i,{cancelable:n});return l.slice().forEach(s=>{s.call(t,r)}),!r.defaultPrevented}return!0}}const J=[],me=[],te=[],_e=[],Ie=Promise.resolve();let oe=!1;function Pe(){oe||(oe=!0,Ie.then(Ne))}function ie(t){te.push(t)}const re=new Set;let ee=0;function Ne(){const t=V;do{for(;ee{ne.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function W(t){t&&t.c()}function K(t,e,i,n){const{fragment:l,after_update:r}=t.$$;l&&l.m(e,i),n||ie(()=>{const s=t.$$.on_mount.map(Ce).filter(Ee);t.$$.on_destroy?t.$$.on_destroy.push(...s):O(s),t.$$.on_mount=[]}),r.forEach(ie)}function G(t,e){const i=t.$$;i.fragment!==null&&(O(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&&(J.push(t),Pe(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const p=h.length?h[0]:v;return u.ctx&&l(u.ctx[f],u.ctx[f]=p)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](p),m&&He(t,f)),v}):[],u.update(),m=!0,O(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(E)}else u.fragment&&u.fragment.c();e.intro&&S(t.$$.fragment),K(t,e.target,e.anchor,e.customElement),Ne()}Q(o)}class Y{$destroy(){G(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=D(),n=d("i"),n.textContent="construction",_(e,"class","action-icon svelte-k7xnb2"),P(e,"cursor","pointer"),_(n,"class","action-icon svelte-k7xnb2"),P(n,"cursor","pointer")},m(s,c){w(s,e,c),w(s,i,c),w(s,n,c),l||(r=[L(e,"click",t[4]),L(n,"click",t[5])],l=!0)},p:N,d(s){s&&E(e),s&&E(i),s&&E(n),l=!1,O(r)}}}function je(t){let e,i,n;return{c(){e=d("i"),e.textContent="save",_(e,"class","action-icon svelte-k7xnb2"),P(e,"cursor","pointer")},m(l,r){w(l,e,r),i||(n=L(e,"click",t[6]),i=!0)},p:N,d(l){l&&E(e),i=!1,n()}}}function Be(t){let e,i,n,l,r;return{c(){e=d("div"),i=d("span"),n=d("input"),_(n,"type","text"),_(n,"class","site-input svelte-k7xnb2"),_(e,"class","site-data site-domain svelte-k7xnb2")},m(s,c){w(s,e,c),a(e,i),a(i,n),R(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&&R(n,s[0].domain)},d(s){s&&E(e),l=!1,O(r)}}}function ze(t){let e,i,n=t[0].domain+"",l,r,s;return{c(){e=d("div"),i=d("span"),l=M(n),_(e,"class","site-data site-domain svelte-k7xnb2")},m(c,o){w(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+"")&&F(l,n)},d(c){c&&E(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,_(e,"class","site-input svelte-k7xnb2"),t[0].siteType===void 0&&ie(()=>t[10].call(e))},m(c,o){w(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&&E(e),r=!1,O(s)}}}function Re(t){let e,i,n=t[0].siteType+"",l;return{c(){e=d("div"),i=d("span"),l=M(n),_(e,"class","site-data")},m(r,s){w(r,e,s),a(e,i),a(i,l)},p(r,s){s&1&&n!==(n=r[0].siteType+"")&&F(l,n)},d(r){r&&E(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=le()},m(r,s){l.m(r,s),w(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&&E(e)}}}function Ue(t){let e,i,n,l,r,s,c,o,u,m=t[0].createdDate+"",f,v,h;return{c(){e=d("div"),i=d("div"),n=d("span"),l=M("UrlAddress: "),r=d("input"),s=D(),c=d("div"),o=d("span"),u=M("Created date: "),f=M(m),_(r,"type","text"),_(r,"class","site-input svelte-k7xnb2"),_(i,"class","site-text svelte-k7xnb2"),_(c,"class","site-text svelte-k7xnb2"),_(e,"class","row site-display svelte-k7xnb2")},m(p,A){w(p,e,A),a(e,i),a(i,n),a(n,l),a(n,r),R(r,t[0].urlAddress),a(e,s),a(e,c),a(c,o),a(o,u),a(o,f),v||(h=L(r,"input",t[12]),v=!0)},p(p,A){A&1&&r.value!==p[0].urlAddress&&R(r,p[0].urlAddress),A&1&&m!==(m=p[0].createdDate+"")&&F(f,m)},d(p){p&&E(e),v=!1,h()}}}function Ke(t){let e,i,n,l,r=t[0].urlAddress+"",s,c,o,u,m,f=t[0].createdDate+"",v;return{c(){e=d("div"),i=d("div"),n=d("span"),l=M("UrlAddress: "),s=M(r),c=D(),o=d("div"),u=d("span"),m=M("Created date: "),v=M(f),_(i,"class","site-text svelte-k7xnb2"),_(o,"class","site-text svelte-k7xnb2"),_(e,"class","row site-display svelte-k7xnb2")},m(h,p){w(h,e,p),a(e,i),a(i,n),a(n,l),a(n,s),a(e,c),a(e,o),a(o,u),a(u,m),a(u,v)},p(h,p){p&1&&r!==(r=h[0].urlAddress+"")&&F(s,r),p&1&&f!==(f=h[0].createdDate+"")&&F(v,f)},d(h){h&&E(e)}}}function Ge(t){let e,i,n,l,r,s,c,o;function u(y,k){return y[1]?je:qe}let m=u(t),f=m(t);function v(y,k){return y[1]?Be:ze}let h=v(t),p=h(t);function A(y,k){return y[1]?Fe:Re}let g=A(t),$=g(t),b=t[2]&&pe(t);return{c(){e=d("div"),i=d("div"),n=d("div"),f.c(),l=D(),r=d("div"),p.c(),s=D(),c=d("div"),$.c(),o=D(),b&&b.c(),_(n,"class","col"),P(n,"display","flex"),_(r,"class","col no-margin svelte-k7xnb2"),_(c,"class","col"),_(i,"class","row site-row svelte-k7xnb2"),_(e,"class","site-item svelte-k7xnb2")},m(y,k){w(y,e,k),a(e,i),a(i,n),f.m(n,null),a(i,l),a(i,r),p.m(r,null),a(i,s),a(i,c),$.m(c,null),a(e,o),b&&b.m(e,null)},p(y,[k]){m===(m=u(y))&&f?f.p(y,k):(f.d(1),f=m(y),f&&(f.c(),f.m(n,null))),h===(h=v(y))&&p?p.p(y,k):(p.d(1),p=h(y),p&&(p.c(),p.m(r,null))),g===(g=A(y))&&$?$.p(y,k):($.d(1),$=g(y),$&&($.c(),$.m(c,null))),y[2]?b?b.p(y,k):(b=pe(y),b.c(),b.m(e,null)):b&&(b.d(1),b=null)},i:N,o:N,d(y){y&&E(e),f.d(),p.d(),$.d(),b&&b.d()}}}function Je(t,e,i){let{site:n}=e,l=!1,r=!1;const s=$=>{if($=="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 m(){console.log(n),c("save",{id:n.id,site:n}),i(1,l=!1)}const f=()=>s("domain");function v(){n.domain=this.value,i(0,n)}const h=()=>s("domain");function p(){n.siteType=xe(this),i(0,n)}const A=()=>answer="";function g(){n.urlAddress=this.value,i(0,n)}return t.$$set=$=>{"site"in $&&i(0,n=$.site)},[n,l,r,s,o,u,m,f,v,h,p,A,g]}class Qe extends Y{constructor(e){super(),X(this,e,Je,Ge,U,{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.
",_(e,"class","no-sites-display svelte-14ayx1a")},m(i,n){w(i,e,n)},p:N,i:N,o:N,d(i){i&&E(e)}}}function We(t){let e,i,n=t[0].sites,l=[];for(let s=0;sT(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s0?0:1}return o=A(t),u=p[o]=h[o](t),{c(){e=d("div"),i=d("div"),n=d("div"),n.innerHTML='

Sites

',l=D(),r=d("div"),r.innerHTML="
Add new site
",s=D(),c=d("div"),u.c(),_(n,"class","col"),_(r,"class","col new-site-button-section svelte-14ayx1a"),P(r,"cursor","pointer"),_(i,"class","row"),_(c,"class","site-manager-container svelte-14ayx1a"),_(e,"class","site-container svelte-14ayx1a"),P(e,"text-align","left")},m(g,$){w(g,e,$),a(e,i),a(i,n),a(i,l),a(i,r),a(e,s),a(e,c),p[o].m(c,null),m=!0,f||(v=L(r,"click",t[3]),f=!0)},p(g,[$]){let b=o;o=A(g),o===b?p[o].p(g,$):(j(),T(p[b],1,1,()=>{p[b]=null}),B(),u=p[o],u?u.p(g,$):(u=p[o]=h[o](g),u.c()),S(u,1),u.m(c,null))},i(g){m||(S(u),m=!0)},o(g){T(u),m=!1},d(g){g&&E(e),p[o].d(),f=!1,v()}}}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 Ae extends Y{constructor(e){super(),X(this,e,Ye,Xe,U,{environment:0})}}function be(t){let e,i,n;return i=new Ae({props:{environment:t[0]}}),{c(){e=d("div"),W(i.$$.fragment),_(e,"class","environment-data")},m(l,r){w(l,e,r),K(i,e,null),n=!0},p(l,r){const s={};r&1&&(s.environment=l[0]),i.$set(s)},i(l){n||(S(i.$$.fragment,l),n=!0)},o(l){T(i.$$.fragment,l),n=!1},d(l){l&&E(e),G(i)}}}function Ze(t){let e,i,n,l,r=t[0].environmentName+"",s,c,o,u,m,f=t[1]&&be(t);return{c(){e=d("div"),i=d("div"),n=d("div"),l=d("h4"),s=M(r),c=D(),f&&f.c(),P(l,"cursor","pointer"),_(n,"class","actual-data"),_(i,"class","environment-data"),_(e,"class","environment-item svelte-vhp27k")},m(v,h){w(v,e,h),a(e,i),a(i,n),a(n,l),a(l,s),a(e,c),f&&f.m(e,null),o=!0,u||(m=L(l,"click",t[2]),u=!0)},p(v,[h]){(!o||h&1)&&r!==(r=v[0].environmentName+"")&&F(s,r),v[1]?f?(f.p(v,h),h&2&&S(f,1)):(f=be(v),f.c(),S(f,1),f.m(e,null)):f&&(j(),T(f,1,1,()=>{f=null}),B())},i(v){o||(S(f),o=!0)},o(v){T(f),o=!1},d(v){v&&E(e),f&&f.d(),u=!1,m()}}}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 Y{constructor(e){super(),X(this,e,et,Ze,U,{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;sT(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=le()},m(o,u){s[e].m(o,u),w(o,n,u),l=!0},p(o,[u]){let m=e;e=c(o),e===m?s[e].p(o,u):(j(),T(s[m],1,1,()=>{s[m]=null}),B(),i=s[e],i?i.p(o,u):(i=s[e]=r[e](o),i.c()),S(i,1),i.m(n.parentNode,n))},i(o){l||(S(i),l=!0)},o(o){T(i),l=!1},d(o){s[e].d(o),o&&E(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 Y{constructor(e){super(),X(this,e,rt,lt,U,{environments:0})}}const z=[];function ce(t,e=N){let i;const n=new Set;function l(c){if(U(t,c)&&(t=c,i)){const o=!z.length;for(const u of n)u[1](),z.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=ce([{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=ce([]),se=ce({environmentName:"My Environment",sites:[]});function ct(t){let e;return{c(){e=d("div"),e.innerHTML="

The environment list is empty.

",_(e,"class","no-environments-diplay svelte-r2bb58")},m(i,n){w(i,e,n)},p:N,i:N,o:N,d(i){i&&E(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=D(),W(n.$$.fragment)},m(r,s){w(r,e,s),w(r,i,s),K(n,r,s),l=!0},p(r,s){const c={};s&1&&(c.environments=r[0]),n.$set(c)},i(r){l||(S(n.$$.fragment,r),l=!0)},o(r){T(n.$$.fragment,r),l=!1},d(r){r&&E(e),r&&E(i),G(n,r)}}}function $e(t){let e,i,n,l,r,s,c,o,u,m,f,v,h,p,A,g,$,b,y,k,C,x,H,ue;return g=new Ae({props:{environment:t[1]}}),g.$on("removed",t[6]),{c(){e=d("div"),i=d("nav"),n=d("button"),n.innerHTML="close",l=D(),r=d("div"),s=d("div"),s.innerHTML="

Environment Setup

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