5 lines
19 KiB
JavaScript
5 lines
19 KiB
JavaScript
(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;i<t.length;i+=1)t[i]&&t[i].d(e)}function d(t){return document.createElement(t)}function M(t){return document.createTextNode(t)}function D(){return M(" ")}function le(){return M("")}function L(t,e,i,n){return t.addEventListener(e,i,n),()=>t.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<t.options.length;i+=1){const n=t.options[i];if(n.__value===e){n.selected=!0;return}}t.selectedIndex=-1}function xe(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Le(t,e,{bubbles:i=!1,cancelable:n=!1}={}){const l=document.createEvent("CustomEvent");return l.initCustomEvent(t,i,n,e),l}let V;function Q(t){V=t}function Me(){if(!V)throw new Error("Function called outside component initialization");return V}function Se(){const t=Me();return(e,i,{cancelable:n=!1}={})=>{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<J.length;){const e=J[ee];ee++,Q(e),Oe(e.$$)}for(Q(null),J.length=0,ee=0;me.length;)me.pop()();for(let e=0;e<te.length;e+=1){const i=te[e];re.has(i)||(re.add(i),i())}te.length=0}while(J.length);for(;_e.length;)_e.pop()();oe=!1,re.clear(),Q(t)}function Oe(t){if(t.fragment!==null){t.update(),O(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ie)}}const ne=new Set;let q;function j(){q={r:0,c:[],p:q}}function B(){q.r||O(q.c),q=q.p}function S(t,e){t&&t.i&&(ne.delete(t),t.i(e))}function T(t,e,i,n){if(t&&t.o){if(ne.has(t))return;ne.add(t),q.c.push(()=>{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<<e%31}function X(t,e,i,n,l,r,s,c=[-1]){const o=V;Q(t);const u=t.$$={fragment:null,ctx:[],props:r,update:N,not_equal:l,bound:fe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(o?o.$$.context:[])),callbacks:fe(),dirty:c,skip_bound:!1,root:e.target||o.$$.root};s&&s(u.root);let m=!1;if(u.ctx=i?i(t,e.props||{},(f,v,...h)=>{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="<h5>The site list is empty.</h5>",_(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;s<n.length;s+=1)l[s]=he(ve(t,n,s));const r=s=>T(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s<l.length;s+=1)l[s].c();e=le()},m(s,c){for(let o=0;o<l.length;o+=1)l[o].m(s,c);w(s,e,c),i=!0},p(s,c){if(c&7){n=s[0].sites;let o;for(o=0;o<n.length;o+=1){const u=ve(s,n,o);l[o]?(l[o].p(u,c),S(l[o],1)):(l[o]=he(u),l[o].c(),S(l[o],1),l[o].m(e.parentNode,e))}for(j(),o=n.length;o<l.length;o+=1)r(o);B()}},i(s){if(!i){for(let c=0;c<n.length;c+=1)S(l[c]);i=!0}},o(s){l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)T(l[c]);i=!1},d(s){we(l,s),s&&E(e)}}}function he(t){let e,i;return e=new Qe({props:{site:t[5]}}),e.$on("removed",t[1]),e.$on("edit",t[2]),{c(){W(e.$$.fragment)},m(n,l){K(e,n,l),i=!0},p(n,l){const r={};l&1&&(r.site=n[5]),e.$set(r)},i(n){i||(S(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){G(e,n)}}}function Xe(t){let e,i,n,l,r,s,c,o,u,m,f,v;const h=[We,Ve],p=[];function A(g,$){return g[0]!=null&&g[0].sites&&g[0].sites.length&&g[0].sites.length>0?0:1}return o=A(t),u=p[o]=h[o](t),{c(){e=d("div"),i=d("div"),n=d("div"),n.innerHTML='<div class="form-title svelte-14ayx1a"><h4>Sites</h4></div>',l=D(),r=d("div"),r.innerHTML="<h5>Add new site</h5>",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;s<n.length;s+=1)l[s]=ke(ge(t,n,s));const r=s=>T(l[s],1,1,()=>{l[s]=null});return{c(){e=d("div");for(let s=0;s<l.length;s+=1)l[s].c();_(e,"class","environment-manager-container svelte-vfhf4x")},m(s,c){w(s,e,c);for(let o=0;o<l.length;o+=1)l[o].m(e,null);i=!0},p(s,c){if(c&1){n=s[0];let o;for(o=0;o<n.length;o+=1){const u=ge(s,n,o);l[o]?(l[o].p(u,c),S(l[o],1)):(l[o]=ke(u),l[o].c(),S(l[o],1),l[o].m(e,null))}for(j(),o=n.length;o<l.length;o+=1)r(o);B()}},i(s){if(!i){for(let c=0;c<n.length;c+=1)S(l[c]);i=!0}},o(s){l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)T(l[c]);i=!1},d(s){s&&E(e),we(l,s)}}}function ke(t){let e,i;return e=new tt({props:{environment:{...t[1]}}}),{c(){W(e.$$.fragment)},m(n,l){K(e,n,l),i=!0},p(n,l){const r={};l&1&&(r.environment={...n[1]}),e.$set(r)},i(n){i||(S(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){G(e,n)}}}function lt(t){let e,i,n,l;const r=[it,nt],s=[];function c(o,u){return o[0]&&o[0].length&&o[0].length>0?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<z.length;u+=2)z[u][0](z[u+1]);z.length=0}}}function r(c){l(c(t))}function s(c,o=N){const u=[c,o];return n.add(u),n.size===1&&(i=e(l)||N),c(t),()=>{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="<h4>The environment list is empty.</h4>",_(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="<i>close</i>",l=D(),r=d("div"),s=d("div"),s.innerHTML="<h3>Environment Setup</h3>",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
|