odsa/dist/bundle.js

1 line
24 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o=function(e,t){var n=new a(e,t);return function(){return n.current()}};Object.defineProperty(o,"default",{value:o});var r=o;o.root=function(e){var t=m,n=0===e.length?y:new a(null,null),o=void 0,r=0===e.length?null:function(){null!==g?h.disposes.add(n):O(n)};return m=n,null===g?o=function(e,t,n){try{return null===t?e():e(t)}finally{m=n}}(e,r,t):(o=null===r?e():e(r),m=t),o},o.on=function(e,t,n,r){var l;return Array.isArray(e)&&(l=e,e=function(){for(var e=0;e<l.length;e++)l[e]()}),r=!!r,o(i,n);function i(n){var o=v;return e(),r?r=!1:(v=null,n=t(n),v=o),n}},o.effect=function(e,t){new a(e,t)},o.data=function(e){var t=new s(e);return function(e){return 0===arguments.length?t.current():t.next(e)}},o.value=function(e,t){var n=o.data(e),r=-1;return function(o){if(0===arguments.length)return n();if(!(t?t(e,o):e===o)){var l=h.time;if(r===l)throw new Error("conflicting values: "+o+" is not the same as "+e);r=l,e=o,n(o)}return o}},o.freeze=function(e){var t=void 0;if(null!==g)t=e();else{(g=h).changes.reset();try{t=e(),x()}finally{g=null}}return t},o.sample=function(e){var t,n=v;return null!==n?(v=null,t=e(),v=n):t=e(),t},o.cleanup=function(e){null!==m?null===m.cleanups?m.cleanups=[e]:m.cleanups.push(e):console.warn("cleanups created without a root or parent will never be run")},o.makeDataNode=function(e){return new s(e)},o.makeComputationNode=function(e,t){return new a(e,t)},o.isFrozen=function(){return null!==g},o.isListening=function(){return null!==v};var l=function(){return function(){this.time=0,this.changes=new c,this.updates=new c,this.disposes=new c}}(),i={time:function(){return h.time}},s=function(){function e(e){this.value=e,this.pending=d,this.log=null}return e.prototype.current=function(){return null!==v&&function(e,t){null===e.log&&(e.log=new u);w(e.log,t)}(this,v),this.value},e.prototype.next=function(e){if(null!==g)if(this.pending!==d){if(e!==this.pending)throw new Error("conflicting changes: "+e+" !== "+this.pending)}else this.pending=e,h.changes.add(this);else null!==this.log?(this.pending=e,h.changes.add(this),x()):this.value=e;return e},e.prototype.clock=function(){return i},e}(),a=function(){function e(e,t){if(this.state=f,this.source1=null,this.source1slot=0,this.sources=null,this.sourceslots=null,this.log=null,this.owned=null,this.cleanups=null,this.fn=e,this.value=t,this.age=h.time,null!==e){var n=m,o=v;null===n&&console.warn("computations created without a root or parent will never be disposed"),m=v=this,null===g?function(e){g=h,h.changes.reset(),h.updates.reset();try{e.value=e.fn(e.value),(h.changes.count>0||h.updates.count>0)&&(h.time++,S(h))}finally{g=m=v=null}}(this):this.value=this.fn(this.value),n&&n!==y&&(null===n.owned?n.owned=[this]:n.owned.push(this)),m=n,v=o}}return e.prototype.current=function(){if(null!==v){if(this.age===h.time){if(this.state===b)throw new Error("circular dependency");N(this)}!function(e,t){null===e.log&&(e.log=new u);w(e.log,t)}(this,v)}return this.value},e.prototype.clock=function(){return i},e}(),u=function(){return function(){this.node1=null,this.node1slot=0,this.nodes=null,this.nodeslots=null}}(),c=function(){function e(){this.items=[],this.count=0}return e.prototype.reset=function(){this.count=0},e.prototype.add=function(e){this.items[this.count++]=e},e.prototype.run=function(e){for(var t=this.items,n=0;n<this.count;n++)e(t[n]),t[n]=null;this.count=0},e}(),d={},f=0,p=1,b=2,h=new l,g=null,v=null,m=null,y=new a(null,null);function w(e,t){var n,o=null===t.source1?-1:null===t.sources?0:t.sources.length;null===e.node1?(e.node1=t,e.node1slot=o,n=-1):null===e.nodes?(e.nodes=[t],e.nodeslots=[o],n=0):(n=e.nodes.length,e.nodes.push(t),e.nodeslots.push(o)),null===t.source1?(t.source1=e,t.source1slot=n):null===t.sources?(t.sources=[e],t.sourceslots=[n]):(t.sources.push(e),t.sourceslots.push(n))}function x(){var e=m;h.updates.reset(),h.time++;try{S(h)}finally{g=v=null,m=e}}function S(e){var t=g,n=0;for(g=e,e.disposes.reset();0!==e.changes.count||0!==e.updates.count||0!==e.disposes.count;)if(n>0&&e.time++,e.changes.run(C),e.updates.run(N),e.disposes.run(O),n++>1e5)throw new Error("Runaway clock detected");g=t}function C(e){e.value=e.pending,e.pending=d,e.log&&k(e.log)}function k(e){var t=e.node1,n=e.nodes;if(null!==t&&_(t),null!==n)for(var o=0,r=n.length;o<r;o++)_(n[o])}function _(e){var t=h.time;e.age<t&&(e.age=t,e.state=p,h.updates.add(e),null!==e.owned&&function e(t){for(var n=0;n<t.length;n++){var o=t[n];o.age=h.time,o.state=f,null!==o.owned&&e(o.owned)}}(e.owned),null!==e.log&&k(e.log))}function N(e){if(e.state===p){var t=m,n=v;m=v=e,e.state=b,A(e,!1),e.value=e.fn(e.value),e.state=f,m=t,v=n}}function A(e,t){var n,o,r=e.source1,l=e.sources,i=e.sourceslots,s=e.cleanups,a=e.owned;if(null!==s){for(n=0;n<s.length;n++)s[n](t);e.cleanups=null}if(null!==a){for(n=0;n<a.length;n++)O(a[n]);e.owned=null}if(null!==r&&(j(r,e.source1slot),e.source1=null),null!==l)for(n=0,o=l.length;n<o;n++)j(l.pop(),i.pop())}function j(e,t){var n,o,r=e.nodes,l=e.nodeslots;-1===t?e.node1=null:(n=r.pop(),o=l.pop(),t!==r.length&&(r[t]=n,l[t]=o,-1===o?n.source1slot=t:n.sourceslots[o]=t))}function O(e){e.fn=null,e.log=null,A(e,!0)}const M=Symbol("solid-node"),E=Symbol("solid-proxy");function P(e){return e[E]||(e[E]=new Proxy(e,F))}function L(e){return null!==e&&"object"==typeof e&&(e.__proto__===Object.prototype||Array.isArray(e))}function T(e){let t,n,o;if(t=null!=e&&e._state)return t;if(!L(e))return e;if(Array.isArray(e)){Object.isFrozen(e)&&(e=e.slice(0));for(let t=0,r=e.length;t<r;t++)(n=T(o=e[t]))!==o&&(e[t]=n)}else{Object.isFrozen(e)&&(e=Object.assign({},e));let t=Object.keys(e);for(let r=0,l=t.length;r<l;r++)(n=T(o=e[t[r]]))!==o&&(e[t[r]]=n)}return e}function B(e){let t=e[M];return t||(e[M]=t={}),t}const F={get(e,t){if("_state"===t)return e;if(t===E||t===M)return;const n=e[t],o=L(n);if(r.isListening()&&"function"!=typeof n){let l,i;o&&(l=B(n))&&(i=l._self||(l._self=r.makeDataNode(void 0))).current(),(i=(l=B(e))[t]||(l[t]=r.makeDataNode(void 0))).current()}return o?P(n):n},set:()=>!0,deleteProperty:()=>!0};function H(e,t,n){if(n=T(n),e[t]===n)return;const o=Array.isArray(e)||!(t in e);void 0===n?delete e[t]:e[t]=n;let r,l=B(e);(r=l[t])&&r.next(),o&&(r=l._self)&&r.next()}function z(e,t){const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const r=n[o];H(e,r,t[r])}}function D(e,t,n=[]){if(1===t.length){let o=t[0];if("function"==typeof o&&void 0===(o=o(P(e),n)))return;return void z(e,o)}const o=t.shift(),r=typeof o,l=Array.isArray(e);if(Array.isArray(o))for(let r=0;r<o.length;r++)D(e,[o[r]].concat(t),n.concat([o[r]]));else if(l&&"function"===r)for(let r=0;r<e.length;r++)o(e[r],r)&&D(e,[r].concat(t),n.concat([r]));else if(l&&"object"===r){const{from:r=0,to:l=e.length-1,by:i=1}=o;for(let o=r;o<=l;o+=i)D(e,[o].concat(t),n.concat([o]))}else if(l&&"*"===o)for(let o=0;o<e.length;o++)D(e,[o].concat(t),n.concat([o]));else if(1===t.length){let r=t[0];if("function"==typeof r){const t=e[o];r=r(L(t)?P(t):t,n.concat([o]))}L(e[o])&&L(r)&&!Array.isArray(r)?z(e[o],r):H(e,o,r)}else D(e[o],t,n.concat([o]))}const{root:q,cleanup:R,sample:I,freeze:$}=r;function J(e,t){for(var n=0,o=t.length;n<o;n++){var r=t[n];r instanceof Node?11===r.nodeType?J(e,r.childNodes):e.push(r):null==r||!0===r||!1===r||(Array.isArray(r)?J(e,r):"string"==typeof r?e.push(document.createTextNode(r)):e.push(document.createTextNode(r.toString())))}return e}const G="__rGroup",X="nextSibling",K="previousSibling";let Q=0;function U(e,t,n,o){if(Array.isArray(e)){if(!e.length)return;let r=(e=J([],e))[0];1!==e.length&&(r[G]=e[e.length-1][G]=o);for(let o=0;o<e.length;o++)n?t.insertBefore(e[o],n):t.appendChild(e[o]);return r}let r,l=typeof e;return"string"===l||"number"===l?e=document.createTextNode(e):11===e.nodeType&&(r=e.firstChild)&&r!==e.lastChild&&(r[G]=e.lastChild[G]=o),n?t.insertBefore(e,n):t.appendChild(e),r||e}function V(e,t,n){const o=e[G];if(o)for(e=e[t];e&&e[G]!==o;)e=e[t];return n?e:e[t]}function W(e,t,n){let o;for(;t!==n;)o=t.nextSibling,e.removeChild(t),t=o}function Y(e,t,n,o){let r;for(;t!==n;)r=t.nextSibling,e.insertBefore(t,o),t=r}function Z(e,t){let n;(n=e.get(t))&&n(),e.delete(t)}function ee(e,t,n,o,r,l,i){const{wrap:s,cleanup:a,root:u,sample:c}=r,{afterRender:d,fallback:f}=o;let p=new Map,b=!1;function h(t,o,r){return u(l=>{const i=U(n(t,o),e,r,++Q);return p.set(i,l),i})}function g(){d&&d(l?l.nextSibling:e.firstChild,i)}a(function(){for(let e of p.keys())p.get(e)();p.clear()}),s((n=[])=>{const o=t()||[];return c(()=>{e=i&&i.parentNode||e;const t=o.length;if(b){if(void 0!==l||void 0!==i){let t=null!=l?l.nextSibling:e.firstChild;W(e,t,void 0===i?null:i)}else e.textContent="";for(let e of p.keys())p.get(e)();p.clear(),b=!1}if(0===t){if(void 0!==l||void 0!==i){let t=null!=l?l.nextSibling:e.firstChild;W(e,t,void 0===i?null:i)}else e.textContent="";for(let e of p.keys())p.get(e)();return p.clear(),g(),f&&(b=!0,u(t=>{const n=U(f(),e,i,++Q);p.set(n,t)})),[]}if(0===n.length){let e=new Array(t);for(let n=0;n<t;n++)h(e[n]=o[n],n,i);return g(),e}let r,s,a=0,c=0,d=!0,v=n.length-1,m=t-1,y=l?l.nextSibling:e.firstChild,w=y,x=i?i.previousSibling:e.lastChild,S=i;e:for(;d;){let t;for(d=!1,r=n[a],s=o[c];r===s;){if(a++,c++,w=y=V(y,X),v<a||m<c)break e;r=n[a],s=o[c]}for(r=n[v],s=o[m];r===s;){if(v--,m--,x=(S=V(x,K,!0)).previousSibling,v<a||m<c)break e;r=n[v],s=o[m]}for(r=n[v],s=o[c];r===s;){d=!0;let l=(t=V(x,K)).nextSibling;if(w!==l&&(Y(e,l,x.nextSibling,w),x=t),c++,--v<a||m<c)break e;r=n[v],s=o[c]}for(r=n[a],s=o[m];r===s;){if(d=!0,t=V(y,X),y!==S){let n=t.previousSibling;Y(e,y,t,S),S=n,y=t}if(m--,v<++a||m<c)break e;r=n[a],s=o[m]}}if(m<c){if(a<=v){let t,n;for(;a<=v;)t=(n=V(x,K,!0)).previousSibling,W(e,n,x.nextSibling),Z(p,n),x=t,v--}return g(),o.slice(0)}if(v<a){if(c<=m)for(;c<=m;)h(o[c],c,S),c++;return g(),o.slice(0)}const C=new Array(m+1-c);for(let e=c;e<=m;e++)C[e]=-1;const k=new Map;for(let e=c;e<=m;e++)k.set(o[e],e);let _=0,N=[];for(let e=a;e<=v;e++)k.has(n[e])?(C[k.get(n[e])]=e,_++):N.push(e);if(0===_){const t=y!==e.firstChild||x!==e.lastChild;let n,r=y;for(S=x.nextSibling;r!==S;)n=V(r,X),Z(p,r),t&&W(e,r,n),r=n,a++;!t&&(e.textContent="");for(let e=c;e<=m;e++)h(o[e],e,S);return g(),o.slice(0)}const A=function(e,t){for(var n=[],o=[],r=-1,l=new Array(e.length),i=t,s=e.length;i<s;i++){var a=e[i];if(!(a<0)){var u=te(n,a);-1!==u&&(l[i]=o[u]),u===r?(n[++r]=a,o[r]=i):a<n[u+1]&&(n[u+1]=a,o[u+1]=i)}}for(i=o[r];r>=0;i=l[i],r--)n[r]=i;return n}(C,c),j=[];let O,M=y,E=A.length-1;for(let e=a;e<=v;e++)j[e]=M,M=V(M,X);for(let t=0;t<N.length;t++){let n=j[N[t]];W(e,n,V(n,X)),Z(p,n)}for(let t=m;t>=c;t--)A[E]===t?(S=j[C[A[E]]],E--):(-1===C[t]?O=h(o[t],t,S):(O=j[C[t]],Y(e,O,V(O,X),S)),S=O);return g(),o.slice(0)})})}function te(e,t){var n=-1,o=e.length;if(o>0&&e[o-1]<=t)return o-1;for(;o-n>1;){var r=Math.floor((n+o)/2);e[r]>t?o=r:n=r}return n}const ne="property",oe={href:{type:"attribute"},style:{type:ne,alias:"style.cssText"},for:{type:ne,alias:"htmlFor"},class:{type:ne,alias:"className"},spellCheck:{type:ne,alias:"spellcheck"},allowFullScreen:{type:ne,alias:"allowFullscreen"},autoCapitalize:{type:ne,alias:"autocapitalize"},autoFocus:{type:ne,alias:"autofocus"},autoPlay:{type:ne,alias:"autoplay"}};function re(e,t,n,o){if(!n)return e.textContent="";if(Array.isArray(t))for(let n=0;n<t.length;n++)e.removeChild(t[n]);else if(null!=t&&""!=t)if(void 0!==o){let t,r=n.previousSibling;for(;r!==o;)t=r.previousSibling,e.removeChild(r),r=t}else e.removeChild(n.previousSibling);return""}function le(e,t){const n=e[t];Object.defineProperty(e,t,{get:()=>n(),enumerable:!0})}const ie=new Set;function se(e){return e&&(e.model||se(e.host||e.parentNode))}function ae(e){const t=`__${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const o=n[t];if(o){if(o(e,o.length>1?se(n):void 0),e.cancelBubble)return}n=n.host||n.parentNode}}new Set(["abort","animationstart","animationend","animationiteration","blur","change","copy","cut","error","focus","load","loadend","loadstart","mouseenter","mouseleave","paste","progress","reset","select","submit","transitionstart","transitioncancel","transitionend","transitionrun"]);const ue=function(e){const{wrap:t,cleanup:n,root:o,sample:r}=e;function l(e,n,o,r){if(n===o)return o;e=r&&r.parentNode||e;const i=typeof n;if("string"===i||"number"===i)if("number"===i&&(n=n.toString()),r){if(""===n)re(e,o,r);else if(""!==o&&"string"==typeof o)r.previousSibling.data=n;else{const t=document.createTextNode(n);""!==o&&null!=o?e.replaceChild(t,r.previousSibling):e.insertBefore(t,r)}o=n}else o=""!==o&&"string"==typeof o?e.firstChild.data=n:e.textContent=n;else if(null==n||"boolean"===i)o=re(e,o,r);else if("function"===i)t(function(){o=l(e,n(),o,r)});else if(n instanceof Node)Array.isArray(o)?0===o.length?e.insertBefore(n,r):1===o.length?e.replaceChild(n,o[0]):(re(e,o,r),e.appendChild(n)):null==o||""===o?e.insertBefore(n,r):e.replaceChild(n,r&&r.previousSibling||e.firstChild),o=n;else{if(!Array.isArray(n))throw new Error("content must be Node, stringable, or array of same");{let t=J([],n);if(re(e,o,r),0!==t.length)for(let n=0,o=t.length;n<o;n++)e.insertBefore(t[n],r);o=t}}return o}function i(e,t){const n=Object.keys(t);for(let o=0;o<n.length;o++){const r=n[o],l=r.split(/\s+/);for(let n=0;n<l.length;n++)e.classList.toggle(l[n],t[r])}}function s(e,t){let n;for(const o in t){const r=t[o];if("style"===o)Object.assign(e.style,r);else if("classList"===o)i(e,r);else if("events"===o)for(const t in r)e.addEventListener(t,r[t]);else(n=oe[o])?"attribute"===n.type?e.setAttribute(o,r):e[n.alias]=r:e[o]=r}}return Object.assign({insert(e,n,o,r){if("function"!=typeof n)return l(e,n,o,r);t((t=o)=>l(e,n(),t,r))},classList:i,createComponent(e,t,n){if(n)for(let e=0;e<n.length;e++)le(t,n[e]);return e(t)},delegateEvents(e){for(let t=0,n=e.length;t<n;t++){const n=e[t];ie.has(n)||(ie.add(n),document.addEventListener(n,ae))}},clearDelegatedEvents(){for(let e of ie.keys())document.removeEventListener(e,ae);ie.clear()},spread(e,n){"function"==typeof n?t(()=>s(e,n())):s(e,n)},flow(i,s,a,u,c,d){let f;if(d&&(f=d.previousSibling),"each"===s)ee(i,a,u,c,e,f,d);else if("when"===s){let e,s;const{afterRender:p,fallback:b}=c;n(function(){s&&s()}),t(t=>{const n=a();return n===t?t:r(()=>(i=d&&d.parentNode||i,s&&s(),null==n||!1===n?(re(i,e,d,f),e=null,p&&p(e,d),b&&o(t=>{s=t,e=l(i,b(),e,d)}),n):(o(t=>{s=t,e=l(i,u(n),e,d)}),p&&p(e,d),n)))})}else if("suspend"===s){const{fallback:e}=c,s=document.implementation.createHTMLDocument(),p=r(u);let b,h,g=!0;for(let e of ie.keys())s.addEventListener(e,ae);Object.defineProperty(s.body,"host",{get:()=>d&&d.parentNode||i}),n(function(){b&&b()}),t(t=>{const n=!!a();let u;if(n===t)return t;if(i=d&&d.parentNode||i,n){if(g)l(s.body,p),g=!1;else for(u=f?f.nextSibling:i.firstChild;u&&u!==d;){const e=u.nextSibling;s.body.appendChild(u),u=e}return e&&r(()=>o(t=>{b=t,h=l(i,e(),null,d)})),n}if(g)l(i,p,null,d),g=!1;else for(b&&(re(i,h,d,f),b());u=s.body.firstChild;)i.insertBefore(u,d);return n})}else if("portal"===s){const{useShadow:e}=c,t=document.createElement("div"),o=a&&r(a)||document.body,s=e&&t.attachShadow?t.attachShadow({mode:"open"}):t;Object.defineProperty(t,"host",{get:()=>d&&d.parentNode||i});const f=r(()=>u(t));l(t,f),t!==s&&Promise.resolve().then(()=>{for(;t.firstChild;)s.appendChild(t.firstChild)}),o.appendChild(t),n(()=>o.removeChild(t))}}},e)}({wrap:r.makeComputationNode,root:r.root,cleanup:r.cleanup,sample:r.sample});const ce=document.createElement("template");ce.innerHTML="<h1>Odoo Docker SSH Admin</h1><nav class='tabs is-full'><a>🛠 Configuration</a><a>🚩 Actions</a><a>📙 Bases de données</a><a>🗄 Modules</a><a>🖥 Retour serveur</a></nav>\x3c!--66--\x3e\x3c!--67--\x3e\x3c!--68--\x3e\x3c!--69--\x3e\x3c!--70--\x3e";const de=document.createElement("template");de.innerHTML="<div><h2>🖥 Retour serveur</h2><div class='row'><div class='col-11'><textarea name='serverlog' class='serverlog' rows='20' readonly></textarea></div><div class='col-1'><button type='button'>💢 Nettoyer</button></div></div></div>";const fe=document.createElement("template");fe.innerHTML="<div><h2>🗄 Modules</h2><form name='modules-form'><p>Bases sélectionnées : \x3c!--43--\x3e</p><div class='row'><div class='col-6'><label for='modules'>Liste de modules, séparés par des virgules</label><input name='modules' type='text' required placeholder='account,crm'/></div><div class='col-6'><label for='stop'>❗ Arrêt serveur préalable ?</label><input type='checkbox' name='stop'/></div></div><button type='button' class='button primary outline'>Installer</button><button type='button' class='button primary'>Mettre à jour</button></form></div>";const pe=document.createElement("template");pe.innerHTML="<div><h2>🚩 Actions</h2><div class='row'><div class='col'><button type='button' class='button clear'>⏩ Odoo : démarrer</button></div><div class='col'><button type='button' class='button clear'>⏹ Odoo : arrêter</button></div><div class='col'><button type='button' class='button clear'>🔄 Odoo : redémarrer</button></div></div><div class='row'><div class='col'><button type='button' class='button clear'>⏩ Frontal : démarrer</button></div><div class='col'><button type='button' class='button clear'>⏹ Frontal : arrêter</button></div><div class='col'><button type='button' class='button clear'>🔄 Frontal : redémarrer</button></div></div><div class='row'><div class='col'><button type='button' class='button clear'>⏩ Moteur de base de données : démarrer</button></div><div class='col'><button type='button' class='button clear'>⏹ Moteur de base de données : arrêter</button></div><div class='col'><button type='button' class='button clear'>🔄 Moteur de base de données : redémarrer</button></div></div></div>";const be=document.createElement("template");be.innerHTML="<li><input type='checkbox'/><span></span><button type='button' class='button outline'>X</button></li>";const he=document.createElement("template");he.innerHTML="<div><h2>📙 Bases de données</h2><p>Merci de renseigner toutes les bases de votre domaine ici. Pour effectuer une installation ou mise à jour de module, sélectionnez les bases sur lesquelles agir.</p><div class='row'><div class='col-12'><button type='button' class='button outline'>☑ Inverser la sélection</button><button type='button' class='button dark'>☑ Sélectionner tout</button><button type='button' class='button dark'>◻ Sélectionner aucun</button><ul class='database-list'></ul></div></div><div class='row'><div class='col-12'><form name='database-form'><div class='row'><div class='col-8'><input type='text' name='database' placeholder='Nom de la base de données'/></div><div class='col-4'><button type='submit' class='button outline primary'> Ajouter</button></div></div></form></div></div></div>";const ge=document.createElement("template");function ve(e){const[t,n]=function(e){return[P(e=T(e||{})),function(){const t=arguments;r.freeze(()=>{if(Array.isArray(t[0]))for(let n=0;n<t.length;n+=1)D(e,t[n]);else D(e,Array.prototype.slice.call(t))})}]}(e);var o,l,i;return localStorage.odoodockerssh&&n(JSON.parse(localStorage.odoodockerssh)),o=(()=>localStorage.odoodockerssh=JSON.stringify(t)),l?r.on(l,o,void 0,i):r.makeComputationNode(o),[t,n]}ge.innerHTML="<div><h2>🛠 Configuration</h2><form name='configuration-form'><div class='row'><div class='col-4'><label for='address'>Hôte / Adressse IP</label><input name='address' type='text' required/><label for='port'>Port</label><input name='port' type='text' pattern='\\d+' placeholder='Exemple : 22'/></div><div class='col-4'><label for='username'>Identifiant</label><input name='username' type='text' required/></div><div class='col-4'><label for='key'>Clé privée</label><textarea name='key' placeholder='Please paste your private key'></textarea><label for='keypassword'>Mot de passe clé</label><input name='password' type='password' required/></div></div><button type='button' class='button outline primary'>🔗 Connect</button><button type='button' class='button outline secondary'>🔴 Disconnect</button></form></div>";const me={address:"",port:"",username:"",key:"",password:"",database:"",databases:[],modules:"",serverlog:""},ye=()=>{const[e,t]=ve(me),n=({target:e})=>t(e.name,e.value),o=n=>{if(n.preventDefault(),e.database){let n={name:e.database,checked:!1};t(["databases",[...e.databases,n]],["database",""])}},r=()=>{let n=e.databases.map(e=>Object.assign({},e));t("databases",n.map(e=>Object.assign(e,{checked:!e.checked})))},l=()=>{let n=e.databases.map(e=>Object.assign({},e));t("databases",n.map(e=>Object.assign(e,{checked:!0})))},i=()=>{let n=e.databases.map(e=>Object.assign({},e));t("databases",n.map(e=>Object.assign(e,{checked:!1})))};return function(){const s=he.content.firstChild.cloneNode(!0),a=s.firstChild.nextSibling.nextSibling,u=a.firstChild.firstChild,c=u.nextSibling,d=c.nextSibling,f=d.nextSibling,p=a.nextSibling.firstChild.firstChild.firstChild.firstChild,b=p.firstChild,h=p.nextSibling.firstChild;return u.__click=r,c.__click=l,d.__click=i,ue.flow(f,"each",()=>e.databases,(n,o)=>(function(){const o=be.content.firstChild.cloneNode(!0),r=o.firstChild,l=r.nextSibling,i=l.nextSibling;return r.__click=(e=>(({target:{checked:e}},n)=>{t("databases",e=>e.name===n,{name:n,checked:e})})(e,n.name)),ue.wrap(()=>r.checked=n.checked),ue.insert(l,()=>n.name),i.__click=(()=>(n=>{t("databases",e.databases.filter(e=>e.name!==n))})(n.name)),o})(),{}),b.__input=n,ue.wrap(()=>b.value=e.database),h.__click=o,ue.wrap(()=>h.disabled=!e.database),s}()},we=()=>{const[e,t]=function(e,t){const n=r.makeDataNode(e);let o;if(t){let r=-1;o=(o=>{if(!t(e,o)){const t=n.clock().time();if(t===r)throw new Error(`Conflicting value update: ${o} is not the same as ${e}`);r=t,e=o,n.next(o)}})}else o=n.next.bind(n);return[n.current.bind(n),o]}("configuration"),n=t=>e()===t?"active":"";return function(){const o=ce.content.cloneNode(!0),r=o.firstChild.nextSibling,l=r.firstChild,i=l.nextSibling,s=i.nextSibling,a=s.nextSibling,u=a.nextSibling,c=r.nextSibling,d=c.nextSibling,f=d.nextSibling,p=f.nextSibling,b=p.nextSibling;return l.__click=(()=>t("configuration")),ue.wrap(()=>l.className=n("configuration")),i.__click=(()=>t("actions")),ue.wrap(()=>i.className=n("actions")),s.__click=(()=>t("databases")),ue.wrap(()=>s.className=n("databases")),a.__click=(()=>t("modules")),ue.wrap(()=>a.className=n("modules")),u.__click=(()=>t("serverlog")),ue.wrap(()=>u.className=n("serverlog")),ue.flow(o,"when",()=>"configuration"===e(),()=>(()=>{const[e,t]=ve(me),n=({target:e})=>t(e.name,e.value);return function(){const t=ge.content.firstChild.cloneNode(!0),o=t.firstChild.nextSibling.firstChild.firstChild,r=o.firstChild.nextSibling,l=r.nextSibling.nextSibling,i=o.nextSibling,s=i.firstChild.nextSibling,a=i.nextSibling.firstChild.nextSibling;return r.onchange=n,ue.wrap(()=>r.value=e.address),l.onchange=n,ue.wrap(()=>l.value=e.port),s.onchange=n,ue.wrap(()=>s.value=e.username),a.onchange=n,ue.wrap(()=>a.value=e.key),t}()})(),{},c),ue.flow(o,"when",()=>"databases"===e(),()=>ye(),{},d),ue.flow(o,"when",()=>"modules"===e(),()=>(()=>{const[e,t]=ve(me),n=({target:e})=>t(e.name,e.value);return function(){const t=fe.content.firstChild.cloneNode(!0),o=t.firstChild.nextSibling.firstChild,r=o.firstChild.nextSibling,l=o.nextSibling.firstChild,i=l.firstChild.nextSibling,s=l.nextSibling.firstChild.nextSibling;return ue.insert(o,(e=>{let t=e.filter(e=>e.checked).map(e=>e.name);return t.length?t.join(", "):"Aucune base sélectionnée"})(e.databases),null,r),i.__input=n,ue.wrap(()=>i.value=e.modules),ue.wrap(()=>s.value=e.stop),t}()})(),{},f),ue.flow(o,"when",()=>"actions"===e(),()=>(()=>{const[e,t]=ve(me);return pe.content.firstChild.cloneNode(!0)})(),{},p),ue.flow(o,"when",()=>"serverlog"===e(),()=>(()=>{const[e,t]=ve(me),n=()=>t("serverlog","");return function(){const t=de.content.firstChild.cloneNode(!0),o=t.firstChild.nextSibling.firstChild,r=o.firstChild,l=o.nextSibling.firstChild;return ue.insert(r,()=>e.serverlog),l.__click=n,t}()})(),{},b),o}()};q(()=>document.body.appendChild(we())),ue.delegateEvents(["click","input"])}]);