CodeLiturgy.Dashboard/CodeLiturgy.Views/wwwroot/static/envs/envs.js

5 lines
19 KiB
JavaScript
Raw Normal View History

(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;i<t.length;i+=1)t[i]&&t[i].d(e)}function d(t){return document.createElement(t)}function P(t){return document.createTextNode(t)}function T(){return P(" ")}function re(){return P("")}function L(t,e,i,n){return t.addEventListener(e,i,n),()=>t.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<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 Me(t,e,{bubbles:i=!1,cancelable:n=!1}={}){const l=document.createEvent("CustomEvent");return l.initCustomEvent(t,i,n,e),l}let W;function V(t){W=t}function Le(){if(!W)throw new Error("Function called outside component initialization");return W}function Se(){const t=Le();return(e,i,{cancelable:n=!1}={})=>{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<Q.length;){const e=Q[te];te++,V(e),Oe(e.$$)}for(V(null),Q.length=0,te=0;me.length;)me.pop()();for(let e=0;e<ne.length;e+=1){const i=ne[e];se.has(i)||(se.add(i),i())}ne.length=0}while(Q.length);for(;_e.length;)_e.pop()();ce=!1,se.clear(),V(t)}function Oe(t){if(t.fragment!==null){t.update(),H(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(le)}}const ie=new Set;let q;function j(){q={r:0,c:[],p:q}}function B(){q.r||H(q.c),q=q.p}function w(t,e){t&&t.i&&(ie.delete(t),t.i(e))}function x(t,e,i,n){if(t&&t.o){if(ie.has(t))return;ie.add(t),q.c.push(()=>{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<<e%31}function Y(t,e,i,n,l,r,s,c=[-1]){const o=W;V(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 p=!1;if(u.ctx=i?i(t,e.props||{},(f,_,...b)=>{const v
2022-11-26 01:35:47 +03:00
`,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="<h5>The site list is empty.</h5>",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;s<n.length;s+=1)l[s]=be(ve(t,n,s));const r=s=>x(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s<l.length;s+=1)l[s].c();e=re()},m(s,c){for(let o=0;o<l.length;o+=1)l[o].m(s,c);E(s,e,c),i=!0},p(s,c){if(c&7){n=s[0].sites;let o;for(o=0;o<
2022-11-22 18:05:35 +03:00
//# sourceMappingURL=envs.js.map