@olympeio/runtime-node 9.7.2 → 9.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -211,13 +211,13 @@ da('Promise.allSettled',function(a){function b(d){return{status:'fulfilled',valu
211
211
  da('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(b[d]);return c}});da('Array.prototype.flatMap',function(a){return a?a:function(b,c){for(var d=[],e=0;e<this.length;e++){var f=b.call(c,this[e],e,this);Array.isArray(f)?d.push.apply(d,f):d.push(f)}return d}});
212
212
  da('Array.prototype.flat',function(a){return a?a:function(b){b=void 0===b?1:b;for(var c=[],d=0;d<this.length;d++){var e=this[d];Array.isArray(e)&&0<b?(e=Array.prototype.flat.call(e,b-1),c.push.apply(c,e)):c.push(e)}return c}});var ja=this||self;function x(a,b){a=a.split('.');let c=ja;a[0]in c||'undefined'==typeof c.execScript||c.execScript('var '+a[0]);for(let d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};const olympe={ie:()=>'object'===typeof window?window:'object'===typeof global?global:self};if('olympe'in olympe.ie())throw Error('The olympe runtime is loaded more than once. Make sure not to import `@olympeio/runtime-web` or `@olympeio/runtime-node` explicitly, and to always use the `olympe` alias.');olympe.ie().olympe=olympe;olympe.GC=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};const ka=(a,b)=>{a={level:a,message:b.map(c=>String(c)).join(' ')};for(const c of b){let d;if(null==(d=c)?0:d.stack)a.stackTrace||(a.stackTrace=''),a.stackTrace+=c.stack}return JSON.stringify(a)};
213
213
  (()=>{const a=console.trace,b=console.debug,c=console.log,d=console.info,e=console.warn,f=console.error;console.trace=(...g)=>a(ka('TRACE',g));console.debug=(...g)=>b(ka('DEBUG',g));console.log=(...g)=>c(ka('LOG',g));console.info=(...g)=>d(ka('INFO',g));console.warn=(...g)=>e(ka('WARN',g));console.error=(...g)=>f(ka('ERROR',g))})();olympe.Sa={};olympe.Sa.node={};olympe.W={};olympe.W.sf={};olympe.W.sf.Qn=class{process(a){for(const b of Object.keys(a.se))if(a.vd(b).Nm())throw Error('Service "'+b+'" is defined as abstract and needs to be overridden');}};olympe.W.sf.Qn.xa=[olympe.W.sf.Rp];olympe.W.sf.Rn=class{process(a){function b(e,f){if(f.includes(e))throw Error('Circular dependency detected: '+f.join(' > ')+' > '+e);if(d.has(e)){f=f.concat(e);d.delete(e);e=a.vd(e);c(e.Ji(),f);for(const g of la(e))c(g.Ji(),f)}}function c(e,f){for(const g of e)g instanceof olympe.W.xb&&b(g.V(),f)}const d=new Set(Object.keys(a.se));for(const e of d)b(e,[])}};olympe.W.sf.Rn.xa=[olympe.W.sf.Rp];olympe.W.sf.Rp=class{process(){}};const ma=[],na=[];function oa(a){const b=a.ab();b.debug('Registering configurations...');b.C++;ma.forEach(c=>{B(a.H,'Registering configure callback '+(c.C?'for module '+c.C:''));a.F.push(c.F)});pa(b);b.debug('done registering')}function qa(a){const b=a.ab();b.debug('Running run callbacks of container...');b.C++;na.forEach(c=>{const d=ra(a,c.Ji());a.H.debug('Calling run callback '+`for module ${c.C}`);c.F.apply(null,d)});pa(b);b.debug('done calling run callbacks. DI process completed!')}
214
- olympe.W.Wn=class{constructor(){}static C(a,b){ma.push(new olympe.W.Tk(a,b))}static F(a,b,c){a.forEach(d=>{if(null===d||void 0===d)throw Error('Cannot proceed - DI configuration error. '+(c?`Run callback "${c}"`:'A run callback')+' cannot have a null or undefined dependency');});na.push(new olympe.W.Tk(b,c,a))}};olympe.W.config=olympe.W.Wn.C;olympe.W.run=olympe.W.Wn.F;olympe.W.Hk=class{constructor(){}getValue(){}};function sa(a,b){let c,d;return null!=(d=null==(c=a.G)?void 0:c.call(a,b))?d:!0}olympe.W.Tk=class{constructor(a,b,c){this.F=a;this.L=(null!=c?c:[]).map(d=>'string'===typeof d?new olympe.W.xb(d):d);this.C=null!=b?b:'no name di callback';this.G=null}Ji(){return this.L}};function ua(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.W.$g.C.Dl)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.H.error('Error during instantiation of service '+b),f;}!e.L&&(a.C[b]=d)}return d}function ra(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.H.C++,f=b[e],d[e]=f instanceof olympe.W.Hk?f.getValue(a):f,pa(a.H);return d}
214
+ olympe.W.Wn=class{constructor(){}static C(a,b){ma.push(new olympe.W.Tk(a,b))}static F(a,b,c){a.forEach(d=>{if(null===d||void 0===d)throw Error('Cannot proceed - DI configuration error. '+(c?`Run callback "${c}"`:'A run callback')+' cannot have a null or undefined dependency');});na.push(new olympe.W.Tk(b,c,a))}};olympe.W.config=olympe.W.Wn.C;olympe.W.run=olympe.W.Wn.F;olympe.W.Hk=class{constructor(){}getValue(){}};function sa(a,b){let c,d;return null!=(d=null==(c=a.G)?void 0:c.call(a,b))?d:!0}olympe.W.Tk=class{constructor(a,b,c){this.F=a;this.K=(null!=c?c:[]).map(d=>'string'===typeof d?new olympe.W.xb(d):d);this.C=null!=b?b:'no name di callback';this.G=null}Ji(){return this.K}};function ua(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.W.$g.C.Dl)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.H.error('Error during instantiation of service '+b),f;}!e.K&&(a.C[b]=d)}return d}function ra(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.H.C++,f=b[e],d[e]=f instanceof olympe.W.Hk?f.getValue(a):f,pa(a.H);return d}
215
215
  olympe.W.$g=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.H=new olympe.W.op(c);a=olympe.W.R.eg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}ab(){return this.H}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.W.$g.C={zs:'exception',Dl:'null'};function va(a,b,c){function d(f,g){let h,k,l;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&(k=f[h],l=g.concat((h.startsWith('#')?h.substring(1):h).toLowerCase()),'object'!==typeof k||null===k||h.startsWith('#')?e[l.join('.')]=k:d(k,l))}const e=a.parameters;d(b,c?[c]:[])}function D(a,b,c,...d){B(a.H,'Defining service '+b);a.C(b,c,d,!1,!1)}function wa(a,b,c,...d){B(a.H,'Defining service '+b);a.C(b,c,d,!1,!0)}
216
216
  function E(a,b,c,d,e=!1){B(a.H,'Defining service (as a factory) '+b);a.C(b,d,c,!0,e)}function xa(a,b,c,d=!1){B(a.H,'Defining service alias '+b);a.C(b,e=>e,[c],!0,d)}function ya(a,b){B(a.H,'Defining abstract service '+b);a.C(b).G=!0}function za(a,b,c){a.parameters[b.toLowerCase()]=c}function F(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
217
- olympe.W.ps=class{constructor(a){var b=Aa,c=Ba;this.se=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.W.sf.Qn,new olympe.W.sf.Rn];this.F=[];b&&va(this,b);c&&va(this,c,'version');a&&va(this,a);a=this.getParameter(olympe.W.U.Ct);this.G=void 0!==a?a:3;this.H=new olympe.W.op(this.G)}ab(){return this.H}C(a,b,c,d,e){const f=a instanceof olympe.W.xb?a.V():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.se[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
218
- var g=this.se[f];g.id=g.id+'!!'+ ++olympe.W.bl.C;g.L=!0;g=g.id;c[h]=g;this.se[g]=this.se[f]}}this.se[f]=new olympe.W.bl(b,c,d||!1,f);return this.se[f]}vd(a){const b=this.se[a];if(void 0===b)throw Error(`DI Error: Definition ${a} was not found`);return b}getParameter(a){return this.parameters[a.toLowerCase()]}compile(){const a=this.F;this.H.debug('Calling '+a.length+' configure callbacks');this.H.C++;a.forEach(b=>{B(this.H,'Calling callback');this.H.C++;b(this);pa(this.H)});pa(this.H);this.H.debug('Configuration summary: '+
219
- Object.keys(this.se).length+' definitions');this.H.debug('Compiling...');this.H.C++;this.L.forEach((b,c)=>{this.H.debug('running compilation pass '+(c+1)+': '+b.constructor.name);b.process(this)});pa(this.H);this.H.debug('Compilation done, returning container');return new olympe.W.$g(this.se,this.parameters,this.G)}};function la(a){let b,c;return null!=(c=null==(b=a.C)?void 0:b.values())?c:[]}
220
- olympe.W.bl=class{constructor(a,b,c,d){this.P=a||null;this.T=!!c;this.F=(null!=b?b:[]).map(e=>'string'===typeof e?new olympe.W.xb(e):e);this.G=!1;this.C=null;this.id=null!=d?d:'';this.L=!1}V(){return this.id}instantiate(a){const b=a.ab();b.debug('Resolving arguments for '+this.id);const c=this.P;let d=ra(a,this.F);const e=()=>{if(this.T)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};B(b,'Instantiating '+this.id);const f=olympe.D?olympe.D.Jg().run(()=>e()):e();let g;if(0<(null==
217
+ olympe.W.ps=class{constructor(a){var b=Aa,c=Ba;this.se=Object.create(null);this.parameters=Object.create(null);this.K=[new olympe.W.sf.Qn,new olympe.W.sf.Rn];this.F=[];b&&va(this,b);c&&va(this,c,'version');a&&va(this,a);a=this.getParameter(olympe.W.U.Ct);this.G=void 0!==a?a:3;this.H=new olympe.W.op(this.G)}ab(){return this.H}C(a,b,c,d,e){const f=a instanceof olympe.W.xb?a.V():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.se[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
218
+ var g=this.se[f];g.id=g.id+'!!'+ ++olympe.W.bl.C;g.K=!0;g=g.id;c[h]=g;this.se[g]=this.se[f]}}this.se[f]=new olympe.W.bl(b,c,d||!1,f);return this.se[f]}vd(a){const b=this.se[a];if(void 0===b)throw Error(`DI Error: Definition ${a} was not found`);return b}getParameter(a){return this.parameters[a.toLowerCase()]}compile(){const a=this.F;this.H.debug('Calling '+a.length+' configure callbacks');this.H.C++;a.forEach(b=>{B(this.H,'Calling callback');this.H.C++;b(this);pa(this.H)});pa(this.H);this.H.debug('Configuration summary: '+
219
+ Object.keys(this.se).length+' definitions');this.H.debug('Compiling...');this.H.C++;this.K.forEach((b,c)=>{this.H.debug('running compilation pass '+(c+1)+': '+b.constructor.name);b.process(this)});pa(this.H);this.H.debug('Compilation done, returning container');return new olympe.W.$g(this.se,this.parameters,this.G)}};function la(a){let b,c;return null!=(c=null==(b=a.C)?void 0:b.values())?c:[]}
220
+ olympe.W.bl=class{constructor(a,b,c,d){this.P=a||null;this.T=!!c;this.F=(null!=b?b:[]).map(e=>'string'===typeof e?new olympe.W.xb(e):e);this.G=!1;this.C=null;this.id=null!=d?d:'';this.K=!1}V(){return this.id}instantiate(a){const b=a.ab();b.debug('Resolving arguments for '+this.id);const c=this.P;let d=ra(a,this.F);const e=()=>{if(this.T)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};B(b,'Instantiating '+this.id);const f=olympe.D?olympe.D.Jg().run(()=>e()):e();let g;if(0<(null==
221
221
  (g=this.C)?void 0:g.size)){b.C++;B(b,'Calling configuration callbacks:');for(const h of this.C.values())b.C++,B(b,'Check if need to call additional configuration callback '+h.C),sa(h,f)?(B(b,'Calling additional configuration callback '+h.C),d=ra(a,h.Ji()),d.push(f),h.F.apply(null,d)):B(b,'Will not call additional configuration callback '+h.C+'predicate has returned false'),pa(b);pa(b)}B(b,'Done instantiating '+this.id);return f}Ji(){return this.F}Nm(){return this.G}config(a,b,c,d,e){null===this.C&&
222
222
  (this.C=new Map);var f=this.C,g=f.set;b=new olympe.W.Tk(c,e,b);b.G=d;g.call(f,a,b)}};olympe.W.bl.C=0;function pa(a){0<a.C&&a.C--}function B(a,b){1>=a.F&&Ca(a,'log','DI: '+b)}function Ca(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.W.op=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&Ca(this,'log','DI: '+a)}info(a){3>=this.F&&Ca(this,'info','DI: '+a)}warn(a){4>=this.F&&Ca(this,'warn','DI: '+a)}error(a){5>=this.F&&Ca(this,'error','DI: '+a)}};olympe.W.ja=class extends olympe.W.Hk{constructor(a){super();this.id=a}V(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.W.xb=class extends olympe.W.Hk{constructor(a,b){super();this.id=a;this.C=b||olympe.W.$g.C.zs}V(){return this.id}getValue(a){return ua(a,this.id,this.C)}};olympe.W.R={eg:'di.Container',tA:'di.PublicContainer'};olympe.W.U={Ct:'logging.di'};olympe.W.run([olympe.W.R.eg],a=>{olympe.W.getParameter=b=>a.getParameter(b);olympe.ie().getConfig=b=>a.getParameter(b);olympe.ie().getConfigNames=()=>Object.keys(a.parameters)});olympe.Y={};olympe.Y.bp=class{constructor(a){this.id=a||olympe.Y.bp.C++}Qa(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.Y.bp.C=0;olympe.Y.Zz=class{constructor(a,b,c,d,e,f){this.C=[a||0,b||0,0,c||0,d||0,0,e||0,f||0,1]}set(a,b,c){this.C[3*a+b]=c}get(a,b){return this.C[3*a+b]}};olympe.Y.hh=function(a,b,c,d,e,f,g,h,k,l,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,l,n,p,q,0]};olympe.Y.hh.F=function(a){return new olympe.Y.hh(.213+.787*a,.715-.715*a,.072-.072*a,.213-.213*a,.715+.285*a,.072-.072*a,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,1)};olympe.Y.hh.C=function(){return new olympe.Y.hh(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.Y.hh.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.Y.hh.prototype.get=function(a,b){return this.values[5*a+b]};olympe.Y.Promise={};olympe.Y.Promise.dk=function(a,b){let c=null;return(...d)=>new Promise((e,f)=>{clearTimeout(c);c=setTimeout(()=>v(function*(){try{const g=yield a(...d);e(g)}catch(g){f(g)}}),b)})};olympe.Y.Promise.fn=function(a,b,c='Promise timeout'){return new Promise((d,e)=>{const f=setTimeout(()=>{e(Error(c))},b);a.then(g=>{clearTimeout(f);d(g)}).catch(g=>{clearTimeout(f);e(g)})})};olympe.Y.promise={};function Da(a){if(0===a.size())a.F.next(!1);else if(a.G()){a.C++;var b=Ea(a);b&&b.F.call(a).then(c=>{b.resolve(c)}).catch(c=>{b.C(c)}).finally(()=>{a.C--;0===a.size()&&a.F.next(!1);Da(a)})}}function Fa(a,b){return new Promise((c,d)=>{a.Ya.push(new olympe.Y.promise.Eu(c,d,b));Da(a)})}function Ea(a){a.F.next(!0);let b;return null!=(b=a.Ya.shift())?b:null}
223
223
  olympe.Y.promise.Cq=class{constructor(){this.Ya=[];this.F=new rxjs.BehaviorSubject(!1);this.C=0}G(){return 0===this.C}clear(){for(;0<this.Ya.length;)this.Ya.shift().C(Error('Canceled by a clearStack'));Da(this)}size(){return this.Ya.length}};olympe.Y.promise.Eu=class{constructor(a,b,c){this.resolve=a;this.C=b;this.F=c}};olympe.Y.promise.Fu=class extends olympe.Y.promise.Cq{constructor(a){super();if('number'!==typeof a||0>=a)throw Error('StackWindow with an invalid concurrentLimit. It must be a number > 0 for the stack to work properly');this.Pi=a}G(){return this.C<this.Pi}};olympe.Y.promise.MB=class{constructor(a,...b){this.G=a;this.parameters=b;this.C=this.F=null;this.promise=new Promise((c,d)=>{this.F=c;this.C=d});this.start()}then(a){return this.promise.then(a)}catch(a){return this.promise.catch(a)}finally(a){return this.promise.finally(a)}start(){'undefined'!==typeof Worker?setTimeout(()=>{const a=URL.createObjectURL(new Blob([`
@@ -231,10 +231,10 @@ olympe.Y.promise.Cq=class{constructor(){this.Ya=[];this.F=new rxjs.BehaviorSubje
231
231
  }
232
232
  self.onmessage = ({ data: { params } }) => {
233
233
  (${this.G.toString()})(onFullfilledCallback, onRejectedCallback, ...(params ?? []));
234
- };`])),b=new Worker(a);b.addEventListener('message',c=>{const {data:d,type:e}=c.data;URL.revokeObjectURL(a);if('done'===e){let f;null==(f=this.F)||f.call(this,d)}else{let f;null==(f=this.C)||f.call(this,d)}});b.postMessage({params:this.parameters})},0):this.G(this.F,this.C,...this.parameters)}};function Ga(a,b){var c=a.C;b=(new TextEncoder).encode(b);return c.call(a,b)}function Ha(a){return(new TextDecoder('utf8')).decode(a)}olympe.Y.Nk=class{G(){}C(){}F(){}};olympe.Y.Zq=a=>a.replace('+','-').replace('/','_');olympe.Y.qv=a=>a.replace('-','+').replace('_','/');function Ia(a){a.C=setTimeout(()=>{const b=Date.now(),c=a.timeout;for(const [d,e]of a.values)b-e>c&&(a.delete(d),a.F&&a.F(d));if(0<a.values.size)Ia(a);else{let d;null==(d=a.G)||d.call(a)}},a.L)}function Ja(a,b){return a.values.has(b)?(a.values.set(b,Date.now()),!0):!1}function La(a,b){a.F=b;return a}
235
- olympe.Y.cm=class{constructor(a,b=a/2){this.timeout=a;this.L=b;this.values=new Map;this.G=this.F=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Ia(this)}has(a){return this.values.has(a)}forEach(a){this.values.forEach((b,c)=>a(c))}delete(a){a=this.values.delete(a);if(0===this.values.size){this.C&&clearTimeout(this.C);this.C=null;let b;null==(b=this.G)||b.call(this)}return a}clear(){this.C&&clearTimeout(this.C);this.C=null;this.values.clear();return this}};function Ma(a,b){a.F=b;return a}function Na(a,b){a.C.G=b}
234
+ };`])),b=new Worker(a);b.addEventListener('message',c=>{const {data:d,type:e}=c.data;URL.revokeObjectURL(a);if('done'===e){let f;null==(f=this.F)||f.call(this,d)}else{let f;null==(f=this.C)||f.call(this,d)}});b.postMessage({params:this.parameters})},0):this.G(this.F,this.C,...this.parameters)}};function Ga(a,b){var c=a.C;b=(new TextEncoder).encode(b);return c.call(a,b)}function Ha(a){return(new TextDecoder('utf8')).decode(a)}olympe.Y.Nk=class{G(){}C(){}F(){}};olympe.Y.Zq=a=>a.replace('+','-').replace('/','_');olympe.Y.qv=a=>a.replace('-','+').replace('_','/');function Ia(a){a.C=setTimeout(()=>{const b=Date.now(),c=a.timeout;for(const [d,e]of a.values)b-e>c&&(a.delete(d),a.F&&a.F(d));if(0<a.values.size)Ia(a);else{let d;null==(d=a.G)||d.call(a)}},a.K)}function Ja(a,b){return a.values.has(b)?(a.values.set(b,Date.now()),!0):!1}function La(a,b){a.F=b;return a}
235
+ olympe.Y.cm=class{constructor(a,b=a/2){this.timeout=a;this.K=b;this.values=new Map;this.G=this.F=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Ia(this)}has(a){return this.values.has(a)}forEach(a){this.values.forEach((b,c)=>a(c))}delete(a){a=this.values.delete(a);if(0===this.values.size){this.C&&clearTimeout(this.C);this.C=null;let b;null==(b=this.G)||b.call(this)}return a}clear(){this.C&&clearTimeout(this.C);this.C=null;this.values.clear();return this}};function Ma(a,b){a.F=b;return a}function Na(a,b){a.C.G=b}
236
236
  olympe.Y.bm=class{constructor(a){this.C=La(new olympe.Y.cm(a,void 0),b=>{const c=this.values.get(b);this.values.delete(b);let d;null==(d=this.F)||d.call(this,b,c)});this.values=new Map;this.F=null}set(a,b){this.values.set(a,b);this.C.add(a);return this}has(a){return this.values.has(a)}get(a){return this.values.get(a)}forEach(a){this.values.forEach((b,c)=>a(b,c))}delete(a){this.values.delete(a);return this.C.delete(a)}clear(){this.C.clear();this.values.clear();return this}};function Oa(a,b){a.T.push(b)}function Pa(a,b){a.Z.push(b)}function Qa(a,b){let c;'object'!==typeof b&&'function'!==typeof b?c=b:b instanceof olympe.dc.CloudObject?c=b.toJSON():Array.isArray(b)?c=b.map(d=>Qa(a,d)):c='N/A';return c}function Ra(a,b,c,d){b={cat:b,epoch:null!=d?d:performance.now()-a.F};let e;for(const [f,g]of null!=(e=c)?e:[])b[f]=Qa(a,g);a.G.push(b)}
237
- olympe.Y.fu=class{constructor(){this.G=[];this.T=[];this.Z=[];this.P=new Map;this.L=new Map;this.C=!1;this.F=null}start(){this.C||(this.F||(this.F=performance.now()),this.C=!0,this.T.forEach(a=>a()))}stop(){this.C&&(this.Z.forEach(a=>a()),this.C=!1)}};function Sa(a,b){return a+b&4294967295}
237
+ olympe.Y.fu=class{constructor(){this.G=[];this.T=[];this.Z=[];this.P=new Map;this.K=new Map;this.C=!1;this.F=null}start(){this.C||(this.F||(this.F=performance.now()),this.C=!0,this.T.forEach(a=>a()))}stop(){this.C&&(this.Z.forEach(a=>a()),this.C=!1)}};function Sa(a,b){return a+b&4294967295}
238
238
  function Ta(a,b){let c=a[0],d=a[1],e=a[2],f=a[3];c=G(c,d,e,f,b[0],7,-680876936);f=G(f,c,d,e,b[1],12,-389564586);e=G(e,f,c,d,b[2],17,606105819);d=G(d,e,f,c,b[3],22,-1044525330);c=G(c,d,e,f,b[4],7,-176418897);f=G(f,c,d,e,b[5],12,1200080426);e=G(e,f,c,d,b[6],17,-1473231341);d=G(d,e,f,c,b[7],22,-45705983);c=G(c,d,e,f,b[8],7,1770035416);f=G(f,c,d,e,b[9],12,-1958414417);e=G(e,f,c,d,b[10],17,-42063);d=G(d,e,f,c,b[11],22,-1990404162);c=G(c,d,e,f,b[12],7,1804603682);f=G(f,c,d,e,b[13],12,-40341101);e=G(e,f,
239
239
  c,d,b[14],17,-1502002290);d=G(d,e,f,c,b[15],22,1236535329);c=H(c,d,e,f,b[1],5,-165796510);f=H(f,c,d,e,b[6],9,-1069501632);e=H(e,f,c,d,b[11],14,643717713);d=H(d,e,f,c,b[0],20,-373897302);c=H(c,d,e,f,b[5],5,-701558691);f=H(f,c,d,e,b[10],9,38016083);e=H(e,f,c,d,b[15],14,-660478335);d=H(d,e,f,c,b[4],20,-405537848);c=H(c,d,e,f,b[9],5,568446438);f=H(f,c,d,e,b[14],9,-1019803690);e=H(e,f,c,d,b[3],14,-187363961);d=H(d,e,f,c,b[8],20,1163531501);c=H(c,d,e,f,b[13],5,-1444681467);f=H(f,c,d,e,b[2],9,-51403784);
240
240
  e=H(e,f,c,d,b[7],14,1735328473);d=H(d,e,f,c,b[12],20,-1926607734);c=I(d^e^f,c,d,b[5],4,-378558);f=I(c^d^e,f,c,b[8],11,-2022574463);e=I(f^c^d,e,f,b[11],16,1839030562);d=I(e^f^c,d,e,b[14],23,-35309556);c=I(d^e^f,c,d,b[1],4,-1530992060);f=I(c^d^e,f,c,b[4],11,1272893353);e=I(f^c^d,e,f,b[7],16,-155497632);d=I(e^f^c,d,e,b[10],23,-1094730640);c=I(d^e^f,c,d,b[13],4,681279174);f=I(c^d^e,f,c,b[0],11,-358537222);e=I(f^c^d,e,f,b[3],16,-722521979);d=I(e^f^c,d,e,b[6],23,76029189);c=I(d^e^f,c,d,b[9],4,-640364487);
@@ -248,105 +248,105 @@ olympe.Y.Fx=function(a){var b=/^(?:(\S*)@)?([^:]+)(?::(\d{2,5}))?$/;const c=/([^
248
248
  r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,qC:g||null,Ir:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,JC:f||null,parameters:b}};olympe.Y.dD=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=').map(decodeURIComponent)))};
249
249
  olympe.Y.gD=function(a){a=Array.from(a.entries()).filter(([,b])=>null!==b&&void 0!==b).map(([b,c])=>`${encodeURIComponent(b)}=${encodeURIComponent(c)}`).join('&');return 0<a.length?`#${a}`:''};olympe.Y.RC=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};olympe.Y.Sm=(a,b)=>{if(b instanceof Object)for(const c of Object.keys(b)){const d=b[c];d instanceof Object&&void 0!==a[c]?olympe.Y.Sm(a[c],d):a[c]=d}};
250
250
  olympe.Y.Ae=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.Y.Sm(d,e);b(`conf.d/${a}`,f=>{olympe.Y.Sm(d,f);c(d)})})};olympe.Y.pC=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Gm(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.Y.Ft=class{constructor(a,b){this.start=a;this.end=b}};olympe.Y.Ft.C={Nz:'left',BA:'right',uy:'bottom',LB:'top'};function $a(a){return`${a.C}.${a.F}.${a.G}`}
251
- olympe.Y.qf=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.L=d||null}static parse(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.Y.qf.C;const b=Number.parseInt(a[1],10),c=Number.parseInt(a[2],10),d=Number.parseInt(a[3],10);return isNaN(b)||isNaN(c)||isNaN(d)?olympe.Y.qf.C:new olympe.Y.qf(b,c,d,a[4])}nk(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}Wi(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<
252
- a.G}Qa(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.L?`-${this.L}`:'')}};olympe.Y.qf.C=new olympe.Y.qf(Number.NaN,Number.NaN,Number.NaN);olympe.Y.R={dg:'utils.binaryConverter',Ur:'utils.base64Converter',Nf:'utils.Profiler'};olympe.W.config(a=>{ya(a,olympe.Y.R.dg);xa(a,olympe.Y.R.Ur,olympe.Y.R.dg,!0);D(a,olympe.Y.R.Nf,olympe.Y.fu)},'Utils services');olympe.W.run([olympe.Y.R.dg,olympe.Y.R.Nf],(a,b)=>{olympe.Y.Te=()=>a;olympe.ie().isProfilerEnabled=()=>b.C;olympe.ie().startProfiler=()=>b.start();olympe.ie().stopProfiler=()=>b.stop();olympe.ie().getProfilerEvents=()=>({events:b.G,names:Object.fromEntries(b.P.entries()),models:Object.fromEntries(b.L.entries())})});olympe.ma={};olympe.ma.Ib=class{la(){}Z(){}L(){}C(){}oa(){}P(){}za(){}aa(){}ea(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ma.Ib.prototype.fatal=olympe.ma.Ib.prototype.fatal;olympe.ma.Ib.prototype.error=olympe.ma.Ib.prototype.error;olympe.ma.Ib.prototype.warn=olympe.ma.Ib.prototype.warn;olympe.ma.Ib.prototype.info=olympe.ma.Ib.prototype.info;olympe.ma.Ib.prototype.log=olympe.ma.Ib.prototype.log;olympe.ma.Ib.prototype.debug=olympe.ma.Ib.prototype.debug;olympe.ma.Ib.prototype.trace=olympe.ma.Ib.prototype.trace;
251
+ olympe.Y.qf=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.K=d||null}static parse(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.Y.qf.C;const b=Number.parseInt(a[1],10),c=Number.parseInt(a[2],10),d=Number.parseInt(a[3],10);return isNaN(b)||isNaN(c)||isNaN(d)?olympe.Y.qf.C:new olympe.Y.qf(b,c,d,a[4])}nk(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}Wi(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<
252
+ a.G}Qa(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.K?`-${this.K}`:'')}};olympe.Y.qf.C=new olympe.Y.qf(Number.NaN,Number.NaN,Number.NaN);olympe.Y.R={dg:'utils.binaryConverter',Ur:'utils.base64Converter',Nf:'utils.Profiler'};olympe.W.config(a=>{ya(a,olympe.Y.R.dg);xa(a,olympe.Y.R.Ur,olympe.Y.R.dg,!0);D(a,olympe.Y.R.Nf,olympe.Y.fu)},'Utils services');olympe.W.run([olympe.Y.R.dg,olympe.Y.R.Nf],(a,b)=>{olympe.Y.Te=()=>a;olympe.ie().isProfilerEnabled=()=>b.C;olympe.ie().startProfiler=()=>b.start();olympe.ie().stopProfiler=()=>b.stop();olympe.ie().getProfilerEvents=()=>({events:b.G,names:Object.fromEntries(b.P.entries()),models:Object.fromEntries(b.K.entries())})});olympe.ma={};olympe.ma.Ib=class{la(){}Z(){}K(){}C(){}oa(){}P(){}za(){}aa(){}ea(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ma.Ib.prototype.fatal=olympe.ma.Ib.prototype.fatal;olympe.ma.Ib.prototype.error=olympe.ma.Ib.prototype.error;olympe.ma.Ib.prototype.warn=olympe.ma.Ib.prototype.warn;olympe.ma.Ib.prototype.info=olympe.ma.Ib.prototype.info;olympe.ma.Ib.prototype.log=olympe.ma.Ib.prototype.log;olympe.ma.Ib.prototype.debug=olympe.ma.Ib.prototype.debug;olympe.ma.Ib.prototype.trace=olympe.ma.Ib.prototype.trace;
253
253
  olympe.ma.Ib.C={Lu:0,Hf:1,Bt:2,Wo:3,Zu:4,Fb:5,Cs:6,ji:7};olympe.ma.Ib.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ma.Ta=class{Qc(){}};olympe.ma.oe={};function ab(a,b,c,d){a.Ja[b](`[OLYMPE.${c}]:`,d.join(' '));if(0<a.T.size){var e=new Date;e=('00'+e.getHours()).substring(-2)+':'+('00'+e.getMinutes()).substring(-2)+':'+('00'+e.getSeconds()).substring(-2)+'.'+('00'+e.getMilliseconds()).substring(-3);for(const f of a.T.values())f(e,c,b,...d)}}
254
- olympe.ma.oe.Ib=class{constructor(a,b){this.name=a;this.F=b;this.G=a.toUpperCase();this.T=new Map;this.Ja=console}la(){return this.name}Z(){return this.F}L(){return this.F<=olympe.ma.Ib.C.Lu}C(){return this.F<=olympe.ma.Ib.C.Hf}P(){return this.F<=olympe.ma.Ib.C.Bt}oa(){return this.F<=olympe.ma.Ib.C.Wo}za(){return this.F<=olympe.ma.Ib.C.Zu}aa(){return this.F<=olympe.ma.Ib.C.Fb}ea(){return this.F<=olympe.ma.Ib.C.Cs}trace(...a){this.L()&&ab(this,'trace',this.G,a)}debug(...a){this.C()&&ab(this,'debug',
254
+ olympe.ma.oe.Ib=class{constructor(a,b){this.name=a;this.F=b;this.G=a.toUpperCase();this.T=new Map;this.Ja=console}la(){return this.name}Z(){return this.F}K(){return this.F<=olympe.ma.Ib.C.Lu}C(){return this.F<=olympe.ma.Ib.C.Hf}P(){return this.F<=olympe.ma.Ib.C.Bt}oa(){return this.F<=olympe.ma.Ib.C.Wo}za(){return this.F<=olympe.ma.Ib.C.Zu}aa(){return this.F<=olympe.ma.Ib.C.Fb}ea(){return this.F<=olympe.ma.Ib.C.Cs}trace(...a){this.K()&&ab(this,'trace',this.G,a)}debug(...a){this.C()&&ab(this,'debug',
255
255
  this.G,a)}log(...a){this.P()&&ab(this,'log',this.G,a)}info(...a){this.oa()&&ab(this,'info',this.G,a)}warn(...a){this.za()&&ab(this,'warn',this.G,a)}error(...a){this.aa()&&ab(this,'error',this.G,a)}fatal(...a){this.ea()&&ab(this,'error',this.G,a)}};olympe.ma.oe.Ib.xa=[olympe.ma.Ib];olympe.ma.oe.Ta=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.H=this.Qc('logging');this.H.info('Logging initialized, global log level is '+olympe.ma.Ib.F[b])}Qc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ma.U.$r}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ma.U.wu}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&
256
- (d=!0===this.C.getParameter(c));b=new olympe.ma.oe.Ib(a,b,d);this.channels.set(a,b)}return b}};olympe.ma.oe.Ta.xa=[olympe.ma.Ta];olympe.ma.R={Fa:'logging.Manager'};olympe.ma.U={Ho:'logging',Io:'logging.showLogLevel',$r:'logging',wu:'showLogLevel'};olympe.W.config(function(a){F(a,olympe.ma.U.Ho,olympe.ma.Ib.C.Wo);F(a,olympe.ma.U.Io,!0);wa(a,olympe.ma.R.Fa,olympe.ma.oe.Ta,olympe.W.R.eg,new olympe.W.ja(olympe.ma.U.Ho),new olympe.W.ja(olympe.ma.U.Io))},'olympe.logging');olympe.W.run([olympe.ma.R.Fa],a=>{olympe.ma.ab=b=>a.Qc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.U={tp:'df.nodeCreationThreshold'};const bb=[];function cb(){}function db(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?cb:b;this.F=void 0===c?bb:c;this.Z=d}static L(){var b=[];return void 0===b||0===b.length?olympe.D.J.aa:new a(db,b)}L(){return this.C?this.C():void 0}G(){return this.F?this.F:bb}P(){return null===this.C&&null===this.F}T(){return this.C===db}};olympe.D.J.Z=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.aa=new olympe.D.J(db);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ba);
256
+ (d=!0===this.C.getParameter(c));b=new olympe.ma.oe.Ib(a,b,d);this.channels.set(a,b)}return b}};olympe.ma.oe.Ta.xa=[olympe.ma.Ta];olympe.ma.R={Fa:'logging.Manager'};olympe.ma.U={Ho:'logging',Io:'logging.showLogLevel',$r:'logging',wu:'showLogLevel'};olympe.W.config(function(a){F(a,olympe.ma.U.Ho,olympe.ma.Ib.C.Wo);F(a,olympe.ma.U.Io,!0);wa(a,olympe.ma.R.Fa,olympe.ma.oe.Ta,olympe.W.R.eg,new olympe.W.ja(olympe.ma.U.Ho),new olympe.W.ja(olympe.ma.U.Io))},'olympe.logging');olympe.W.run([olympe.ma.R.Fa],a=>{olympe.ma.ab=b=>a.Qc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.U={tp:'df.nodeCreationThreshold'};const bb=[];function cb(){}function db(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?cb:b;this.F=void 0===c?bb:c;this.Z=d}static K(){var b=[];return void 0===b||0===b.length?olympe.D.J.aa:new a(db,b)}K(){return this.C?this.C():void 0}G(){return this.F?this.F:bb}P(){return null===this.C&&null===this.F}T(){return this.C===db}};olympe.D.J.Z=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.aa=new olympe.D.J(db);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ba);
257
257
  olympe.D.J.F=new olympe.D.J(()=>olympe.D.Na);olympe.D.J.P=new olympe.D.J(()=>olympe.D.fa);olympe.D.J.T=new olympe.D.J(()=>olympe.D.Sb);olympe.D.bh=class{V(){return''}ud(){return''}destroy(){}eb(){return!1}ad(){return!1}run(a,...b){return a(...b)}G(a){return a}getParent(){return null}tf(){}Mc(){}sd(){}ck(){}oa(){}onDestroy(){return''}Bf(){}Z(){return''}Qe(){}};olympe.D.bh.prototype.offDestroy=olympe.D.bh.prototype.Bf;olympe.D.bh.prototype.onDestroy=olympe.D.bh.prototype.onDestroy;let eb=0;olympe.W.run([new olympe.W.ja(olympe.D.U.tp)],()=>{});
258
- olympe.D.$b=class{constructor(a='SimpleContext',b){++eb;this.pb=new Map;this.jb=new Map;this.Ja=new Map;this.cc=0;this.name=a;this.id=String(eb);this.L=this.ub=!1;(this.aa=void 0===b?olympe.D.Wa():b)&&this.aa.Mc(this);this.debug=!1}V(){return this.id}ud(){return this.name}run(a,...b){if(!this.ub){var c=olympe.D.Er(this);a=a(...b);c&&olympe.D.Er(c);return a}}G(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.ub&&!this.L){this.L=!0;this.oa();for(const a of this.jb.keys())this.jb.has(a)&&this.jb.get(a)();
259
- this.jb.clear();this.Ja.clear();this.aa&&(this.aa.sd(this,!1),this.aa=null);this.ub=!0;this.L=!1;this.oa()}}eb(){return this.ub}ad(){return this.L}Mc(a){if(!this.ub){var b;olympe.D.fb(a)?b=a.Da:olympe.D.Qm(a)&&(b=a);b&&this.pb.set(b.V(),b)}}sd(a,b=!0){let c;olympe.D.fb(a)?c=a.Da:olympe.D.Qm(a)&&(c=a);c&&this.pb.has(c.V())&&(b&&c.ck(this),this.pb.delete(c.V()))}ck(){this.aa=null;this.destroy()}oa(){const a=this.pb;for(const b of a.keys())a.has(b)&&a.get(b).ck(this);this.pb.clear();for(const b of this.Ja.keys())this.Ja.has(b)&&
258
+ olympe.D.$b=class{constructor(a='SimpleContext',b){++eb;this.pb=new Map;this.jb=new Map;this.Ja=new Map;this.cc=0;this.name=a;this.id=String(eb);this.K=this.ub=!1;(this.aa=void 0===b?olympe.D.Wa():b)&&this.aa.Mc(this);this.debug=!1}V(){return this.id}ud(){return this.name}run(a,...b){if(!this.ub){var c=olympe.D.Er(this);a=a(...b);c&&olympe.D.Er(c);return a}}G(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.ub&&!this.K){this.K=!0;this.oa();for(const a of this.jb.keys())this.jb.has(a)&&this.jb.get(a)();
259
+ this.jb.clear();this.Ja.clear();this.aa&&(this.aa.sd(this,!1),this.aa=null);this.ub=!0;this.K=!1;this.oa()}}eb(){return this.ub}ad(){return this.K}Mc(a){if(!this.ub){var b;olympe.D.fb(a)?b=a.Da:olympe.D.Qm(a)&&(b=a);b&&this.pb.set(b.V(),b)}}sd(a,b=!0){let c;olympe.D.fb(a)?c=a.Da:olympe.D.Qm(a)&&(c=a);c&&this.pb.has(c.V())&&(b&&c.ck(this),this.pb.delete(c.V()))}ck(){this.aa=null;this.destroy()}oa(){const a=this.pb;for(const b of a.keys())a.has(b)&&a.get(b).ck(this);this.pb.clear();for(const b of this.Ja.keys())this.Ja.has(b)&&
260
260
  this.Ja.get(b)();this.Ja.clear()}onDestroy(a,b){void 0===b&&(++this.cc,b=String(this.cc));this.jb.set(b,a);return b}Bf(a){this.jb.delete(a)}Z(a){if(void 0===b){++this.cc;var b=String(this.cc)}this.Ja.set(b,a);return b}Qe(a){this.Ja.delete(a)}tf(a){this.aa&&this.aa.sd(this,!1);(this.aa=a||null)&&this.aa.Mc(this)}getParent(){return this.aa}};olympe.D.mq=class extends olympe.D.$b{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Bf(){}};olympe.D.bh.xa=[olympe.D.bh];let fb=0;
261
- function gb(a,b){a.ea||(a.ea=new Map);a.ea.set(b.V(),b);switch(b.Dc()){case olympe.D.Node.C.ih:break;case olympe.D.Node.C.sh:break;case olympe.D.Node.C.xj:case olympe.D.Node.C.If:olympe.D.H.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.dh:hb(a,olympe.D.Node.C.dh);break;case olympe.D.Node.C.OBSOLETE:a.jc=!0;a.C!==olympe.D.Node.C.dh&&hb(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.Od:olympe.D.H.warn('Adding a destroyed node as upstream => should never happen!');break;
261
+ function gb(a,b){a.ea||(a.ea=new Map);a.ea.set(b.V(),b);switch(b.Dc()){case olympe.D.Node.C.ih:break;case olympe.D.Node.C.sh:break;case olympe.D.Node.C.xj:case olympe.D.Node.C.If:olympe.D.H.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.dh:hb(a,olympe.D.Node.C.dh);break;case olympe.D.Node.C.OBSOLETE:a.jc=!0;a.C!==olympe.D.Node.C.dh&&hb(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.Pd:olympe.D.H.warn('Adding a destroyed node as upstream => should never happen!');break;
262
262
  default:olympe.D.H.warn('Unknown state, investigate: ',b.Dc())}ib(b,a)}
263
263
  function jb(a){if(a.Bd){var b=[],c=[];if(a.Cf)if(a.Cf instanceof olympe.D.Node)if(kb(a.Cf))b=a.Cf.Eb;else return;else b=a.Cf;else b=null;if(null!==a.za){const e=a.Tf;for(let f=0,g=a.za.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.za[f];if(kb(h))c.push(h.Eb);else return}else c.push(a.za[f])}if(a.Bd instanceof Function)var d=a.Bd;else b&&(b[a.Bd]||olympe.D.H.warn('looks like you forget a cast somewhere around '+a.Bd),d=b[a.Bd]);a.run(()=>{a.oa();if(void 0!==d){const e=d.apply(b,c);e&&e.Uq?
264
264
  lb(a,e.Da):e instanceof olympe.D.Node?lb(a,e):(L(a,e),void 0===e&&void 0===a.valueType&&hb(a,olympe.D.Node.C.sh))}else mb(a)})}}function N(a){void 0===a.Tb&&(a.Tb=a.valueType===olympe.D.Proxy?nb(void 0,a.ye):nb(a.valueType,a.ye),a.Tb.Da=a);return a.Tb}function ob(a){void 0!==a.P&&(pb(a.P,a),a.P=void 0)}function qb(a){if(a.C===olympe.D.Node.C.OBSOLETE&&(a.C=olympe.D.Node.C.sh,null!==a.T))for(const b of a.T.values())rb(b)}function hb(a,b){b!==a.C&&(a.C=b)}
265
265
  function sb(a){if(a.C!==olympe.D.Node.C.OBSOLETE&&a.C!==olympe.D.Node.C.xj&&a.C!==olympe.D.Node.C.ih&&a.C!==olympe.D.Node.C.dh){hb(a,olympe.D.Node.C.xj);var b=a.T;if(b)for(const c of b.values())b.has(c.V())&&sb(c);hb(a,olympe.D.Node.C.OBSOLETE)}}function tb(a,b,c){if(a.C!==olympe.D.Node.C.If)if(b===a.P)L(a,c,!0);else{if(a.C===olympe.D.Node.C.OBSOLETE||a.C===olympe.D.Node.C.xj)a.jc=!0;jb(a)}}
266
- function L(a,b,c){b instanceof olympe.D.Node&&(olympe.D.H.warn('We are setting the value of a node as a node, that should never happen?'),b=b.Eb);a.Lb||c||void 0===a.P||ob(a);if(void 0!==b){if((a.Lb||a.C===olympe.D.Node.C.sh||a.C===olympe.D.Node.C.OBSOLETE)&&!olympe.D.fb(b)&&void 0!==a.Eb){if(null===b&&null===a.Eb){qb(a);return}if(null!==b&&null!==a.Eb&&(b.valueOf()===a.Eb.valueOf()||a.Eb.Qa&&a.Eb.Qa(b))){qb(a);return}}if(!0===a.Lb)olympe.D.H.error("Circular dependency detected: updating a downstream node caused this node's (#"+
267
- a.V()+') value to get updated !');else{a.C===olympe.D.Node.C.Od&&olympe.D.H.warn(`trying to set a value on a destroyed node (#${a.V()} ${a.kd?', '+a.kd:''})`);a.C===olympe.D.Node.C.If&&olympe.D.H.warn(`trying to set a value on a node being destroyed (#${a.V()} ${a.kd?', '+a.kd:''})`);a.Lb=!0;c=b;var d=!1,e=(f,g)=>f instanceof g?!0:!1;void 0===a.valueType||null===c||e(c,a.valueType)||(e=a.valueType&&a.valueType.name?a.valueType.name:'undefined',b='object'===typeof c?b.constructor.name:typeof c,c instanceof
268
- Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&('string'===b.toLowerCase()&&a.valueType===olympe.D.Na?(c=olympe.D.zb(c),d=!1):'number'===b.toLowerCase()&&a.valueType===olympe.D.ba?(c=olympe.D.sa(c),d=!1):'boolean'===b.toLowerCase()&&a.valueType===olympe.D.fa&&(c=olympe.D.Xb(c),d=!1)));a.Eb=c;hb(a,olympe.D.Node.C.sh);if(b=a.T){d=0;for(const f of b.values())0<d&&sb(f),d++;for(const f of b.values())tb(f,a,c)}a.Lb=!1}}}
269
- function ub(a,b){if(a.C!==olympe.D.Node.C.If&&a.C!==olympe.D.Node.C.Od&&(a.C!==olympe.D.Node.C.ih||a.Bd)){var c=void 0!==a.defaultValue;a.Bd&&b!==a.P&&a.oa();if(c)L(a,a.defaultValue,!0);else if(a.Eb=void 0,hb(a,olympe.D.Node.C.ih),b=a.T)for(const d of b.values())ub(d,a)}}function mb(a){if(a.C!==olympe.D.Node.C.dh){hb(a,olympe.D.Node.C.dh);var b=a.T;if(b)for(const c of b.values())mb(c);a.oa();void 0!==a.P&&ob(a);a.Eb=a.defaultValue}}function kb(a){return a.C===olympe.D.Node.C.sh}
266
+ function L(a,b,c){b instanceof olympe.D.Node&&(olympe.D.H.warn('We are setting the value of a node as a node, that should never happen?'),b=b.Eb);a.Mb||c||void 0===a.P||ob(a);if(void 0!==b){if((a.Mb||a.C===olympe.D.Node.C.sh||a.C===olympe.D.Node.C.OBSOLETE)&&!olympe.D.fb(b)&&void 0!==a.Eb){if(null===b&&null===a.Eb){qb(a);return}if(null!==b&&null!==a.Eb&&(b.valueOf()===a.Eb.valueOf()||a.Eb.Qa&&a.Eb.Qa(b))){qb(a);return}}if(!0===a.Mb)olympe.D.H.error("Circular dependency detected: updating a downstream node caused this node's (#"+
267
+ a.V()+') value to get updated !');else{a.C===olympe.D.Node.C.Pd&&olympe.D.H.warn(`trying to set a value on a destroyed node (#${a.V()} ${a.kd?', '+a.kd:''})`);a.C===olympe.D.Node.C.If&&olympe.D.H.warn(`trying to set a value on a node being destroyed (#${a.V()} ${a.kd?', '+a.kd:''})`);a.Mb=!0;c=b;var d=!1,e=(f,g)=>f instanceof g?!0:!1;void 0===a.valueType||null===c||e(c,a.valueType)||(e=a.valueType&&a.valueType.name?a.valueType.name:'undefined',b='object'===typeof c?b.constructor.name:typeof c,c instanceof
268
+ Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&('string'===b.toLowerCase()&&a.valueType===olympe.D.Na?(c=olympe.D.zb(c),d=!1):'number'===b.toLowerCase()&&a.valueType===olympe.D.ba?(c=olympe.D.sa(c),d=!1):'boolean'===b.toLowerCase()&&a.valueType===olympe.D.fa&&(c=olympe.D.Xb(c),d=!1)));a.Eb=c;hb(a,olympe.D.Node.C.sh);if(b=a.T){d=0;for(const f of b.values())0<d&&sb(f),d++;for(const f of b.values())tb(f,a,c)}a.Mb=!1}}}
269
+ function ub(a,b){if(a.C!==olympe.D.Node.C.If&&a.C!==olympe.D.Node.C.Pd&&(a.C!==olympe.D.Node.C.ih||a.Bd)){var c=void 0!==a.defaultValue;a.Bd&&b!==a.P&&a.oa();if(c)L(a,a.defaultValue,!0);else if(a.Eb=void 0,hb(a,olympe.D.Node.C.ih),b=a.T)for(const d of b.values())ub(d,a)}}function mb(a){if(a.C!==olympe.D.Node.C.dh){hb(a,olympe.D.Node.C.dh);var b=a.T;if(b)for(const c of b.values())mb(c);a.oa();void 0!==a.P&&ob(a);a.Eb=a.defaultValue}}function kb(a){return a.C===olympe.D.Node.C.sh}
270
270
  function lb(a,b){b===a?olympe.D.H.error('Setting a node as provider of itself. Ignoring'):(a.P&&a.P!==b&&ob(a),ib(b,a),kb(b)?L(a,b.Eb,!0):void 0!==a.defaultValue?L(a,a.defaultValue,!0):ub(a),a.P=b)}function vb(a,b){a.Bd&&(a.Bd=void 0);a.kd='Repeater';lb(a,b)}function rb(a){a.P?qb(a):null!==a.ea&&0===Array.from(a.ea.values()).filter(b=>!kb(b)).length&&(a.jc&&(a.jc=!1,jb(a)),qb(a))}
271
- function ib(a,b){a.T||(a.T=new Map);a.T.set(b.V(),b);a.C===olympe.D.Node.C.Od&&olympe.D.H.warn('adding a downstream node on a deleted one (#'+a.V()+') !')}function pb(a,b){a.T&&(b=b.V(),a.T.has(b)&&(a.T.delete(b),wb(a)))}function wb(a){if(null===a.getParent()){var b=a.T;b&&0<b.size||a.destroy()}}
272
- olympe.D.Node=class extends olympe.D.$b{constructor({valueType:a,Bd:b,Kx:c=!0,Cf:d,Mm:e,debug:f=!1,Tf:g=null,kd:h='Node',Di:k}={}){++fb;super(String(fb));this.debug=!!f;this.kd=h;h&&'string'===typeof h||(b?this.kd=b.name?b.name:'anon()':this.kd='Node');this.za=e&&0<e.length?e:null;this.Tf=g&&0<g.length?g:null;this.valueType=a;this.Eb=void 0;this.Lb=!1;this.C=olympe.D.Node.C.ih;this.jc=!1;this.T=this.ea=null;this.Bd=b;this.Cf=d||null;this.defaultValue=this.Tb=this.P=void 0;this.Di=k;d&&d instanceof
273
- olympe.D.Node&&gb(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],gb(this,a);c&&jb(this)}Wg(a){this.defaultValue=a;this.C===olympe.D.Node.C.ih&&L(this,a,!0);return this}Ei(a){this.valueType=a}Ob(){return this.valueType||Object}asObservable(a=olympe.D.Wa()){return new rxjs.Observable(b=>{const c=a.run(()=>olympe.D.createNode(this.valueType,b.next.bind(b),null,[this],[0],`Observable of ${this.kd}`));c.onDestroy(()=>b.complete());return()=>c.destroy()})}Dc(){return this.C}eb(){return this.C===olympe.D.Node.C.Od}ad(){return this.C===
274
- olympe.D.Node.C.If}ye(...a){if(this.Di instanceof Function)return this.Di(...a);var b=a.length;--b;const c=a[b];--b;const d=a[b],e=Array(b);for(var f=0;f<b;f++)e[f]=a[f];a=this.Dc();a!==olympe.D.Node.C.If&&a!==olympe.D.Node.C.Od||olympe.D.H.warn('Calling a function on a destroyed node!!!',this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.D.fb(g)&&b.push(g.Da);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.Eg&&(e[g]=f.Da,b.push(g));return N(new olympe.D.Node({valueType:d.L(),
275
- Bd:c,Cf:this,Mm:e,debug:!1,Tf:b,kd:'Proxy.'+c+'()'}))}ck(a){if(null===this.getParent())olympe.D.H.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.H.warn('Investigate a potential issue in creator-createe link: create node mismatch',a,this.getParent());return}this.tf(null);wb(this)}destroy(){var a=this.C;if(a!==olympe.D.Node.C.If&&a!==olympe.D.Node.C.Od){hb(this,olympe.D.Node.C.If);if(a=this.T){for(const c of a.values())if(a.has(c.V())){var b=c;b.ea&&b.ea.delete(this.V());
276
- b.P&&b.P.V()===this.V()?b.P=void 0:b.destroy()}a.clear()}this.T=null;super.destroy();if(this.ea){for(const c of this.ea.values())this.ea.has(c.V())&&pb(c,this);this.ea.clear()}this.ea=null;this.P&&(pb(this.P,this),this.P=void 0);this.Eb=void 0;this.za&&(this.za.length=0,this.za=null);this.Tf&&(this.Tf.length=0,this.Tf=null);this.Di=this.Bd=void 0;this.defaultValue=this.Cf=null;this.kd=`** Destroyed ** ${this.kd}`;hb(this,olympe.D.Node.C.Od)}}ud(){return this.kd}};olympe.D.Node.F='rootNode';
277
- olympe.D.Node.C={ih:0,sh:1,dh:3,xj:4,OBSOLETE:5,If:6,Od:7};function nb(a,b){if('function'!==typeof a)return new olympe.D.Proxy(a,b);var c=olympe.D.Proxy.prototype;void 0===a.prototype&&olympe.D.H.error('investigate');c=Object.create(xb(c,a.prototype));c.uh=a;c.Vq=b;return c}function xb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.Ml)||Object.defineProperty(b,olympe.D.Proxy.Ml,{enumerable:!1,configurable:!1,writable:!1,value:yb(a,b)});return b[olympe.D.Proxy.Ml]}
271
+ function ib(a,b){a.T||(a.T=new Map);a.T.set(b.V(),b);a.C===olympe.D.Node.C.Pd&&olympe.D.H.warn('adding a downstream node on a deleted one (#'+a.V()+') !')}function pb(a,b){a.T&&(b=b.V(),a.T.has(b)&&(a.T.delete(b),wb(a)))}function wb(a){if(null===a.getParent()){var b=a.T;b&&0<b.size||a.destroy()}}
272
+ olympe.D.Node=class extends olympe.D.$b{constructor({valueType:a,Bd:b,Kx:c=!0,Cf:d,Mm:e,debug:f=!1,Tf:g=null,kd:h='Node',Di:k}={}){++fb;super(String(fb));this.debug=!!f;this.kd=h;h&&'string'===typeof h||(b?this.kd=b.name?b.name:'anon()':this.kd='Node');this.za=e&&0<e.length?e:null;this.Tf=g&&0<g.length?g:null;this.valueType=a;this.Eb=void 0;this.Mb=!1;this.C=olympe.D.Node.C.ih;this.jc=!1;this.T=this.ea=null;this.Bd=b;this.Cf=d||null;this.defaultValue=this.Tb=this.P=void 0;this.Di=k;d&&d instanceof
273
+ olympe.D.Node&&gb(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],gb(this,a);c&&jb(this)}Wg(a){this.defaultValue=a;this.C===olympe.D.Node.C.ih&&L(this,a,!0);return this}Ei(a){this.valueType=a}Ob(){return this.valueType||Object}asObservable(a=olympe.D.Wa()){return new rxjs.Observable(b=>{const c=a.run(()=>olympe.D.createNode(this.valueType,b.next.bind(b),null,[this],[0],`Observable of ${this.kd}`));c.onDestroy(()=>b.complete());return()=>c.destroy()})}Dc(){return this.C}eb(){return this.C===olympe.D.Node.C.Pd}ad(){return this.C===
274
+ olympe.D.Node.C.If}ye(...a){if(this.Di instanceof Function)return this.Di(...a);var b=a.length;--b;const c=a[b];--b;const d=a[b],e=Array(b);for(var f=0;f<b;f++)e[f]=a[f];a=this.Dc();a!==olympe.D.Node.C.If&&a!==olympe.D.Node.C.Pd||olympe.D.H.warn('Calling a function on a destroyed node!!!',this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.D.fb(g)&&b.push(g.Da);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.Eg&&(e[g]=f.Da,b.push(g));return N(new olympe.D.Node({valueType:d.K(),
275
+ Bd:c,Cf:this,Mm:e,debug:!1,Tf:b,kd:'Proxy.'+c+'()'}))}ck(a){if(null===this.getParent())olympe.D.H.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.H.warn('Investigate a potential issue in creator-createe link: create node mismatch',a,this.getParent());return}this.tf(null);wb(this)}destroy(){var a=this.C;if(a!==olympe.D.Node.C.If&&a!==olympe.D.Node.C.Pd){hb(this,olympe.D.Node.C.If);if(a=this.T){for(const c of a.values())if(a.has(c.V())){var b=c;b.ea&&b.ea.delete(this.V());
276
+ b.P&&b.P.V()===this.V()?b.P=void 0:b.destroy()}a.clear()}this.T=null;super.destroy();if(this.ea){for(const c of this.ea.values())this.ea.has(c.V())&&pb(c,this);this.ea.clear()}this.ea=null;this.P&&(pb(this.P,this),this.P=void 0);this.Eb=void 0;this.za&&(this.za.length=0,this.za=null);this.Tf&&(this.Tf.length=0,this.Tf=null);this.Di=this.Bd=void 0;this.defaultValue=this.Cf=null;this.kd=`** Destroyed ** ${this.kd}`;hb(this,olympe.D.Node.C.Pd)}}ud(){return this.kd}};olympe.D.Node.F='rootNode';
277
+ olympe.D.Node.C={ih:0,sh:1,dh:3,xj:4,OBSOLETE:5,If:6,Pd:7};function nb(a,b){if('function'!==typeof a)return new olympe.D.Proxy(a,b);var c=olympe.D.Proxy.prototype;void 0===a.prototype&&olympe.D.H.error('investigate');c=Object.create(xb(c,a.prototype));c.uh=a;c.Vq=b;return c}function xb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.Ml)||Object.defineProperty(b,olympe.D.Proxy.Ml,{enumerable:!1,configurable:!1,writable:!1,value:yb(a,b)});return b[olympe.D.Proxy.Ml]}
278
278
  function zb(a,b){if(a.uh!==b){a.uh=b;b.prototype||olympe.D.H.error('Cast not possible, provided type is not a valid type!');var c=xb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Da&&a.Da.Ei(b)}}
279
- function yb(a,b){let c={};if(b.prototype)olympe.D.H.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(xb(a,b.__proto__));else return olympe.D.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].K;null===e||e&&e.P()?c[d]=function(...f){var g=this.Da;if(g&&kb(g)&&(g=g.Eb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.Z,c[d]=function(...f){f=this.Vq.call(this.Da,
279
+ function yb(a,b){let c={};if(b.prototype)olympe.D.H.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(xb(a,b.__proto__));else return olympe.D.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].L;null===e||e&&e.P()?c[d]=function(...f){var g=this.Da;if(g&&kb(g)&&(g=g.Eb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.Z,c[d]=function(...f){f=this.Vq.call(this.Da,
280
280
  ...f,e,d);const g=e.Z;if(g){const h=this.Da.Eb;h&&h[g]&&zb(f,h[g])}return e.T()?this:f})}});return c}function Ab(a,b){L(a.Da,b)}function Bb(a){ub(a.Da)}function Cb(a,b){vb(a.Da,olympe.D.Af(b)?b:b.Da)}function Db(a,b){olympe.D.fb(b)||olympe.D.Af(b)?Cb(a,b):Ab(a,b)}
281
281
  olympe.D.Proxy=class{constructor(a,b){this.Da=null;this.uh=a;this.Vq=b}static fb(a){return!(!a||!a.Eg)}Qa(a){return olympe.D.ta([this,a],(b,c)=>b===c,Boolean)}zd(a){return olympe.D.ta([this,a],(b,c)=>null===b||null===c?b===c?olympe.D.fa.F:olympe.D.fa.C:b.valueOf()===c.valueOf()?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa)}asObservable(a){return this.Da.asObservable(a)}Uq(){return this.Da}};olympe.D.Proxy.Ml='__opp__';olympe.D.Proxy.prototype.Eg=!0;function Eb(a,b){a.node.Wg(b);return a}olympe.D.oj=class{constructor(a,b='FlowSource'){this.node=olympe.D.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.D.fb(a)?L(this.node,olympe.D.Ra(a)):L(this.node,a);return this}repeat(a){vb(this.node,olympe.D.fb(a)?a.Da:a);return this}clear(){ub(this.node);return this}sb(){return N(this.node)}getContext(){return this.node}};function Fb(a,b,c=1E3,d,e){const f=olympe.D.ic(olympe.D.ba),g=d||olympe.D.ba.oo.mp;let h,k,l,n;f.update(olympe.D.sa(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.getContext().eb()||(l=q-a.valueOf(),k=(window.performance.now()-p)/c,1<=k&&(k=1,n=void 0),h=a.valueOf()+l*g(k,0,1,1),f.update(olympe.D.sa(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.sb()}
282
282
  olympe.D.ba=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.sa(b.value)}en(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.Xb(!this.en())}Kc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.D.zb(''):olympe.D.zb(this.value.toString())}toString(a,b){return void 0!==
283
283
  this.value&&null!==this.value?'number'===typeof a?this.value.toString(a):'number'===typeof b?this.value.toFixed(b):this.value.toString():'-'}toFixed(a){return this.en()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.ic(olympe.D.ba,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.sa(c))};a.forEach((f,g)=>{olympe.D.Ic([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.getContext().eb()){var g=b.get(f);b.delete(f);
284
- g===c&&e()}});return d.sb()}Wd(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()+c.valueOf()),olympe.D.ba,'ONumber.plus')}Ug(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()-c.valueOf()),olympe.D.ba,'ONumber.minus')}round(){return olympe.D.sa(Math.round(this.valueOf()))}Xi(){return olympe.D.sa(-this.valueOf())}uk(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()*c.valueOf()),olympe.D.ba,'ONumber.mul')}Gi(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()/
284
+ g===c&&e()}});return d.sb()}Xd(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()+c.valueOf()),olympe.D.ba,'ONumber.plus')}Ug(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()-c.valueOf()),olympe.D.ba,'ONumber.minus')}round(){return olympe.D.sa(Math.round(this.valueOf()))}Xi(){return olympe.D.sa(-this.valueOf())}uk(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()*c.valueOf()),olympe.D.ba,'ONumber.mul')}Gi(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()/
285
285
  c.valueOf()),olympe.D.ba,'ONumber.div')}mx(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(b.valueOf()%c.valueOf()),olympe.D.ba,'ONumber.div')}floor(){return olympe.D.sa(Math.floor(this.valueOf()))}ceil(){return olympe.D.sa(Math.ceil(this.valueOf()))}trunc(){return olympe.D.sa(Math.trunc(this.valueOf()))}log(){return olympe.D.sa(Math.log(this.valueOf()))}pow(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.sa(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ba,'ONumber.pow')}exp(){return olympe.D.sa(Math.exp(this.valueOf()))}zd(a){return olympe.D.ta([this,
286
286
  a],(b,c)=>olympe.D.Xb(b.Qa(c)),olympe.D.fa,'ONumber.oEquals')}Qa(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}yw(){return this.valueOf()}Pm(a){return olympe.D.ta([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa,'ONumber.isBiggerThan')}Ox(a){return olympe.D.ta([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.sa(c),olympe.D.ba,'ONumber.returnsBiggest')}Cr(a){return olympe.D.ta([this,
287
287
  a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.sa(c),olympe.D.ba,'ONumber.returnsSmallest')}bx(a){return olympe.D.ta([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa,'ONumber.isSmallerThan')}sin(){return olympe.D.sa(Math.sin(this.valueOf()))}cos(){return olympe.D.sa(Math.cos(this.valueOf()))}atan2(a){return olympe.D.fb(a)?olympe.D.pe([a],b=>olympe.D.sa(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ba):olympe.D.sa(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.sa(Math.abs(this.valueOf()))}Qi(a,
288
- b){return olympe.D.fb(a)||olympe.D.fb(b)?olympe.D.pe([a,b],(c,d)=>olympe.D.sa(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ba):olympe.D.sa(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static bv(a,b,c,d){'number'===typeof a&&(a=olympe.D.Vd(a));'number'===typeof b&&(b=olympe.D.Vd(b));'number'===typeof c&&(c=olympe.D.Vd(c));let e=0;const f=olympe.D.Vd(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.Ni(b.Pm(c),()=>{olympe.ma.ab('df').warn('You have a min bigger than max, cap your inputs')});
289
- const k=(l,n)=>{n=olympe.D.Vd(n);const p=olympe.D.ba.animate(n,500);Cb(f,p);Ab(n,olympe.D.sa(l));e=l};olympe.D.pe([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):Cb(f,olympe.D.Vd(e))},olympe.D.ba);void 0!==b&&olympe.D.Um(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.D.Vd(e),p=olympe.D.ba.animate(n,400,d);l=olympe.D.sa(g);L(n.Da,l);e=g;Cb(f,p)}});void 0!==c&&olympe.D.Um(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.D.Vd(e),p=olympe.D.ba.animate(n,400,d);l=olympe.D.sa(h);L(n.Da,l);e=h;Cb(f,
288
+ b){return olympe.D.fb(a)||olympe.D.fb(b)?olympe.D.pe([a,b],(c,d)=>olympe.D.sa(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ba):olympe.D.sa(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static bv(a,b,c,d){'number'===typeof a&&(a=olympe.D.Wd(a));'number'===typeof b&&(b=olympe.D.Wd(b));'number'===typeof c&&(c=olympe.D.Wd(c));let e=0;const f=olympe.D.Wd(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.Ni(b.Pm(c),()=>{olympe.ma.ab('df').warn('You have a min bigger than max, cap your inputs')});
289
+ const k=(l,n)=>{n=olympe.D.Wd(n);const p=olympe.D.ba.animate(n,500);Cb(f,p);Ab(n,olympe.D.sa(l));e=l};olympe.D.pe([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):Cb(f,olympe.D.Wd(e))},olympe.D.ba);void 0!==b&&olympe.D.Um(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.D.Wd(e),p=olympe.D.ba.animate(n,400,d);l=olympe.D.sa(g);L(n.Da,l);e=g;Cb(f,p)}});void 0!==c&&olympe.D.Um(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.D.Wd(e),p=olympe.D.ba.animate(n,400,d);l=olympe.D.sa(h);L(n.Da,l);e=h;Cb(f,
290
290
  p)}});return f}static offset(a){let b;return olympe.D.pe([a],c=>{void 0===b&&(b=c);return olympe.D.sa(c-b)},olympe.D.ba,'offset')}static fr(a){let b,c,d;return olympe.D.ta([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.D.sa(0);d=window.performance.now();const f=olympe.D.sa((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.D.ba,'derivative')}static Vw(a){let b=olympe.D.sa(0),c,d,e;return olympe.D.ta([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.D.sa(0);
291
- e=window.performance.now();b=b.Wd((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ba,'integrate')}static Dv(a){let b;return olympe.D.ta([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.sa(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ba,'diff')}static uv(a,b,c){return olympe.D.pe([a,b,c],(d,e,f)=>{d='number'===typeof d?d:d.valueOf();e='number'===typeof e?e:e.valueOf();f='number'===typeof f?f:f.valueOf();return olympe.D.sa(d>=e?d<=f?d:f:e)},olympe.D.ba)}static animate(a,b,c,d){let e;
292
- return e=olympe.D.ta([a],f=>{const g=olympe.D.Ra(b,1E3),h=olympe.D.Ra(e);return void 0===h?olympe.D.sa(f):Fb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ba)}static ov(a,b,c){let d,e,f,g,h,k,l=olympe.D.Vd(),n;olympe.D.Ic([a],p=>{void 0===d?g=d=p.valueOf():d=g;f=window.performance.now();e=p.valueOf();k=e-d;0!==k&&void 0===n&&(n=setInterval(()=>{k=e-d;h=(window.performance.now()-f)/b;1<=h&&(h=1);g=d+k*c(h,0,1,1);Ab(l,olympe.D.sa(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Kc(a){return olympe.D.fb(a)?
293
- olympe.D.ta([a],b=>olympe.D.zb(b.valueOf().toString()),olympe.D.Na):olympe.D.zb(a)}static Xi(a){return olympe.D.fb(a)?olympe.D.ta([a],b=>olympe.D.sa(-b.valueOf()),olympe.D.ba):olympe.D.sa(-a.valueOf())}static Wd(a,b){return olympe.D.fb(a)||olympe.D.fb(b)?olympe.D.ta([a,b],(c,d)=>olympe.D.sa(c.valueOf()+d.valueOf()),olympe.D.ba,'plus'):olympe.D.sa(a.valueOf()+b.valueOf())}static Ug(a,b){return olympe.D.fb(a)||olympe.D.fb(b)?olympe.D.pe([a,b],(c,d)=>olympe.D.sa(c.valueOf()-d.valueOf()),olympe.D.ba,
291
+ e=window.performance.now();b=b.Xd((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ba,'integrate')}static Dv(a){let b;return olympe.D.ta([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.sa(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ba,'diff')}static uv(a,b,c){return olympe.D.pe([a,b,c],(d,e,f)=>{d='number'===typeof d?d:d.valueOf();e='number'===typeof e?e:e.valueOf();f='number'===typeof f?f:f.valueOf();return olympe.D.sa(d>=e?d<=f?d:f:e)},olympe.D.ba)}static animate(a,b,c,d){let e;
292
+ return e=olympe.D.ta([a],f=>{const g=olympe.D.Ra(b,1E3),h=olympe.D.Ra(e);return void 0===h?olympe.D.sa(f):Fb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ba)}static ov(a,b,c){let d,e,f,g,h,k,l=olympe.D.Wd(),n;olympe.D.Ic([a],p=>{void 0===d?g=d=p.valueOf():d=g;f=window.performance.now();e=p.valueOf();k=e-d;0!==k&&void 0===n&&(n=setInterval(()=>{k=e-d;h=(window.performance.now()-f)/b;1<=h&&(h=1);g=d+k*c(h,0,1,1);Ab(l,olympe.D.sa(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Kc(a){return olympe.D.fb(a)?
293
+ olympe.D.ta([a],b=>olympe.D.zb(b.valueOf().toString()),olympe.D.Na):olympe.D.zb(a)}static Xi(a){return olympe.D.fb(a)?olympe.D.ta([a],b=>olympe.D.sa(-b.valueOf()),olympe.D.ba):olympe.D.sa(-a.valueOf())}static Xd(a,b){return olympe.D.fb(a)||olympe.D.fb(b)?olympe.D.ta([a,b],(c,d)=>olympe.D.sa(c.valueOf()+d.valueOf()),olympe.D.ba,'plus'):olympe.D.sa(a.valueOf()+b.valueOf())}static Ug(a,b){return olympe.D.fb(a)||olympe.D.fb(b)?olympe.D.pe([a,b],(c,d)=>olympe.D.sa(c.valueOf()-d.valueOf()),olympe.D.ba,
294
294
  'minus'):olympe.D.sa(a.valueOf()-b.valueOf())}static Gi(a,b){return olympe.D.fb(a)||olympe.D.fb(b)?olympe.D.pe([a,b],(c,d)=>olympe.D.sa(c.valueOf()/d.valueOf()),olympe.D.ba,'div'):olympe.D.sa(a.valueOf()/b.valueOf())}static Ix(a,b){if(void 0===b)return a;olympe.D.Ic([b],c=>{c=olympe.D.sa(a.Da.Eb.valueOf()+c.valueOf());L(a.Da,c)},'plusEqual');return a}};olympe.D.ba.ZERO=new olympe.D.ba(0);olympe.D.ba.ONE=new olympe.D.ba(1);olympe.D.ba.Nu=new olympe.D.ba(2);olympe.D.ba.PI=new olympe.D.ba(Math.PI);
295
295
  olympe.D.ba.Ts=new olympe.D.ba(Infinity);olympe.D.ba.Mt=new olympe.D.ba(-Infinity);olympe.D.ba.sp=new olympe.D.ba(NaN);olympe.D.ba.vA=olympe.D.ba.Ix;olympe.D.ba.ky=olympe.D.ba.bv;olympe.D.ba.jA=olympe.D.ba.offset;olympe.D.ba.Ry=olympe.D.ba.fr;olympe.D.ba.BC=olympe.D.ba.fr;olympe.D.ba.Mz=olympe.D.ba.Vw;olympe.D.ba.Sy=olympe.D.ba.Dv;olympe.D.ba.zy=olympe.D.ba.uv;olympe.D.ba.ly=olympe.D.ba.animate;olympe.D.ba.my=olympe.D.ba.ov;olympe.D.ba.NB=olympe.D.ba.Kc;olympe.D.ba.OB=olympe.D.ba.Xi;
296
- olympe.D.ba.uA=olympe.D.ba.Wd;olympe.D.ba.$z=olympe.D.ba.Ug;olympe.D.ba.Ty=olympe.D.ba.Gi;
296
+ olympe.D.ba.uA=olympe.D.ba.Xd;olympe.D.ba.$z=olympe.D.ba.Ug;olympe.D.ba.Ty=olympe.D.ba.Gi;
297
297
  olympe.D.ba.oo={mp:function(a,b,c,d){return c*a/d+b},mz:function(a,b,c,d){a/=d;return c*a*a+b},xz:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},iz:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a+b;a--;return-c/2*(a*(a-2)-1)+b},bz:function(a,b,c,d){a/=d;return c*a*a*a+b},sz:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},gz:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a+b;a-=2;return c/2*(a*a*a+2)+b},nz:function(a,b,c,d){a/=d;return c*a*a*a*a+b},yz:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
298
298
  jz:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a+b;a-=2;return-c/2*(a*a*a*a-2)+b},oz:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},zz:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},kz:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a*a+b;a-=2;return c/2*(a*a*a*a*a+2)+b},pz:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},Az:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},lz:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},ez:function(a,b,c,d){return c*Math.pow(2,
299
299
  10*(a/d-1))+b},wz:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},hz:function(a,b,c,d){a/=d/2;if(1>a)return c/2*Math.pow(2,10*(a-1))+b;a--;return c/2*(-Math.pow(2,-10*a)+2)+b},az:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},rz:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},fz:function(a,b,c,d){a/=d/2;if(1>a)return-c/2*(Math.sqrt(1-a*a)-1)+b;a-=2;return c/2*(Math.sqrt(1-a*a)+1)+b},Wy:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},Xy:function(a,b,c,d){d=(a/=d)*a;return b+
300
300
  c*(2*d*d+2*d*a+-3*d)},Yy:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},Zy:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},vz:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(33*e*d+-106*d*d+126*e+-67*d+15*a)},uz:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(56*e*d+-175*d*d+200*e+-100*d+20*a)},dz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},cz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},qz:function(a,
301
- b,c,d){return(a/=d)<1/2.75?7.5625*c*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},$y:function(a,b,c,d){a=d-a;d=(a/=d)<1/2.75?7.5625*c*a*a:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375):c*(7.5625*(a-=2.625/2.75)*a+.984375);return c-d+b}};m=olympe.D.ba.prototype;m.toJSON.K=olympe.D.J.C;m.en.K=olympe.D.J.C;m.isNaN.K=olympe.D.J.P;m.Kc.K=olympe.D.J.F;
302
- m.toString.K=new olympe.D.J(()=>String,[]);m.toFixed.K=new olympe.D.J(()=>String,[]);m.Wd.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.Ug.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.round.K=olympe.D.J.G;m.Xi.K=olympe.D.J.G;m.uk.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.Gi.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.mx.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.floor.K=olympe.D.J.G;m.ceil.K=olympe.D.J.G;m.trunc.K=olympe.D.J.G;m.log.K=olympe.D.J.G;m.pow.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.exp.K=olympe.D.J.G;
303
- m.zd.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.Qa.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.yw.K=olympe.D.J.C;m.Pm.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.Ox.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.Cr.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.bx.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.sin.K=olympe.D.J.G;m.cos.K=olympe.D.J.G;m.atan2.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.abs.K=olympe.D.J.G;m.Qi.K=new olympe.D.J(()=>olympe.D.ba,[0,1]);olympe.D.Na=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.zb(b.value)}cr(a){return olympe.D.Na.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.ta([this,...b],(...c)=>{let d='';for(let e=0,f=c.length;e<f;e++)d=c[e]?d+c[e].valueOf():d+c[e];return olympe.D.zb(d)},olympe.D.Na,'OString.concat')}Kc(){return this}by(a){return olympe.D.sa(parseInt(this.value,
301
+ b,c,d){return(a/=d)<1/2.75?7.5625*c*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},$y:function(a,b,c,d){a=d-a;d=(a/=d)<1/2.75?7.5625*c*a*a:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375):c*(7.5625*(a-=2.625/2.75)*a+.984375);return c-d+b}};m=olympe.D.ba.prototype;m.toJSON.L=olympe.D.J.C;m.en.L=olympe.D.J.C;m.isNaN.L=olympe.D.J.P;m.Kc.L=olympe.D.J.F;
302
+ m.toString.L=new olympe.D.J(()=>String,[]);m.toFixed.L=new olympe.D.J(()=>String,[]);m.Xd.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.Ug.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.round.L=olympe.D.J.G;m.Xi.L=olympe.D.J.G;m.uk.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.Gi.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.mx.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.floor.L=olympe.D.J.G;m.ceil.L=olympe.D.J.G;m.trunc.L=olympe.D.J.G;m.log.L=olympe.D.J.G;m.pow.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.exp.L=olympe.D.J.G;
303
+ m.zd.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.Qa.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;m.yw.L=olympe.D.J.C;m.Pm.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.Ox.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.Cr.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.bx.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.sin.L=olympe.D.J.G;m.cos.L=olympe.D.J.G;m.atan2.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.abs.L=olympe.D.J.G;m.Qi.L=new olympe.D.J(()=>olympe.D.ba,[0,1]);olympe.D.Na=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.zb(b.value)}cr(a){return olympe.D.Na.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.ta([this,...b],(...c)=>{let d='';for(let e=0,f=c.length;e<f;e++)d=c[e]?d+c[e].valueOf():d+c[e];return olympe.D.zb(d)},olympe.D.Na,'OString.concat')}Kc(){return this}by(a){return olympe.D.sa(parseInt(this.value,
304
304
  a))}Gr(){return olympe.D.sa(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}Qa(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}zd(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.Xb(c&&b.valueOf()===c.valueOf()),olympe.D.fa,'OString.oEquals')}Hh(){return olympe.D.Xb(!this.value||0===this.value.length)}contains(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.Xb((c instanceof olympe.D.Na||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
305
305
  olympe.D.fa,'OString.contains')}startsWith(a,b){return olympe.D.ta([this,a,b||0],(c,d,e)=>olympe.D.Xb(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.D.fa,'OString.startsWith')}endsWith(a,b){return olympe.D.ta([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Gm().valueOf()+e.valueOf()+1;return olympe.D.Xb(c.valueOf().endsWith(d.valueOf(),e))},olympe.D.fa,'OString.endsWith')}indexOf(a,b){return olympe.D.ta([this,a,b||0],(c,d,e)=>olympe.D.sa(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
306
306
  olympe.D.ba,'OString.indexOf')}lastIndexOf(a,b){return olympe.D.ta([this,a,b||Infinity],(c,d,e)=>olympe.D.sa(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.D.ba,'OString.lastIndexOf')}slice(a,b){return olympe.D.ta([this,a,b],(c,d,e)=>olympe.D.zb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.D.Na,'OString.slice')}Gm(){return olympe.D.sa(this.value.length)}threshold(a){return olympe.D.ta([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.D.Na.EMPTY,olympe.D.Na,'OString.threshold')}toLowerCase(){return olympe.D.zb(this.value.toLowerCase())}toUpperCase(){return olympe.D.zb(this.value.toUpperCase())}trim(){return olympe.D.zb(this.value.trim())}padStart(a,
307
307
  b){return olympe.D.ta([this,a,b],(c,d,e)=>olympe.D.zb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.Na,'OString.padStart')}padEnd(a,b){return olympe.D.ta([this,a,b],(c,d,e)=>olympe.D.zb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.Na,'OString.padEnd')}replace(a,b){return olympe.D.ta([this,a,b],(c,d,e)=>olympe.D.zb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.Na,'OString.replace')}Yx(a,b){return olympe.D.ta([this,a,b],(c,d,e)=>olympe.D.zb(c.valueOf().substr(d.valueOf(),
308
- e.valueOf())),olympe.D.Na,'OString.subOStr')}static concat(...a){return olympe.D.zb('').concat(...a)}};olympe.D.Na.EMPTY=new olympe.D.Na('');olympe.D.Na.zu=new olympe.D.Na(' ');m=olympe.D.Na.prototype;m.toJSON.K=olympe.D.J.C;m.cr.K=new olympe.D.J(()=>olympe.D.Na,[0,1]);m.concat.K=olympe.D.J.F;m.Kc.K=olympe.D.J.F;m.by.K=olympe.D.J.G;m.Gr.K=olympe.D.J.G;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.Qa.K=olympe.D.J.C;m.zd.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.Hh.K=olympe.D.J.P;
309
- m.contains.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.startsWith.K=new olympe.D.J(()=>olympe.D.fa,[0,1]);m.endsWith.K=new olympe.D.J(()=>olympe.D.fa,[0,1]);m.indexOf.K=new olympe.D.J(()=>olympe.D.ba,[0,1]);m.lastIndexOf.K=new olympe.D.J(()=>olympe.D.ba,[0,1]);m.slice.K=new olympe.D.J(()=>olympe.D.Na,[0,1]);m.Gm.K=olympe.D.J.G;m.threshold.K=new olympe.D.J(()=>olympe.D.Na,[0]);m.toLowerCase.K=olympe.D.J.F;m.toUpperCase.K=olympe.D.J.F;m.trim.K=olympe.D.J.F;m.padStart.K=olympe.D.J.F;m.padEnd.K=olympe.D.J.F;
310
- m.replace.K=olympe.D.J.F;m.Yx.K=olympe.D.J.F;olympe.D.fa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.D.fa.F:olympe.D.fa.C}and(a){if(void 0!==a)return olympe.D.fb(a)?olympe.D.pe([a],b=>new olympe.D.fa(this.valueOf()&&b.valueOf()),olympe.D.fa,'and'):this.value&&a.valueOf()?olympe.D.fa.F:olympe.D.fa.C}Qa(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}zd(a){if(void 0!==a)return olympe.D.fb(a)?
308
+ e.valueOf())),olympe.D.Na,'OString.subOStr')}static concat(...a){return olympe.D.zb('').concat(...a)}};olympe.D.Na.EMPTY=new olympe.D.Na('');olympe.D.Na.zu=new olympe.D.Na(' ');m=olympe.D.Na.prototype;m.toJSON.L=olympe.D.J.C;m.cr.L=new olympe.D.J(()=>olympe.D.Na,[0,1]);m.concat.L=olympe.D.J.F;m.Kc.L=olympe.D.J.F;m.by.L=olympe.D.J.G;m.Gr.L=olympe.D.J.G;m.toString.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;m.Qa.L=olympe.D.J.C;m.zd.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.Hh.L=olympe.D.J.P;
309
+ m.contains.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.startsWith.L=new olympe.D.J(()=>olympe.D.fa,[0,1]);m.endsWith.L=new olympe.D.J(()=>olympe.D.fa,[0,1]);m.indexOf.L=new olympe.D.J(()=>olympe.D.ba,[0,1]);m.lastIndexOf.L=new olympe.D.J(()=>olympe.D.ba,[0,1]);m.slice.L=new olympe.D.J(()=>olympe.D.Na,[0,1]);m.Gm.L=olympe.D.J.G;m.threshold.L=new olympe.D.J(()=>olympe.D.Na,[0]);m.toLowerCase.L=olympe.D.J.F;m.toUpperCase.L=olympe.D.J.F;m.trim.L=olympe.D.J.F;m.padStart.L=olympe.D.J.F;m.padEnd.L=olympe.D.J.F;
310
+ m.replace.L=olympe.D.J.F;m.Yx.L=olympe.D.J.F;olympe.D.fa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.D.fa.F:olympe.D.fa.C}and(a){if(void 0!==a)return olympe.D.fb(a)?olympe.D.pe([a],b=>new olympe.D.fa(this.valueOf()&&b.valueOf()),olympe.D.fa,'and'):this.value&&a.valueOf()?olympe.D.fa.F:olympe.D.fa.C}Qa(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}zd(a){if(void 0!==a)return olympe.D.fb(a)?
311
311
  olympe.D.pe([a],b=>new olympe.D.fa(this.valueOf()===b.valueOf()),olympe.D.fa,'oEquals'):this.Qa(a)?olympe.D.fa.F:olympe.D.fa.C}md(){return this.value?olympe.D.fa.C:olympe.D.fa.F}nv(a){if(void 0!==a)return olympe.D.fb(a)?olympe.D.pe([a],b=>new olympe.D.fa(!(this.valueOf()&&b.valueOf())),olympe.D.fa,'andNot'):this.value&&!a.valueOf()?olympe.D.fa.F:olympe.D.fa.C}or(a){if(void 0!==a)return olympe.D.fb(a)?olympe.D.pe([a],b=>new olympe.D.fa(this.valueOf()||b.valueOf()),olympe.D.fa,'or'):this.value||a.valueOf()?
312
- olympe.D.fa.F:olympe.D.fa.C}xor(a){return olympe.D.ta([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.Xb(b&&!c||!b&&c)},olympe.D.fa,'OBoolean.xor')}Rv(){return this.value}rr(){return!0===this.value?olympe.D.ba.ONE:olympe.D.ba.ZERO}Kc(){return olympe.D.zb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.fa.F=new olympe.D.fa(!0);olympe.D.fa.C=new olympe.D.fa(!1);m=olympe.D.fa.prototype;m.toJSON.K=olympe.D.J.C;
313
- m.and.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.Qa.K=olympe.D.J.C;m.zd.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.md.K=olympe.D.J.P;m.nv.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.or.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.xor.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.Rv.K=new olympe.D.J(()=>Boolean,[]);m.rr.K=olympe.D.J.G;m.Kc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;function Gb(a){return new olympe.D.gb(new Date(a))}
312
+ olympe.D.fa.F:olympe.D.fa.C}xor(a){return olympe.D.ta([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.Xb(b&&!c||!b&&c)},olympe.D.fa,'OBoolean.xor')}Rv(){return this.value}rr(){return!0===this.value?olympe.D.ba.ONE:olympe.D.ba.ZERO}Kc(){return olympe.D.zb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.fa.F=new olympe.D.fa(!0);olympe.D.fa.C=new olympe.D.fa(!1);m=olympe.D.fa.prototype;m.toJSON.L=olympe.D.J.C;
313
+ m.and.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.Qa.L=olympe.D.J.C;m.zd.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.md.L=olympe.D.J.P;m.nv.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.or.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.xor.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.Rv.L=new olympe.D.J(()=>Boolean,[]);m.rr.L=olympe.D.J.G;m.Kc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;function Gb(a){return new olympe.D.gb(new Date(a))}
314
314
  olympe.D.gb=class{constructor(a){this.rb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.rb.toJSON()+'" }'}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.gb(new Date(b.value.valueOf()))}static now(){return new olympe.D.gb(new Date)}Oi(){return this.rb&&!isNaN(this.rb.getTime())?olympe.D.fa.F:olympe.D.fa.C}$s(){return olympe.D.sa(this.rb.getMilliseconds())}bt(){return olympe.D.sa(this.rb.getSeconds())}at(){return olympe.D.sa(this.rb.getMinutes())}Zs(){return olympe.D.sa(this.rb.getHours())}dw(){return olympe.D.sa(this.rb.getDate())}getMonth(){return olympe.D.sa(this.rb.getMonth()+1)}ct(){return olympe.D.sa(this.rb.getFullYear())}getTime(){return this.rb.getTime()}Vx(){var a=
315
315
  olympe.D,b=a.zb;var c=this.rb.getDate();c=10>c?'0'+c:c;var d=this.rb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.rb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.D.zb(this.rb.toLocaleString(a)):olympe.D.ta([this,a],(b,c)=>olympe.D.zb(b.rb.toLocaleString(c.valueOf())),olympe.D.Na)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.D.zb(this.rb.toLocaleDateString(a)):olympe.D.ta([this,a],(b,c)=>olympe.D.zb(b.rb.toLocaleDateString(c.valueOf())),
316
316
  olympe.D.Na)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.zb(this.rb.toLocaleTimeString(a)):olympe.D.ta([this,a],(b,c)=>olympe.D.zb(b.rb.toLocaleTimeString(c.valueOf())),olympe.D.Na)}Kc(){return olympe.D.zb(this.rb.toISOString())}Zx(){return new Date(this.getTime())}ay(){return this}ey(){return this}Sf(a,b){return olympe.D.ta([b],c=>{const d=new olympe.D.gb(new Date(this.rb.getTime()));d.rb['set'+a](this.rb['get'+a]()+c.valueOf());return d},olympe.D.gb)}ev(a){return this.Sf('Milliseconds',
317
317
  a)}kv(a){return this.Sf('Seconds',a)}fv(a){return this.Sf('Minutes',a)}dv(a){return this.Sf('Hours',a)}nm(a){return this.Sf('Date',a)}lv(a){return'number'===typeof a?this.nm(7*a):this.nm(a.uk(7))}gv(a){return this.Sf('Month',a)}mv(a){return this.Sf('FullYear',a)}Wx(){let a=this.rb.getDay();a=0===a?6:a-1;return new olympe.D.gb(new Date(this.rb.getFullYear(),this.rb.getMonth(),this.rb.getDate()-a))}Xx(){return new olympe.D.gb(new Date(this.rb.getFullYear(),this.rb.getMonth()))}zd(a){return olympe.D.ta([a],
318
318
  b=>olympe.D.Xb(this.Qa(b)),olympe.D.fa)}Qa(a){return a instanceof olympe.D.gb?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}qw(){let a=this.rb.getDay();0===a&&(a=7);return olympe.D.sa(a)}hw(a,b){return olympe.D.ta([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.rb.getFullYear()-c.rb.getFullYear():'months'===d?c=12*(this.rb.getFullYear()-c.rb.getFullYear())+(this.rb.getMonth()-c.rb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
319
319
  void 0===d&&(olympe.ma.ab('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.rb.getTime()-c.rb.getTime())/d));return olympe.D.sa(c)},olympe.D.ba)}Yw(a){return olympe.D.ta([a],b=>olympe.D.Xb(this.getTime()<b.getTime()),olympe.D.fa)}Ww(a){return olympe.D.ta([a],b=>olympe.D.Xb(this.getTime()>b.getTime()),olympe.D.fa)}Zw(a,b){return olympe.D.ta([a,b],(c,d)=>olympe.D.Xb(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.fa)}valueOf(){return this.Oi().valueOf()?
320
- new Date(this.getTime()):new Date(0)}};olympe.D.gb.C=Gb(0);olympe.D.gb.F=Gb(Number.NaN);m=olympe.D.gb.prototype;m.Oi.K=olympe.D.J.P;m.$s.K=olympe.D.J.G;m.bt.K=olympe.D.J.G;m.at.K=olympe.D.J.G;m.Zs.K=olympe.D.J.G;m.dw.K=olympe.D.J.G;m.getMonth.K=olympe.D.J.G;m.ct.K=olympe.D.J.G;m.getTime.K=olympe.D.J.C;m.Vx.K=new olympe.D.J(()=>olympe.D.Na,[0]);m.toLocaleString.K=olympe.D.J.F;m.toLocaleDateString.K=olympe.D.J.F;m.toLocaleTimeString.K=olympe.D.J.F;m.Kc.K=olympe.D.J.F;m.Zx.K=olympe.D.J.C;
321
- m.ay.K=new olympe.D.J(()=>olympe.D.gb,[]);m.ey.K=new olympe.D.J(()=>olympe.D.gb,[]);m.Sf.K=new olympe.D.J(()=>olympe.D.gb,[]);m.ev.K=new olympe.D.J(()=>olympe.D.gb,[]);m.kv.K=new olympe.D.J(()=>olympe.D.gb,[]);m.fv.K=new olympe.D.J(()=>olympe.D.gb,[]);m.dv.K=new olympe.D.J(()=>olympe.D.gb,[]);m.nm.K=new olympe.D.J(()=>olympe.D.gb,[0]);m.lv.K=new olympe.D.J(()=>olympe.D.gb,[]);m.gv.K=new olympe.D.J(()=>olympe.D.gb,[]);m.mv.K=new olympe.D.J(()=>olympe.D.gb,[0]);
322
- m.Wx.K=new olympe.D.J(()=>olympe.D.gb,[]);m.Xx.K=new olympe.D.J(()=>olympe.D.gb,[]);m.zd.K=olympe.D.J.P;m.Qa.K=olympe.D.J.C;m.qw.K=olympe.D.J.G;m.hw.K=new olympe.D.J(()=>olympe.D.ba,[0,1]);m.Yw.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.Ww.K=new olympe.D.J(()=>olympe.D.fa,[0]);m.Zw.K=new olympe.D.J(()=>olympe.D.fa,[0,1]);m.valueOf.K=olympe.D.J.C;const Hb=new Map,Ib=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,Jb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function Kb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=Jb.exec(c)):(d=1,c=Ib.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.D.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.D.Xe(a)?olympe.D.pe([a],b,olympe.D.Color):b(a)}
320
+ new Date(this.getTime()):new Date(0)}};olympe.D.gb.C=Gb(0);olympe.D.gb.F=Gb(Number.NaN);m=olympe.D.gb.prototype;m.Oi.L=olympe.D.J.P;m.$s.L=olympe.D.J.G;m.bt.L=olympe.D.J.G;m.at.L=olympe.D.J.G;m.Zs.L=olympe.D.J.G;m.dw.L=olympe.D.J.G;m.getMonth.L=olympe.D.J.G;m.ct.L=olympe.D.J.G;m.getTime.L=olympe.D.J.C;m.Vx.L=new olympe.D.J(()=>olympe.D.Na,[0]);m.toLocaleString.L=olympe.D.J.F;m.toLocaleDateString.L=olympe.D.J.F;m.toLocaleTimeString.L=olympe.D.J.F;m.Kc.L=olympe.D.J.F;m.Zx.L=olympe.D.J.C;
321
+ m.ay.L=new olympe.D.J(()=>olympe.D.gb,[]);m.ey.L=new olympe.D.J(()=>olympe.D.gb,[]);m.Sf.L=new olympe.D.J(()=>olympe.D.gb,[]);m.ev.L=new olympe.D.J(()=>olympe.D.gb,[]);m.kv.L=new olympe.D.J(()=>olympe.D.gb,[]);m.fv.L=new olympe.D.J(()=>olympe.D.gb,[]);m.dv.L=new olympe.D.J(()=>olympe.D.gb,[]);m.nm.L=new olympe.D.J(()=>olympe.D.gb,[0]);m.lv.L=new olympe.D.J(()=>olympe.D.gb,[]);m.gv.L=new olympe.D.J(()=>olympe.D.gb,[]);m.mv.L=new olympe.D.J(()=>olympe.D.gb,[0]);
322
+ m.Wx.L=new olympe.D.J(()=>olympe.D.gb,[]);m.Xx.L=new olympe.D.J(()=>olympe.D.gb,[]);m.zd.L=olympe.D.J.P;m.Qa.L=olympe.D.J.C;m.qw.L=olympe.D.J.G;m.hw.L=new olympe.D.J(()=>olympe.D.ba,[0,1]);m.Yw.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.Ww.L=new olympe.D.J(()=>olympe.D.fa,[0]);m.Zw.L=new olympe.D.J(()=>olympe.D.fa,[0,1]);m.valueOf.L=olympe.D.J.C;const Hb=new Map,Ib=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,Jb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function Kb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=Jb.exec(c)):(d=1,c=Ib.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.D.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.D.Xe(a)?olympe.D.pe([a],b,olympe.D.Color):b(a)}
323
323
  olympe.D.Color=class{constructor(a,b,c,d){this.C=olympe.D.sa(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.D.sa(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.D.sa(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.D.sa(void 0!==d?Math.min(1,Math.max(0,d)):1)}toJSON(){return{r:this.C.valueOf(),g:this.F.valueOf(),b:this.b.valueOf(),a:this.a.valueOf()}}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.Color.create(b.r,
324
324
  b.g,b.b,b.a)}static create(a,b,c,d=1){return olympe.D.ta([a,b,c,d],(e,f,g,h)=>{e=olympe.D.sa(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.D.sa(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.D.sa(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.D.sa(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of Hb.values())if(k&&k.C.Qa(e)&&k.F.Qa(f)&&k.b.Qa(g)&&k.a.Qa(h))return k;return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Ng(){return this.C}Gg(){return this.b}Kg(){return this.F}Fg(){return this.a}rv(a,
325
325
  b){return olympe.D.Color.create(this.C.Qi(a.Ng(),b),this.F.Qi(a.Kg(),b),this.b.Qi(a.Gg(),b),this.a.Qi(a.Fg(),b))}Kv(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}Hr(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}cn(){const a=(16777216|this.b|this.F<<8|this.C<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);return'#'+(a+b).toUpperCase()}toString(){return this.cn()}Qa(a){return a instanceof olympe.D.Color?this.C.valueOf()===a.C.valueOf()&&
326
326
  this.F.valueOf()===a.F.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}compare(a){const b=(this.Ng().valueOf()<<16|this.Kg().valueOf()<<8|this.Gg().valueOf())-(a.Ng().valueOf()<<16|a.Kg().valueOf()<<8|a.Gg().valueOf());return 0===b?this.Fg().valueOf()-a.Fg().valueOf():b}};olympe.D.Color.prototype.equals=olympe.D.Color.prototype.Qa;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.cn;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.Hr;
327
- olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Fg;olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Kg;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Gg;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Ng;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.K=olympe.D.J.C;m.Ng.K=olympe.D.J.G;m.Gg.K=olympe.D.J.G;m.Kg.K=olympe.D.J.G;m.Fg.K=olympe.D.J.G;m.rv.K=new olympe.D.J(()=>olympe.D.Color,[]);
328
- m.Kv.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Hr.K=new olympe.D.J(()=>String,[]);m.cn.K=new olympe.D.J(()=>String,[]);m.Qa.K=olympe.D.J.C;m.compare.K=olympe.D.J.C;olympe.D.File=class{la(){}ep(){}tl(){}Im(){}hk(){}Cm(){}ik(){}rename(){}};olympe.D.Sb=class{constructor(a,b){this.x=olympe.D.Vd(a);this.y=olympe.D.Vd(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.Ra(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Ra(this.y).valueOf())+' }'}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.Sb(b.x,b.y)}fp(){return this.x}Tx(a){Db(this.x,a)}gp(){return this.y}Ux(a){Db(this.y,a)}Jw(){return this.x.Cr(this.y)}Wd(a){return olympe.D.ta([this,a],(b,c)=>new olympe.D.Sb(b.x.Wd(c.x),b.y.Wd(c.y)),
327
+ olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Fg;olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Kg;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Gg;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Ng;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.L=olympe.D.J.C;m.Ng.L=olympe.D.J.G;m.Gg.L=olympe.D.J.G;m.Kg.L=olympe.D.J.G;m.Fg.L=olympe.D.J.G;m.rv.L=new olympe.D.J(()=>olympe.D.Color,[]);
328
+ m.Kv.L=new olympe.D.J(()=>olympe.D.Color,[]);m.Hr.L=new olympe.D.J(()=>String,[]);m.cn.L=new olympe.D.J(()=>String,[]);m.Qa.L=olympe.D.J.C;m.compare.L=olympe.D.J.C;olympe.D.File=class{la(){}ep(){}tl(){}Im(){}hk(){}Cm(){}ik(){}rename(){}};olympe.D.Sb=class{constructor(a,b){this.x=olympe.D.Wd(a);this.y=olympe.D.Wd(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.Ra(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Ra(this.y).valueOf())+' }'}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.Sb(b.x,b.y)}fp(){return this.x}Tx(a){Db(this.x,a)}gp(){return this.y}Ux(a){Db(this.y,a)}Jw(){return this.x.Cr(this.y)}Xd(a){return olympe.D.ta([this,a],(b,c)=>new olympe.D.Sb(b.x.Xd(c.x),b.y.Xd(c.y)),
329
329
  olympe.D.Sb,'Vector2.plus')}Ug(a){return olympe.D.ta([this,a],(b,c)=>new olympe.D.Sb(b.x.Ug(c.x),b.y.Ug(c.y)),olympe.D.Sb,'Vector2.minus')}ox(a){return new olympe.D.Sb(this.x.uk(a),this.y.uk(a))}Fv(a){return new olympe.D.Sb(this.x.Gi(a),this.y.Gi(a))}qx(){return new olympe.D.Sb(this.x.Xi(),this.y.Xi())}Gv(a){return olympe.D.ta([this,a],(b,c)=>olympe.D.ta([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.sa(d*f+e*g),olympe.D.ba),olympe.D.ba)}length(){return olympe.D.ta([this.x,this.y],(a,b)=>olympe.D.sa(Math.sqrt(a*
330
- a+b*b)),olympe.D.ba)}normalize(){return olympe.D.ta([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.Sb(a/c,b/c)},olympe.D.Sb)}floor(){return olympe.D.ta([this.x,this.y],(a,b)=>new olympe.D.Sb(Math.floor(a),Math.floor(b)),olympe.D.Sb)}ceil(){return olympe.D.ta([this.x,this.y],(a,b)=>new olympe.D.Sb(Math.ceil(a),Math.ceil(b)),olympe.D.Sb)}round(){return olympe.D.ta([this.x,this.y],(a,b)=>new olympe.D.Sb(Math.round(a),Math.round(b)),olympe.D.Sb)}hv(a){return new olympe.D.Sb(this.x.Wd(a),
331
- this.y.Wd(a))}jv(a,b){return new olympe.D.Sb(this.x.Wd(a),this.y.Wd(b))}Kc(){return olympe.D.ta([this.x,this.y],(a,b)=>olympe.D.zb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Na)}toString(){return`Vector2[${this.x.Da.Eb}, ${this.y.Da.Eb}]`}Qa(a){return this===a?!0:!1}};m=olympe.D.Sb.prototype;m.toJSON.K=olympe.D.J.C;m.fp.K=olympe.D.J.G;m.Tx.K=olympe.D.J.C;m.gp.K=olympe.D.J.G;m.Ux.K=olympe.D.J.C;m.Jw.K=olympe.D.J.G;m.Wd.K=new olympe.D.J(()=>olympe.D.Sb,[0]);
332
- m.Ug.K=new olympe.D.J(()=>olympe.D.Sb,[0]);m.ox.K=olympe.D.J.T;m.Fv.K=olympe.D.J.T;m.qx.K=olympe.D.J.T;m.Gv.K=new olympe.D.J(()=>olympe.D.ba,[0]);m.length.K=olympe.D.J.G;m.normalize.K=olympe.D.J.T;m.floor.K=olympe.D.J.T;m.ceil.K=olympe.D.J.T;m.round.K=olympe.D.J.T;m.hv.K=olympe.D.J.T;m.jv.K=olympe.D.J.T;m.Kc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.Qa.K=olympe.D.J.C;olympe.D.ig=class{constructor(){}Ob(){}Gd(){}get(){}Eh(){}has(){}Rg(){}Cc(){}xf(){}ff(){}Vf(){}forEach(){}fe(){}};olympe.D.ig.prototype.forEachCurrentValue=olympe.D.ig.prototype.fe;olympe.D.ig.prototype.forEach=olympe.D.ig.prototype.forEach;m=olympe.D.ig.prototype;m.has.K=olympe.D.J.P;m.Rg.K=olympe.D.J.C;m.Cc.K=new olympe.D.J(()=>Object,[]);m.xf.K=new olympe.D.J(()=>String,[]);m.ff.K=olympe.D.J.G;m.Vf.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.fe.K=olympe.D.J.C;olympe.D.jd=class extends olympe.D.ig{Td(){}wf(){}Ve(){}vf(){}ge(){}Ue(){}Hi(){}Gh(){}};olympe.D.jd.prototype.getCurrentAt=olympe.D.jd.prototype.Ue;olympe.D.jd.prototype.getAt=olympe.D.jd.prototype.ge;olympe.D.jd.prototype.getCurrentKeyAt=olympe.D.jd.prototype.vf;olympe.D.jd.prototype.getKeyAt=olympe.D.jd.prototype.Ve;olympe.D.jd.prototype.getCurrentRank=olympe.D.jd.prototype.wf;olympe.D.jd.prototype.getRank=olympe.D.jd.prototype.Td;m=olympe.D.jd.prototype;m.Td.K=olympe.D.J.G;m.wf.K=olympe.D.J.C;
333
- m.Ve.K=new olympe.D.J(()=>String,[]);m.vf.K=olympe.D.J.C;m.ge.K=new olympe.D.J(()=>Object,[]);m.Ue.K=olympe.D.J.C;m.Hi.K=olympe.D.J.C;m.Gh.K=new olympe.D.J(()=>Array,[]);olympe.D.Oh=class{constructor(a,b){this.P=b||olympe.D.Wa();this.valueType=a||Object;this.values={};this.pb=this.za=null;this.Qe=0;this.Z=Object.create(null);this.ub=Object.create(null);this.size=0;this.L=null;this.P.onDestroy(()=>{const c=this.Z;if(c){const d=Object.keys(c),e=d.length;for(let f=0;f<e;f++){const g=c[d[f]],h=Object.keys(g);for(let k=h.length,l=0;l<k;l++)g[h[l]].destroy()}}})}getContext(){return this.P}Ob(){return this.valueType}Gd(a){this.valueType=a;const b=this.za;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
330
+ a+b*b)),olympe.D.ba)}normalize(){return olympe.D.ta([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.Sb(a/c,b/c)},olympe.D.Sb)}floor(){return olympe.D.ta([this.x,this.y],(a,b)=>new olympe.D.Sb(Math.floor(a),Math.floor(b)),olympe.D.Sb)}ceil(){return olympe.D.ta([this.x,this.y],(a,b)=>new olympe.D.Sb(Math.ceil(a),Math.ceil(b)),olympe.D.Sb)}round(){return olympe.D.ta([this.x,this.y],(a,b)=>new olympe.D.Sb(Math.round(a),Math.round(b)),olympe.D.Sb)}hv(a){return new olympe.D.Sb(this.x.Xd(a),
331
+ this.y.Xd(a))}jv(a,b){return new olympe.D.Sb(this.x.Xd(a),this.y.Xd(b))}Kc(){return olympe.D.ta([this.x,this.y],(a,b)=>olympe.D.zb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Na)}toString(){return`Vector2[${this.x.Da.Eb}, ${this.y.Da.Eb}]`}Qa(a){return this===a?!0:!1}};m=olympe.D.Sb.prototype;m.toJSON.L=olympe.D.J.C;m.fp.L=olympe.D.J.G;m.Tx.L=olympe.D.J.C;m.gp.L=olympe.D.J.G;m.Ux.L=olympe.D.J.C;m.Jw.L=olympe.D.J.G;m.Xd.L=new olympe.D.J(()=>olympe.D.Sb,[0]);
332
+ m.Ug.L=new olympe.D.J(()=>olympe.D.Sb,[0]);m.ox.L=olympe.D.J.T;m.Fv.L=olympe.D.J.T;m.qx.L=olympe.D.J.T;m.Gv.L=new olympe.D.J(()=>olympe.D.ba,[0]);m.length.L=olympe.D.J.G;m.normalize.L=olympe.D.J.T;m.floor.L=olympe.D.J.T;m.ceil.L=olympe.D.J.T;m.round.L=olympe.D.J.T;m.hv.L=olympe.D.J.T;m.jv.L=olympe.D.J.T;m.Kc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.Qa.L=olympe.D.J.C;olympe.D.ig=class{constructor(){}Ob(){}Gd(){}get(){}Eh(){}has(){}Rg(){}Cc(){}xf(){}ff(){}Vf(){}forEach(){}fe(){}};olympe.D.ig.prototype.forEachCurrentValue=olympe.D.ig.prototype.fe;olympe.D.ig.prototype.forEach=olympe.D.ig.prototype.forEach;m=olympe.D.ig.prototype;m.has.L=olympe.D.J.P;m.Rg.L=olympe.D.J.C;m.Cc.L=new olympe.D.J(()=>Object,[]);m.xf.L=new olympe.D.J(()=>String,[]);m.ff.L=olympe.D.J.G;m.Vf.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.fe.L=olympe.D.J.C;olympe.D.jd=class extends olympe.D.ig{Ud(){}wf(){}Ve(){}vf(){}ge(){}Ue(){}Hi(){}Gh(){}};olympe.D.jd.prototype.getCurrentAt=olympe.D.jd.prototype.Ue;olympe.D.jd.prototype.getAt=olympe.D.jd.prototype.ge;olympe.D.jd.prototype.getCurrentKeyAt=olympe.D.jd.prototype.vf;olympe.D.jd.prototype.getKeyAt=olympe.D.jd.prototype.Ve;olympe.D.jd.prototype.getCurrentRank=olympe.D.jd.prototype.wf;olympe.D.jd.prototype.getRank=olympe.D.jd.prototype.Ud;m=olympe.D.jd.prototype;m.Ud.L=olympe.D.J.G;m.wf.L=olympe.D.J.C;
333
+ m.Ve.L=new olympe.D.J(()=>String,[]);m.vf.L=olympe.D.J.C;m.ge.L=new olympe.D.J(()=>Object,[]);m.Ue.L=olympe.D.J.C;m.Hi.L=olympe.D.J.C;m.Gh.L=new olympe.D.J(()=>Array,[]);olympe.D.Oh=class{constructor(a,b){this.P=b||olympe.D.Wa();this.valueType=a||Object;this.values={};this.pb=this.za=null;this.Qe=0;this.Z=Object.create(null);this.ub=Object.create(null);this.size=0;this.K=null;this.P.onDestroy(()=>{const c=this.Z;if(c){const d=Object.keys(c),e=d.length;for(let f=0;f<e;f++){const g=c[d[f]],h=Object.keys(g);for(let k=h.length,l=0;l<k;l++)g[h[l]].destroy()}}})}getContext(){return this.P}Ob(){return this.valueType}Gd(a){this.valueType=a;const b=this.za;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
334
334
  c)&&zb(b[c],a)}get(a){const b=c=>{null===this.za&&(this.za={});return this.Ki(this.za,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.D.ta([a],c=>b(c),this.valueType)}Eh(a){a=this.values[a];return olympe.D.fb(a)?kb(a.Da)?a.Da.Eb:void 0:a}has(a){const b=c=>{null===this.pb&&(this.pb={});return this.Ki(this.pb,c,c in this.values?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa,'Map.has('+c+')')};return olympe.D.ta([a],c=>b(c),olympe.D.fa)}Rg(a){return a in this.values}Ki(a,b,c,d,e){let f=a[b];
335
- f||this.P.run(()=>{f=olympe.D.Kd(d,void 0,e);a[b]=f;f.Da.onDestroy(()=>delete a[b]);olympe.D.fb(c)?Cb(f,c):Ab(f,c)});return f}Cc(){throw Error('Abstract method getFirstKey needs to be overridden');}xf(){throw Error('Abstract method getFirstKey needs to be overridden');}ff(){null===this.L&&this.P.run(()=>{this.L=olympe.D.Kd(olympe.D.ba,olympe.D.sa(this.size));this.L.Da.onDestroy(()=>{this.L=null})});return this.L}Vf(){return this.size}forEach(a,b){const c=this.im();a=this.Wq(c,a,b);this.hm(c,a)}im(){return String(++this.Qe)}hm(a,
335
+ f||this.P.run(()=>{f=olympe.D.Ld(d,void 0,e);a[b]=f;f.Da.onDestroy(()=>delete a[b]);olympe.D.fb(c)?Cb(f,c):Ab(f,c)});return f}Cc(){throw Error('Abstract method getFirstKey needs to be overridden');}xf(){throw Error('Abstract method getFirstKey needs to be overridden');}ff(){null===this.K&&this.P.run(()=>{this.K=olympe.D.Ld(olympe.D.ba,olympe.D.sa(this.size));this.K.Da.onDestroy(()=>{this.K=null})});return this.K}Vf(){return this.size}forEach(a,b){const c=this.im();a=this.Wq(c,a,b);this.hm(c,a)}im(){return String(++this.Qe)}hm(a,
336
336
  b){this.ub[a]=b;olympe.D.Wa().Z(()=>{const c=this.Z;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.ub[a]});this.fe(b)}Wq(a,b,c){const d=olympe.D.Wa();return(e,f)=>{d.run(()=>{const g=olympe.D.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.mm(a,f,g)})}}mm(a,b,c){void 0===this.Z[b]&&(this.Z[b]={});this.Z[b][a]=c}fe(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===
337
337
  a(b[c],c,this))break}$j(a,b){void 0!==this.values[a]&&this.Ci(a,!0);this.values[a]=b;var c=this.za;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?Cb(c[a],b):Ab(c[a],b));c=this.pb;null!==c&&void 0!==c[a]&&Db(c[a],!0);this.size++;c=this.ub;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}Ci(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.Eg?d.Da.Eb:d;var e=this.za;null!==e&&void 0!==e[a]&&Bb(e[a]);e=this.pb;null!==e&&void 0!==
338
- e[a]&&Db(e[a],!1);delete c[a];this.size--;b||this.rf()}a=this.Z[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}rf(){null!==this.L&&Db(this.L,this.size)}wh(){var a=this.za;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&Bb(a[c]);a=this.pb;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&Db(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];for(const c in this.Z)if(Object.prototype.hasOwnProperty.call(this.Z,
339
- c)){b=this.Z[c];for(const d in b)Object.prototype.hasOwnProperty.call(b,d)&&b[d].destroy()}this.size=0;null!==this.L&&Db(this.L,this.size)}lg(){const a=this.values;let b='\n';for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=a[c]+'\n');return b}};olympe.D.Oh.xa=[olympe.D.ig];m=olympe.D.Oh.prototype;m.getContext.K=olympe.D.J.C;m.Ob.K=olympe.D.J.C;m.Gd.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>Object,[],'valueType');m.Eh.K=olympe.D.J.C;m.has.K=olympe.D.J.P;m.Rg.K=olympe.D.J.C;m.Ki.K=olympe.D.J.C;
340
- m.ff.K=olympe.D.J.G;m.Vf.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.im.K=olympe.D.J.C;m.hm.K=olympe.D.J.C;m.Wq.K=olympe.D.J.C;m.mm.K=olympe.D.J.C;m.fe.K=olympe.D.J.C;m.$j.K=olympe.D.J.C;m.Ci.K=olympe.D.J.C;m.rf.K=olympe.D.J.C;m.wh.K=olympe.D.J.C;m.lg.K=olympe.D.J.C;olympe.D.$i=class extends olympe.D.Oh{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.oa=this.Ja=this.jb=this.ea=null}Gd(a){super.Gd(a);if(null!==this.oa)for(let b of this.oa.values())zb(b,a)}Cc(){return this.ge(0)}xf(){return this.Ve(0)}Td(a){const b=c=>{null===this.jb&&(this.jb=Object.create(null));let d=this.wf(a);d=void 0!==d?olympe.D.sa(d):void 0;return this.Ki(this.jb,c,d,olympe.D.ba,`List.getRank(${c})`)};return olympe.D.fb(a)?N(olympe.D.createNode(olympe.D.ba,b,null,
338
+ e[a]&&Db(e[a],!1);delete c[a];this.size--;b||this.rf()}a=this.Z[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}rf(){null!==this.K&&Db(this.K,this.size)}wh(){var a=this.za;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&Bb(a[c]);a=this.pb;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&Db(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];for(const c in this.Z)if(Object.prototype.hasOwnProperty.call(this.Z,
339
+ c)){b=this.Z[c];for(const d in b)Object.prototype.hasOwnProperty.call(b,d)&&b[d].destroy()}this.size=0;null!==this.K&&Db(this.K,this.size)}lg(){const a=this.values;let b='\n';for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=a[c]+'\n');return b}};olympe.D.Oh.xa=[olympe.D.ig];m=olympe.D.Oh.prototype;m.getContext.L=olympe.D.J.C;m.Ob.L=olympe.D.J.C;m.Gd.L=olympe.D.J.C;m.get.L=new olympe.D.J(()=>Object,[],'valueType');m.Eh.L=olympe.D.J.C;m.has.L=olympe.D.J.P;m.Rg.L=olympe.D.J.C;m.Ki.L=olympe.D.J.C;
340
+ m.ff.L=olympe.D.J.G;m.Vf.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.im.L=olympe.D.J.C;m.hm.L=olympe.D.J.C;m.Wq.L=olympe.D.J.C;m.mm.L=olympe.D.J.C;m.fe.L=olympe.D.J.C;m.$j.L=olympe.D.J.C;m.Ci.L=olympe.D.J.C;m.rf.L=olympe.D.J.C;m.wh.L=olympe.D.J.C;m.lg.L=olympe.D.J.C;olympe.D.$i=class extends olympe.D.Oh{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.oa=this.Ja=this.jb=this.ea=null}Gd(a){super.Gd(a);if(null!==this.oa)for(let b of this.oa.values())zb(b,a)}Cc(){return this.ge(0)}xf(){return this.Ve(0)}Ud(a){const b=c=>{null===this.jb&&(this.jb=Object.create(null));let d=this.wf(a);d=void 0!==d?olympe.D.sa(d):void 0;return this.Ki(this.jb,c,d,olympe.D.ba,`List.getRank(${c})`)};return olympe.D.fb(a)?N(olympe.D.createNode(olympe.D.ba,b,null,
341
341
  [a.Da],[0],'onResolved('+(b.name||'')+')')):b(a)}wf(a){return this.F[a]}Ve(a){const b=c=>{const d=c.valueOf(),e=this.vf(d);null===this.Ja&&(this.Ja=Object.create(null));return this.Ki(this.Ja,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.ta([a],c=>b(c),String)}vf(a){return this.C[a.valueOf()]}ge(a){if(olympe.D.fb(a))return this.get(olympe.D.ta([a],c=>{c=this.Ve(c);if(!kb(c.Da)){const d=olympe.D.Wa();olympe.D.Af(d)&&ub(d)}return c},String));null===this.oa&&(this.oa=new Map);let b=this.oa.get(a);
342
- b||this.P.run(()=>{b=this.get(this.Ve(a));this.oa.set(a,b);b.Da.onDestroy(()=>this.oa.delete(a))});return b}Ue(a){return this.Eh(this.vf(a))}Hi(a,b,c,d){let e=this.im();a=this.zr(e,a,b,c,d);this.hm(e,a)}zr(a,b,c,d,e){return olympe.D.Wa().G((f,g)=>{let h=!1,k=olympe.D.Mh([b,c,this.Td(g)],(l,n,p)=>{p>=l&&p<l+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.mm(a,g,k)})}Gh(){null===this.ea&&this.P.run(()=>{this.ea=olympe.D.Kd(Array,this.C.filter(a=>void 0!==a));
343
- this.ea.Da.onDestroy(()=>{this.L=null})});return this.ea}fe(a){if(this.C.length!==this.size)super.fe(a);else{var b=this.values;for(let c of this.C.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}km(a,b){const c=this.jb,d=this.Ja,e=this.F[a],f=b.valueOf();if(e!==f||this.C[e]!==a){var g=this.C[f];void 0!==g&&delete this.F[g];void 0!==e&&null!==e&&this.C[e]===a&&(this.C[e]=void 0);this.F[a]=f;this.C[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&Bb(c[g]),void 0!==
342
+ b||this.P.run(()=>{b=this.get(this.Ve(a));this.oa.set(a,b);b.Da.onDestroy(()=>this.oa.delete(a))});return b}Ue(a){return this.Eh(this.vf(a))}Hi(a,b,c,d){let e=this.im();a=this.zr(e,a,b,c,d);this.hm(e,a)}zr(a,b,c,d,e){return olympe.D.Wa().G((f,g)=>{let h=!1,k=olympe.D.Mh([b,c,this.Ud(g)],(l,n,p)=>{p>=l&&p<l+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.mm(a,g,k)})}Gh(){null===this.ea&&this.P.run(()=>{this.ea=olympe.D.Ld(Array,this.C.filter(a=>void 0!==a));
343
+ this.ea.Da.onDestroy(()=>{this.K=null})});return this.ea}fe(a){if(this.C.length!==this.size)super.fe(a);else{var b=this.values;for(let c of this.C.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}km(a,b){const c=this.jb,d=this.Ja,e=this.F[a],f=b.valueOf();if(e!==f||this.C[e]!==a){var g=this.C[f];void 0!==g&&delete this.F[g];void 0!==e&&null!==e&&this.C[e]===a&&(this.C[e]=void 0);this.F[a]=f;this.C[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&Bb(c[g]),void 0!==
344
344
  c[a]&&Ab(c[a],olympe.D.sa(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&Bb(d[e]),void 0!==d[b]&&Ab(d[b],a))}}jm(a){var b=this.Ja,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Da.Eb===a&&Bb(b));delete this.F[a];this.C.splice(c,1);c=this.jb;null!==c&&void 0!==c[a]&&Bb(c[a])}Xq(){if(null!==this.ea){const a=this.C,b=this.ea.Da.Eb;b&&a.join(',')!==b.join(',')&&Ab(this.ea,a)}}rf(){this.Xq();super.rf()}wh(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.jb;if(null!==
345
- a)for(b in a)Bb(a[b]);a=this.Ja;if(null!==a)for(b in a)Bb(a[parseInt(b,10)]);var b=this.ea;null!==b&&(sb(b.Da),Ab(b,this.C));return olympe.D.Oh.prototype.wh.call(this)}lg(){const a=this.values,b=this.F;let c='[\n';for(let d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c+=`${b[d]}. ${a[d]}\n`);return c+']'}};olympe.D.$i.xa=[olympe.D.jd];m=olympe.D.$i.prototype;m.Gd.K=olympe.D.J.C;m.Cc.K=new olympe.D.J(()=>Object,[]);m.xf.K=new olympe.D.J(()=>String,[]);m.Td.K=olympe.D.J.G;m.wf.K=olympe.D.J.C;
346
- m.Ve.K=new olympe.D.J(()=>String,[]);m.vf.K=olympe.D.J.C;m.ge.K=new olympe.D.J(()=>Object,[]);m.Ue.K=olympe.D.J.C;m.Hi.K=new olympe.D.J(()=>{},[]);m.zr.K=olympe.D.J.C;m.Gh.K=new olympe.D.J(()=>Array,[]);m.fe.K=olympe.D.J.C;m.km.K=olympe.D.J.C;m.jm.K=olympe.D.J.C;m.Xq.K=olympe.D.J.C;m.rf.K=olympe.D.J.C;m.wh.K=olympe.D.J.C;m.lg.K=olympe.D.J.C;olympe.D.Map=class extends olympe.D.Oh{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}Gd(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&zb(this.F,a);super.Gd(a)}Cc(){null===this.F&&this.wm();return this.F}xf(){null===this.C&&this.wm();return this.C}wm(){this.getContext().run(()=>{this.F=olympe.D.Kd(this.Ob());this.C=olympe.D.Kd(String);this.Vi(this.zm())})}zm(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}Vi(a){if(void 0!==
347
- a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?Cb(this.F,b):Ab(this.F,b);Ab(this.C,a)}else void 0!==this.F.Da.Eb&&(Bb(this.F),Bb(this.C))}set(a,b){this.$j(a,b);1===this.size&&null!==this.C&&this.Vi(a);this.rf()}remove(a){const b=this.Ci(a);null!==this.C&&this.C.Da.Eb===a&&this.Vi(this.zm());return b}clear(){this.wh();null!==this.C&&this.Vi()}};m=olympe.D.Map.prototype;m.Gd.K=olympe.D.J.C;m.Cc.K=new olympe.D.J(()=>Object,[]);m.xf.K=new olympe.D.J(()=>String,[]);m.wm.K=olympe.D.J.C;
348
- m.zm.K=olympe.D.J.C;m.Vi.K=olympe.D.J.C;m.set.K=olympe.D.J.C;m.remove.K=new olympe.D.J(()=>Object,[]);m.clear.K=olympe.D.J.C;olympe.D.og=class extends olympe.D.$i{constructor(a){super(a)}set(a,b,c){this.$j(a,b);void 0!==c&&olympe.D.Ic([c],d=>{this.km(a,d)});this.rf()}remove(a){this.jm(a);return this.Ci(a)}clear(){this.wh()}};olympe.D.og.prototype.remove.K=olympe.D.J.C;olympe.D.og.prototype.clear.K=olympe.D.J.C;olympe.D.Rr=class extends olympe.D.oj{constructor(a,b){super(olympe.D.ba,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ba.oo.mp}sb(){return olympe.D.tx(this.node,this.duration,this.C,void 0)}};let Lb=null;olympe.D.H=void 0;olympe.D.Ym=void 0;olympe.D.Bh=void 0;olympe.D.vh=new Map;olympe.D.vh.set(0,olympe.D.ba.ZERO);olympe.D.vh.set(1,olympe.D.ba.ONE);olympe.D.vh.set(2,olympe.D.ba.Nu);olympe.D.Zj=new Map;olympe.D.Zj.set('',olympe.D.Na.EMPTY);olympe.D.Zj.set(' ',olympe.D.Na.zu);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,Bd:b,Cf:c,Mm:d,debug:g,Tf:e,kd:f,Di:h})};olympe.D.Af=function(a){return a instanceof olympe.D.Node};
349
- olympe.D.Kd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Af(b)?vb(a,b):olympe.D.fb(b)?vb(a,b.Da):L(a,b);return N(a)};olympe.D.fb=function(a){return!(!a||!a.Eg)};olympe.D.Xe=function(a){return!(!a||!(a instanceof olympe.D.Node||a.Eg))};olympe.D.Qm=function(a){return a instanceof olympe.D.$b||a instanceof olympe.D.mq||a instanceof olympe.D.Node};olympe.D.Sg=function(a){return a instanceof olympe.D.oj};
345
+ a)for(b in a)Bb(a[b]);a=this.Ja;if(null!==a)for(b in a)Bb(a[parseInt(b,10)]);var b=this.ea;null!==b&&(sb(b.Da),Ab(b,this.C));return olympe.D.Oh.prototype.wh.call(this)}lg(){const a=this.values,b=this.F;let c='[\n';for(let d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c+=`${b[d]}. ${a[d]}\n`);return c+']'}};olympe.D.$i.xa=[olympe.D.jd];m=olympe.D.$i.prototype;m.Gd.L=olympe.D.J.C;m.Cc.L=new olympe.D.J(()=>Object,[]);m.xf.L=new olympe.D.J(()=>String,[]);m.Ud.L=olympe.D.J.G;m.wf.L=olympe.D.J.C;
346
+ m.Ve.L=new olympe.D.J(()=>String,[]);m.vf.L=olympe.D.J.C;m.ge.L=new olympe.D.J(()=>Object,[]);m.Ue.L=olympe.D.J.C;m.Hi.L=new olympe.D.J(()=>{},[]);m.zr.L=olympe.D.J.C;m.Gh.L=new olympe.D.J(()=>Array,[]);m.fe.L=olympe.D.J.C;m.km.L=olympe.D.J.C;m.jm.L=olympe.D.J.C;m.Xq.L=olympe.D.J.C;m.rf.L=olympe.D.J.C;m.wh.L=olympe.D.J.C;m.lg.L=olympe.D.J.C;olympe.D.Map=class extends olympe.D.Oh{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}Gd(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&zb(this.F,a);super.Gd(a)}Cc(){null===this.F&&this.wm();return this.F}xf(){null===this.C&&this.wm();return this.C}wm(){this.getContext().run(()=>{this.F=olympe.D.Ld(this.Ob());this.C=olympe.D.Ld(String);this.Vi(this.zm())})}zm(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}Vi(a){if(void 0!==
347
+ a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?Cb(this.F,b):Ab(this.F,b);Ab(this.C,a)}else void 0!==this.F.Da.Eb&&(Bb(this.F),Bb(this.C))}set(a,b){this.$j(a,b);1===this.size&&null!==this.C&&this.Vi(a);this.rf()}remove(a){const b=this.Ci(a);null!==this.C&&this.C.Da.Eb===a&&this.Vi(this.zm());return b}clear(){this.wh();null!==this.C&&this.Vi()}};m=olympe.D.Map.prototype;m.Gd.L=olympe.D.J.C;m.Cc.L=new olympe.D.J(()=>Object,[]);m.xf.L=new olympe.D.J(()=>String,[]);m.wm.L=olympe.D.J.C;
348
+ m.zm.L=olympe.D.J.C;m.Vi.L=olympe.D.J.C;m.set.L=olympe.D.J.C;m.remove.L=new olympe.D.J(()=>Object,[]);m.clear.L=olympe.D.J.C;olympe.D.og=class extends olympe.D.$i{constructor(a){super(a)}set(a,b,c){this.$j(a,b);void 0!==c&&olympe.D.Ic([c],d=>{this.km(a,d)});this.rf()}remove(a){this.jm(a);return this.Ci(a)}clear(){this.wh()}};olympe.D.og.prototype.remove.L=olympe.D.J.C;olympe.D.og.prototype.clear.L=olympe.D.J.C;olympe.D.Rr=class extends olympe.D.oj{constructor(a,b){super(olympe.D.ba,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ba.oo.mp}sb(){return olympe.D.tx(this.node,this.duration,this.C,void 0)}};let Lb=null;olympe.D.H=void 0;olympe.D.Ym=void 0;olympe.D.Bh=void 0;olympe.D.vh=new Map;olympe.D.vh.set(0,olympe.D.ba.ZERO);olympe.D.vh.set(1,olympe.D.ba.ONE);olympe.D.vh.set(2,olympe.D.ba.Nu);olympe.D.Zj=new Map;olympe.D.Zj.set('',olympe.D.Na.EMPTY);olympe.D.Zj.set(' ',olympe.D.Na.zu);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,Bd:b,Cf:c,Mm:d,debug:g,Tf:e,kd:f,Di:h})};olympe.D.Af=function(a){return a instanceof olympe.D.Node};
349
+ olympe.D.Ld=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Af(b)?vb(a,b):olympe.D.fb(b)?vb(a,b.Da):L(a,b);return N(a)};olympe.D.fb=function(a){return!(!a||!a.Eg)};olympe.D.Xe=function(a){return!(!a||!(a instanceof olympe.D.Node||a.Eg))};olympe.D.Qm=function(a){return a instanceof olympe.D.$b||a instanceof olympe.D.mq||a instanceof olympe.D.Node};olympe.D.Sg=function(a){return a instanceof olympe.D.oj};
350
350
  olympe.D.Um=function(a,b){if(void 0!==a){olympe.D.Sg(a)&&(a=a.sb().Da);if(!olympe.D.Xe(a))return b(a);var c=[];olympe.D.fb(a)?c.push(a.Da):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.Ra=function(a,b){let c=a;olympe.D.fb(a)?c=a.Da.Eb:olympe.D.Af(a)?c=a.Eb:olympe.D.Sg(a)&&(c=a.sb().Da.Eb);return void 0===c?b:c};
351
351
  olympe.D.Wg=function(a,b){let c;olympe.D.fb(a)?c=a.Da:olympe.D.Af(a)?c=a:olympe.D.Sg(a)&&(c=a.sb().Da);c&&olympe.D.Ic([b],d=>{c.Wg(d)},'setDefaultValue');return a};olympe.D.Mh=function(a,b,c,d){const e=a.length,f=Array(e),g=[];let h;for(let k=0;k<e;k++)h=a[k],void 0!==h&&null!==h&&(void 0!==h.Uq?(h=h.Da,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.Sg(h)&&(h=h.sb().Da,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};
352
352
  olympe.D.pe=function(a,b,c,d){return N(olympe.D.Mh(a,b,c,d||'syncProxies'))};const Mb=a=>{for(const b of a)if(olympe.D.Xe(b)||olympe.D.Sg(b))return!1;return!0};olympe.D.ta=function(a,b,c,d,e){if(Mb(a))return b(...a);const f=olympe.D.Mh(a,b,c,d||'TransformFlows');e&&olympe.D.Ic([e],g=>{f.Wg(g)},'setDefaultValue');return N(f)};olympe.D.Ic=function(a,b,c){Mb(a)?b(...a):olympe.D.Mh(a,b,void 0,c||'processFlows')};
@@ -357,114 +357,114 @@ olympe.D.HC=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.kD=funct
357
357
  olympe.D.Hv=function(a,b,c){if(a){var d=a.V();null===Lb&&(Lb={});if(Lb[d])olympe.D.H.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{Lb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.D.H.warn(e):olympe.D.H.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.D.createNode(null,g=>{void 0===g?olympe.D.H.log(f,'undefined'):null===g?olympe.D.H.log(f,'null'):olympe.D.H.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.D.H.log(`Node #${d} destroyed`+(b?`: ${b}`:
358
358
  ''))});c.onDestroy(()=>{delete Lb[d]})}}else olympe.D.H.log('NOT starting node dump, node is '+String(a))};olympe.D.DC=function(){let a='',b=olympe.D.Wa();for(;null!==b;)a+=b.ud()+' --\x3e ',b=b.getParent();olympe.D.H.log(a)};
359
359
  olympe.D.sa=function(a){if(void 0===a)return olympe.D.ba.ZERO;if(a instanceof olympe.D.ba)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ba.sp;if(a===Math.PI)return olympe.D.ba.PI;if(Infinity===a)return olympe.D.ba.Ts;if(-Infinity===a)return olympe.D.ba.Mt;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.vh.has(a)||olympe.D.vh.set(a,new olympe.D.ba(a)),olympe.D.vh.get(a)):new olympe.D.ba(a)}return null};
360
- olympe.D.Vd=function(a){return void 0===a?olympe.D.Kd(olympe.D.ba):olympe.D.Kd(olympe.D.ba,olympe.D.Xe(a)?a:olympe.D.sa(a))};olympe.D.tx=olympe.D.ba.animate;olympe.D.XC=function(a,b){return new olympe.D.Rr(a,b)};olympe.D.zb=function(a){if(a instanceof olympe.D.Na)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.D.Zj.has(a)?olympe.D.Zj.get(a):new olympe.D.Na(a)};
361
- olympe.D.bD=function(a){return void 0===a?olympe.D.Kd(olympe.D.Na):olympe.D.Kd(olympe.D.Na,olympe.D.Xe(a)?a:olympe.D.zb(a))};olympe.D.Xb=function(a){return a instanceof olympe.D.fa?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.fa.F:olympe.D.fa.C};olympe.D.ZC=function(a){return void 0===a?olympe.D.Kd(olympe.D.fa):olympe.D.Kd(olympe.D.fa,olympe.D.Xe(a)?a:olympe.D.Xb(a))};olympe.D.YC=function(a){if(a instanceof Date)return new olympe.D.gb(a)};
362
- olympe.D.aD=function(a){return olympe.D.Kd(olympe.D.gb,void 0!==a?new olympe.D.gb(a):null)};olympe.D.xr=a=>a instanceof olympe.D.fa||a instanceof olympe.D.ba||a instanceof olympe.D.Na||a instanceof olympe.D.gb;olympe.D.cD=function(a,b){return olympe.D.Kd(olympe.D.Sb,void 0===a&&void 0===b?void 0:new olympe.D.Sb(a,b))};olympe.D.Ex=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.D.Color?e=a:e=olympe.D.Color.create(a,b,c,d));return olympe.D.Kd(olympe.D.Color,e)};olympe.D.$C=olympe.D.Ex;
360
+ olympe.D.Wd=function(a){return void 0===a?olympe.D.Ld(olympe.D.ba):olympe.D.Ld(olympe.D.ba,olympe.D.Xe(a)?a:olympe.D.sa(a))};olympe.D.tx=olympe.D.ba.animate;olympe.D.XC=function(a,b){return new olympe.D.Rr(a,b)};olympe.D.zb=function(a){if(a instanceof olympe.D.Na)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.D.Zj.has(a)?olympe.D.Zj.get(a):new olympe.D.Na(a)};
361
+ olympe.D.bD=function(a){return void 0===a?olympe.D.Ld(olympe.D.Na):olympe.D.Ld(olympe.D.Na,olympe.D.Xe(a)?a:olympe.D.zb(a))};olympe.D.Xb=function(a){return a instanceof olympe.D.fa?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.fa.F:olympe.D.fa.C};olympe.D.ZC=function(a){return void 0===a?olympe.D.Ld(olympe.D.fa):olympe.D.Ld(olympe.D.fa,olympe.D.Xe(a)?a:olympe.D.Xb(a))};olympe.D.YC=function(a){if(a instanceof Date)return new olympe.D.gb(a)};
362
+ olympe.D.aD=function(a){return olympe.D.Ld(olympe.D.gb,void 0!==a?new olympe.D.gb(a):null)};olympe.D.xr=a=>a instanceof olympe.D.fa||a instanceof olympe.D.ba||a instanceof olympe.D.Na||a instanceof olympe.D.gb;olympe.D.cD=function(a,b){return olympe.D.Ld(olympe.D.Sb,void 0===a&&void 0===b?void 0:new olympe.D.Sb(a,b))};olympe.D.Ex=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.D.Color?e=a:e=olympe.D.Color.create(a,b,c,d));return olympe.D.Ld(olympe.D.Color,e)};olympe.D.$C=olympe.D.Ex;
363
363
  olympe.D.yv=function(a){olympe.D.H=a;olympe.D.Bh=olympe.D.Jg()};olympe.D.Jg=function(){olympe.D.Ym||(olympe.D.Ym=new olympe.D.mq);return olympe.D.Ym};olympe.D.Wa=function(){olympe.D.Bh||(olympe.D.Bh=olympe.D.Jg());return olympe.D.Bh};olympe.D.Er=function(a){const b=olympe.D.Bh;olympe.D.Qm(a)&&(olympe.D.Bh=a);return null!=b?b:null};
364
- olympe.D.Ub=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.gb.Ub(a);break;case 'number':b=olympe.D.ba.Ub(a);break;case 'string':b=olympe.D.Na.Ub(a);break;case 'vector2':b=olympe.D.Sb.Ub(a);break;case 'color':b=olympe.D.Color.Ub(a);break;case 'boolean':b=olympe.D.fa.Ub(a)}return b}return null};function Nb(a){a.C.eb()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.P.clear(),a.T.length=0,a.L.length=0)}
365
- olympe.D.YA=class{constructor(){this.C=new olympe.D.$b('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.ic(Ob,'Last slot manager entry');this.size=Eb(olympe.D.ic(olympe.D.ba,'SlotManager size').repeat(this.F.sb().Fm()),olympe.D.ba.ZERO);this.P=Eb(olympe.D.ic(olympe.D.ba,'last valid slots'),olympe.D.sa(-1))});this.T=[];this.L=[];this.C.onDestroy(()=>{Nb(this)})}};
366
- class Ob{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.$b('Slot manager entry');this.L=c;this.P=d;this.F.run(()=>{const e=Eb(olympe.D.ic(olympe.D.ba),olympe.D.ba.ZERO);olympe.D.fb(b)?e.repeat(b):e.update(b);this.C=olympe.D.ic(olympe.D.ba);this.G=this.C.sb().Wd(e.sb())});this.next=null}V(){return this.id}Nw(){return this.C.sb()}Fm(){return this.G}Td(){return this.L}Xw(){return this.P}hy(a){this.L=a}Sx(a){null===a?this.C.update(olympe.D.ba.ZERO):(this.C.repeat(a.Fm()),a.next=this)}dt(){this.C.clear();
367
- this.next=null}destroy(){this.F.destroy();this.G=this.C=this.next=null}}m=Ob.prototype;m.V.K=olympe.D.J.C;m.Nw.K=new olympe.D.J(()=>olympe.D.ba);m.Fm.K=new olympe.D.J(()=>olympe.D.ba);m.Td.K=olympe.D.J.C;m.Xw.K=olympe.D.J.C;m.hy.K=olympe.D.J.C;m.Sx.K=olympe.D.J.C;m.dt.K=olympe.D.J.C;m.destroy.K=olympe.D.J.C;olympe.D.R={Ca:'df.Logger'};olympe.W.config(a=>{F(a,olympe.D.U.tp,Number.POSITIVE_INFINITY);E(a,olympe.D.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('df'))},'olympe.df');olympe.W.run([olympe.D.R.Ca],a=>{olympe.D.yv(a)},'olympe.df');olympe.host={};const Pb=new Map,Qb=new Map;olympe.host.wp=class{static register(a,b,...c){Pb.set(a,b);0<c.length&&Qb.set(a,c)}static create(a,b,c,d){const e=Pb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Qb.get(a);return void 0!==a?new e(b,c,...a.map(f=>ua(d,f))):new e(b,c)}};function Rb(a,b,c){a.H.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.wp.create(c,b,a.H,a.L))}function Sb(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.H.Z()<=olympe.ma.Ib.C.Hf&&a.H.debug('CALL #'+b+', '+c+'('+Array.prototype.slice.call(d,0)+')');b=[];for(const f of d)if(void 0===f||null===f)b.push(f);else if(olympe.D.fb(f))b.push(a.C.get(f.av)||null);else if('function'===typeof f){const g=f,h=olympe.D.Wa();b.push((...k)=>{h.eb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
364
+ olympe.D.Ub=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.gb.Ub(a);break;case 'number':b=olympe.D.ba.Ub(a);break;case 'string':b=olympe.D.Na.Ub(a);break;case 'vector2':b=olympe.D.Sb.Ub(a);break;case 'color':b=olympe.D.Color.Ub(a);break;case 'boolean':b=olympe.D.fa.Ub(a)}return b}return null};function Nb(a){a.C.eb()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.P.clear(),a.T.length=0,a.K.length=0)}
365
+ olympe.D.YA=class{constructor(){this.C=new olympe.D.$b('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.ic(Ob,'Last slot manager entry');this.size=Eb(olympe.D.ic(olympe.D.ba,'SlotManager size').repeat(this.F.sb().Fm()),olympe.D.ba.ZERO);this.P=Eb(olympe.D.ic(olympe.D.ba,'last valid slots'),olympe.D.sa(-1))});this.T=[];this.K=[];this.C.onDestroy(()=>{Nb(this)})}};
366
+ class Ob{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.$b('Slot manager entry');this.K=c;this.P=d;this.F.run(()=>{const e=Eb(olympe.D.ic(olympe.D.ba),olympe.D.ba.ZERO);olympe.D.fb(b)?e.repeat(b):e.update(b);this.C=olympe.D.ic(olympe.D.ba);this.G=this.C.sb().Xd(e.sb())});this.next=null}V(){return this.id}Nw(){return this.C.sb()}Fm(){return this.G}Ud(){return this.K}Xw(){return this.P}hy(a){this.K=a}Sx(a){null===a?this.C.update(olympe.D.ba.ZERO):(this.C.repeat(a.Fm()),a.next=this)}dt(){this.C.clear();
367
+ this.next=null}destroy(){this.F.destroy();this.G=this.C=this.next=null}}m=Ob.prototype;m.V.L=olympe.D.J.C;m.Nw.L=new olympe.D.J(()=>olympe.D.ba);m.Fm.L=new olympe.D.J(()=>olympe.D.ba);m.Ud.L=olympe.D.J.C;m.Xw.L=olympe.D.J.C;m.hy.L=olympe.D.J.C;m.Sx.L=olympe.D.J.C;m.dt.L=olympe.D.J.C;m.destroy.L=olympe.D.J.C;olympe.D.R={Ca:'df.Logger'};olympe.W.config(a=>{F(a,olympe.D.U.tp,Number.POSITIVE_INFINITY);E(a,olympe.D.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('df'))},'olympe.df');olympe.W.run([olympe.D.R.Ca],a=>{olympe.D.yv(a)},'olympe.df');olympe.host={};const Pb=new Map,Qb=new Map;olympe.host.wp=class{static register(a,b,...c){Pb.set(a,b);0<c.length&&Qb.set(a,c)}static create(a,b,c,d){const e=Pb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Qb.get(a);return void 0!==a?new e(b,c,...a.map(f=>ua(d,f))):new e(b,c)}};function Rb(a,b,c){a.H.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.wp.create(c,b,a.H,a.K))}function Sb(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.H.Z()<=olympe.ma.Ib.C.Hf&&a.H.debug('CALL #'+b+', '+c+'('+Array.prototype.slice.call(d,0)+')');b=[];for(const f of d)if(void 0===f||null===f)b.push(f);else if(olympe.D.fb(f))b.push(a.C.get(f.av)||null);else if('function'===typeof f){const g=f,h=olympe.D.Wa();b.push((...k)=>{h.eb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
368
368
  function Tb(a){var b=olympe.host.xe.rd,c=olympe.host.xe.vp.Nq;++a.G;const d=a.G;Rb(a,d,c);const e=olympe.D.createNode(b,void 0,void 0,void 0,void 0,'Native('+d+')',!1,function(){var f=arguments.length-2;const g=Array.from({length:f}),h=[],k=arguments[f+1],l=d+'_'+k;this.F.has(l)&&this.F.get(l).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.D.fb(p)?(h.push(n),p=p.Da):olympe.D.Af(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Sb(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
369
- {Sb(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(l,f),f.onDestroy(()=>this.F.delete(l)));return null}.bind(a));e.Z(a.P.bind(a,d));a=N(e);a.av=d;L(e,a);return a}olympe.host.Ta=class{constructor(a,b){this.H=a;this.L=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}ab(){return this.H}P(a){this.H.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.destroy()}};olympe.host.Hd=class{constructor(a){this.C=a;this.F=olympe.D.Wa()}G(){return this.C}ad(){return this.C.Da.ad()||this.F.ad()}eb(){return this.C.Da.eb()}};olympe.host.Hd.prototype.G.K=new olympe.D.J(()=>olympe.host.xe.Hd,[]);olympe.host.Vj=class{C(){}F(){}};olympe.host.Ns=class{F(){}C(){return v(function*(){})}Oi(){}};function Ub(a,b){var c=olympe.host.Df;const d=olympe.Y.Hc(),e=new olympe.D.$b('onTimeout context');c.C.Z(b,d,()=>{e.eb()||e.ad()||e.run(a);c.C.G(d)});return new olympe.host.rd.F(c.C,d,e)}function Vb(a,b){var c=olympe.host.Df;const d=olympe.Y.Hc(),e=new olympe.D.$b('onInterval context');c.C.T(b,d,()=>{e.eb()||e.ad()?c.C.F(d):e.run(a)})}olympe.host.rd=class{constructor(a){this.C=Tb(a)}};olympe.host.rd.C=class{constructor(a,b,c){this.Df=a;this.id=b;this.C=null!=c?c:null}V(){return this.id}cancel(){}};
370
- olympe.host.rd.L=class extends olympe.host.rd.C{cancel(){this.Df.P(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.rd.F=class extends olympe.host.rd.C{cancel(){this.Df.G(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.rd.G=class extends olympe.host.rd.C{cancel(){this.Df.F(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.Fj=class{F(a,b){return null!=b?b:''}aa(a,b){return null!=b?b:''}P(){}C(a,b){return null!=b?b:''}G(){}};olympe.host.xe={};olympe.host.xe.Hd=class{destroy(){}};olympe.host.xe.Hd.prototype.destroy=olympe.host.xe.Hd.prototype.destroy;olympe.host.xe.vp={oy:100,qy:101,py:102,ty:103,sy:104,ny:105,PA:201,NA:202,KA:204,SA:205,JA:206,MA:207,QA:208,TA:209,UA:210,VA:211,LA:212,RA:218,OA:219,WA:220,IA:221,HA:222,cB:300,dB:301,eB:302,iB:303,jB:304,kB:305,fB:310,gB:311,hB:312,kA:400,lA:401,mA:402,aA:450,Uz:500,Sz:501,Xz:502,Wz:503,Tz:504,Vz:505,DB:600,uB:601,yB:602,qB:603,rB:604,oB:605,tB:606,JB:607,BB:608,lB:609,pB:610,sB:611,AB:612,FB:613,mB:614,EB:615,zB:616,IB:617,vB:618,wB:619,xB:620,CB:630,nB:631,GB:632,HB:633,mC:700,QB:701,RB:702,
369
+ {Sb(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(l,f),f.onDestroy(()=>this.F.delete(l)));return null}.bind(a));e.Z(a.P.bind(a,d));a=N(e);a.av=d;L(e,a);return a}olympe.host.Ta=class{constructor(a,b){this.H=a;this.K=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}ab(){return this.H}P(a){this.H.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.destroy()}};olympe.host.Hd=class{constructor(a){this.C=a;this.F=olympe.D.Wa()}G(){return this.C}ad(){return this.C.Da.ad()||this.F.ad()}eb(){return this.C.Da.eb()}};olympe.host.Hd.prototype.G.L=new olympe.D.J(()=>olympe.host.xe.Hd,[]);olympe.host.Vj=class{C(){}F(){}};olympe.host.Ns=class{F(){}C(){return v(function*(){})}Oi(){}};function Ub(a,b){var c=olympe.host.Df;const d=olympe.Y.Hc(),e=new olympe.D.$b('onTimeout context');c.C.Z(b,d,()=>{e.eb()||e.ad()||e.run(a);c.C.G(d)});return new olympe.host.rd.F(c.C,d,e)}function Vb(a,b){var c=olympe.host.Df;const d=olympe.Y.Hc(),e=new olympe.D.$b('onInterval context');c.C.T(b,d,()=>{e.eb()||e.ad()?c.C.F(d):e.run(a)})}olympe.host.rd=class{constructor(a){this.C=Tb(a)}};olympe.host.rd.C=class{constructor(a,b,c){this.Df=a;this.id=b;this.C=null!=c?c:null}V(){return this.id}cancel(){}};
370
+ olympe.host.rd.K=class extends olympe.host.rd.C{cancel(){this.Df.P(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.rd.F=class extends olympe.host.rd.C{cancel(){this.Df.G(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.rd.G=class extends olympe.host.rd.C{cancel(){this.Df.F(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.Fj=class{F(a,b){return null!=b?b:''}aa(a,b){return null!=b?b:''}P(){}C(a,b){return null!=b?b:''}G(){}};olympe.host.xe={};olympe.host.xe.Hd=class{destroy(){}};olympe.host.xe.Hd.prototype.destroy=olympe.host.xe.Hd.prototype.destroy;olympe.host.xe.vp={oy:100,qy:101,py:102,ty:103,sy:104,ny:105,PA:201,NA:202,KA:204,SA:205,JA:206,MA:207,QA:208,TA:209,UA:210,VA:211,LA:212,RA:218,OA:219,WA:220,IA:221,HA:222,cB:300,dB:301,eB:302,iB:303,jB:304,kB:305,fB:310,gB:311,hB:312,kA:400,lA:401,mA:402,aA:450,Uz:500,Sz:501,Xz:502,Wz:503,Tz:504,Vz:505,DB:600,uB:601,yB:602,qB:603,rB:604,oB:605,tB:606,JB:607,BB:608,lB:609,pB:610,sB:611,AB:612,FB:613,mB:614,EB:615,zB:616,IB:617,vB:618,wB:619,xB:620,CB:630,nB:631,GB:632,HB:633,mC:700,QB:701,RB:702,
371
371
  SB:703,UB:704,VB:705,WB:706,TB:707,YB:708,XB:709,ZB:710,cC:711,kC:712,$B:713,aC:714,dC:715,eC:716,gC:717,hC:718,jC:719,fC:720,iC:721,lC:722,bC:723,nC:724,oC:725,Nq:800};olympe.host.xe.rd=class{P(){}Z(){}G(){}T(){}F(){}};olympe.host.R={Sj:'host.System',il:'host.HistoryManager',oq:'host.Scheduler',Ca:'host.platform.Logger',Fa:'host.Manager',Le:'host.ProcessManager'};olympe.host.U={Np:'host.processProbe',tq:'host.gracefulShutdownTimeout'};olympe.host.Df=null;
372
372
  olympe.W.config(function(a){ya(a,olympe.host.R.Sj);ya(a,olympe.host.R.il);D(a,olympe.host.R.Le,olympe.host.Fj);E(a,olympe.host.R.Ca,[olympe.ma.R.Fa],function(b){return b.Qc('host')});D(a,olympe.host.R.Fa,olympe.host.Ta,olympe.host.R.Ca,olympe.W.R.eg);E(a,olympe.host.R.oq,[olympe.host.R.Fa],b=>{null===olympe.host.Df&&(olympe.host.Df=new olympe.host.rd(b));return olympe.host.Df},!0)},'olympe.host');olympe.W.run([olympe.host.R.oq],a=>a,'olympe.host.scheduler');olympe.W.run([olympe.host.R.Fa],a=>a,'olympe.host');
373
- olympe.W.run([olympe.host.R.Le],a=>{olympe.host.lk=()=>a});olympe.net={};olympe.net.Ba={};olympe.net.Ba.Qd={lh:'POST',GET:'GET',Ks:'HEAD',Op:'PUT',yc:'DELETE',Ep:'OPTIONS',nA:'PATCH'};olympe.net.Ba.ResponseType={Zl:'text',Kk:'blob',Hq:'arraybuffer'};olympe.net.Ba.Headers={Th:'content-type',Cy:'content-length',un:'authorization',Qr:'access-control-allow-origin',Nr:'access-control-allow-headers',Pr:'access-control-allow-methods',Bo:'x-forwarded-host',Co:'x-forwarded-proto'};olympe.net.Ba.Vk={Fz:'text/html',JSON:'application/json',$u:'application/zip',Au:'application/octet-stream'};
373
+ olympe.W.run([olympe.host.R.Le],a=>{olympe.host.lk=()=>a});olympe.net={};olympe.net.Ba={};olympe.net.Ba.Rd={lh:'POST',GET:'GET',Ks:'HEAD',Op:'PUT',yc:'DELETE',Ep:'OPTIONS',nA:'PATCH'};olympe.net.Ba.ResponseType={Zl:'text',Kk:'blob',Hq:'arraybuffer'};olympe.net.Ba.Headers={Th:'content-type',Cy:'content-length',un:'authorization',Qr:'access-control-allow-origin',Nr:'access-control-allow-headers',Pr:'access-control-allow-methods',Bo:'x-forwarded-host',Co:'x-forwarded-proto'};olympe.net.Ba.Vk={Fz:'text/html',JSON:'application/json',$u:'application/zip',Au:'application/octet-stream'};
374
374
  olympe.net.Ba.ac={Zr:0,jh:200,Pn:201,Yi:202,Ik:400,Qu:401,zo:403,Cl:404,Yz:405,pi:500,tu:503};function Wb(a){return a.host&&encodeURI(a.host)}function Xb(a){return encodeURI(a.path).replace(olympe.net.Bi.C,(b,c)=>'%'+c)}function Yb(a){return void 0===a.G?443===a.port:a.G}olympe.net.Bi=class{constructor(a,b,c,d){this.host='localhost';this.port=80;this.path='';this.G=!1;void 0!==a&&(this.host=a);void 0!==b&&(this.port=b);void 0!==c&&(this.path=c.replace(/^\/+/,''));void 0!==d&&(this.G=d)}C(){return`${Yb(this)?'wss':'ws'}://${Wb(this)}:${this.port}/${Xb(this)}`}toString(){return`${Wb(this)}:${this.port}/${Xb(this)}`}};
375
375
  olympe.net.Bi.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}ea(){}aa(){}Z(){}F(){}};function O(a,b,c,d){a=olympe.Y.Fx(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.net.ci(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.Ir&&(c=a.Ir.split(':'),2===c.length&&(c=Ga(olympe.Y.Te(),`${c[0]}:${c[1]}`),P(b,{Authorization:`Basic ${c}`})));return b}function Zb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}function P(a,b){Object.assign(a.headers,b)}
376
- olympe.net.ci=class extends olympe.net.Bi{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.net.Ba.Qd.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.Ba.ResponseType.Zl;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}Li(){return this.headers}C(){let a=Zb(this);a=a?`?${a}`:'';return Wb(this)?`${Yb(this)?'https':'http'}://${Wb(this)}:${this.port}/${Xb(this)}${a}`:`${Xb(this)}${a}`}toString(){return this.C()}};
377
- olympe.net.ci.Qd={lh:'POST',GET:'GET',Ks:'HEAD',Op:'PUT',yc:'DELETE',Ep:'OPTIONS'};olympe.net.Zd=class{constructor(a,b,c,d){this.data=a;this.status=void 0===b?200:b;this.statusText=void 0===c?'':c;this.headers=void 0===d?{}:d}getData(){return this.data}Dc(){return this.status}Li(){return this.headers}};function $b(a,b,c){const d=olympe.D.Wa(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.G(f=>{d.Bf(e);a.F().C.delete(b);c(f)})}function ac(a,b){return new olympe.net.hf(a,b)}olympe.net.Ta=class{constructor(a){this.H=a;this.L=1;a='Initializing NET layer';this.H.C()&&(a+=' (implementation: '+this.T()+')');this.H.info(a);this.H.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}G(){}C(){}P(){}Wf(){}T(){}};function bc(a){let b;return!(null==(b=a.C)||!b.connected)}function cc(a,b){const c=()=>{const d=b(),e=d.wd();return{username:`${a.T.vhost}:${d.wc()}`,password:e}};return Object.assign({},a.T,c(),{transformWsUrl:(d,e,f)=>{Object.assign(f.options,c());return d}})}
376
+ olympe.net.ci=class extends olympe.net.Bi{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.net.Ba.Rd.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.Ba.ResponseType.Zl;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}Li(){return this.headers}C(){let a=Zb(this);a=a?`?${a}`:'';return Wb(this)?`${Yb(this)?'https':'http'}://${Wb(this)}:${this.port}/${Xb(this)}${a}`:`${Xb(this)}${a}`}toString(){return this.C()}};
377
+ olympe.net.ci.Rd={lh:'POST',GET:'GET',Ks:'HEAD',Op:'PUT',yc:'DELETE',Ep:'OPTIONS'};olympe.net.$d=class{constructor(a,b,c,d){this.data=a;this.status=void 0===b?200:b;this.statusText=void 0===c?'':c;this.headers=void 0===d?{}:d}getData(){return this.data}Dc(){return this.status}Li(){return this.headers}};function $b(a,b,c){const d=olympe.D.Wa(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.G(f=>{d.Bf(e);a.F().C.delete(b);c(f)})}function ac(a,b){return new olympe.net.hf(a,b)}olympe.net.Ta=class{constructor(a){this.H=a;this.K=1;a='Initializing NET layer';this.H.C()&&(a+=' (implementation: '+this.T()+')');this.H.info(a);this.H.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}G(){}C(){}P(){}Wf(){}T(){}};function bc(a){let b;return!(null==(b=a.C)||!b.connected)}function cc(a,b){const c=()=>{const d=b(),e=d.wd();return{username:`${a.T.vhost}:${d.wc()}`,password:e}};return Object.assign({},a.T,c(),{transformWsUrl:(d,e,f)=>{Object.assign(f.options,c());return d}})}
378
378
  function dc(a,b,c){if(!bc(a))return Promise.reject(Error('Cannot subscribe because the MQTT client is disconnected'));a.H.C()&&a.H.debug(`MQTT subscribe to topic ${b}`);return new Promise((d,e)=>{a.C.subscribe(b,void 0,f=>{f?e(Error(`Failed to subscribe to topic ${b}: ${f}`)):(a.F.set(b,c),d())})})}
379
- function ec(a,b){if(!bc(a))return Promise.reject(Error('Cannot unsubscribe because the MQTT client is disconnected'));a.H.C()&&a.H.debug(`MQTT unsubscribe topic ${b}`);return new Promise((c,d)=>{a.C.unsubscribe(b,void 0,e=>{a.F.delete(b);e?d(e):c()})})}function fc(a,b){a.L.push(b)}function gc(a,b){a.G.push(b)}function hc(a,b){a.P.push(b)}
380
- olympe.net.hf=class{constructor(a,b){this.url=a;this.T=b||null;this.C=null;this.G=[];this.P=[];this.aa=[];this.Z=[];this.L=[];this.F=new Map;this.H=olympe.ma.ab('MQTT')}connect(a,b){if(bc(this))return b&&b(),this;b&&this.G.push(b);null===this.C&&(this.C=mqtt.connect(this.url,cc(this,a)),this.C.on(olympe.net.hf.C.Lt,(c,d)=>{this.H.C()&&this.H.debug(`MQTT < ${d}`);this.F.has(c)?this.F.get(c)(JSON.parse(d.toString())):this.H.warn('There is no subscriber for topic '+c)}),this.C.on(olympe.net.hf.C.gs,
381
- ()=>{this.H.info('Mqtt client is connected to bus');this.G.forEach(c=>c())}),this.C.on(olympe.net.hf.C.ju,()=>{this.H.info('Mqtt client is reconnecting to bus ... ');this.P.forEach(c=>c())}),this.C.on(olympe.net.hf.C.Fb,c=>{this.H.error('Mqtt client error ',c);this.Z.forEach(d=>d(c))}),this.C.on(olympe.net.hf.C.ae,()=>{this.H.info('Mqtt client is offline');this.aa.forEach(c=>c())}),this.C.on(olympe.net.hf.C.es,()=>{this.H.info('Mqtt client is closed');this.L.forEach(c=>c())}),this.C.on(olympe.net.hf.C.cl,
379
+ function ec(a,b){if(!bc(a))return Promise.reject(Error('Cannot unsubscribe because the MQTT client is disconnected'));a.H.C()&&a.H.debug(`MQTT unsubscribe topic ${b}`);return new Promise((c,d)=>{a.C.unsubscribe(b,void 0,e=>{a.F.delete(b);e?d(e):c()})})}function fc(a,b){a.K.push(b)}function gc(a,b){a.G.push(b)}function hc(a,b){a.P.push(b)}
380
+ olympe.net.hf=class{constructor(a,b){this.url=a;this.T=b||null;this.C=null;this.G=[];this.P=[];this.aa=[];this.Z=[];this.K=[];this.F=new Map;this.H=olympe.ma.ab('MQTT')}connect(a,b){if(bc(this))return b&&b(),this;b&&this.G.push(b);null===this.C&&(this.C=mqtt.connect(this.url,cc(this,a)),this.C.on(olympe.net.hf.C.Lt,(c,d)=>{this.H.C()&&this.H.debug(`MQTT < ${d}`);this.F.has(c)?this.F.get(c)(JSON.parse(d.toString())):this.H.warn('There is no subscriber for topic '+c)}),this.C.on(olympe.net.hf.C.gs,
381
+ ()=>{this.H.info('Mqtt client is connected to bus');this.G.forEach(c=>c())}),this.C.on(olympe.net.hf.C.ju,()=>{this.H.info('Mqtt client is reconnecting to bus ... ');this.P.forEach(c=>c())}),this.C.on(olympe.net.hf.C.Fb,c=>{this.H.error('Mqtt client error ',c);this.Z.forEach(d=>d(c))}),this.C.on(olympe.net.hf.C.be,()=>{this.H.info('Mqtt client is offline');this.aa.forEach(c=>c())}),this.C.on(olympe.net.hf.C.es,()=>{this.H.info('Mqtt client is closed');this.K.forEach(c=>c())}),this.C.on(olympe.net.hf.C.cl,
382
382
  ()=>{this.H.info('Mqtt client has ended')}));return this}publish(a,b,c){if(!bc(this))return Promise.reject(Error('Cannot publish message because the MQTT client is disconnected'));const d=JSON.stringify(b);this.H.C()&&this.H.debug(`MQTT > ${d}`);return new Promise((e,f)=>{this.C.publish(a,d,c,g=>{g?f(Error('Failed to publish a message '+d)):e()})})}end(a,b){this.F.clear();this.C?this.C.end(a,{},()=>{b&&b();this.C=null}):null==b||b();return this}};
383
- olympe.net.hf.C={gs:'connect',ju:'reconnect',Lt:'message',es:'close',cl:'end',Fb:'error',ae:'offline'};olympe.net.Ai=class{constructor(a){this.H=a}start(){return Promise.reject('Try to start web server with the browser implementation.')}G(){return Promise.reject('Try to restart web server with the browser implementation.')}stop(){return Promise.reject('Try to stop web server with the browser implementation.')}L(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}Z(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};
383
+ olympe.net.hf.C={gs:'connect',ju:'reconnect',Lt:'message',es:'close',cl:'end',Fb:'error',be:'offline'};olympe.net.Ai=class{constructor(a){this.H=a}start(){return Promise.reject('Try to start web server with the browser implementation.')}G(){return Promise.reject('Try to restart web server with the browser implementation.')}stop(){return Promise.reject('Try to stop web server with the browser implementation.')}K(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}Z(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};
384
384
  olympe.net.Ai.C='*';olympe.net.Du=class{register(){return v(function*(){throw Error('Service Worker Manager must be overridden by a native layer: called "register"');})}};olympe.net.R={Fa:'net.Manager',Ca:'net.Logger',zi:'net.WebServer',vu:'net.ServiceWorkerManager',Fl:'net.OfflineConfig'};olympe.net.U={ai:'net.httpPort',Qo:'net.httpBodyLimit',Mq:'net.http2',Po:'net.httpsCertificatesPath',tj:'net.localNetworkSuffix',mi:'offline.enabled',El:'offline.autoBackOnline',Dp:'offline.downloadBatchSize'};
385
385
  olympe.W.config(function(a){F(a,olympe.net.U.ai,3141);F(a,olympe.net.U.Qo,100);F(a,olympe.net.U.Mq,!1);F(a,olympe.net.U.Po,null);F(a,olympe.net.U.tj,'frontend');F(a,olympe.net.U.mi,!1);F(a,olympe.net.U.El,!1);F(a,olympe.net.U.Dp,20);ya(a,olympe.net.R.Fa);E(a,olympe.net.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('net'));D(a,olympe.net.R.zi,olympe.net.Ai,olympe.net.R.Ca);D(a,olympe.net.R.vu,olympe.net.Du);E(a,olympe.net.R.Fl,[new olympe.W.ja(olympe.net.U.mi),new olympe.W.ja(olympe.net.U.El)],(b,c)=>new Map([['offlineEnabled',
386
- b],['offlineAutoBackOnline',!b||c]]))},'olympe.net');olympe.Sa.node.host={};olympe.Sa.node.host.Hd=function(a,b){this.H=b};olympe.Sa.node.host.Hd.prototype.constructor=olympe.Sa.node.host.Hd;olympe.Sa.node.host.Hd.prototype.destroy=function(){};olympe.Sa.node.host.Hd.prototype.destroy=olympe.Sa.node.host.Hd.prototype.destroy;olympe.Sa.node.host.Hd.prototype.ab=function(){return this.H};olympe.Sa.node.host.Hd.xa=[olympe.host.xe.Hd];function ic(a){a.H.error('No history manager implemented in Node')}olympe.Sa.node.host.xp=class{constructor(a){this.H=a}Oi(){return!1}F(){ic(this);return null}C(){const a=this;return v(function*(){ic(a)})}};olympe.Sa.node.host.xp.xa=[olympe.host.Ns];olympe.Sa.node.host.rd=class{constructor(){this.C={};this.L={}}destroy(){}P(a){clearTimeout(this.C[a]);delete this.C[a]}Z(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}T(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.wp.register(olympe.host.xe.vp.Nq,olympe.Sa.node.host.rd);olympe.Sa.node.host.rd.xa=[olympe.host.xe.rd];olympe.Sa.node.host.Vj=class{constructor(a){this.H=a}C(){return olympe.D.fa.F}F(){return!0}};olympe.Sa.node.host.Vj.xa=[olympe.host.Vj];function jc(a){const b=olympe.net.Ba.ac.jh,c=olympe.net.Ba.ac.pi;a.ea.L('healthcheck','/readiness',[olympe.net.Ba.Qd.GET],()=>{const d=Array.from(a.Z.values()).map(e=>e.apply(a));return 0===d.length?Promise.resolve(new olympe.net.Zd('No healthCheck is set',b,'Nothing to check')):Promise.allSettled(d).then(e=>{let f=!1,g='Health check result: ';for(const h of e)'rejected'===h.status?(f=!0,e=h.reason,g+=`\n${e}`,a.H.warn(`Health check detected a service which is DOWN: ${e}`)):g+=`\n${h.value}`;return new olympe.net.Zd(g,
386
+ b],['offlineAutoBackOnline',!b||c]]))},'olympe.net');olympe.Sa.node.host={};olympe.Sa.node.host.Hd=function(a,b){this.H=b};olympe.Sa.node.host.Hd.prototype.constructor=olympe.Sa.node.host.Hd;olympe.Sa.node.host.Hd.prototype.destroy=function(){};olympe.Sa.node.host.Hd.prototype.destroy=olympe.Sa.node.host.Hd.prototype.destroy;olympe.Sa.node.host.Hd.prototype.ab=function(){return this.H};olympe.Sa.node.host.Hd.xa=[olympe.host.xe.Hd];function ic(a){a.H.error('No history manager implemented in Node')}olympe.Sa.node.host.xp=class{constructor(a){this.H=a}Oi(){return!1}F(){ic(this);return null}C(){const a=this;return v(function*(){ic(a)})}};olympe.Sa.node.host.xp.xa=[olympe.host.Ns];olympe.Sa.node.host.rd=class{constructor(){this.C={};this.K={}}destroy(){}P(a){clearTimeout(this.C[a]);delete this.C[a]}Z(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}T(a,b,c){this.K[b]=setInterval(c,a)}F(a){clearInterval(this.K[a]);delete this.K[a]}};olympe.host.wp.register(olympe.host.xe.vp.Nq,olympe.Sa.node.host.rd);olympe.Sa.node.host.rd.xa=[olympe.host.xe.rd];olympe.Sa.node.host.Vj=class{constructor(a){this.H=a}C(){return olympe.D.fa.F}F(){return!0}};olympe.Sa.node.host.Vj.xa=[olympe.host.Vj];function jc(a){const b=olympe.net.Ba.ac.jh,c=olympe.net.Ba.ac.pi;a.ea.K('healthcheck','/readiness',[olympe.net.Ba.Rd.GET],()=>{const d=Array.from(a.Z.values()).map(e=>e.apply(a));return 0===d.length?Promise.resolve(new olympe.net.$d('No healthCheck is set',b,'Nothing to check')):Promise.allSettled(d).then(e=>{let f=!1,g='Health check result: ';for(const h of e)'rejected'===h.status?(f=!0,e=h.reason,g+=`\n${e}`,a.H.warn(`Health check detected a service which is DOWN: ${e}`)):g+=`\n${h.value}`;return new olympe.net.$d(g,
387
387
  f?c:b,f?'Some services are not working':'Everything is OK')})}).catch(d=>a.H.error(`Failed to add health check route ${d}`));a.F(()=>a.ea.stop())}function kc(a,b){b=Array.from(b.entries()).map(([c,d])=>olympe.Y.Promise.fn(d(),a.oa,`Shutdown hook ${c} has timeout`));return Promise.allSettled(b).then(c=>{let d=!1;for(const e of c)'rejected'===e.status&&(d=!0,a.H.warn(`Failed to close some resource: ${e.reason}`));return d})}
388
- function lc(a){return v(function*(){try{const b=yield kc(a,a.L),c=yield kc(a,a.T);if(b||c)throw Error('Failed to gracefully close the backend');}finally{a.L.clear(),a.T.clear()}})}
389
- olympe.Sa.node.host.Fj=class extends olympe.host.Fj{constructor(a,b,c,d=!0){super();this.H=a;this.ea=b;this.oa=c;this.Z=new Map;this.L=new Map;this.T=new Map;d&&jc(this)}C(a,b=olympe.Y.uf()){this.Z.set(b,a);return b}G(a){this.Z.delete(a)}F(a,b=olympe.Y.uf()){this.L.set(b,a);return b}aa(a,b=olympe.Y.uf()){this.T.set(b,a);return b}P(a){this.L.has(a)?this.L.delete(a):this.T.delete(a)}};olympe.W.config(function(a){F(a,olympe.host.U.Np,!0);F(a,olympe.host.U.tq,1E4);wa(a,olympe.host.R.il,olympe.Sa.node.host.xp,olympe.host.R.Ca);wa(a,olympe.host.R.Sj,olympe.Sa.node.host.Vj,olympe.host.R.Ca);D(a,olympe.host.R.Le,olympe.Sa.node.host.Fj,olympe.host.R.Ca,olympe.net.R.zi,new olympe.W.ja(olympe.host.U.tq),new olympe.W.ja(olympe.host.U.Np))},'olympe.native.node.host');olympe.W.run([olympe.host.R.Le],a=>{olympe.Sa.node.host.lk=()=>a});olympe.net.oe={};olympe.net.oe.pl=class{constructor(a){this.H=a;this.C=new Map}G(){}F(){}};olympe.net.oe.WebSocket=class{constructor(a,b){this.H=b;this.id=a;this.C=null;this.buffer=[];this.P=this.G=this.L=this.T=null}V(){return this.id}open(a){const b=`#${this.id}`,c=this.oa(a);c.binaryType='arraybuffer';c.addEventListener('open',()=>{this.H.info('Websocket OPENED');this.T?(this.H.debug('Notifying upper layer for WebSocket',b),this.T()):this.H.warn('Nothing to notify for WebSocket',b);this.H.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));
390
- this.buffer.length=0});c.addEventListener('message',d=>{d='string'===typeof d.data?String(d.data):Ha(d.data);(this.H.L()||this.H.C()&&!d.startsWith('pong'))&&this.H.debug(b,'<',d);this.G&&this.G(d)});c.addEventListener('close',()=>{this.H.debug(`WebSocket ${b} CLOSED`);this.L&&this.L()});c.addEventListener('error',()=>{this.H.debug(`WebSocket ${b} ERROR`);this.P&&this.P()});this.C=c}send(a){const b=`#${this.id}`;if(null!==this.C){const c=this.C.constructor;switch(this.C.readyState){case c.OPEN:(this.H.L()||
388
+ function lc(a){return v(function*(){try{const b=yield kc(a,a.K),c=yield kc(a,a.T);if(b||c)throw Error('Failed to gracefully close the backend');}finally{a.K.clear(),a.T.clear()}})}
389
+ olympe.Sa.node.host.Fj=class extends olympe.host.Fj{constructor(a,b,c,d=!0){super();this.H=a;this.ea=b;this.oa=c;this.Z=new Map;this.K=new Map;this.T=new Map;d&&jc(this)}C(a,b=olympe.Y.uf()){this.Z.set(b,a);return b}G(a){this.Z.delete(a)}F(a,b=olympe.Y.uf()){this.K.set(b,a);return b}aa(a,b=olympe.Y.uf()){this.T.set(b,a);return b}P(a){this.K.has(a)?this.K.delete(a):this.T.delete(a)}};olympe.W.config(function(a){F(a,olympe.host.U.Np,!0);F(a,olympe.host.U.tq,1E4);wa(a,olympe.host.R.il,olympe.Sa.node.host.xp,olympe.host.R.Ca);wa(a,olympe.host.R.Sj,olympe.Sa.node.host.Vj,olympe.host.R.Ca);D(a,olympe.host.R.Le,olympe.Sa.node.host.Fj,olympe.host.R.Ca,olympe.net.R.zi,new olympe.W.ja(olympe.host.U.tq),new olympe.W.ja(olympe.host.U.Np))},'olympe.native.node.host');olympe.W.run([olympe.host.R.Le],a=>{olympe.Sa.node.host.lk=()=>a});olympe.net.oe={};olympe.net.oe.pl=class{constructor(a){this.H=a;this.C=new Map}G(){}F(){}};olympe.net.oe.WebSocket=class{constructor(a,b){this.H=b;this.id=a;this.C=null;this.buffer=[];this.P=this.G=this.K=this.T=null}V(){return this.id}open(a){const b=`#${this.id}`,c=this.oa(a);c.binaryType='arraybuffer';c.addEventListener('open',()=>{this.H.info('Websocket OPENED');this.T?(this.H.debug('Notifying upper layer for WebSocket',b),this.T()):this.H.warn('Nothing to notify for WebSocket',b);this.H.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));
390
+ this.buffer.length=0});c.addEventListener('message',d=>{d='string'===typeof d.data?String(d.data):Ha(d.data);(this.H.K()||this.H.C()&&!d.startsWith('pong'))&&this.H.debug(b,'<',d);this.G&&this.G(d)});c.addEventListener('close',()=>{this.H.debug(`WebSocket ${b} CLOSED`);this.K&&this.K()});c.addEventListener('error',()=>{this.H.debug(`WebSocket ${b} ERROR`);this.P&&this.P()});this.C=c}send(a){const b=`#${this.id}`;if(null!==this.C){const c=this.C.constructor;switch(this.C.readyState){case c.OPEN:(this.H.K()||
391
391
  this.H.C()&&!a.startsWith('ping'))&&this.H.debug(b,'>',a);this.C.send(a);break;case c.CONNECTING:this.H.debug(b,'- Connecting: BUFFER','>',a);this.buffer.push(a);break;default:return this.H.debug(b,'- Closed','>',a),!1}}else this.H.debug(b,'- Not opened yet: BUFFER','>',a),this.buffer.push(a);return!0}close(){if(null!==this.C){const a=this.C.constructor,b=this.C.readyState;if(b===a.OPEN||b===a.CONNECTING){this.H.debug(`Force closing native websocket ${`#${this.id}`}`);this.C.close(1E3);return}}this.H.debug('Try to force close native websocket, but not open nor connecting')}ea(a){this.T=
392
- a||null}aa(a){this.G=a||null}F(a){this.P=a||null}Z(a){this.L=a||null}oa(){}};olympe.net.oe.WebSocket.xa=[olympe.net.WebSocket];olympe.Sa.node.net={};olympe.Sa.node.net.Pt=class extends olympe.net.Ta{constructor(a,b){super(a,b);this.Z=new olympe.Sa.node.net.pl(a)}T(){return'NodeJS'}Wf(){return olympe.D.fa.F}G(a){var b=this.L++;a=a.C();this.H.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.Sa.node.net.Qt(b,this.H);b.open(a);return b}C(a,b){this.H.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.L++;b=$b(this,c,b);this.Z.G(c,{u:a.C(),s:Yb(a),h:Wb(a),p:a.port,z:Xb(a),q:Zb(a),m:a.method,v:a.Li(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,
392
+ a||null}aa(a){this.G=a||null}F(a){this.P=a||null}Z(a){this.K=a||null}oa(){}};olympe.net.oe.WebSocket.xa=[olympe.net.WebSocket];olympe.Sa.node.net={};olympe.Sa.node.net.Pt=class extends olympe.net.Ta{constructor(a,b){super(a,b);this.Z=new olympe.Sa.node.net.pl(a)}T(){return'NodeJS'}Wf(){return olympe.D.fa.F}G(a){var b=this.K++;a=a.C();this.H.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.Sa.node.net.Qt(b,this.H);b.open(a);return b}C(a,b){this.H.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.K++;b=$b(this,c,b);this.Z.G(c,{u:a.C(),s:Yb(a),h:Wb(a),p:a.port,z:Xb(a),q:Zb(a),m:a.method,v:a.Li(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,
393
393
  b:a.body,r:a.F},b)}P(){this.H.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.Z}};const mc=require('fs'),nc=require('http'),oc=require('https');
394
394
  olympe.Sa.node.net.pl=class extends olympe.net.oe.pl{G(a,b,c){const d=b.s,e=b.b,f=b.m;var g=b.v;const h=b.k,k=b.c,l=b.a,n=b.j;var p=b.h;const q=b.p;let r=b.z;r.startsWith('/')||(r=`/${r}`);const t=b.q,u=b.u,w=b.r;b={host:p,port:q,path:t?r+'?'+t:r,method:f};g&&(b.headers=g);g=(y,z,A)=>new Promise((C,M)=>{mc.readFile(y,(K,ta)=>{K?M(K):(A[z]=ta,C(A))})});p=y=>{const z=C=>{C.setEncoding(w===olympe.net.Ba.ResponseType.Zl?'utf-8':'binary');let M='';C.on('data',K=>{M+=K});C.on('end',()=>{if(w!==olympe.net.Ba.ResponseType.Zl){var K=
395
395
  new Uint8Array(Buffer.from(M,'binary'));K=w===olympe.net.Ba.ResponseType.Kk?new Blob(K):K}else K=M;c(this.F(C.statusCode,C.statusMessage,K,C.headers))})},A=d?new oc.request(y,z):new nc.request(y,z);this.C.set(a,()=>{A.destroy()});A.on('error',C=>{c(this.F(olympe.net.Ba.ac.pi,'Connection refused','Error connecting to '+u+' with method '+f+', code = '+C.code+', message = '+C.message,''))});!e||'POST'!==f&&'PUT'!==f?A.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(C=>{A.write(C instanceof
396
- ArrayBuffer?Buffer.from(C):C);A.end()})};d&&(h||k||l)?h&&k&&l?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,l,'ca')).then(p).catch(y=>{this.H.log('Error loading self signed files:',y)})):this.H.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.H.debug('Received HTTP response',a,c);return new olympe.net.Zd(c,a,b,d)}};olympe.Sa.node.net.Qt=class extends olympe.net.oe.WebSocket{oa(a){return new (require('ws'))(a)}};olympe.Sa.node.net.U={PB:'native.html.net.useWorkers'};olympe.W.config(function(a){a.getParameter(olympe.net.U.mi)&&za(a,olympe.net.U.mi,!1);wa(a,olympe.net.R.Fa,olympe.Sa.node.net.Pt,olympe.net.R.Ca,olympe.host.R.Fa)},'olympe.native.node.net');olympe.Sa.node.net.http={};const pc=require('fastify'),{Readable:qc}=require('stream'),rc={Rj:0,Qj:1,Vl:2},sc=olympe.net.Ba.Qd.Ep,tc=olympe.net.Ba.Headers.Qr,uc=olympe.net.Ba.Headers.Nr,vc=olympe.net.Ba.Headers.Pr,wc=olympe.net.Ba.ac.jh;
396
+ ArrayBuffer?Buffer.from(C):C);A.end()})};d&&(h||k||l)?h&&k&&l?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,l,'ca')).then(p).catch(y=>{this.H.log('Error loading self signed files:',y)})):this.H.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.H.debug('Received HTTP response',a,c);return new olympe.net.$d(c,a,b,d)}};olympe.Sa.node.net.Qt=class extends olympe.net.oe.WebSocket{oa(a){return new (require('ws'))(a)}};olympe.Sa.node.net.U={PB:'native.html.net.useWorkers'};olympe.W.config(function(a){a.getParameter(olympe.net.U.mi)&&za(a,olympe.net.U.mi,!1);wa(a,olympe.net.R.Fa,olympe.Sa.node.net.Pt,olympe.net.R.Ca,olympe.host.R.Fa)},'olympe.native.node.net');olympe.Sa.node.net.http={};const pc=require('fastify'),{Readable:qc}=require('stream'),rc={Rj:0,Qj:1,Vl:2},sc=olympe.net.Ba.Rd.Ep,tc=olympe.net.Ba.Headers.Qr,uc=olympe.net.Ba.Headers.Nr,vc=olympe.net.Ba.Headers.Pr,wc=olympe.net.Ba.ac.jh;
397
397
  function xc(a,b){const c=b.methods,d=b.Sw,e=b.headers,f=b.origin;a.F.route({bodyLimit:a.aa<<20,url:b.path,method:[...c,sc],handler:(g,h)=>{var k=g.method;const l={[tc]:f,[vc]:c,[uc]:e};if(k===sc)return a.H.debug('< HTTP: OPTIONS'),h.code(wc).headers(l).send();var n=g.body;if(n instanceof Buffer){var p=new Uint8Array(n.length);n.copy(p)}else if('string'===typeof n||n instanceof Object)p=n;const [q,r]=g.hostname.split(':');k=new olympe.net.ci(q,parseInt(r,10),g.url,'https'===g.protocol,k,p);for(const [t,
398
398
  u]of Object.entries(g.headers))k.headers[t]=u;a.H.debug('< HTTP:',k.toString());n=new Map(Object.entries(g.params));g=new Map(Object.entries(g.query));return d(k,n,g).then(t=>{const u=t.Dc(),w=t.getData();(w instanceof Uint8Array||w instanceof ArrayBuffer||w instanceof qc)&&h.type(olympe.net.Ba.Vk.Au);if(u>=olympe.net.Ba.ac.pi)throw Error(w);u>=olympe.net.Ba.ac.Ik?a.H.warn('> HTTP: client bad request: reply with error:',w):a.H.debug('> HTTP: reply with body:',Buffer.isBuffer(w)?'binary':w);return h.code(u).headers(Object.assign(l,
399
399
  t.Li())).send(w)}).catch(t=>{a.H.error('> HTTP: reply with internal server error:',t);return h.code(olympe.net.Ba.ac.pi).headers(Object.assign(l,{[olympe.net.Ba.Headers.Th]:'text/plain'})).send('Internal server error')})}})}
400
- olympe.Sa.node.net.http.Ai=class extends olympe.net.Ai{constructor(a,b,c,d,e){super(a);this.aa=c;this.port=b;this.ea=d;this.T=e;this.F=this.createServer();this.P=new Map;this.C=rc.Rj;this.Ad=new Set;this.timer=null}L(a,b,c,d){this.P.set(a,{path:b,methods:c,Sw:d,headers:'*',origin:'*'});return this.G()}Z(a){const b=this;return v(function*(){b.P.delete(a);return 0<b.P.size?b.G():b.stop()})}start(){if(this.C===rc.Rj)return this.G();if(this.C===rc.Qj){for(const a of this.P.values())xc(this,a);return this.F.listen({port:this.port,
400
+ olympe.Sa.node.net.http.Ai=class extends olympe.net.Ai{constructor(a,b,c,d,e){super(a);this.aa=c;this.port=b;this.ea=d;this.T=e;this.F=this.createServer();this.P=new Map;this.C=rc.Rj;this.Ad=new Set;this.timer=null}K(a,b,c,d){this.P.set(a,{path:b,methods:c,Sw:d,headers:'*',origin:'*'});return this.G()}Z(a){const b=this;return v(function*(){b.P.delete(a);return 0<b.P.size?b.G():b.stop()})}start(){if(this.C===rc.Rj)return this.G();if(this.C===rc.Qj){for(const a of this.P.values())xc(this,a);return this.F.listen({port:this.port,
401
401
  host:'0.0.0.0'}).then(a=>{this.C=rc.Vl;this.H.debug('Web server listening on '+a);this.Ad.forEach(b=>b(null))}).catch(a=>{this.stop().then();this.Ad.forEach(b=>b(a))}).finally(()=>this.Ad.clear())}return Promise.reject('Try to start a webservice already started')}G(){return this.C===rc.Qj?(new Promise((a,b)=>{this.Ad.add(c=>c?b(c):a())})).then(()=>this.G()):new Promise((a,b)=>{this.Ad.add(c=>c?b(c):a());this.dk(()=>{const c=this;return v(function*(){c.C=rc.Qj;yield c.F.close();c.F=c.createServer();
402
402
  yield c.start()})})})}stop(){return this.C===rc.Vl?this.F.close().then(()=>{this.C=rc.Rj}):Promise.resolve()}createServer(){var a={logger:{level:'warn'},http2:this.ea};if('string'===typeof this.T){const b=require('fs'),c=require('path');Object.assign(a,{https:{allowHTTP1:!0,key:b.readFileSync(c.join(this.T,'key.pem')),cert:b.readFileSync(c.join(this.T,'cert.pem'))}})}a=pc(a);a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}dk(a,b=1E3){this.timer&&clearTimeout(this.timer);
403
- this.timer=setTimeout(a,b)}};olympe.W.config(function(a){D(a,olympe.net.R.zi,olympe.Sa.node.net.http.Ai,olympe.net.R.Ca,new olympe.W.ja(olympe.net.U.ai),new olympe.W.ja(olympe.net.U.Qo),new olympe.W.ja(olympe.net.U.Mq),new olympe.W.ja(olympe.net.U.Po))},'olympe.native.node.net.http');olympe.Sa.node.Y={};const yc=require('buffer');olympe.Sa.node.Y.Nk=class extends olympe.Y.Nk{G(a){return new Uint8Array(Buffer.from(a,'base64'))}C(a){return a instanceof Uint8Array?Buffer.from(a,a.byteOffset,a.byteLength).toString('base64'):Buffer.from(a).toString('base64')}F(a,b,c){try{b(yc.resolveObjectURL(a))}catch(d){c(`Error while trying to fetch buffer from ObjectURL: ${d}`)}}};olympe.W.config(function(a){wa(a,olympe.Y.R.dg,olympe.Sa.node.Y.Nk)},'olympe.native.node.utils');olympe.async={};function zc(a,b){a.L||a.Z.push(a.G.G(b))}
404
- olympe.async.vo=class{constructor(a,b=void 0===a){this.F=[];this.Z=[];this.G=a||new olympe.D.$b('Async executor context');this.oa=b;this.C=null;this.env=new Map;this.env.set('Executor',this);this.L=this.P=!1;this.H=null;this.timer=this.timeout=0;this.aa=olympe.Y.Hc()}fn(a){0<=a&&(this.timeout=a);return this}ab(){return this.H}add(a){this.L||this.F.push(this.G.G(a));return this}start(){this.P||(this.H&&this.H.log('Executor started.'),this.P=!0,this.G.onDestroy(()=>{this.C='Context destroyed.';this.complete(!1)},
405
- this.aa),0<this.timeout&&(this.timer=setTimeout(()=>{this.C='Timeout expired.';this.timer=0;this.complete(!1)},this.timeout)))}clear(){this.F=[];this.Z=[];this.env.clear();this.oa&&this.G.destroy()}complete(a){this.G.Bf(this.aa);if(!this.L){this.L=!0;this.timer&&(clearTimeout(this.timer),this.timer=0);this.H&&this.H.log(a?'Executor completed successfully':`Executor completed with error: ${this.C}`);for(const b of this.Z)b(a,a?null:this.C,this.env);this.clear()}}getContext(){return this.G}};
403
+ this.timer=setTimeout(a,b)}};olympe.W.config(function(a){D(a,olympe.net.R.zi,olympe.Sa.node.net.http.Ai,olympe.net.R.Ca,new olympe.W.ja(olympe.net.U.ai),new olympe.W.ja(olympe.net.U.Qo),new olympe.W.ja(olympe.net.U.Mq),new olympe.W.ja(olympe.net.U.Po))},'olympe.native.node.net.http');olympe.Sa.node.Y={};const yc=require('buffer');olympe.Sa.node.Y.Nk=class extends olympe.Y.Nk{G(a){return new Uint8Array(Buffer.from(a,'base64'))}C(a){return a instanceof Uint8Array?Buffer.from(a,a.byteOffset,a.byteLength).toString('base64'):Buffer.from(a).toString('base64')}F(a,b,c){try{b(yc.resolveObjectURL(a))}catch(d){c(`Error while trying to fetch buffer from ObjectURL: ${d}`)}}};olympe.W.config(function(a){wa(a,olympe.Y.R.dg,olympe.Sa.node.Y.Nk)},'olympe.native.node.utils');olympe.async={};function zc(a,b){a.K||a.Z.push(a.G.G(b))}
404
+ olympe.async.vo=class{constructor(a,b=void 0===a){this.F=[];this.Z=[];this.G=a||new olympe.D.$b('Async executor context');this.oa=b;this.C=null;this.env=new Map;this.env.set('Executor',this);this.K=this.P=!1;this.H=null;this.timer=this.timeout=0;this.aa=olympe.Y.Hc()}fn(a){0<=a&&(this.timeout=a);return this}ab(){return this.H}add(a){this.K||this.F.push(this.G.G(a));return this}start(){this.P||(this.H&&this.H.log('Executor started.'),this.P=!0,this.G.onDestroy(()=>{this.C='Context destroyed.';this.complete(!1)},
405
+ this.aa),0<this.timeout&&(this.timer=setTimeout(()=>{this.C='Timeout expired.';this.timer=0;this.complete(!1)},this.timeout)))}clear(){this.F=[];this.Z=[];this.env.clear();this.oa&&this.G.destroy()}complete(a){this.G.Bf(this.aa);if(!this.K){this.K=!0;this.timer&&(clearTimeout(this.timer),this.timer=0);this.H&&this.H.log(a?'Executor completed successfully':`Executor completed with error: ${this.C}`);for(const b of this.Z)b(a,a?null:this.C,this.env);this.clear()}}getContext(){return this.G}};
406
406
  function Ac(a){if(0<a.F.length){const b=a.F.shift();a.H&&a.H.log(`Executing next task. ${a.F.length} tasks left in the pipeline.`);a.getContext().run(()=>{b(()=>{Promise.resolve().then(()=>{Ac(a)})},c=>{c&&(a.C=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.xq=class extends olympe.async.vo{static create(){return new olympe.async.xq(new olympe.D.$b('SequencedExecutor'),!0)}start(){this.P||(super.start(),Ac(this))}};
407
- olympe.async.Ej=class extends olympe.async.vo{constructor(a,b){super(a,b);this.T=0;this.ea=!0}static create(){return new olympe.async.Ej(new olympe.D.$b('ParallelExecutor'),!0)}run(a){this.H&&this.H.log('Starting a task');this.getContext().run(()=>{a(()=>{this.done()},b=>{this.ea=!1;b&&(this.C=this.C?`${this.C}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.P&&!this.L&&(this.T++,this.run(a));return this}done(){this.T--;0>=this.T&&this.complete(this.ea)}start(){if(!this.P)if(super.start(),
408
- 0<this.F.length){this.T=this.F.length;for(const a of this.F)this.run(a)}else this.complete(!0)}};olympe.Db={};olympe.Db.yt=class{F(){return v(function*(){})}Z(){}P(){}G(){}T(){}forEach(){}has(){}get(){}set(){}remove(){}ea(){}aa(){}clear(){}L(){}};olympe.Db.zt=class{F(){}};olympe.Db.Storage=class{open(){}write(){}close(){}};olympe.Db.It=class{get(){return null}set(){return this}delete(){}};olympe.Db.R={sj:'localStorage.KeyValueDatabaseManager',ri:'localStorage.Storage',Gy:'localStorage.DatacloudStorage',yl:'localStorage.LocalStorage',Ca:'localStorage.Logger',xg:'localStorage.prefix'};olympe.W.config(function(a){ya(a,olympe.Db.R.sj);E(a,olympe.Db.R.xg,[],()=>'olympe');E(a,olympe.Db.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('localstorage'));D(a,olympe.Db.R.yl,olympe.Db.It)},'olympe.localstorage');olympe.N={};olympe.N.errors={};olympe.N.errors.Ip=class extends Error{};olympe.N.errors.Bp=class extends Error{};olympe.N.errors.Wj=class extends Error{};olympe.N.errors.Vn=class extends Error{};olympe.N.errors.jq=class extends Error{};olympe.N.errors.Lp=class extends Error{};olympe.N.errors.Wu=class extends Error{};olympe.N.errors.Xl=class extends Error{constructor(a,b){super(a);this.id=b}V(){return this.id}};olympe.N.errors.wj=class extends olympe.N.errors.Xl{};olympe.N.errors.In=class extends olympe.N.errors.Xl{};
407
+ olympe.async.Ej=class extends olympe.async.vo{constructor(a,b){super(a,b);this.T=0;this.ea=!0}static create(){return new olympe.async.Ej(new olympe.D.$b('ParallelExecutor'),!0)}run(a){this.H&&this.H.log('Starting a task');this.getContext().run(()=>{a(()=>{this.done()},b=>{this.ea=!1;b&&(this.C=this.C?`${this.C}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.P&&!this.K&&(this.T++,this.run(a));return this}done(){this.T--;0>=this.T&&this.complete(this.ea)}start(){if(!this.P)if(super.start(),
408
+ 0<this.F.length){this.T=this.F.length;for(const a of this.F)this.run(a)}else this.complete(!0)}};olympe.Db={};olympe.Db.yt=class{F(){return v(function*(){})}Z(){}P(){}G(){}T(){}forEach(){}has(){}get(){}set(){}remove(){}ea(){}aa(){}clear(){}K(){}};olympe.Db.zt=class{F(){}};olympe.Db.Storage=class{open(){}write(){}close(){}};olympe.Db.It=class{get(){return null}set(){return this}delete(){}};olympe.Db.R={sj:'localStorage.KeyValueDatabaseManager',ri:'localStorage.Storage',Gy:'localStorage.DatacloudStorage',yl:'localStorage.LocalStorage',Ca:'localStorage.Logger',xg:'localStorage.prefix'};olympe.W.config(function(a){ya(a,olympe.Db.R.sj);E(a,olympe.Db.R.xg,[],()=>'olympe');E(a,olympe.Db.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('localstorage'));D(a,olympe.Db.R.yl,olympe.Db.It)},'olympe.localstorage');olympe.N={};olympe.N.errors={};olympe.N.errors.Ip=class extends Error{};olympe.N.errors.Bp=class extends Error{};olympe.N.errors.Wj=class extends Error{};olympe.N.errors.Vn=class extends Error{};olympe.N.errors.jq=class extends Error{};olympe.N.errors.Lp=class extends Error{};olympe.N.errors.Wu=class extends Error{};olympe.N.errors.Xl=class extends Error{constructor(a,b){super(a);this.id=b}V(){return this.id}};olympe.N.errors.wj=class extends olympe.N.errors.Xl{};olympe.N.errors.In=class extends olympe.N.errors.Xl{};
409
409
  olympe.N.errors.No=class extends olympe.N.errors.Xl{};olympe.N.bc={mj:'urls.FileSvc',vn:'urls.BackupSvc',bq:'urls.RestoreBackupSvc',jg:'urls.GetContext',Ko:'urls.GraphDef',Kn:'urls.StaticGraphDef',TRANSACTION:'urls.Transaction',Lq:'urls.UserTagFromToken',Vu:'urls.UserNameFromTag',Uu:'urls.UserRoles',nu:'urls.RoleMembers',yj:'urls.OpenIDSvc'};
410
410
  olympe.W.config(a=>{F(a,olympe.N.bc.mj,'rest/filesvc');F(a,olympe.N.bc.vn,'rest/backupsvc');F(a,olympe.N.bc.bq,'rest/backupsvc/restore');F(a,olympe.N.bc.yj,'rest/openid');F(a,olympe.N.bc.jg,'rest/initialData');F(a,olympe.N.bc.Ko,'rest/querysvc/graphDef');F(a,olympe.N.bc.Kn,'rest/querysvc/graphDef/static');F(a,olympe.N.bc.TRANSACTION,'rest/transaction');F(a,olympe.N.bc.Lq,'rest/token');F(a,olympe.N.bc.Vu,'rest/authorization/getUserTag');F(a,olympe.N.bc.Uu,'rest/authorization/getUserRoles');F(a,olympe.N.bc.nu,
411
411
  'rest/authorization/roleMembers')});function Bc(a){a.H.info('Disconnected from bus');let b;null==(b=a.C)||b.forEach((c,d)=>{null!==c.F&&(a.H.info(`Disconnected from bus: pause keep alive of ${c.C.size} subscriptions for ${d} service.`),Cc(c))})}
412
- function Dc(a){a.H.debug('Connection to bus established. Listening to responses on topic',a.L);return dc(a.F,a.L,b=>{a.H.C()&&a.H.debug('BUS <',JSON.stringify(b));Ec(a,b.seq,'consumed');b=new olympe.N.Response(b.dest,b.src,b.seq,b.type,a.za.F(b.content));Ec(a,b.We().toString(),'deserialized',(new Map).set('source',b.yb()).set('messageType',b.getType().toString()));let c;null==(c=a.G.get(b.We()))||c(b)})}
412
+ function Dc(a){a.H.debug('Connection to bus established. Listening to responses on topic',a.K);return dc(a.F,a.K,b=>{a.H.C()&&a.H.debug('BUS <',JSON.stringify(b));Ec(a,b.seq,'consumed');b=new olympe.N.Response(b.dest,b.src,b.seq,b.type,a.za.F(b.content));Ec(a,b.We().toString(),'deserialized',(new Map).set('source',b.yb()).set('messageType',b.getType().toString()));let c;null==(c=a.G.get(b.We()))||c(b)})}
413
413
  function Fc(a){a.aa.forEach(c=>c(null));a.aa=[];a.H.debug(`Reconnected to bus: resubscribe to ${a.oa.size} active topics.`);a.oa.forEach((c,d)=>{Gc(a,d,c).then(()=>{})});let b;null==(b=a.C)||b.forEach((c,d)=>{null===c.F&&(a.H.debug(`Reconnected to bus: restart keep alive of ${c.C.size} subscriptions for ${d} service.`),Hc(c,!0))})}function Ic(a){return Jc(a.pb)&&bc(a.F)}function Kc(a){a.ub=a.ea.C(()=>Ic(a)?Promise.resolve('Bus connection OK'):Promise.reject('Bus is disconnected'))}
414
- function Ec(a,b,c,d=new Map){a.Lb.C&&Ra(a.Lb,'com',d.set('id',`${b}`).set('channel','bus').set('eventType',c))}
414
+ function Ec(a,b,c,d=new Map){a.Mb.C&&Ra(a.Mb,'com',d.set('id',`${b}`).set('channel','bus').set('eventType',c))}
415
415
  function Gc(a,b,c){return v(function*(){Ic(a)||(yield a.connect());a.H.debug(`Bus: Subscribe to ${b}`);a.oa.set(b,c);yield dc(a.F,b,d=>{a.H.C()&&a.H.debug(`BUS < #${b}: ${JSON.stringify(d)}`);let e=null;try{Ec(a,d.seq,'consumed'),e=new olympe.N.Request(d.dest,d.src,d.auth,d.seq,d.type,a.za.F(d.content)),Ec(a,e.We().toString(),'deserialized',(new Map).set('source',e.yb()).set('messageType',e.getType().toString()))}catch(f){a.H.error(`An error occurred while trying to deserialize the request: ${JSON.stringify(d)} with error ${f}`)}null!==
416
- e&&c(e)})})}function Mc(a,b,c,d,e){b=new olympe.N.Response(c,a.L,b,d,e);return a.publish(b)}function Nc(a,b,c,d){const e=Oc(a.P).wd();a.Z++;return new olympe.N.Request(b,a.L,e,a.Z,c,d)}function Pc(a,b,c,d){const e=b.We(),f=olympe.N.Response.qb.Ck;let g=null;g=setTimeout(()=>Qc(a,e),a.Tb);a.G.set(e,h=>{g&&clearTimeout(g);h.getType()===f?g=setTimeout(()=>Qc(a,e),d):(a.G.delete(e),c(h))})}
417
- function Qc(a,b){const c=a.G.get(b);a.G.delete(b);null==c||c(new olympe.N.Response(a.L,a.L,b,olympe.N.Response.qb.Fb,{reason:'Timeout'}))}function Rc(a,b){a.Z++;const c=a.Z,d=setTimeout(()=>Qc(a,c),a.Tb);a.G.set(c,e=>{a.G.delete(c);clearTimeout(d);b(e)});return a.Z}function Sc(a,b){return v(function*(){let c;const d=null==(c=a.C)?void 0:c.get(b);d&&(Cc(d),a.C.delete(b));a.oa.delete(b);a.H.debug(`Bus: Unsubscribe to ${b}`);if(Ic(a))return ec(a.F,b)})}
416
+ e&&c(e)})})}function Mc(a,b,c,d,e){b=new olympe.N.Response(c,a.K,b,d,e);return a.publish(b)}function Nc(a,b,c,d){const e=Oc(a.P).wd();a.Z++;return new olympe.N.Request(b,a.K,e,a.Z,c,d)}function Pc(a,b,c,d){const e=b.We(),f=olympe.N.Response.qb.Ck;let g=null;g=setTimeout(()=>Qc(a,e),a.Tb);a.G.set(e,h=>{g&&clearTimeout(g);h.getType()===f?g=setTimeout(()=>Qc(a,e),d):(a.G.delete(e),c(h))})}
417
+ function Qc(a,b){const c=a.G.get(b);a.G.delete(b);null==c||c(new olympe.N.Response(a.K,a.K,b,olympe.N.Response.qb.Fb,{reason:'Timeout'}))}function Rc(a,b){a.Z++;const c=a.Z,d=setTimeout(()=>Qc(a,c),a.Tb);a.G.set(c,e=>{a.G.delete(c);clearTimeout(d);b(e)});return a.Z}function Sc(a,b){return v(function*(){let c;const d=null==(c=a.C)?void 0:c.get(b);d&&(Cc(d),a.C.delete(b));a.oa.delete(b);a.H.debug(`Bus: Unsubscribe to ${b}`);if(Ic(a))return ec(a.F,b)})}
418
418
  function Tc(a,b,c,d,e){null===a.C&&(a.C=new Map);let f=a.C.get(b);f?(a=f,a.G!==d&&(a.G=d,null!==a.F&&(Cc(a),Hc(a,!1)))):(f=new olympe.N.Iu(a.H,a,b,d),a.C.set(b,f));d=f;d.C.set(c,e);1===d.C.size&&Hc(d,!1)}function Uc(a,b,c){var d;const e=null==(d=a.C)?void 0:d.get(b);if(null==e?0:Vc(e,c))d=olympe.N.Request.qb.Iq,Ic(a)&&a.publish(Nc(a,b,d,c)).catch(f=>a.H.error(`Impossible to keep alive subscriptions: ${f}`)),0===e.C.size&&(a.C.delete(b),0===a.C.size&&(a.C=null))}
419
419
  function Wc(a,b){return new Promise((c,d)=>{a.P.Qg(b.le(),(e,f)=>{e?d(e):c(f)})})}
420
- olympe.N.Jn=class{constructor(a,b,c,d,e,f,g,h){b=h.get('connectionOptions');this.H=a;this.pb=c;this.P=d;this.ea=e;this.za=f;this.Lb=g;this.Tb=h.get('shortTimeout');this.Mc=h.get('requestTimeout');this.jc=h.get('subscriptionsRefreshRate');this.G=new Map;this.F=ac(h.get('url'),b);this.jb=h.get('allowGuest');this.Z=0;this.L=olympe.Y.Hc();this.C=null;this.T=!1;this.aa=[];this.oa=new Map;this.cc=this.ub='';this.Ja=!1;fc(this.F,()=>{Bc(this)});hc(this.F,()=>{this.T=!0});gc(this.F,()=>{this.T&&Dc(this).then(()=>
420
+ olympe.N.Jn=class{constructor(a,b,c,d,e,f,g,h){b=h.get('connectionOptions');this.H=a;this.pb=c;this.P=d;this.ea=e;this.za=f;this.Mb=g;this.Tb=h.get('shortTimeout');this.Mc=h.get('requestTimeout');this.jc=h.get('subscriptionsRefreshRate');this.G=new Map;this.F=ac(h.get('url'),b);this.jb=h.get('allowGuest');this.Z=0;this.K=olympe.Y.Hc();this.C=null;this.T=!1;this.aa=[];this.oa=new Map;this.cc=this.ub='';this.Ja=!1;fc(this.F,()=>{Bc(this)});hc(this.F,()=>{this.T=!0});gc(this.F,()=>{this.T&&Dc(this).then(()=>
421
421
  {this.T=!1;Fc(this)}).catch(k=>{this.H.error(`An error occurred while trying to subscribe to "response topic" on the bus. Close connection: ${k}`);this.F.end()})})}connect(){return new Promise((a,b)=>{const c=d=>{b(d);this.aa.forEach(e=>e(d));this.aa=[]};Ic(this)?a():this.T||this.Ja?this.aa.push(d=>d?b(d):a()):Jc(this.pb)?(this.Ja=!0,olympe.D.Vm([this.P.tk()],d=>{Kc(this);this.Ja=!1;d.valueOf()||this.jb?(this.jb||Xc(this.P,()=>this.disconnect().then()),this.T=!0,this.F.connect(()=>Oc(this.P),()=>
422
422
  a()),this.cc=this.ea.aa(()=>this.disconnect(),'Bus websocket')):c(Error('Guest user is not allowed to connect to RabbitMQ, you can allow guest with the bus.allowGuest oConfig parameter!'))})):c(Error('Cannot connect to the bus if working offline'))})}disconnect(){return new Promise(a=>{this.H.debug('Disconnecting from bus');this.P.oa.delete('busLogoutCallback');this.F.end(!1,()=>a());this.ea.G(this.ub);this.ea.P(this.cc)})}publish(a){const b=this;return v(function*(){if(!b.T||a.getType()!==olympe.N.Request.qb.Je){Ic(b)||
423
423
  (yield b.connect());var c=a.pc();try{Ec(b,a.We().toString(),'serialize');var d=a.ha(b.za);b.H.C()&&b.H.debug(`BUS > #${c}: ${JSON.stringify(d)}`)}catch(e){throw Error(`An error occurred while serializing the message (seqId=${a.We()}): ${e}`);}yield b.F.publish(c,d);Ec(b,a.We().toString(),'publish',(new Map).set('destination',a.pc()).set('messageType',a.getType().toString()))}})}nd(a,b,c){return Mc(this,a.We(),a.yb(),b,c)}request(a,b,c,d){const e=Nc(this,a,b,c);if(b===olympe.N.Request.qb.PUBLISH){const f=
424
- new olympe.N.Response(a,this.L,e.We(),olympe.N.Response.qb.Ck);return this.publish(e).then(()=>f)}return new Promise((f,g)=>{Pc(this,e,f,null!=d?d:this.Mc);this.publish(e).catch(g)})}};olympe.N.Jn.C='Timeout';const Yc=olympe.net.Ba.Headers.un,Zc=olympe.net.Ba.ac.jh,$c=olympe.net.Ba.ac.Pn,ad=olympe.net.Ba.ac.Yi,bd=olympe.net.Ba.ac.tu,cd=olympe.net.Ba.ac.Zr,dd=olympe.net.Ba.ac.zo,ed=olympe.net.Ba.ac.Qu,fd=olympe.net.Ba.ac.Cl;function gd(a,b){let c;return null!=(c=a.L.get(b))?c:''}function hd(a,b,c,d=new Map){a.C.C&&Ra(a.C,'com',d.set('id',`${b}`).set('channel','http').set('eventType',c))}
424
+ new olympe.N.Response(a,this.K,e.We(),olympe.N.Response.qb.Ck);return this.publish(e).then(()=>f)}return new Promise((f,g)=>{Pc(this,e,f,null!=d?d:this.Mc);this.publish(e).catch(g)})}};olympe.N.Jn.C='Timeout';const Yc=olympe.net.Ba.Headers.un,Zc=olympe.net.Ba.ac.jh,$c=olympe.net.Ba.ac.Pn,ad=olympe.net.Ba.ac.Yi,bd=olympe.net.Ba.ac.tu,cd=olympe.net.Ba.ac.Zr,dd=olympe.net.Ba.ac.zo,ed=olympe.net.Ba.ac.Qu,fd=olympe.net.Ba.ac.Cl;function gd(a,b){let c;return null!=(c=a.K.get(b))?c:''}function hd(a,b,c,d=new Map){a.C.C&&Ra(a.C,'com',d.set('id',`${b}`).set('channel','http').set('eventType',c))}
425
425
  function id(a,b,c){if(null===b)return Promise.reject('No http request to send');P(b,{[Yc]:c});const d=b.C();return rxjs.firstValueFrom(rxjs.defer(()=>new Promise((e,f)=>{a.F++;const g=a.F;if(a.H.C()){const h=b.body;a.H.debug('HTTP >',d,`body: ${'string'===typeof h?h:typeof h}`)}hd(a,g,'request',(new Map).set('destination',b.C()).set('messageType',b.method.toString()));a.G.C(b,h=>{hd(a,g,'reply');switch(h.Dc()){case Zc:case $c:case ad:var k=h.getData();a.H.C()&&a.H.debug('HTTP <',h.Dc(),`content: ${'string'===
426
426
  typeof k?k:typeof k}`);e(k);break;case bd:h=`HTTP < Service provider for http request to ${b.C()} is overloaded, retry later`;a.H.warn(h);f(new olympe.N.errors.Lp(h));break;case cd:a.H.debug(`HTTP < request canceled (${b.C()}).`);e();break;case dd:case ed:h=`HTTP < request authorization denied: ${b.C()}`;a.H.error(h);f(new olympe.N.errors.Wu(h));break;case fd:h=`HTTP < requested resource not found: ${b.C()}`;a.H.error(h);f(new olympe.N.errors.Bp(h));break;default:k=`HTTP < Error: ${h.Dc()}, ${h.statusText}`,
427
- a.H.error(k),500===h.Dc()&&'Connection refused'===h.statusText?f(new olympe.N.errors.Vn(k)):f(Error(k))}})})).pipe(olympe.N.operators.Ui(olympe.N.errors.Lp,(e,f)=>{a.H.warn(`Service overloaded (${d}), retry sending http request after ${f}ms.`)},4E3)))}olympe.N.Ls=class{constructor(a,b,c,d){this.H=a;this.G=b;this.C=c;this.L=d;this.F=0}};function jd(a,b,c){a.H.info('Initializing COMMUNICATION layer');if(a.H.C()){const d=['Server layer parameters:'];b.forEach((e,f)=>{d.push(f+'="'+e+'"')});a.H.debug(d.join('\n\t'))}kd(a,olympe.N.Ke.Fb,d=>{switch(d.c){case olympe.N.qb.Su:a.H.error('Unknown message sent to the server:',olympe.N.Va.Kb[d.s]);break;case olympe.N.qb.Ds:a.H.error('Fatal error, the last message is probably too big according to the websocket config.'),a.G.forEach((e,f)=>{null!==e.Zm&&ld(a,f,d.i)})}});olympe.D.Ni(a.connected,
428
- ()=>{let d=!1;olympe.D.Ni(a.za.C(),()=>{d&&(a.Tb(),a.jb(),d=!1);Vb(a.Tb.bind(a),a.sd);Vb(a.jb.bind(a),a.pb)},()=>{a.L=[0,0,a.L[2]];d=!0})},()=>{a.P=null;Ub(a.jb.bind(a),a.pb)});c.C(()=>md(a)?Promise.resolve('WebSocket connection to Orchestrator OK'):Promise.reject(`WebSocket connection to Orchestrator is ${a.C}`));c.aa(()=>a.disconnect(),'Orchestrator websocket');a.H.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
427
+ a.H.error(k),500===h.Dc()&&'Connection refused'===h.statusText?f(new olympe.N.errors.Vn(k)):f(Error(k))}})})).pipe(olympe.N.operators.Ui(olympe.N.errors.Lp,(e,f)=>{a.H.warn(`Service overloaded (${d}), retry sending http request after ${f}ms.`)},4E3)))}olympe.N.Ls=class{constructor(a,b,c,d){this.H=a;this.G=b;this.C=c;this.K=d;this.F=0}};function jd(a,b,c){a.H.info('Initializing COMMUNICATION layer');if(a.H.C()){const d=['Server layer parameters:'];b.forEach((e,f)=>{d.push(f+'="'+e+'"')});a.H.debug(d.join('\n\t'))}kd(a,olympe.N.Ke.Fb,d=>{switch(d.c){case olympe.N.qb.Su:a.H.error('Unknown message sent to the server:',olympe.N.Va.Lb[d.s]);break;case olympe.N.qb.Ds:a.H.error('Fatal error, the last message is probably too big according to the websocket config.'),a.G.forEach((e,f)=>{null!==e.Zm&&ld(a,f,d.i)})}});olympe.D.Ni(a.connected,
428
+ ()=>{let d=!1;olympe.D.Ni(a.za.C(),()=>{d&&(a.Tb(),a.jb(),d=!1);Vb(a.Tb.bind(a),a.sd);Vb(a.jb.bind(a),a.pb)},()=>{a.K=[0,0,a.K[2]];d=!0})},()=>{a.P=null;Ub(a.jb.bind(a),a.pb)});c.C(()=>md(a)?Promise.resolve('WebSocket connection to Orchestrator OK'):Promise.reject(`WebSocket connection to Orchestrator is ${a.C}`));c.aa(()=>a.disconnect(),'Orchestrator websocket');a.H.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
429
429
  function md(a){return a.C===olympe.N.Va.C.Yg}
430
- function Q(a,b){if(a.C!==b)switch(a.H.debug('State change '+a.C+' --\x3e '+b),a.C=b,a.ub.forEach(c=>c(b)),b){case olympe.N.Va.C.gm:case olympe.N.Va.C.CONNECTING:case olympe.N.Va.C.jo:break;case olympe.N.Va.C.Yg:a.connected.update(olympe.D.fa.F);break;case olympe.N.Va.C.tg:a.L=[0,0,a.L[2]];nd(a);break;case olympe.N.Va.C.Fb:a.H.error('Connection to server',a.Z.C(),'aborted due to error');a.connected.update(olympe.D.fa.C);break;case olympe.N.Va.C.pn:nd(a);break;case olympe.N.Va.C.Xd:a.connected.update(olympe.D.fa.C);
430
+ function Q(a,b){if(a.C!==b)switch(a.H.debug('State change '+a.C+' --\x3e '+b),a.C=b,a.ub.forEach(c=>c(b)),b){case olympe.N.Va.C.gm:case olympe.N.Va.C.CONNECTING:case olympe.N.Va.C.jo:break;case olympe.N.Va.C.Yg:a.connected.update(olympe.D.fa.F);break;case olympe.N.Va.C.tg:a.K=[0,0,a.K[2]];nd(a);break;case olympe.N.Va.C.Fb:a.H.error('Connection to server',a.Z.C(),'aborted due to error');a.connected.update(olympe.D.fa.C);break;case olympe.N.Va.C.pn:nd(a);break;case olympe.N.Va.C.Yd:a.connected.update(olympe.D.fa.C);
431
431
  break;default:throw Error('State machine error in server manager. Should not get in state '+b);}}
432
- function od(a){const b=olympe.N.Va.C.pn,c=olympe.N.Va.C.gm,d=olympe.N.Va.C.Xd,e=Xb(a.Ja);a.H.info(`Trying to wakeup orchestrator with ${e}`);Q(a,c);const f=a.cc.G(a.Ja);f.aa(g=>{const h=JSON.parse(g);a.H.info(`${e}: ${null==h?void 0:h.status}`);switch(null==h?void 0:h.status){case 'ready':Q(a,b);f.close();break;case 'asleep':a.H.info(`Trying to wakeup orchestrator with ${e}`);f.send('{"action": "wakeup"}');Q(a,c);break;case 'waking-up':break;default:a.H.warn(`Invalid message from ${e}: ${g}`),f.close(),
432
+ function od(a){const b=olympe.N.Va.C.pn,c=olympe.N.Va.C.gm,d=olympe.N.Va.C.Yd,e=Xb(a.Ja);a.H.info(`Trying to wakeup orchestrator with ${e}`);Q(a,c);const f=a.cc.G(a.Ja);f.aa(g=>{const h=JSON.parse(g);a.H.info(`${e}: ${null==h?void 0:h.status}`);switch(null==h?void 0:h.status){case 'ready':Q(a,b);f.close();break;case 'asleep':a.H.info(`Trying to wakeup orchestrator with ${e}`);f.send('{"action": "wakeup"}');Q(a,c);break;case 'waking-up':break;default:a.H.warn(`Invalid message from ${e}: ${g}`),f.close(),
433
433
  Q(a,d)}});f.F(()=>{a.H.warn(`Communication with ${e} failed.`);f.close();Q(a,d)});f.ea(()=>{a.H.info(`Checking orchestrator status with ${e}`);f.send('{"action": "status"}')})}function pd(a,b,c,d=!1){const e=f=>{if(0===b.length||b.includes(f))d&&a.ub.delete(e),c(f)};a.ub.add(e);e(a.C)}function qd(a,b,c,d,e){a.aa.C&&Ra(a.aa,'com',d.set('id',`${b}`).set('channel','ws').set('eventType',c),e)}
434
- function nd(a){const b=olympe.N.Va.C.INIT,c=olympe.N.Va.C.CONNECTING,d=olympe.N.Va.C.Yg,e=olympe.N.Va.C.Xd,f=olympe.N.Va.C.tg,g=olympe.N.Va.C.gm,h=olympe.N.Va.C.Fb;null!==a.F&&(a.F.Z(null),a.F.close());a.H.log(`Asking NET layer for a connection to ${Wb(a.Z)}:${a.Z.port}...`);a.F=a.cc.G(a.Z);a.F.ea(a.ud.bind(a));a.F.aa(a.Qe.bind(a));a.F.Z(()=>{a.F=null;a.C===d?Q(a,f):a.C!==h&&a.C!==g&&Q(a,e)});a.Ja&&a.C===b&&a.F.F(()=>{a.F.F(null);a.C===c&&od(a);a.Ja=null});a.C!==f&&Q(a,c)}
434
+ function nd(a){const b=olympe.N.Va.C.INIT,c=olympe.N.Va.C.CONNECTING,d=olympe.N.Va.C.Yg,e=olympe.N.Va.C.Yd,f=olympe.N.Va.C.tg,g=olympe.N.Va.C.gm,h=olympe.N.Va.C.Fb;null!==a.F&&(a.F.Z(null),a.F.close());a.H.log(`Asking NET layer for a connection to ${Wb(a.Z)}:${a.Z.port}...`);a.F=a.cc.G(a.Z);a.F.ea(a.ud.bind(a));a.F.aa(a.Qe.bind(a));a.F.Z(()=>{a.F=null;a.C===d?Q(a,f):a.C!==h&&a.C!==g&&Q(a,e)});a.Ja&&a.C===b&&a.F.F(()=>{a.F.F(null);a.C===c&&od(a);a.Ja=null});a.C!==f&&Q(a,c)}
435
435
  function rd(a,b,c,d){const e=a.ye;a.ye++;c={message:{seqId:e,messageFamily:b,payload:c},qm:d?sd(a,d):null,Zm:null};a.G.set(e,c);qd(a,e,'publish',(new Map).set('family',b));d=[olympe.N.Va.C.CONNECTING,olympe.N.Va.C.tg];(md(a)||b===olympe.N.Ke.qj&&d.includes(a.C))&&td(a,e,c)}
436
- function sd(a,b){const c=olympe.N.Va.G.si;return d=>{if(null!==d&&void 0!==d){var e=null,f,g=null==(f=d.info)?void 0:f.warn;f=d.s;if('string'===typeof g)a.H.debug(`A message has raised a warning in the orchestrator: ${g}. Investigate.`);else if(void 0!==f&&f!==c){e=void 0!==olympe.N.Va.Kb[f]?`Status code = ${f} [${olympe.N.Va.Kb[f]}]`:`Status code = ${f}`;g=d.info;f=olympe.N.errors.jq;if(void 0!==g&&void 0!==g.error){var h=g.error.reason;'string'===typeof h&&0<h.length&&(h.includes('Message timeout')&&
436
+ function sd(a,b){const c=olympe.N.Va.G.si;return d=>{if(null!==d&&void 0!==d){var e=null,f,g=null==(f=d.info)?void 0:f.warn;f=d.s;if('string'===typeof g)a.H.debug(`A message has raised a warning in the orchestrator: ${g}. Investigate.`);else if(void 0!==f&&f!==c){e=void 0!==olympe.N.Va.Lb[f]?`Status code = ${f} [${olympe.N.Va.Lb[f]}]`:`Status code = ${f}`;g=d.info;f=olympe.N.errors.jq;if(void 0!==g&&void 0!==g.error){var h=g.error.reason;'string'===typeof h&&0<h.length&&(h.includes('Message timeout')&&
437
437
  (f=olympe.N.errors.Wj),e+=`\nReason:\n${g.error.reason}`);h=g.error.detailedReason;'string'===typeof h&&0<h.length&&(e+=`\nDetails:\n${g.error.detailedReason}`)}e=new f('Rejected by orchestrator:\n'+e)}b(e,d)}}}function td(a,b,c){var d=c.message;a.H.C()&&a.H.debug('WS >',JSON.stringify(d.payload));(d=a.F.send(JSON.stringify(d)))?null===c.qm?a.G.delete(b):c.Zm=Date.now():olympe.D.Ra(a.za.C()).valueOf()&&Q(a,olympe.N.Va.C.tg);return d}
438
438
  function kd(a,b,c,d){void 0===d&&(d=olympe.Y.Hc());let e=a.ea.get(b);void 0===e&&(e=new Map,a.ea.set(b,e));e.set(d,c)}function ud(a){a=a.ea.get(olympe.N.Ke.ng);void 0!==a&&a.delete('logoutHandler')}function ld(a,b,c){if(a.G.has(b)){const {qm:d}=a.G.get(b);a.G.delete(b);d&&d({s:23,info:c})}}function vd(a,b){a.H.error(b);Q(a,olympe.N.Va.C.Fb)}
439
439
  function wd(a,b,c){a.jc=c?1E3*c:-1;a.H.info(`Connected to ${a.Z.C()}`,'|',b?`server version: ${b}`:'','|',null!==c?`activity timeout: ${c}s`:'');b=Array.from(a.G).sort(([d],[e])=>d-e);for(const [d,e]of b)if(!td(a,d,e))return;Q(a,olympe.N.Va.C.Yg)}
440
- olympe.N.Va=class{constructor(a,b,c,d,e,f,g,h){this.H=a;this.cc=b;this.Z=e;this.F=null;this.Ja=f;this.aa=g;this.sd=h.get('pingInterval');h.get('retryHttpOverload');this.pb=h.get('messageTimeout');this.T=olympe.Y.qf.parse(h.get('clientVersion'));this.oa=olympe.Y.qf.parse(h.get('serverVersion'));this.C=olympe.N.Va.C.INIT;this.za=d;this.Lb=h.get('getContextMode');this.ye=1;this.P=null;this.L=[0,0,0];this.ea=new Map;this.connected=olympe.D.ic(olympe.D.fa,'Server is connected');this.ub=new Set;this.G=
441
- new Map;this.Mc=new Map;this.jc=-1;jd(this,h,c)}connect(){const a=olympe.N.Va.C.Yg,b=olympe.N.Va.C.Xd,c=olympe.N.Va.C.Fb,d=olympe.N.Va.C.INIT;return new Promise((e,f)=>{this.C!==d&&this.C!==b||nd(this);pd(this,[a,b,c],g=>{g===a?e():f(Error('Was not able to open a connection to the orchestrator'))},!0)})}disconnect(){return new Promise((a,b)=>{const c=olympe.N.Va.C.jo,d=olympe.N.Va.C.Xd,e=olympe.N.Va.C.CONNECTING,f=olympe.N.Va.C.Fb;this.C===olympe.N.Va.C.Yg||this.C===e||this.C===c?(pd(this,[d,f],g=>
442
- {g===d?a():b(Error('Was not able to disconnect'))},!0),this.C!==c&&(Q(this,c),this.F.close())):(Q(this,d),a())})}ud(){this.H.debug('Websocket connected, sending handshake. Client version:',$a(this.T),'subscribeEverything:',this.Lb?'NO':'YES');rd(this,olympe.N.Ke.qj,{c:olympe.N.qb.qj,cv:$a(this.T),m:this.Lb?0:1,s:this.P,b:this.za.F()},this.tf.bind(this))}tf(a,b){if(a)vd(this,'Error in receiving handshake response: '+a.message);else{this.H.debug('Handshake response received');var c=olympe.N.Va.F;a=
440
+ olympe.N.Va=class{constructor(a,b,c,d,e,f,g,h){this.H=a;this.cc=b;this.Z=e;this.F=null;this.Ja=f;this.aa=g;this.sd=h.get('pingInterval');h.get('retryHttpOverload');this.pb=h.get('messageTimeout');this.T=olympe.Y.qf.parse(h.get('clientVersion'));this.oa=olympe.Y.qf.parse(h.get('serverVersion'));this.C=olympe.N.Va.C.INIT;this.za=d;this.Mb=h.get('getContextMode');this.ye=1;this.P=null;this.K=[0,0,0];this.ea=new Map;this.connected=olympe.D.ic(olympe.D.fa,'Server is connected');this.ub=new Set;this.G=
441
+ new Map;this.Mc=new Map;this.jc=-1;jd(this,h,c)}connect(){const a=olympe.N.Va.C.Yg,b=olympe.N.Va.C.Yd,c=olympe.N.Va.C.Fb,d=olympe.N.Va.C.INIT;return new Promise((e,f)=>{this.C!==d&&this.C!==b||nd(this);pd(this,[a,b,c],g=>{g===a?e():f(Error('Was not able to open a connection to the orchestrator'))},!0)})}disconnect(){return new Promise((a,b)=>{const c=olympe.N.Va.C.jo,d=olympe.N.Va.C.Yd,e=olympe.N.Va.C.CONNECTING,f=olympe.N.Va.C.Fb;this.C===olympe.N.Va.C.Yg||this.C===e||this.C===c?(pd(this,[d,f],g=>
442
+ {g===d?a():b(Error('Was not able to disconnect'))},!0),this.C!==c&&(Q(this,c),this.F.close())):(Q(this,d),a())})}ud(){this.H.debug('Websocket connected, sending handshake. Client version:',$a(this.T),'subscribeEverything:',this.Mb?'NO':'YES');rd(this,olympe.N.Ke.qj,{c:olympe.N.qb.qj,cv:$a(this.T),m:this.Mb?0:1,s:this.P,b:this.za.F()},this.tf.bind(this))}tf(a,b){if(a)vd(this,'Error in receiving handshake response: '+a.message);else{this.H.debug('Handshake response received');var c=olympe.N.Va.F;a=
443
443
  b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.Ws:vd(this,`Framework version (${$a(this.T)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);return;case c.Ku:vd(this,`Framework version (${$a(this.T)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.Gs:vd(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.oa.Qa(olympe.Y.qf.C))this.H.warn('Handshake successful but received server version',
444
- a,'is invalid. Cannot check against it');else try{var e=olympe.Y.qf.parse(a);if(e.Wi(this.oa)){vd(this,`Framework v${$a(this.T)} is expecting Orchestrator to be at least in v${$a(this.oa)}`);return}this.H.log('Handshake successful. Orchestrator version: ',e,'required:',$a(this.oa))}catch(f){vd(this,f);return}e=olympe.N.Va.C.Xd;if(this.C===olympe.N.Va.C.tg&&null!==this.P&&this.P!==b.sessionId)this.H.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),
445
- Q(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.Mc.set(f,g);this.P=b.sessionId||null;wd(this,a,d)}}}Tb(){this.L[0]-this.L[1]>this.sd/2?(this.H.debug('Ping did not get answer, try to reconnect'),Q(this,olympe.N.Va.C.tg)):(this.L[0]=Date.now(),this.F.send('ping')||(this.H.debug('Impossible to send ping, try to reconnect'),Q(this,olympe.N.Va.C.tg)))}Qe(a){this.L[2]=Date.now();if(a.startsWith('pong'))return olympe.D.Ra(this.za.C()).valueOf()&&(this.L[1]=this.L[2]),null;
444
+ a,'is invalid. Cannot check against it');else try{var e=olympe.Y.qf.parse(a);if(e.Wi(this.oa)){vd(this,`Framework v${$a(this.T)} is expecting Orchestrator to be at least in v${$a(this.oa)}`);return}this.H.log('Handshake successful. Orchestrator version: ',e,'required:',$a(this.oa))}catch(f){vd(this,f);return}e=olympe.N.Va.C.Yd;if(this.C===olympe.N.Va.C.tg&&null!==this.P&&this.P!==b.sessionId)this.H.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),
445
+ Q(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.Mc.set(f,g);this.P=b.sessionId||null;wd(this,a,d)}}}Tb(){this.K[0]-this.K[1]>this.sd/2?(this.H.debug('Ping did not get answer, try to reconnect'),Q(this,olympe.N.Va.C.tg)):(this.K[0]=Date.now(),this.F.send('ping')||(this.H.debug('Impossible to send ping, try to reconnect'),Q(this,olympe.N.Va.C.tg)))}Qe(a){this.K[2]=Date.now();if(a.startsWith('pong'))return olympe.D.Ra(this.za.C()).valueOf()&&(this.K[1]=this.K[2]),null;
446
446
  var b=0;this.aa.C&&(b=performance.now()-this.aa.F);try{var c=JSON.parse(a)}catch(e){return this.H.error('Unable to parse response from server: '+e.toString()),Error('Unable to parse response from server')}a=c.seqId;const d=c.messageFamily;c=c.payload;this.H.C()&&this.H.debug('WS <',JSON.stringify(c));qd(this,a,'consumed',new Map,b);qd(this,a,'deserialized',(new Map).set('family',d));this.G.has(a)&&({qm:b}=this.G.get(a),this.G.delete(a),null==b||b(c));b=this.ea.get(d);if(void 0!==b)for(const e of b.values())e(c);
447
447
  return null}jb(){const a=Date.now();for(const [b,{Zm:c}]of this.G)null!==c&&a-c>this.pb&&(this.H.warn(`No response was received from the server for the seqId = ${b}`),ld(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};function Jc(a){return olympe.D.Ra(a.C)===olympe.N.rc.C.ni}
448
- function xd(a,b){const c=olympe.N.rc.C.Kl,d=olympe.N.rc.C.ae,e=olympe.N.rc.C.Xd,f=olympe.N.rc.C.xu,g=b.get('reconnectionDelay');pd(a.G,[olympe.N.Va.C.INIT],()=>{yd(a)?(a.C.update(c),a.connect().catch(h=>a.H.error(h))):a.G.disconnect().catch(h=>a.H.error(h))},!0);pd(a.G,[olympe.N.Va.C.Xd],()=>{if(olympe.D.Ra(a.C)===f)a.H.info('Disconnected, from orchestrator for shutdown');else if(a.C.update(a.F?d:e),yd(a)&&a.P){const h=`Disconnected, will try to auto reconnect in ${g} ms`;a.F?a.H.log(h):a.H.error(h);
449
- setTimeout(()=>a.connect().catch(k=>a.H.error(k)),g)}else a.H.info('Disconnected, stay offline.')});a.T.F(()=>{a.C.update(f);return Promise.resolve()},'Connectivity manager: shutdown state')}function yd(a){return null===a.storage.get(a.L+'olympe_manual_offline')}
450
- olympe.N.rc=class{constructor(a,b,c,d,e,f){this.H=a;this.G=b;this.T=d;this.storage=e;this.C=olympe.D.ic(Number).update(olympe.N.rc.C.INIT);this.F=f.get('offlineEnabled');this.P=f.get('offlineAutoBackOnline');this.L=f.get('storagePrefix');xd(this,f)}Wf(){const a=olympe.N.rc.C.ni,b=olympe.N.rc.C.ae,c=olympe.N.rc.C.Xd;let d=olympe.D.fa.C;return olympe.D.ta([this.C],e=>{if(e===a)d=olympe.D.fa.F;else if(e===b||e===c)d=olympe.D.fa.C;return d},olympe.D.fa)}getState(){return this.C.sb()}connect(){const a=
451
- this;return v(function*(){const b=olympe.N.rc.C.ni,c=olympe.N.rc.C.Kl;olympe.D.Ra(a.C)!==b&&(a.C.update(c),a.storage.delete(a.L+'olympe_manual_offline'),yield a.G.connect(),yield zd(),a.C.update(b))})}disconnect(){const a=this;return v(function*(){const b=olympe.N.rc.C.ae,c=olympe.N.rc.C.Kl;if(!a.F)throw Error('Try to go offline manually while the process does not support it. Please add `offline.enabled=true` in the config');a.storage.set(a.L+'olympe_manual_offline','true');olympe.D.Ra(a.C)!==b&&
452
- (a.C.update(c),yield olympe.N.Hg().disconnect(),yield a.G.disconnect())})}};olympe.N.rc.C={INIT:0,Kl:1,ni:2,ae:3,Xd:4,xu:5};olympe.N.rc.F='olympe_manual_offline';olympe.N.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.C=a;this.source=b;this.L=c;this.Kh=e;this.F=f||null}pc(){return this.C}yb(){return this.source}We(){return this.G}getType(){return this.Kh}le(){return this.L}ha(a){return{dest:this.C,src:this.source,seq:this.G,auth:this.L,type:this.Kh,content:a.ha(this.F)}}toString(){return`Request(dest: ${this.C}, src: ${this.source}, seqId: ${this.G}, type: ${this.Kh})`}};olympe.N.Request.qb={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3,Je:4,Iq:5};function Ad(a){const b=olympe.N.Response.qb.Gq;return a.F!==olympe.N.Response.qb.$l?Promise.reject('Should only call `topicAck` on TOPIC responses'):Mc(olympe.N.Hg(),a.C.seq,a.source,b)}olympe.N.Response=class{constructor(a,b,c,d,e){this.L=c;this.G=a;this.source=b;this.F=d;this.C=null!=e?e:null}pc(){return this.G}yb(){return this.source}We(){return this.L}getType(){return this.F}ha(a){return{dest:this.G,src:this.source,seq:this.L,type:this.F,content:a.ha(this.C)}}toString(){return JSON.stringify(this)}};
448
+ function xd(a,b){const c=olympe.N.rc.C.Kl,d=olympe.N.rc.C.be,e=olympe.N.rc.C.Yd,f=olympe.N.rc.C.xu,g=b.get('reconnectionDelay');pd(a.G,[olympe.N.Va.C.INIT],()=>{yd(a)?(a.C.update(c),a.connect().catch(h=>a.H.error(h))):a.G.disconnect().catch(h=>a.H.error(h))},!0);pd(a.G,[olympe.N.Va.C.Yd],()=>{if(olympe.D.Ra(a.C)===f)a.H.info('Disconnected, from orchestrator for shutdown');else if(a.C.update(a.F?d:e),yd(a)&&a.P){const h=`Disconnected, will try to auto reconnect in ${g} ms`;a.F?a.H.log(h):a.H.error(h);
449
+ setTimeout(()=>a.connect().catch(k=>a.H.error(k)),g)}else a.H.info('Disconnected, stay offline.')});a.T.F(()=>{a.C.update(f);return Promise.resolve()},'Connectivity manager: shutdown state')}function yd(a){return null===a.storage.get(a.K+'olympe_manual_offline')}
450
+ olympe.N.rc=class{constructor(a,b,c,d,e,f){this.H=a;this.G=b;this.T=d;this.storage=e;this.C=olympe.D.ic(Number).update(olympe.N.rc.C.INIT);this.F=f.get('offlineEnabled');this.P=f.get('offlineAutoBackOnline');this.K=f.get('storagePrefix');xd(this,f)}Wf(){const a=olympe.N.rc.C.ni,b=olympe.N.rc.C.be,c=olympe.N.rc.C.Yd;let d=olympe.D.fa.C;return olympe.D.ta([this.C],e=>{if(e===a)d=olympe.D.fa.F;else if(e===b||e===c)d=olympe.D.fa.C;return d},olympe.D.fa)}getState(){return this.C.sb()}connect(){const a=
451
+ this;return v(function*(){const b=olympe.N.rc.C.ni,c=olympe.N.rc.C.Kl;olympe.D.Ra(a.C)!==b&&(a.C.update(c),a.storage.delete(a.K+'olympe_manual_offline'),yield a.G.connect(),yield zd(),a.C.update(b))})}disconnect(){const a=this;return v(function*(){const b=olympe.N.rc.C.be,c=olympe.N.rc.C.Kl;if(!a.F)throw Error('Try to go offline manually while the process does not support it. Please add `offline.enabled=true` in the config');a.storage.set(a.K+'olympe_manual_offline','true');olympe.D.Ra(a.C)!==b&&
452
+ (a.C.update(c),yield olympe.N.Hg().disconnect(),yield a.G.disconnect())})}};olympe.N.rc.C={INIT:0,Kl:1,ni:2,be:3,Yd:4,xu:5};olympe.N.rc.F='olympe_manual_offline';olympe.N.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.C=a;this.source=b;this.K=c;this.Kh=e;this.F=f||null}pc(){return this.C}yb(){return this.source}We(){return this.G}getType(){return this.Kh}le(){return this.K}ha(a){return{dest:this.C,src:this.source,seq:this.G,auth:this.K,type:this.Kh,content:a.ha(this.F)}}toString(){return`Request(dest: ${this.C}, src: ${this.source}, seqId: ${this.G}, type: ${this.Kh})`}};olympe.N.Request.qb={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3,Je:4,Iq:5};function Ad(a){const b=olympe.N.Response.qb.Gq;return a.F!==olympe.N.Response.qb.$l?Promise.reject('Should only call `topicAck` on TOPIC responses'):Mc(olympe.N.Hg(),a.C.seq,a.source,b)}olympe.N.Response=class{constructor(a,b,c,d,e){this.K=c;this.G=a;this.source=b;this.F=d;this.C=null!=e?e:null}pc(){return this.G}yb(){return this.source}We(){return this.K}getType(){return this.F}ha(a){return{dest:this.G,src:this.source,seq:this.K,type:this.F,content:a.ha(this.C)}}toString(){return JSON.stringify(this)}};
453
453
  olympe.N.Response.qb={Ck:0,pq:1,Pq:2,$l:3,Gq:4,Fb:5};const Bd=olympe.N.Response.qb.pq,Cd=olympe.N.Response.qb.Fb,Dd=olympe.N.Response.qb.Pq,Ed=olympe.N.Response.qb.$l,Fd=olympe.N.Response.qb.Gq,Gd=olympe.N.Request.qb.SEND,Hd=olympe.N.Request.qb.GET,Id=olympe.N.Request.qb.SUBSCRIBE,Jd=olympe.N.Request.qb.Je;
454
454
  olympe.N.Oc=class{constructor(a,b,c){this.request=a;this.C=b;this.G=c;this.F=null}Nh(){return null!==this.F?Promise.resolve(this.F):Wc(this.C,this.request).then(a=>this.F=a)}Kh(){return this.request.getType()}source(){return this.request.yb()}body(){return this.request.F}Yq(){return this.request.getType()===Gd?this.C.nd(this.request,Bd):Promise.reject('Should only call `ack` on SEND requests')}nd(a){const b=this.request.getType();return b===Hd||b===Jd?this.C.nd(this.request,Dd,a):Promise.reject('Should only call `reply` on GET requests')}Tm(a){if(this.request.getType()!==
455
455
  Id)return Promise.reject('Should only call `notifyOn` on SUBSCRIBE requests');const b=olympe.Y.Hc();return new Promise((c,d)=>{const e={seq:Rc(this.C,f=>{switch(f.getType()){case Fd:Kd(this.G,b);c(b);break;case Cd:d(f.C.reason);break;default:d('Unsupported response type for a SUBSCRIBE request')}}),topic:a,id:b,refresh:this.C.jc};this.C.nd(this.request,Ed,e).catch(d)})}Ch(a){return this.C.nd(this.request,Cd,{reason:a.message})}};olympe.N.Oc.prototype.fail=olympe.N.Oc.prototype.Ch;
456
456
  olympe.N.Oc.prototype.notifyOn=olympe.N.Oc.prototype.Tm;olympe.N.Oc.prototype.reply=olympe.N.Oc.prototype.nd;olympe.N.Oc.prototype.ack=olympe.N.Oc.prototype.Yq;olympe.N.Oc.prototype.body=olympe.N.Oc.prototype.body;olympe.N.Oc.prototype.source=olympe.N.Oc.prototype.source;olympe.N.Oc.prototype.requestType=olympe.N.Oc.prototype.Kh;olympe.N.Oc.prototype.userTag=olympe.N.Oc.prototype.Nh;function Cc(a){if(null!==a.F){var b=a.F;a.F=null;clearInterval(b)}}function Hc(a,b){b&&a.Ye();null===a.F&&(a.F=setInterval(a.Ye.bind(a),a.G))}function Vc(a,b){b=a.C.delete(b);0===a.C.size&&Cc(a);return b}function Ld(a,b){a.C.forEach((c,d)=>{Vc(a,d);c(b)})}
457
- olympe.N.Iu=class{constructor(a,b,c,d){this.H=a;this.L=b;this.P=c;this.G=d;this.C=new Map;this.F=null}Ye(){const a=olympe.N.errors.wj;Ic(this.L)?this.L.request(this.P,olympe.N.Request.qb.Je,Array.from(this.C.keys())).then(b=>{b=b.C;0<b.length&&b.forEach(c=>{const d=this.C.get(c);Vc(this,c);null==d||d(new a('Subscription does not exist in the service.',c))})}).catch(b=>{b=`Impossible to keep alive subscriptions: ${b}`;this.H.error(b);Ld(this,Error(b))}):Cc(this)}};olympe.N.yg=class{ha(a){return this.C(a)}F(a){return this.G(a)}C(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a;case a instanceof olympe.D.gb:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.D.Color:return Object.assign({t:2},a.toJSON());case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.C(d));
457
+ olympe.N.Iu=class{constructor(a,b,c,d){this.H=a;this.K=b;this.P=c;this.G=d;this.C=new Map;this.F=null}Ye(){const a=olympe.N.errors.wj;Ic(this.K)?this.K.request(this.P,olympe.N.Request.qb.Je,Array.from(this.C.keys())).then(b=>{b=b.C;0<b.length&&b.forEach(c=>{const d=this.C.get(c);Vc(this,c);null==d||d(new a('Subscription does not exist in the service.',c))})}).catch(b=>{b=`Impossible to keep alive subscriptions: ${b}`;this.H.error(b);Ld(this,Error(b))}):Cc(this)}};olympe.N.yg=class{ha(a){return this.C(a)}F(a){return this.G(a)}C(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a;case a instanceof olympe.D.gb:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.D.Color:return Object.assign({t:2},a.toJSON());case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.C(d));
458
458
  return{t:3,m:b};case a instanceof Set:return{t:4,m:Array.from(a).map(this.C.bind(this))};case Array.isArray(a):return a.map(this.C.bind(this));case a instanceof ArrayBuffer:return{t:5,v:olympe.Y.Te().C(a)};case a instanceof Uint8Array:return{t:6,v:olympe.Y.Te().C(a)};case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>{c[d]=this.C(e);return c},{});default:throw Error(`Impossible to serialize the following value: ${a}`);}}G(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===
459
459
  typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a}if(Array.isArray(a))return a.map(b=>this.F(b));switch(a.t){case 1:return new Date(a.d);case 2:return olympe.D.Color.Ub(a);case 3:return new Map(Object.entries(a.m).map(([b,c])=>[b,this.F(c)]));case 4:return new Set(a.m.map(b=>this.F(b)));case 5:return olympe.Y.Te().G(a.v).buffer;case 6:return olympe.Y.Te().G(a.v);default:return Object.entries(a).reduce((b,[c,d])=>{b[c]=this.F(d);return b},{})}}};const Md=olympe.N.Response.qb.pq,Nd=olympe.N.Response.qb.Ck,Od=olympe.N.Response.qb.Fb,Pd=olympe.N.Response.qb.Pq,Qd=olympe.N.Response.qb.$l,Rd=olympe.N.Request.qb.SEND,Sd=olympe.N.Request.qb.GET,Td=olympe.N.Request.qb.PUBLISH,Ud=olympe.N.Request.qb.SUBSCRIBE,Vd=olympe.N.Request.qb.Je,Wd=olympe.N.Request.qb.Iq;function Kd(a,b){a.C||(a.C=La(new olympe.Y.cm(a.F.jc+3E4),c=>{let d;null==(d=a.G)||d.call(a,c)}));a.C.add(b)}
460
460
  function Xd(a){let b,c;a=null!=(c=null==(b=a.C)?void 0:b.reason)?c:'Unknown reason';return'Timeout'===a?new olympe.N.errors.Wj(a):Error(a)}
461
- olympe.N.xb=class{constructor(a,b){this.F=olympe.N.Hg();this.L=a;this.G=this.C=null;this.P=new olympe.D.$b(`Service ${a}`,'function'===typeof b.F?b.F():b);this.H=olympe.ma.ab(`Service ${this.L}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();this.clear()};this.P.onDestroy(b);Gc(this.F,this.L,c=>{const d=new olympe.N.Oc(c,this.F,this);switch(c.getType()){case Vd:var e=d.body().filter(g=>{let h;return!(null==(h=this.C)?0:Ja(h,g))});d.nd(e).catch(g=>this.H.error('Not able to validate subscription keep alive',
462
- g));break;case Wd:c=d.body();null==(e=this.C)||e.delete(c);let f;null==(f=this.G)||f.call(this,c);break;case Td:a.next(d);break;default:this.F.nd(c,Nd).then(()=>a.next(d))}}).catch(c=>{c='Failed to connect to the bus: '+c;this.H.error(c);a.error(Error(c))});return b})}Fr(a){this.G=a;return this}stop(){this.P.destroy()}clear(){Sc(this.F,this.L).catch(b=>this.H.error('Failed to unsubscribe from '+this.L+', error: '+b));if(this.G){let b;null==(b=this.C)||b.forEach(c=>{let d;return null==(d=this.G)?void 0:
461
+ olympe.N.xb=class{constructor(a,b){this.F=olympe.N.Hg();this.K=a;this.G=this.C=null;this.P=new olympe.D.$b(`Service ${a}`,'function'===typeof b.F?b.F():b);this.H=olympe.ma.ab(`Service ${this.K}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();this.clear()};this.P.onDestroy(b);Gc(this.F,this.K,c=>{const d=new olympe.N.Oc(c,this.F,this);switch(c.getType()){case Vd:var e=d.body().filter(g=>{let h;return!(null==(h=this.C)?0:Ja(h,g))});d.nd(e).catch(g=>this.H.error('Not able to validate subscription keep alive',
462
+ g));break;case Wd:c=d.body();null==(e=this.C)||e.delete(c);let f;null==(f=this.G)||f.call(this,c);break;case Td:a.next(d);break;default:this.F.nd(c,Nd).then(()=>a.next(d))}}).catch(c=>{c='Failed to connect to the bus: '+c;this.H.error(c);a.error(Error(c))});return b})}Fr(a){this.G=a;return this}stop(){this.P.destroy()}clear(){Sc(this.F,this.K).catch(b=>this.H.error('Failed to unsubscribe from '+this.K+', error: '+b));if(this.G){let b;null==(b=this.C)||b.forEach(c=>{let d;return null==(d=this.G)?void 0:
463
463
  d.call(this,c)})}let a;null==(a=this.C)||a.clear()}static publish(a,b){return olympe.N.Hg().request(a,Td,b).then(()=>{})}static send(a,b,c={}){return olympe.N.Hg().request(a,Rd,b,c.timeout).then(d=>{switch(d.getType()){case Md:break;case Od:throw Xd(d);default:throw Error('Unsupported response type for a SEND request');}})}static get(a,b,c={}){return olympe.N.Hg().request(a,Sd,b,c.timeout).then(d=>{switch(d.getType()){case Pd:d=d.C;if(null!==d)return d;throw Error('No payload after request to service: '+
464
464
  a);case Od:throw Xd(d);default:throw Error('Unsupported response type for a GET request');}})}static observe(a,b,c,d={}){const e='function'===typeof b.F?b.F():b,f=olympe.N.Hg();return(new rxjs.Observable(g=>{let h=null,k=null;const l=()=>{g.complete();k&&Uc(f,a,k);h&&Sc(f,h).catch(n=>olympe.ma.ab('Service '+a).error('Failed to unsubscribe from a topic '+n))};e.Z(l);f.request(a,Ud,c,d.timeout).then(n=>{switch(n.getType()){case Qd:const p=n.C;h=p.topic;Gc(f,h,q=>{q.getType()===Td?g.next(q.F):(g.error('Unsupported notification message. It should be a publish'),
465
465
  l())}).then(()=>{k=p.id;Tc(f,a,k,p.refresh,q=>g.error(q));Ad(n).catch(q=>{g.error(`Was unable to ack the subscription: ${q}`);l()})}).catch(q=>{g.error(`Was not able to subscribe to notification topic ${h}: ${q}`);l()});break;case Od:g.error(Xd(n));break;default:g.error('Unsupported response type for a SUBSCRIBE request')}}).catch(n=>g.error(n));return l})).pipe(olympe.N.operators.Ui(olympe.N.errors.wj,(g,h)=>{olympe.ma.ab(`Service ${a}`).debug(`Subscribed to topic ${g.V()} now that we are back online, after waiting for ${h}ms`);
466
- let k;null==(k=d.onRetry)||k.call(d)}))}};olympe.N.xb.observe=olympe.N.xb.observe;olympe.N.xb.get=olympe.N.xb.get;olympe.N.xb.send=olympe.N.xb.send;olympe.N.xb.publish=olympe.N.xb.publish;olympe.N.xb.prototype.stop=olympe.N.xb.prototype.stop;olympe.N.xb.prototype.setUnsubscriptionHandler=olympe.N.xb.prototype.Fr;olympe.N.xb.prototype.listen=olympe.N.xb.prototype.listen;olympe.N.Ke={$n:1,Hf:2,Fb:3,ng:4,yy:5,qj:6};olympe.N.qb={qj:1,Su:2,Ds:3,Je:5};olympe.N.Va.C={INIT:'initialize',CONNECTING:'connecting',Xd:'disconnected',jo:'disconnecting',Yg:'connected',tg:'reconnecting',gm:'waking',pn:'awake',Fb:'error'};olympe.N.Va.F={jh:1,Gs:-1,Ws:-2,Ku:-3};olympe.N.Va.G={si:0,Kz:23};
467
- olympe.N.Va.Kb={0:'OK',1:'SRP Authentication First Step Failed',2:'SRP Authentication Last Step Failed',3:'SRP Authentication Bad Credentials',4:'AutoLogin Authentication Failed',5:'AutoLogin Authentication Token Invalid',6:'Logout Failed',7:'SAML Request Generation Failed',8:'SAML Authentication Save Failed',9:'Invalid SAML Response',10:'SAML User Not Found',11:'Transaction Failed',12:'GetContext Failed',13:'Notification Failed',15:'FileService Clean Failed',17:'Try to subscribe multiple times',
466
+ let k;null==(k=d.onRetry)||k.call(d)}))}};olympe.N.xb.observe=olympe.N.xb.observe;olympe.N.xb.get=olympe.N.xb.get;olympe.N.xb.send=olympe.N.xb.send;olympe.N.xb.publish=olympe.N.xb.publish;olympe.N.xb.prototype.stop=olympe.N.xb.prototype.stop;olympe.N.xb.prototype.setUnsubscriptionHandler=olympe.N.xb.prototype.Fr;olympe.N.xb.prototype.listen=olympe.N.xb.prototype.listen;olympe.N.Ke={$n:1,Hf:2,Fb:3,ng:4,yy:5,qj:6};olympe.N.qb={qj:1,Su:2,Ds:3,Je:5};olympe.N.Va.C={INIT:'initialize',CONNECTING:'connecting',Yd:'disconnected',jo:'disconnecting',Yg:'connected',tg:'reconnecting',gm:'waking',pn:'awake',Fb:'error'};olympe.N.Va.F={jh:1,Gs:-1,Ws:-2,Ku:-3};olympe.N.Va.G={si:0,Kz:23};
467
+ olympe.N.Va.Lb={0:'OK',1:'SRP Authentication First Step Failed',2:'SRP Authentication Last Step Failed',3:'SRP Authentication Bad Credentials',4:'AutoLogin Authentication Failed',5:'AutoLogin Authentication Token Invalid',6:'Logout Failed',7:'SAML Request Generation Failed',8:'SAML Authentication Save Failed',9:'Invalid SAML Response',10:'SAML User Not Found',11:'Transaction Failed',12:'GetContext Failed',13:'Notification Failed',15:'FileService Clean Failed',17:'Try to subscribe multiple times',
468
468
  18:'Try to unsubscribe multiple times',21:'GraphDef Query Failed',22:'Client Request Invalid',23:'Internal Server Error',24:'File Retrieval Error',25:'File Does Not Exists',26:'Restore Failed',27:'Permission Error',14:'Handshake Failed',28:'Client Version Too Old',29:'Client Version Invalid Format',34:'Server overloaded, retry later',35:'Add token error',36:'Keep token alive error',37:'Unknown client message',39:'Fetch data while concurrency transaction'};olympe.N.R={$e:'com.ConnectivityManager',Mj:'com.ServerManager',An:'com.BusManager',ll:'com.HttpManager',ce:'com.Serializer',Ca:'com.Logger',vq:'com.Source',Jq:'com.Urls',oA:'com.peerFileSvcUrl'};
469
469
  olympe.N.U={Yk:'defaultHost',qh:'server.host',Nj:'server.port',Oj:'server.ssl',Jk:'server.basePath',Sq:'server.wsPath',Ql:'server.reconnectionDelay',Mp:'server.pingInterval',Rq:'server.messageTimeout',eq:'server.retryHttpOnOverload',Rk:'server.clientVersion',sq:'server.serverVersion',uu:'server.wakeUpService',Mk:'bus.host',Bn:'bus.path',Cn:'bus.port',Hn:'bus.vhost',Fn:'bus.ssl',Je:'bus.keepalive',lu:'bus.reschedulePings',ds:'bus.clientId',bs:'bus.clean',hs:'bus.connectTimeout',En:'bus.shortTimeout',
470
470
  Dn:'bus.requestTimeout',Gn:'bus.subscriptionRefreshRate',hu:'bus.queueQoSZero',Lk:'bus.allowGuest'};
@@ -478,115 +478,115 @@ new olympe.W.ja(olympe.N.U.Je),new olympe.W.ja(olympe.N.U.lu),new olympe.W.ja(ol
478
478
  h],['connectionOptions',w],['allowGuest',q],['shortTimeout',r],['requestTimeout',t],['subscriptionsRefreshRate',u]])});D(a,olympe.N.R.An,olympe.N.Jn,olympe.N.R.Ca,olympe.net.R.Fa,olympe.N.R.$e,olympe.auth.R.Fa,olympe.host.R.Le,olympe.N.R.ce,olympe.Y.R.Nf,'com.bus.ManagerConfig');E(a,'com.connectivity.ManagerConfig',[olympe.net.R.Fl,olympe.Db.R.xg,new olympe.W.ja(olympe.N.U.Ql)],(g,...h)=>['storagePrefix','reconnectionDelay'].reduce((k,l,n)=>k.set(l,h[n]),g));D(a,olympe.N.R.$e,olympe.N.rc,olympe.N.R.Ca,
479
479
  olympe.N.R.Mj,olympe.net.R.Fa,olympe.host.R.Le,olympe.Db.R.yl,'com.connectivity.ManagerConfig')},'olympe.communication');olympe.W.run([olympe.N.R.An,olympe.N.R.$e],(a,b)=>{olympe.N.Hg=()=>a;olympe.N.Bm=()=>b});olympe.N.operators={};olympe.N.operators.Ui=(a,b,c=5E3)=>rxjs.operators.retry({resetOnSuccess:!0,delay:(d,e)=>{if(d instanceof a){const f=Math.round(Math.random()*(e+1)*c);return rxjs.timer(f).pipe(rxjs.operators.tap(()=>null==b?void 0:b(d,f)))}return rxjs.throwError(()=>d)}});olympe.auth={};function Yd(a,b){ud(a.C);kd(a.C,olympe.N.Ke.ng,c=>{const d=c.c;d===olympe.auth.hd.C.Dt?(a.C.ud(),b(olympe.auth.Ta.F.Yi,c)):d===olympe.auth.hd.C.ru&&b(olympe.auth.Ta.F.To,c)},'logoutHandler')}
480
480
  function Zd(a,b,c){const d=null==b?void 0:b.gf();if(b instanceof olympe.auth.Bj){const e=g=>{const h=Object.create(null);h.url=g;h.olympe_token=b.wd();h.access_token=$d(b);g=`${gd(a.fh,olympe.N.bc.yj)}/logout${d?`?idpName=${d}`:''}`;a.F.redirect(g,h)};c=a.F.C();const f=new URL(c);0!==f.hash.length||0!==f.search.length?(f.hash='',f.search='',a.G.db.set('main',c,'redirectTo').then(()=>{e(f.toString())}).catch(g=>{a.H.error(`Error when trying to set the redirectKey in Auth store: ${g}`)})):e(c)}else rd(a.C,
481
- olympe.N.Ke.ng,Object.assign({},{c:olympe.auth.hd.C.Et},d&&{idpName:d}),c)}function ae(a,b,c,d){olympe.D.Ra(a.L.getState())===olympe.N.rc.C.ae?d(new olympe.N.errors.Ip('Working offline'),'Working offline'):(c.c=b,rd(a.C,olympe.N.Ke.ng,c,d))}
481
+ olympe.N.Ke.ng,Object.assign({},{c:olympe.auth.hd.C.Et},d&&{idpName:d}),c)}function ae(a,b,c,d){olympe.D.Ra(a.K.getState())===olympe.N.rc.C.be?d(new olympe.N.errors.Ip('Working offline'),'Working offline'):(c.c=b,rd(a.C,olympe.N.Ke.ng,c,d))}
482
482
  function be(a,b,c){if(b.mg()!==olympe.auth.Ac.C.OAUTH2)c(Error('Only oAuth2 tokens can be refreshed'),null);else{var d=`?idpName=${b.gf()}&access_token=${$d(b)}`;d=`${gd(a.fh,olympe.N.bc.yj)}/refresh${d}`;id(a.fh,O(d),b.wd()).then(e=>{'string'===typeof e?(e=JSON.parse(e),e=new olympe.auth.Bj(b.wc(),b.me(),b.wd(),e,b.gf()),c(null,e)):c(null,b)}).catch(e=>c(Error(e),null))}}
483
- olympe.auth.hd=class{constructor(a,b,c,d,e,f){this.H=a;this.C=b;this.fh=c;this.L=d;this.F=e;this.G=f;ce(this.G).then(g=>{g&&this.G.db.remove('main','redirectTo').then(()=>{this.F.redirect(g,null,olympe.auth.Lj.C.GET)}).catch(h=>{this.H.error(`Error when trying to remove redirect key from AUTH storage: ${h}`)})}).catch(g=>{this.H.error(`Error when trying to get redirect key from AUTH storage: ${g}`)})}Ye(a){rd(this.C,olympe.N.Ke.ng,{c:olympe.auth.hd.C.Je},b=>a(b))}Qg(a,b,c){const d=gd(this.fh,olympe.N.bc.Lq);
483
+ olympe.auth.hd=class{constructor(a,b,c,d,e,f){this.H=a;this.C=b;this.fh=c;this.K=d;this.F=e;this.G=f;ce(this.G).then(g=>{g&&this.G.db.remove('main','redirectTo').then(()=>{this.F.redirect(g,null,olympe.auth.Lj.C.GET)}).catch(h=>{this.H.error(`Error when trying to remove redirect key from AUTH storage: ${h}`)})}).catch(g=>{this.H.error(`Error when trying to get redirect key from AUTH storage: ${g}`)})}Ye(a){rd(this.C,olympe.N.Ke.ng,{c:olympe.auth.hd.C.Je},b=>a(b))}Qg(a,b,c){const d=gd(this.fh,olympe.N.bc.Lq);
484
484
  a=O(`${d}/${a}`);id(this.fh,a,b).then(e=>c(null,e)).catch(e=>c(Error(e)))}};olympe.auth.hd.C={ng:1,Et:2,Fb:3,Je:5,si:6,Os:10,Cu:11,Mr:12,SAML:13,ru:14,Dt:20};function Xc(a,b){var c='busLogoutCallback';void 0===c&&(c=olympe.Y.Dh());a.oa.set(c,b)}function Oc(a){return olympe.D.Ra(a.C.sb())}
485
485
  function zd(){var a=olympe.auth.je();const b=olympe.auth.Ta.C.Zi,c=olympe.auth.Ta.C.INIT;de(a,b);a.jb?(a.G=olympe.auth.Ta.G.Lr,a.H.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),ee(a)):(a.G=olympe.auth.Ta.G.vi,a.H.log('Connector online, attempting to log with token'),fe(a));return rxjs.firstValueFrom(a.F.sb().asObservable().pipe(rxjs.operators.filter(d=>!(d===b||d===c)))).catch(()=>{})}
486
- function ge(a){a.H.info('Initializing AUTH layer');let b=a.jc;if(a.ea){const c=a.ea.F();b=null!=c?c:b;c&&a.ea.C().then(()=>{})}b&&a.storage&&he(a.storage,b).catch(c=>a.H.error(c));a.H.debug('Asking to be notified when auth connector gets online');olympe.D.Ic([a.pb.getState()],c=>{switch(c){case olympe.N.rc.C.ae:a.G=olympe.auth.Ta.G.vi;a.H.log('Connector offline, attempting to recover sessions from current token');fe(a);break;case olympe.N.rc.C.Xd:switch(olympe.D.Ra(a.F)){case olympe.auth.Ta.C.Ef:c=
487
- olympe.D.Ra(a.C).wc();ie(a,`Disconnected from server - session of user ${c} lost`);break;case olympe.auth.Ta.C.$h:a.H.info('Disconnected from server - guest session lost');break;case olympe.auth.Ta.C.Zi:ie(a,'Disconnected from server - authentication aborted');break;case olympe.auth.Ta.C.INIT:ie(a,'Cannot open auth session - no server connection');break;default:ie(a,'Should not get there, investigate',!0)}}});Yd(a.L,(c,d)=>{if(c===olympe.auth.Ta.F.Yi)ie(a,'authentication revoked'),a.storage&&je(a.storage),
486
+ function ge(a){a.H.info('Initializing AUTH layer');let b=a.jc;if(a.ea){const c=a.ea.F();b=null!=c?c:b;c&&a.ea.C().then(()=>{})}b&&a.storage&&he(a.storage,b).catch(c=>a.H.error(c));a.H.debug('Asking to be notified when auth connector gets online');olympe.D.Ic([a.pb.getState()],c=>{switch(c){case olympe.N.rc.C.be:a.G=olympe.auth.Ta.G.vi;a.H.log('Connector offline, attempting to recover sessions from current token');fe(a);break;case olympe.N.rc.C.Yd:switch(olympe.D.Ra(a.F)){case olympe.auth.Ta.C.Ef:c=
487
+ olympe.D.Ra(a.C).wc();ie(a,`Disconnected from server - session of user ${c} lost`);break;case olympe.auth.Ta.C.$h:a.H.info('Disconnected from server - guest session lost');break;case olympe.auth.Ta.C.Zi:ie(a,'Disconnected from server - authentication aborted');break;case olympe.auth.Ta.C.INIT:ie(a,'Cannot open auth session - no server connection');break;default:ie(a,'Should not get there, investigate',!0)}}});Yd(a.K,(c,d)=>{if(c===olympe.auth.Ta.F.Yi)ie(a,'authentication revoked'),a.storage&&je(a.storage),
488
488
  a.oa.forEach(e=>{e(c,d)});else if(c===olympe.auth.Ta.F.To)a.H.info('Redirection to IDP to invalidate token (SAML)'),Oc(a),a.storage&&je(a.storage),a.ub.F();else throw Error(`Unknown logout step coming from server : ${c}`);});a.Ja=ke(a);a.T.F(()=>a.Jh().catch(c=>a.H.error(`Failed to logout ${c}`)),'Logout');a.H.log('DONE initializing AUTH layer (waiting for connector to be online)')}
489
- function le(a,b){let c=null;olympe.D.Ni(a.F.sb().zd(olympe.auth.Ta.C.Ef).and(b),()=>{const d=Oc(a);!me(a)&&d&&(c=a.Md.get(d.mg()).L(d,(e,f)=>{e?(a.H.error('Failed to refresh token, error message: ',e.message),a.Jh().catch(g=>a.H.error(`Failed to logout after wrong refresh ${g}`))):f&&ne(a,f)}))},()=>{let d;null==(d=c)||d()})}
489
+ function le(a,b){let c=null;olympe.D.Ni(a.F.sb().zd(olympe.auth.Ta.C.Ef).and(b),()=>{const d=Oc(a);!me(a)&&d&&(c=a.Nd.get(d.mg()).K(d,(e,f)=>{e?(a.H.error('Failed to refresh token, error message: ',e.message),a.Jh().catch(g=>a.H.error(`Failed to logout after wrong refresh ${g}`))):f&&ne(a,f)}))},()=>{let d;null==(d=c)||d()})}
490
490
  function fe(a){null!==a.storage?(a.H.debug('Retrieving token from local storage'),a.storage.le().then(b=>{if(b){const e=new olympe.auth.Request;var c=b.wc();e.set('username',c);c=e;var d=b.wd();c.set('nonce',d);'string'===typeof b.gf()&&e.set('idpName',b.gf());a.H.debug('Token found, trying login with',e);oe(a,e,olympe.auth.Ac.C.Gl)}else ie(a,'No token found, cannot perform auto login')}).catch(b=>{ie(a,b.message,!0)})):ie(a,'Cannot retrieve token: no storage configured, cannot perform auto login',
491
491
  !0)}function ie(a,b,c=!1){a.C.update(a.aa);de(a,olympe.auth.Ta.C.$h);b=`Authenticated as guest (${b})`;c?a.H.error(b):a.H.info(b)}function ke(a){const b=[olympe.auth.Ta.C.Ef];a.jb||b.push(olympe.auth.Ta.C.$h);return a.T.C(()=>{const c=pe(a);return b.includes(c)?Promise.resolve('The auth manager is OK'):Promise.reject(`The auth manager is not in valid state, the current state is: ${c}`)})}function de(a,b){a.H.log('State change: ',pe(a),'--\x3e',b);a.F.update(b)}
492
- function ee(a){if(a.Z){const b=new olympe.auth.Request;b.set('username',a.Z);b.set('password',a.Lb);a.H.log('Autologin with user "'+a.Z+'"');oe(a,b)}else ie(a,'No user specified for auto login',!0)}function me(a){return olympe.D.Ra(a.C)===a.aa}function ne(a,b){if(b){a.C.update(b);let c;null==(c=a.storage)||he(c,b).catch(d=>a.H.error(d));a.H.debug('Token updated')}}function pe(a){return olympe.D.Ra(a.F.sb())}function qe(){var a=olympe.public.Ka.get();return new Map(a.L.C.Mc)}
493
- function re(a,b,c,d=!1){b=b+c?':'+c.message:'';a.H.error(b);a.error.update(olympe.D.zb(b));de(a,olympe.auth.Ta.C.Fb);if(d)throw Error(b);}function oe(a,b,c,d){void 0===c&&(c=a.cc);void 0===c&&re(a,'No authentication provider specified',null,!0);const e=a.Md.get(c);e||re(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.P.set('login',d);a.H.log('Sending authentication request using "'+c+'" for '+b);e.le(b,a.Tb.bind(a));de(a,olympe.auth.Ta.C.Zi)}
492
+ function ee(a){if(a.Z){const b=new olympe.auth.Request;b.set('username',a.Z);b.set('password',a.Mb);a.H.log('Autologin with user "'+a.Z+'"');oe(a,b)}else ie(a,'No user specified for auto login',!0)}function me(a){return olympe.D.Ra(a.C)===a.aa}function ne(a,b){if(b){a.C.update(b);let c;null==(c=a.storage)||he(c,b).catch(d=>a.H.error(d));a.H.debug('Token updated')}}function pe(a){return olympe.D.Ra(a.F.sb())}function qe(){var a=olympe.public.Ka.get();return new Map(a.K.C.Mc)}
493
+ function re(a,b,c,d=!1){b=b+c?':'+c.message:'';a.H.error(b);a.error.update(olympe.D.zb(b));de(a,olympe.auth.Ta.C.Fb);if(d)throw Error(b);}function oe(a,b,c,d){void 0===c&&(c=a.cc);void 0===c&&re(a,'No authentication provider specified',null,!0);const e=a.Nd.get(c);e||re(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.P.set('login',d);a.H.log('Sending authentication request using "'+c+'" for '+b);e.le(b,a.Tb.bind(a));de(a,olympe.auth.Ta.C.Zi)}
494
494
  function se(a,b,c){a.P.forEach(d=>{d(b,c)})}
495
- olympe.auth.Ta=class{constructor(a,b,c,d,e,f,g,h,k,l){this.H=a;this.pb=b;this.L=c;this.storage=d;this.ub=e;this.ea=f;this.cc=l.get('defaultProvider');this.jb=!!l.get('autoLogin');this.Z=l.get('autoUser');this.Lb=l.get('autoPassword');this.jc=l.get('autoToken');this.Md=new Map;this.T=g;this.Ja='';this.F=olympe.D.ic(String).update(olympe.auth.Ta.C.INIT);this.error=olympe.D.ic(olympe.D.Na);this.G=null;this.aa=new olympe.auth.Dg('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=
496
- olympe.D.ic(olympe.auth.Dg).update(this.aa);this.P=new Map;this.oa=new Map;this.za=new olympe.Y.bm(l.get('cacheTokenTimeout'));k.forEach(n=>{const p=n.G();if(this.Md.has(p))throw Error('Provider "'+p+'" has already been registered !');this.Md.set(p,n)});ge(this);le(this,h.C())}tk(){const a=olympe.auth.Ta.C.Ef,b=olympe.auth.Ta.C.$h,c=olympe.auth.Ta.C.Fb,d=olympe.D.ic(olympe.D.fa);olympe.D.Ic([this.F],e=>{e===a?d.update(olympe.D.fa.F):e===b?d.update(olympe.D.fa.C):e===c?(this.H.error('Authentication failed.'),
497
- d.update(olympe.D.fa.C)):d.clear()});return d.sb()}Zf(a){if(olympe.D.Ra(this.F)===olympe.auth.Ta.C.Ef){var b=Oc(this);!me(this)&&b&&this.Md.get(b.mg()).Zf(b,(c,d)=>{c?(this.H.error('Failed to refresh token, error message: ',c.message),this.Jh().catch(e=>this.H.error(`Failed to logout after wrong refresh ${e}`))):d&&ne(this,d);a(c)})}}getState(){return this.F.sb()}wc(){return this.C.sb().wc()}me(){return this.C.sb().me()}Fh(){return this.C.sb().Fh()}Qg(a,b){if(Ja(this.za.C,a))b(null,this.za.get(a));
498
- else{var c,d=null==(c=olympe.D.Ra(this.C.sb()))?void 0:c.wd();this.L.Qg(a,d,(e,f)=>{'string'===typeof f&&this.za.set(a,f);b(e,f)})}}Jh(){return me(this)?(this.H.warn('Logout called for Guest user so it will be ignored'),Promise.resolve()):new Promise((a,b)=>{this.H.debug('Sending logout');je(this.storage);Zd(this.L,Oc(this),c=>{c?(re(this,'Logout request rejected:',c),b(c)):(this.H.debug('Logout request acknowledged'),a())});this.T.G(this.Ja)})}Ye(a){pe(this)===olympe.auth.Ta.C.Ef&&this.L.Ye(b=>{b&&
495
+ olympe.auth.Ta=class{constructor(a,b,c,d,e,f,g,h,k,l){this.H=a;this.pb=b;this.K=c;this.storage=d;this.ub=e;this.ea=f;this.cc=l.get('defaultProvider');this.jb=!!l.get('autoLogin');this.Z=l.get('autoUser');this.Mb=l.get('autoPassword');this.jc=l.get('autoToken');this.Nd=new Map;this.T=g;this.Ja='';this.F=olympe.D.ic(String).update(olympe.auth.Ta.C.INIT);this.error=olympe.D.ic(olympe.D.Na);this.G=null;this.aa=new olympe.auth.Dg('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=
496
+ olympe.D.ic(olympe.auth.Dg).update(this.aa);this.P=new Map;this.oa=new Map;this.za=new olympe.Y.bm(l.get('cacheTokenTimeout'));k.forEach(n=>{const p=n.G();if(this.Nd.has(p))throw Error('Provider "'+p+'" has already been registered !');this.Nd.set(p,n)});ge(this);le(this,h.C())}tk(){const a=olympe.auth.Ta.C.Ef,b=olympe.auth.Ta.C.$h,c=olympe.auth.Ta.C.Fb,d=olympe.D.ic(olympe.D.fa);olympe.D.Ic([this.F],e=>{e===a?d.update(olympe.D.fa.F):e===b?d.update(olympe.D.fa.C):e===c?(this.H.error('Authentication failed.'),
497
+ d.update(olympe.D.fa.C)):d.clear()});return d.sb()}Zf(a){if(olympe.D.Ra(this.F)===olympe.auth.Ta.C.Ef){var b=Oc(this);!me(this)&&b&&this.Nd.get(b.mg()).Zf(b,(c,d)=>{c?(this.H.error('Failed to refresh token, error message: ',c.message),this.Jh().catch(e=>this.H.error(`Failed to logout after wrong refresh ${e}`))):d&&ne(this,d);a(c)})}}getState(){return this.F.sb()}wc(){return this.C.sb().wc()}me(){return this.C.sb().me()}Fh(){return this.C.sb().Fh()}Qg(a,b){if(Ja(this.za.C,a))b(null,this.za.get(a));
498
+ else{var c,d=null==(c=olympe.D.Ra(this.C.sb()))?void 0:c.wd();this.K.Qg(a,d,(e,f)=>{'string'===typeof f&&this.za.set(a,f);b(e,f)})}}Jh(){return me(this)?(this.H.warn('Logout called for Guest user so it will be ignored'),Promise.resolve()):new Promise((a,b)=>{this.H.debug('Sending logout');je(this.storage);Zd(this.K,Oc(this),c=>{c?(re(this,'Logout request rejected:',c),b(c)):(this.H.debug('Logout request acknowledged'),a())});this.T.G(this.Ja)})}Ye(a){pe(this)===olympe.auth.Ta.C.Ef&&this.K.Ye(b=>{b&&
499
499
  this.H.error('Was not able to send the auth keep alive message:',b.message);null==a||a(b)})}Tb(a,b){const c=null===this.G?olympe.auth.Ta.G.Kt:this.G;this.G=null;if(!a||a instanceof olympe.N.errors.Ip){null===a?this.H.info(`User ${b.wc()} (#${b.me()}) successfully authenticated`):this.H.info(`User ${b.wc()} (#${b.me()}) recovered from token, while offline`);this.C.update(b);de(this,olympe.auth.Ta.C.Ef);se(this,a,c);let d;null==(d=this.storage)||he(d,b).catch(e=>this.H.error(e))}else{let d;null==(d=
500
- this.storage)||je(d).catch(e=>this.H.error(e));this.error.update(olympe.D.zb(a.message));ie(this,'authentication rejected: '+a.message);se(this,a,c)}this.P.has('login')&&this.P.delete('login')}};olympe.auth.Ta.C={INIT:'init',Zi:'authenticating',$h:'guest',Ef:'authenticated',Fb:'error'};olympe.auth.Ta.G={Kt:'manual',Lr:'auto',vi:'tokenOnFirstConnection'};olympe.auth.Ta.F={Yi:'accepted',To:'redirect'};olympe.auth.Ac=class{constructor(a,b){this.H=a;this.F=b;this.C=null}G(){}le(){}L(a,b){const c=()=>{this.C=setTimeout(()=>this.F.Ye(d=>{d?b(d,null):(b(null,null),c())}),this.F.C.jc)};c();return()=>{this.C&&clearTimeout(this.C);this.C=null}}Zf(a,b){this.F.Ye(c=>{b(c,null)})}};olympe.auth.Ac.C={SAML:'saml',OAUTH2:'openID',SRP:'srp',Gl:'olympeToken'};function te(a){return a.get('idpName')}olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.Ic([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.Eg&&(a=a.Da.Eb);return a?a.valueOf():a}wc(){return this.get('username')}wd(){return this.get('nonce')}toString(){return this.wc()+(this.wd()?' with nonce':'')+(this.get('password')?' with password':'')+(te(this)?` with idp name ${te(this)}`:'')}};olympe.auth.Dg=class{constructor(a,b,c,d={},e=null){this.L=a;this.Nh=b;this.F=c;this.C=e;this.G=d}wc(){return this.L}me(){return this.Nh}wd(){return this.F}fi(){return this.G}Fh(){return null}gf(){return this.C}ha(){const a=olympe.Y.Te(),b=Object.assign({},{user:this.L,userTag:this.Nh,nonce:this.F},this.C&&{idpName:this.C},{payload:this.G});return olympe.Y.Zq(Ga(a,JSON.stringify(b)))}mg(){return olympe.auth.Ac.C.SRP}};m=olympe.auth.Dg.prototype;m.wc.K=new olympe.D.J(()=>String,[]);
501
- m.me.K=new olympe.D.J(()=>String,[]);m.wd.K=new olympe.D.J(()=>String,[]);m.fi.K=new olympe.D.J(()=>Object,[]);m.Fh.K=new olympe.D.J(()=>String,[]);m.gf.K=new olympe.D.J(()=>String,[]);m.ha.K=new olympe.D.J(()=>String,[]);m.mg.K=new olympe.D.J(()=>String,[]);function $d(a){return a.fi().access_token||null}function ue(a){return 1E3*parseInt(a.fi().access_token_exp||'0',10)}olympe.auth.Bj=class extends olympe.auth.Dg{constructor(a,b,c,d,e){super(a,b,c,d,e);this.P=Date.now()}Fh(){return $d(this)}mg(){return olympe.auth.Ac.C.OAUTH2}};olympe.auth.nq=class extends olympe.auth.Dg{constructor(a,b,c,d,e,f){super(a,b,c,e,f);this.P=d}Fh(){return this.P}mg(){return olympe.auth.Ac.C.SAML}ha(){const a=olympe.Y.Te(),b=Object.assign({},{user:this.wc(),userTag:this.me(),nonce:this.wd()},this.gf()&&{idpName:this.gf()},{payload:this.fi(),fullToken:this.P});return olympe.Y.Zq(Ga(a,JSON.stringify(b)))}};function ce(a){let b;return null!=(b=a.db.get('main','redirectTo'))?b:null}function he(a,b){return Fa(a.F,()=>a.db.set('main','string'===typeof b?b:b.ha(),a.C).catch(c=>{throw Error(`Error when trying to set the token from the auth store: ${c}`);}))}function je(a){return Fa(a.F,()=>a.db.remove('main',a.C).catch(b=>{a.H.error(`Error when trying to remove the token from the auth store: ${b}`)}))}
500
+ this.storage)||je(d).catch(e=>this.H.error(e));this.error.update(olympe.D.zb(a.message));ie(this,'authentication rejected: '+a.message);se(this,a,c)}this.P.has('login')&&this.P.delete('login')}};olympe.auth.Ta.C={INIT:'init',Zi:'authenticating',$h:'guest',Ef:'authenticated',Fb:'error'};olympe.auth.Ta.G={Kt:'manual',Lr:'auto',vi:'tokenOnFirstConnection'};olympe.auth.Ta.F={Yi:'accepted',To:'redirect'};olympe.auth.Ac=class{constructor(a,b){this.H=a;this.F=b;this.C=null}G(){}le(){}K(a,b){const c=()=>{this.C=setTimeout(()=>this.F.Ye(d=>{d?b(d,null):(b(null,null),c())}),this.F.C.jc)};c();return()=>{this.C&&clearTimeout(this.C);this.C=null}}Zf(a,b){this.F.Ye(c=>{b(c,null)})}};olympe.auth.Ac.C={SAML:'saml',OAUTH2:'openID',SRP:'srp',Gl:'olympeToken'};function te(a){return a.get('idpName')}olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.Ic([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.Eg&&(a=a.Da.Eb);return a?a.valueOf():a}wc(){return this.get('username')}wd(){return this.get('nonce')}toString(){return this.wc()+(this.wd()?' with nonce':'')+(this.get('password')?' with password':'')+(te(this)?` with idp name ${te(this)}`:'')}};olympe.auth.Dg=class{constructor(a,b,c,d={},e=null){this.K=a;this.Nh=b;this.F=c;this.C=e;this.G=d}wc(){return this.K}me(){return this.Nh}wd(){return this.F}fi(){return this.G}Fh(){return null}gf(){return this.C}ha(){const a=olympe.Y.Te(),b=Object.assign({},{user:this.K,userTag:this.Nh,nonce:this.F},this.C&&{idpName:this.C},{payload:this.G});return olympe.Y.Zq(Ga(a,JSON.stringify(b)))}mg(){return olympe.auth.Ac.C.SRP}};m=olympe.auth.Dg.prototype;m.wc.L=new olympe.D.J(()=>String,[]);
501
+ m.me.L=new olympe.D.J(()=>String,[]);m.wd.L=new olympe.D.J(()=>String,[]);m.fi.L=new olympe.D.J(()=>Object,[]);m.Fh.L=new olympe.D.J(()=>String,[]);m.gf.L=new olympe.D.J(()=>String,[]);m.ha.L=new olympe.D.J(()=>String,[]);m.mg.L=new olympe.D.J(()=>String,[]);function $d(a){return a.fi().access_token||null}function ue(a){return 1E3*parseInt(a.fi().access_token_exp||'0',10)}olympe.auth.Bj=class extends olympe.auth.Dg{constructor(a,b,c,d,e){super(a,b,c,d,e);this.P=Date.now()}Fh(){return $d(this)}mg(){return olympe.auth.Ac.C.OAUTH2}};olympe.auth.nq=class extends olympe.auth.Dg{constructor(a,b,c,d,e,f){super(a,b,c,e,f);this.P=d}Fh(){return this.P}mg(){return olympe.auth.Ac.C.SAML}ha(){const a=olympe.Y.Te(),b=Object.assign({},{user:this.wc(),userTag:this.me(),nonce:this.wd()},this.gf()&&{idpName:this.gf()},{payload:this.fi(),fullToken:this.P});return olympe.Y.Zq(Ga(a,JSON.stringify(b)))}};function ce(a){let b;return null!=(b=a.db.get('main','redirectTo'))?b:null}function he(a,b){return Fa(a.F,()=>a.db.set('main','string'===typeof b?b:b.ha(),a.C).catch(c=>{throw Error(`Error when trying to set the token from the auth store: ${c}`);}))}function je(a){return Fa(a.F,()=>a.db.remove('main',a.C).catch(b=>{a.H.error(`Error when trying to remove the token from the auth store: ${b}`)}))}
502
502
  olympe.auth.Tr=class{constructor(a,b,c){this.G=a;this.H=b;this.C='OlympeToken-'+c.C;this.F=new olympe.Y.promise.Cq;this.db=this.G.F('AUTH')}le(){this.H.debug(`olympe.auth.AuthStorage: retrieve token with key ${this.C}`);return Fa(this.F,()=>{const a=this;return v(function*(){let b;try{b=yield a.db.get('main',a.C)}catch(g){throw Error(`Error when trying to get the token from the auth store: ${g}`);}let c=null;if(b)try{a.H.debug('olympe.auth.AuthStorage: Token retrieved successfully');var d=JSON,e=
503
- d.parse;var f=Ha(olympe.Y.Te().G(olympe.Y.qv(b)));const g=e.call(d,f);let h;g.fullToken?h=new olympe.auth.nq(g.user,g.userTag,g.nonce,g.fullToken,g.payload,g.idpName):g.payload&&g.payload.id_token?h=new olympe.auth.Bj(g.user,g.userTag,g.nonce,g.payload,g.idpName):h=new olympe.auth.Dg(g.user,g.userTag,g.nonce,g.payload,g.idpName);c=h}catch(g){throw Error(`Error while unserializing token: ${g}`);}else a.H.debug('olympe.auth.AuthStorage: No token found');return c})})}};olympe.auth.Lj=class{redirect(){}F(){}C(){}};olympe.auth.Lj.C={GET:'GET',lh:'POST'};olympe.auth.sn=class{constructor(a){this.C=a||'default'}};olympe.auth.Md={};function ve(a,b,c){ae(a.F,olympe.auth.hd.C.ng,{token:b.wd()},(d,e)=>{if(null!==d)c(d,null);else switch(e.c){case olympe.auth.hd.C.Fb:c(Error('Invalid token'),null);break;case olympe.auth.hd.C.si:d=null;if(e=e.payload){const f=e.userName,g=e.userTag,h=e.rndCook,k=e.payload,l=e.protocol;'SAML'===l?d=new olympe.auth.nq(f,g,h,e.samlToken,k,te(b)):'openid'===l&&(d=new olympe.auth.Bj(f,g,h,k,te(b)))}c(null,d);break;default:c(Error('Unknown response from server'),null)}})}
504
- olympe.auth.Md.Jt=class extends olympe.auth.Ac{constructor(a,b,c){super(a,b);this.storage=c}G(){return olympe.auth.Ac.C.Gl}le(a,b){this.storage.le().then(c=>{ve(this,a,(d,e)=>{b(d,null!=e?e:c)})}).catch(c=>{b(c,null)})}};function we(a,b,c){var d=ue(b);const e=Math.max(d-b.P,0),f=olympe.W.getParameter(olympe.auth.U.Fq);d=Math.max(Math.round(d-e*(1-Math.max(Math.min((f||50)/100,.95),0))-Date.now()),0);if(0<d)return setTimeout(()=>{a.Zf(b,c)},d);a.Zf(b,c);return null}
505
- olympe.auth.Md.Xt=class extends olympe.auth.Ac{constructor(a,b,c,d){super(a,b);this.P=c;this.T=d}G(){return olympe.auth.Ac.C.OAUTH2}le(a){const b=encodeURIComponent(this.P.C());a=te(a)?`idpName=${te(a)}&`:'';this.P.redirect(`${this.T}/auth?${a}url=${b}`,null,olympe.auth.Lj.C.GET)}L(a,b){0<ue(a)?this.C=we(this,a,b):b(null,a);return this.Z.bind(this)}Zf(a,b){be(this.F,a,(c,d)=>{c?b(c,null):d&&(b(null,d),this.C&&(this.C=we(this,d,b)))})}Z(){this.C&&clearTimeout(this.C);this.C=null}};function xe(a,b){ae(a.F,olympe.auth.hd.C.SAML,{},(c,d)=>{null!==c?b(c):d.url&&d.request?b(null,d.url,d.request.replace(/\s/g,''),d.id):b(Error('Missing parameters from server response'))})}olympe.auth.Md.SAML=class extends olympe.auth.Ac{constructor(a,b,c){super(a,b);this.P=c}G(){return olympe.auth.Ac.C.SAML}le(a,b){xe(this,c=>{c?b(c,null):this.P.F(te(a))})}};function ye(a,b,c){const d=olympe.auth.hd.C.Os,e=olympe.auth.hd.C.Fb,f=olympe.auth.hd.C.Cu,g={I:b.wc()};ae(a.F,d,g,(h,k)=>{if(null!==h)c(h);else switch(k.c){case e:c(Error(`Username '${b.wc()}' invalid, or password does not match`));break;case f:h=k.payload;c(null,h.S,h.B);break;default:c(Error('Unknown response from server'))}})}
503
+ d.parse;var f=Ha(olympe.Y.Te().G(olympe.Y.qv(b)));const g=e.call(d,f);let h;g.fullToken?h=new olympe.auth.nq(g.user,g.userTag,g.nonce,g.fullToken,g.payload,g.idpName):g.payload&&g.payload.id_token?h=new olympe.auth.Bj(g.user,g.userTag,g.nonce,g.payload,g.idpName):h=new olympe.auth.Dg(g.user,g.userTag,g.nonce,g.payload,g.idpName);c=h}catch(g){throw Error(`Error while unserializing token: ${g}`);}else a.H.debug('olympe.auth.AuthStorage: No token found');return c})})}};olympe.auth.Lj=class{redirect(){}F(){}C(){}};olympe.auth.Lj.C={GET:'GET',lh:'POST'};olympe.auth.sn=class{constructor(a){this.C=a||'default'}};olympe.auth.Nd={};function ve(a,b,c){ae(a.F,olympe.auth.hd.C.ng,{token:b.wd()},(d,e)=>{if(null!==d)c(d,null);else switch(e.c){case olympe.auth.hd.C.Fb:c(Error('Invalid token'),null);break;case olympe.auth.hd.C.si:d=null;if(e=e.payload){const f=e.userName,g=e.userTag,h=e.rndCook,k=e.payload,l=e.protocol;'SAML'===l?d=new olympe.auth.nq(f,g,h,e.samlToken,k,te(b)):'openid'===l&&(d=new olympe.auth.Bj(f,g,h,k,te(b)))}c(null,d);break;default:c(Error('Unknown response from server'),null)}})}
504
+ olympe.auth.Nd.Jt=class extends olympe.auth.Ac{constructor(a,b,c){super(a,b);this.storage=c}G(){return olympe.auth.Ac.C.Gl}le(a,b){this.storage.le().then(c=>{ve(this,a,(d,e)=>{b(d,null!=e?e:c)})}).catch(c=>{b(c,null)})}};function we(a,b,c){var d=ue(b);const e=Math.max(d-b.P,0),f=olympe.W.getParameter(olympe.auth.U.Fq);d=Math.max(Math.round(d-e*(1-Math.max(Math.min((f||50)/100,.95),0))-Date.now()),0);if(0<d)return setTimeout(()=>{a.Zf(b,c)},d);a.Zf(b,c);return null}
505
+ olympe.auth.Nd.Xt=class extends olympe.auth.Ac{constructor(a,b,c,d){super(a,b);this.P=c;this.T=d}G(){return olympe.auth.Ac.C.OAUTH2}le(a){const b=encodeURIComponent(this.P.C());a=te(a)?`idpName=${te(a)}&`:'';this.P.redirect(`${this.T}/auth?${a}url=${b}`,null,olympe.auth.Lj.C.GET)}K(a,b){0<ue(a)?this.C=we(this,a,b):b(null,a);return this.Z.bind(this)}Zf(a,b){be(this.F,a,(c,d)=>{c?b(c,null):d&&(b(null,d),this.C&&(this.C=we(this,d,b)))})}Z(){this.C&&clearTimeout(this.C);this.C=null}};function xe(a,b){ae(a.F,olympe.auth.hd.C.SAML,{},(c,d)=>{null!==c?b(c):d.url&&d.request?b(null,d.url,d.request.replace(/\s/g,''),d.id):b(Error('Missing parameters from server response'))})}olympe.auth.Nd.SAML=class extends olympe.auth.Ac{constructor(a,b,c){super(a,b);this.P=c}G(){return olympe.auth.Ac.C.SAML}le(a,b){xe(this,c=>{c?b(c,null):this.P.F(te(a))})}};function ye(a,b,c){const d=olympe.auth.hd.C.Os,e=olympe.auth.hd.C.Fb,f=olympe.auth.hd.C.Cu,g={I:b.wc()};ae(a.F,d,g,(h,k)=>{if(null!==h)c(h);else switch(k.c){case e:c(Error(`Username '${b.wc()}' invalid, or password does not match`));break;case f:h=k.payload;c(null,h.S,h.B);break;default:c(Error('Unknown response from server'))}})}
506
506
  function ze(a,b,c){const d=olympe.auth.hd.C.Mr,e=olympe.auth.hd.C.Fb,f=olympe.auth.hd.C.si;b={A:b.get('a'),M:b.get('m1'),I:b.wc()};ae(a.F,d,b,(g,h)=>{if(null!==g)c(g,null);else switch(h.c){case e:a.H.debug('Login failed, invalid username or password');c(Error('Invalid username or password'),null);break;case f:g=h.payload;a.H.debug('Login successful, creating token');h=g.payload?JSON.parse(g.payload):void 0;c(null,new olympe.auth.Dg(g.userName,g.userTag,g.rndCook,h));break;default:c(Error(`Unknown response from server (type ${h.c})`),
507
- null)}})}olympe.auth.Md.SRP=class extends olympe.auth.Ac{G(){return olympe.auth.Ac.C.SRP}le(a,b){const c=a.get('password');a.C.delete('password');this.H.debug('Sending SRP request');ye(this,a,(d,e,f)=>{this.H.debug('Received Salt+B message');if(d)b(d,null);else{try{const g=new SRPClient;g.step1(a.wc(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g,null);return}this.H.debug('Sending SRP A+M (proof) message');ze(this,a,b)}})}};olympe.auth.R={Fa:'auth.Manager',Ca:'auth.Logger',ri:'auth.Storage',Ek:'auth.appNameToken',Ij:'auth.Redirector',qq:'auth.ServerConnector'};olympe.auth.U={Zk:'auth.defaultProvider',ln:'auth.autoLogin',nn:'auth.autoUser',mn:'auth.autoPassword',vi:'auth.token',Ln:'auth.cacheTokenTimeout',Fq:'auth.tokenDurationPercentage'};
507
+ null)}})}olympe.auth.Nd.SRP=class extends olympe.auth.Ac{G(){return olympe.auth.Ac.C.SRP}le(a,b){const c=a.get('password');a.C.delete('password');this.H.debug('Sending SRP request');ye(this,a,(d,e,f)=>{this.H.debug('Received Salt+B message');if(d)b(d,null);else{try{const g=new SRPClient;g.step1(a.wc(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g,null);return}this.H.debug('Sending SRP A+M (proof) message');ze(this,a,b)}})}};olympe.auth.R={Fa:'auth.Manager',Ca:'auth.Logger',ri:'auth.Storage',Ek:'auth.appNameToken',Ij:'auth.Redirector',qq:'auth.ServerConnector'};olympe.auth.U={Zk:'auth.defaultProvider',ln:'auth.autoLogin',nn:'auth.autoUser',mn:'auth.autoPassword',vi:'auth.token',Ln:'auth.cacheTokenTimeout',Fq:'auth.tokenDurationPercentage'};
508
508
  olympe.W.config(function(a){F(a,olympe.auth.U.Zk,olympe.auth.Ac.C.SRP);F(a,olympe.auth.U.ln,!1);F(a,olympe.auth.U.nn,'');F(a,olympe.auth.U.mn,'');F(a,olympe.auth.U.vi,'');F(a,olympe.auth.U.Fq,50);F(a,olympe.auth.U.Ln,3E5);E(a,olympe.auth.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('auth'));D(a,olympe.auth.R.Ek,olympe.auth.sn,olympe.Db.R.xg);D(a,olympe.auth.R.ri,olympe.auth.Tr,olympe.Db.R.sj,olympe.auth.R.Ca,olympe.auth.R.Ek);D(a,olympe.auth.R.qq,olympe.auth.hd,olympe.auth.R.Ca,olympe.N.R.Mj,olympe.N.R.ll,olympe.N.R.$e,
509
509
  olympe.auth.R.Ij,olympe.auth.R.ri);ya(a,olympe.auth.R.Ij);E(a,olympe.auth.R.Fa,[olympe.auth.R.Ca,olympe.N.R.$e,olympe.auth.R.qq,olympe.host.R.il,olympe.host.R.Le,olympe.host.R.Sj,new olympe.W.xb(olympe.auth.R.ri,olympe.W.$g.C.Dl),new olympe.W.xb(olympe.auth.R.Ij,olympe.W.$g.C.Dl),new olympe.W.ja(olympe.auth.U.Zk),new olympe.W.ja(olympe.auth.U.ln),new olympe.W.ja(olympe.auth.U.nn),new olympe.W.ja(olympe.auth.U.mn),new olympe.W.ja(olympe.auth.U.vi),new olympe.W.ja(olympe.auth.U.Ln)],(b,c,d,e,f,g,h,
510
- k,l,n,p,q,r,t)=>{const u=[new olympe.auth.Md.Jt(b,d,h),new olympe.auth.Md.SRP(b,d),new olympe.auth.Md.SAML(b,d,k),new olympe.auth.Md.Xt(b,d,k,gd(d.fh,olympe.N.bc.yj))];if(!u.map(w=>w.G()).includes(l))throw Error(`Default provider name ${l} given by parameter ${olympe.auth.U.Zk} cannot be found`);return new olympe.auth.Ta(b,c,d,h,k,e.Oi()?e:null,f,g,u,new Map([['defaultProvider',l],['autoLogin',n],['autoUser',p],['autoPassword',q],['autoToken',r],['cacheTokenTimeout',t]]))},!0)},'olympe.auth');
510
+ k,l,n,p,q,r,t)=>{const u=[new olympe.auth.Nd.Jt(b,d,h),new olympe.auth.Nd.SRP(b,d),new olympe.auth.Nd.SAML(b,d,k),new olympe.auth.Nd.Xt(b,d,k,gd(d.fh,olympe.N.bc.yj))];if(!u.map(w=>w.G()).includes(l))throw Error(`Default provider name ${l} given by parameter ${olympe.auth.U.Zk} cannot be found`);return new olympe.auth.Ta(b,c,d,h,k,e.Oi()?e:null,f,g,u,new Map([['defaultProvider',l],['autoLogin',n],['autoUser',p],['autoPassword',q],['autoToken',r],['cacheTokenTimeout',t]]))},!0)},'olympe.auth');
511
511
  olympe.W.run([olympe.auth.R.Fa],a=>{olympe.auth.je=()=>a});olympe.Sa.node.auth={};olympe.Sa.node.auth.Ap=class{redirect(){console.warn('Redirection n/a in Node.JS')}F(){console.warn('Redirection n/a in Node.JS')}C(){console.warn('Redirection n/a in Node.JS');return''}};olympe.Sa.node.auth.Ap.xa=[olympe.auth.Lj];olympe.W.config(a=>{D(a,olympe.auth.R.Ij,olympe.Sa.node.auth.Ap)},'olympe.native.node.auth');olympe.Sa.node.Db={};function Ae(){throw Error('Key-Value Database does not implement this in NodeJS');}
512
512
  olympe.Sa.node.Db.yp=class{constructor(a){this.H=a;this.C=new Map}Z(){return 0}P(a){const b=this;return v(function*(){let c,d;return null!=(d=null==(c=b.C.get(a))?void 0:c.size)?d:0})}G(a){const b=this;return v(function*(){const c=b.C.get(a);return c?Array.from(c.values()):[]})}T(a){const b=this;return v(function*(){const c=b.C.get(a);return c?Array.from(c.keys()):[]})}forEach(a,b){const c=this;return v(function*(){let d;for(const [e,f]of null!=(d=c.C.get(a))?d:new Map)b(f,e)})}has(a,b){const c=this;
513
513
  return v(function*(){let d,e;return null!=(e=null==(d=c.C.get(a))?void 0:d.has(b))?e:!1})}get(a,b){const c=this;return v(function*(){let d;return null==(d=c.C.get(a))?void 0:d.get(b)})}set(a,b,c){const d=this;return v(function*(){let e;return null==(e=d.C.get(a))?void 0:e.set(c,b)})}remove(a,b){const c=this;return v(function*(){let d;yield null==(d=c.C.get(a))?void 0:d.delete(b)})}ea(){Ae();return Promise.resolve()}aa(){Ae();return Promise.resolve()}clear(a){const b=this;return v(function*(){let c;
514
- null==(c=b.C.get(a))||c.clear()})}L(){Ae();return Promise.resolve([])}F(){return v(function*(){Ae()})}};olympe.Sa.node.Db.yp.xa=[olympe.Db.yt];olympe.Sa.node.Db.zp=class{constructor(a){this.C=new Map;this.H=a}F(a){this.C.has(a)||this.C.set(a,new olympe.Sa.node.Db.yp(this.H));return this.C.get(a)}};olympe.Sa.node.Db.zp.xa=[olympe.Db.zt];olympe.W.config(function(a){D(a,olympe.Db.R.sj,olympe.Sa.node.Db.zp,olympe.Db.R.Ca)},'olympe.native.node.localstorage');olympe.Sa.node.storage={};olympe.Sa.node.storage.Storage=class{constructor(a){this.H=a}write(a,b,c,d,e){e&&e('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.Sa.node.storage.Storage.xa=[olympe.Db.Storage];olympe.W.config(function(a){wa(a,olympe.Db.R.ri,olympe.Sa.node.storage.Storage,olympe.host.R.Ca)},'olympe.native.html.storage');olympe.Yf={};olympe.Yf.U={VERSION:'version.version',Xr:'version.branch',Ze:'version.commit',Ju:'version.tag',Ao:'version.olympe-framework',Yr:'version.build'};olympe.W.config(function(a){F(a,olympe.Yf.U.VERSION,'');F(a,olympe.Yf.U.Xr,'');F(a,olympe.Yf.U.Ze,'');F(a,olympe.Yf.U.Ju,'');F(a,olympe.Yf.U.Ao,'');F(a,olympe.Yf.U.Yr,'')},'olympe.main');const Be=require('fs');let Ba,Aa;function Ce(a,b){Be.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
514
+ null==(c=b.C.get(a))||c.clear()})}K(){Ae();return Promise.resolve([])}F(){return v(function*(){Ae()})}};olympe.Sa.node.Db.yp.xa=[olympe.Db.yt];olympe.Sa.node.Db.zp=class{constructor(a){this.C=new Map;this.H=a}F(a){this.C.has(a)||this.C.set(a,new olympe.Sa.node.Db.yp(this.H));return this.C.get(a)}};olympe.Sa.node.Db.zp.xa=[olympe.Db.zt];olympe.W.config(function(a){D(a,olympe.Db.R.sj,olympe.Sa.node.Db.zp,olympe.Db.R.Ca)},'olympe.native.node.localstorage');olympe.Sa.node.storage={};olympe.Sa.node.storage.Storage=class{constructor(a){this.H=a}write(a,b,c,d,e){e&&e('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.Sa.node.storage.Storage.xa=[olympe.Db.Storage];olympe.W.config(function(a){wa(a,olympe.Db.R.ri,olympe.Sa.node.storage.Storage,olympe.host.R.Ca)},'olympe.native.html.storage');olympe.Yf={};olympe.Yf.U={VERSION:'version.version',Xr:'version.branch',Ze:'version.commit',Ju:'version.tag',Ao:'version.olympe-framework',Yr:'version.build'};olympe.W.config(function(a){F(a,olympe.Yf.U.VERSION,'');F(a,olympe.Yf.U.Xr,'');F(a,olympe.Yf.U.Ze,'');F(a,olympe.Yf.U.Ju,'');F(a,olympe.Yf.U.Ao,'');F(a,olympe.Yf.U.Yr,'')},'olympe.main');const Be=require('fs');let Ba,Aa;function Ce(a,b){Be.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
515
515
  function De(){if(void 0!==Ba&&void 0!==Aa){0===Object.keys(Aa).length&&console.warn('No configuration found. Check presence of oConfig.json');0===Object.keys(Ba).length&&console.warn('No version found. Check presence of version.json');var a=Object.create(null);const b=process.argv;for(let c=2;c<b.length;c++){const d=/^true|false$/i,e=/^\d+(\.\d+)?$/;let f;const g=/([^?&=]+)(=?([^?&=]+))?/g.exec(b[c]);!Array.isArray(g)||4>g.length?console.warn(`Malformed config parameter "${b[c]}" ignored. It should of the form 'a=b'`):
516
516
  (f=g[3],void 0===f?f=!0:f.startsWith('"')&&f.endsWith('"')?f=f.substring(1,f.length-1):d.test(f)?f='true'===f.toLowerCase():e.test(f)&&(f=parseFloat(f)),a[g[1]]=f)}a=new olympe.W.ps(a);oa(a);qa(a.compile())}}function Ee(){console.log('The node process received a signal for graceful shutdown');let a,b;null==(b=(a=olympe.Sa.node.host).lk)||lc(b.call(a)).then(()=>console.log('The node backend has stopped successfully')).catch(c=>console.warn(c)).finally(()=>process.exit(0))}
517
- olympe.Y.Ae('oConfig.json',Ce,function(a){Aa=a;De()});Ce('version.json',function(a){Ba=a;De()});process.on('SIGTERM',Ee);process.on('SIGINT',Ee);process.on('SIGBREAK',Ee);process.on('SIGHUP',Ee);process.on('uncaughtException',a=>{console.error('Uncaught Exception:',a);Ee()});olympe.dc={};olympe.dc.ua={ORIGIN:'<',DESTINATION:'>'};x('olympe.dc.Direction',olympe.dc.ua);olympe.dc.nc={Wc:'ff022000000000000000',Wh:'ff02200000000000000e',ej:'ff02200000000000000f'};olympe.dc.cp={VERSION:'@v',vq:'@s'};olympe.dc.rj={He:'?'};olympe.dc.$A={ni:'online',ae:'offline',Lz:'invalidate'};olympe.dc.Pa={SELF:'self',SERVER:'server',kf:'remote',ae:'offline'};olympe.dc.Zb={NONE:null,ko:'ff023000000000000037',yc:'ff023000000000000137',Of:'ff023000000000000237',yu:'ff023000000000000337'};olympe.dc.Gp=class extends Error{constructor(a){var b=olympe.dc.ia(),c=olympe.dc.Ud(),d=b.model(a);d=`\n- model: ${d} (${d?b.name(d):'no name'})`;b=b.source(a);c=`\n- source: ${b} (${b?c.yb(b).name():'no name'})`;super(`Trying to use a CloudObject that does not exist:\n- tag: ${a}${d}${c}${''}`)}};olympe.dc.Writable=class{Pc(){}Sc(){}F(){}Ea(){}kc(){}};olympe.dc.cu=class{td(){}V(){}L(){}};olympe.dc.Bc=class{constructor(a){this.tag='string'===typeof a?a:a.X()}X(){return this.tag}Qa(a){return a instanceof olympe.dc.Bc&&this.tag===a.tag}};olympe.dc.Bc.xa=[olympe.dc.Ie];olympe.dc.Bc.prototype.Qa.K=olympe.D.J.C;olympe.dc.Fs=class a{constructor(b,c,d,e,f,g){this.H=b;this.db=c;this.T=d;this.Yb=e;this.P=f;this.G=g;this.C=Ma(new olympe.Y.bm(6E5),(h,k)=>{URL.revokeObjectURL(k);Fe(this.db,h,a.C(h))})}Z(b,c,d,e,f){this.aa(c).then(g=>{this.ea(b,g,d,!!this.G,e,f)}).catch(g=>this.H.error(g))}F(b,c,d){const e=olympe.D.Wa().G(c),f=olympe.D.Wa().G(g=>{g=`Failed to download file ${b.X()}: ${g}`;this.H.error(g);null==d||d(g)});olympe.D.Vm([b.wr(),b.X(),b.tl(),b.Im()],(g,h,k,l)=>{if(Ja(this.C.C,h))k=this.C.get(h),this.P.F(k,
518
- e,f);else{var n=p=>{p=p instanceof Uint8Array?new Blob([p],{type:l}):p;this.G&&this.L(h,p);e(p)};g.valueOf()?(g=this.db.model(b),k=new olympe.dc.Request(olympe.dc.Request.C.Jf,olympe.dc.Ud().ze(b),{tag:h,model:g,url:k.valueOf()}),this.Yb.request(k).then(n).catch(f)):(k=O(k),k.F=olympe.net.Ba.ResponseType.Kk,this.T.C(k,p=>{const q=p.Dc();200<=q&&300>q?n(p.getData()):f(`Failed to download file ${b}. Response code ${q}`)}))}})}ea(b,c,d,e,f,g){const h=e?k=>{this.L(b,new Blob([c],{type:d}));f(k)}:f;e=
519
- this.db.model(b);e=new olympe.dc.Request(olympe.dc.Request.C.Qf,olympe.dc.Ud().ze(b),{tag:b,model:e,content:c,mimeType:d});this.Yb.request(e).then(k=>h(null!=k?k:'')).catch(null!=g?g:this.H.error.bind(this.H))}aa(b){return v(function*(){var c=b instanceof olympe.D.Na?b.valueOf():b;return'string'===typeof c?(new TextEncoder).encode(c):c instanceof ArrayBuffer?new Uint8Array(c,0,c.byteLength):c instanceof Blob?(c=yield c.arrayBuffer(),new Uint8Array(c,0,c.byteLength)):c})}L(b,c){const d=olympe.dc.ga(b);
520
- b=URL.createObjectURL(c);this.C.set(d,b);const e=a.C(d);Ge(this.db,d,f=>{f||(this.C.delete(d),Fe(this.db,d,e))},e)}static C(b){return`cacheBinary${b}`}};function He(a,b){let c=Ie(b),d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Re(b);if(null===b)break;c=Ie(b)}let e;return null!=(e=c)?e:null}olympe.dc.Ys=class{constructor(a,b,c){this.H=a;this.C=b;this.db=b.view;this.F=c;this.Ma=new FinalizationRegistry(d=>{this.H.L()&&this.H.debug(`Collect instance ${d} (${this.db.name(d)||'no name'})`);this.C.C.ub([d])})}};function Je(a,b){a.origin=b;return a}function Ke(a,b,c){a.F.set(b,c);return a}function Le(a){let b;return null!=(b=a.F)?b:new Map}olympe.dc.Request=class{constructor(a,b,c,d){this.type=a;this.origin=olympe.dc.Pa.SELF;this.C=b;this.content=null!=c?c:null;this.G=null!=d?d:Oc(olympe.auth.je()).me();this.F=new Map}getType(){return this.type}wc(){return this.G}pc(){return this.C}toString(){return`Request of type ${this.type}, from ${this.origin} to ${this.C}; content: ${this.content}`}};
521
- olympe.dc.Request.C={Kb:1,jg:10,Hs:24,Lo:25,Is:28,sg:30,Hj:31,xA:32,Bg:40,Cg:41,wn:42,cq:43,Rh:45,yn:46,nj:47,Qf:50,Jf:51,hg:52,Ru:60,ku:61,Go:62,Dz:63,cs:64,Xg:65,bo:91,Js:93,Bl:95,QUERY_RESULT:97};function Me(a,b,c,d,e){const f=olympe.D.Jg();a.sources.set(olympe.dc.Pa.SERVER,e.init(a));a.G?a.sources.set(olympe.dc.Pa.kf,d.init(a)):Ge(b,a.C,()=>{a.sources.set(olympe.dc.Pa.kf,d.init(a));const g=new Map;olympe.dc.pa.from(a.C,a.C).cb(olympe.dm.DataSource.Si).filter(olympe.dc.query.Aa.Qa(olympe.dm.DataSource.xh,!0)).observe(f).subscribe(h=>{var k=Ne(h);for(var l of k){const [p,q]=g.get(l);c.G(p);c.P(q);k=a.sources.get(l);a.sources.delete(l);var n=void 0;null==(n=k)||n.destroy()}h=Oe(h);for(const p of h)if(h=
517
+ olympe.Y.Ae('oConfig.json',Ce,function(a){Aa=a;De()});Ce('version.json',function(a){Ba=a;De()});process.on('SIGTERM',Ee);process.on('SIGINT',Ee);process.on('SIGBREAK',Ee);process.on('SIGHUP',Ee);process.on('uncaughtException',a=>{console.error('Uncaught Exception:',a);Ee()});olympe.dc={};olympe.dc.ua={ORIGIN:'<',DESTINATION:'>'};x('olympe.dc.Direction',olympe.dc.ua);olympe.dc.nc={Wc:'ff022000000000000000',Wh:'ff02200000000000000e',ej:'ff02200000000000000f'};olympe.dc.cp={VERSION:'@v',vq:'@s'};olympe.dc.rj={He:'?'};olympe.dc.$A={ni:'online',be:'offline',Lz:'invalidate'};olympe.dc.Pa={SELF:'self',SERVER:'server',kf:'remote',be:'offline'};olympe.dc.Zb={NONE:null,ko:'ff023000000000000037',yc:'ff023000000000000137',Of:'ff023000000000000237',yu:'ff023000000000000337'};olympe.dc.Gp=class extends Error{constructor(a){var b=olympe.dc.ia(),c=olympe.dc.Vd(),d=b.model(a);d=`\n- model: ${d} (${d?b.name(d):'no name'})`;b=b.source(a);c=`\n- source: ${b} (${b?c.yb(b).name():'no name'})`;super(`Trying to use a CloudObject that does not exist:\n- tag: ${a}${d}${c}${''}`)}};olympe.dc.Writable=class{Pc(){}Sc(){}F(){}Ea(){}kc(){}};olympe.dc.cu=class{td(){}V(){}K(){}};olympe.dc.Bc=class{constructor(a){this.tag='string'===typeof a?a:a.X()}X(){return this.tag}Qa(a){return a instanceof olympe.dc.Bc&&this.tag===a.tag}};olympe.dc.Bc.xa=[olympe.dc.Ie];olympe.dc.Bc.prototype.Qa.L=olympe.D.J.C;olympe.dc.Fs=class a{constructor(b,c,d,e,f,g){this.H=b;this.db=c;this.T=d;this.Yb=e;this.P=f;this.G=g;this.C=Ma(new olympe.Y.bm(6E5),(h,k)=>{URL.revokeObjectURL(k);Fe(this.db,h,a.C(h))})}Z(b,c,d,e,f){this.aa(c).then(g=>{this.ea(b,g,d,!!this.G,e,f)}).catch(g=>this.H.error(g))}F(b,c,d){const e=olympe.D.Wa().G(c),f=olympe.D.Wa().G(g=>{g=`Failed to download file ${b.X()}: ${g}`;this.H.error(g);null==d||d(g)});olympe.D.Vm([b.wr(),b.X(),b.tl(),b.Im()],(g,h,k,l)=>{if(Ja(this.C.C,h))k=this.C.get(h),this.P.F(k,
518
+ e,f);else{var n=p=>{p=p instanceof Uint8Array?new Blob([p],{type:l}):p;this.G&&this.K(h,p);e(p)};g.valueOf()?(g=this.db.model(b),k=new olympe.dc.Request(olympe.dc.Request.C.Jf,olympe.dc.Vd().ze(b),{tag:h,model:g,url:k.valueOf()}),this.Yb.request(k).then(n).catch(f)):(k=O(k),k.F=olympe.net.Ba.ResponseType.Kk,this.T.C(k,p=>{const q=p.Dc();200<=q&&300>q?n(p.getData()):f(`Failed to download file ${b}. Response code ${q}`)}))}})}ea(b,c,d,e,f,g){const h=e?k=>{this.K(b,new Blob([c],{type:d}));f(k)}:f;e=
519
+ this.db.model(b);e=new olympe.dc.Request(olympe.dc.Request.C.Qf,olympe.dc.Vd().ze(b),{tag:b,model:e,content:c,mimeType:d});this.Yb.request(e).then(k=>h(null!=k?k:'')).catch(null!=g?g:this.H.error.bind(this.H))}aa(b){return v(function*(){var c=b instanceof olympe.D.Na?b.valueOf():b;return'string'===typeof c?(new TextEncoder).encode(c):c instanceof ArrayBuffer?new Uint8Array(c,0,c.byteLength):c instanceof Blob?(c=yield c.arrayBuffer(),new Uint8Array(c,0,c.byteLength)):c})}K(b,c){const d=olympe.dc.ga(b);
520
+ b=URL.createObjectURL(c);this.C.set(d,b);const e=a.C(d);Ge(this.db,d,f=>{f||(this.C.delete(d),Fe(this.db,d,e))},e)}static C(b){return`cacheBinary${b}`}};function He(a,b){let c=Ie(b),d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Re(b);if(null===b)break;c=Ie(b)}let e;return null!=(e=c)?e:null}olympe.dc.Ys=class{constructor(a,b,c){this.H=a;this.C=b;this.db=b.view;this.F=c;this.Ma=new FinalizationRegistry(d=>{this.H.K()&&this.H.debug(`Collect instance ${d} (${this.db.name(d)||'no name'})`);this.C.C.ub([d])})}};function Je(a,b){a.origin=b;return a}function Ke(a,b,c){a.F.set(b,c);return a}function Le(a){let b;return null!=(b=a.F)?b:new Map}olympe.dc.Request=class{constructor(a,b,c,d){this.type=a;this.origin=olympe.dc.Pa.SELF;this.C=b;this.content=null!=c?c:null;this.G=null!=d?d:Oc(olympe.auth.je()).me();this.F=new Map}getType(){return this.type}wc(){return this.G}pc(){return this.C}toString(){return`Request of type ${this.type}, from ${this.origin} to ${this.C}; content: ${this.content}`}};
521
+ olympe.dc.Request.C={Lb:1,jg:10,Hs:24,Lo:25,Is:28,sg:30,Hj:31,xA:32,Bg:40,Cg:41,wn:42,cq:43,Rh:45,yn:46,nj:47,Qf:50,Jf:51,hg:52,Ru:60,ku:61,Go:62,Dz:63,cs:64,Xg:65,bo:91,Js:93,Bl:95,QUERY_RESULT:97};function Me(a,b,c,d,e){const f=olympe.D.Jg();a.sources.set(olympe.dc.Pa.SERVER,e.init(a));a.G?a.sources.set(olympe.dc.Pa.kf,d.init(a)):Ge(b,a.C,()=>{a.sources.set(olympe.dc.Pa.kf,d.init(a));const g=new Map;olympe.dc.pa.from(a.C,a.C).cb(olympe.dm.DataSource.Si).filter(olympe.dc.query.Aa.Qa(olympe.dm.DataSource.xh,!0)).observe(f).subscribe(h=>{var k=Ne(h);for(var l of k){const [p,q]=g.get(l);c.G(p);c.P(q);k=a.sources.get(l);a.sources.delete(l);var n=void 0;null==(n=k)||n.destroy()}h=Oe(h);for(const p of h)if(h=
522
522
  p.X(),!a.sources.has(h)){const q=new olympe.dc.sources.np(a.H,p);a.sources.set(h,q);l=c.C(()=>q.healthCheck());n=c.F(()=>q.destroy(),`Datasource ${h}`);g.set(h,[l,n]);q.init(a)}});Fe(b,a.C,'router',!0)},'router')}function Pe(a,b,c){a.H.debug('Router: subscribes',b);return a.yb(b.pc()).ea(b,c)}function Qe(a,b,c){let d=a.F.get(b);void 0===d&&(d=[],a.F.set(b,d));d.push(c)}
523
523
  olympe.dc.pu=class{constructor(a,b,c,d,e,f,g){this.H=a;this.C=f;this.G=g;this.sources=new Map;this.F=new Map;Me(this,d,e,b,c)}request(a){this.H.debug('Router: sends',a);return this.yb(a.pc()).request(a)}nd(a){const b=a.pc();if(b===this.C){let c;null==(c=this.F.get(a.getType()))||c.forEach(d=>d(a))}else olympe.N.xb.publish(b,a).catch(c=>{this.H.error(`Error while publishing the message ${a} to remote router: ${c}`)})}yb(a){let b;return null!=(b=this.sources.get(a))?b:this.sources.get(olympe.dc.Pa.kf)}};olympe.dc.Ma={};const Re=olympe.dc.ua.ORIGIN,Se=olympe.dc.ua.DESTINATION,Te=new Map,Ue=new Map,Ve=new Map,We=new Map;function Ie(a){let b;return null!=(b=Te.get(a))?b:null}function Xe(a,b,c){let d=a;'function'===typeof a&&(d=c.entry);a=[...(d.bn||[])];return olympe.dc.na.C(b,c,...a)}function Ye(a,b){We.set(a,b);return a}function Ze(a){let b,c;return null!=(c=null==(b=Te.get(a))?void 0:b.F)?c:olympe.dc.CloudObject}
524
524
  function $e(a,b,c){const d=a+'@'+(b===Se?Re:Se);if(Ue.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Ue.set(d,c)}function af(a){a=a.X()+'@'+a.Ha();return Ue.get(a)||olympe.dc.CloudObject}function R(a,b){b.NAME=a;Ve.set(a,b)}function S(a){let b;return null!=(b=a.NAME)?b:null}
525
525
  olympe.dc.na=class{constructor(){}static C(a,b,...c){if(Te.has(a))throw Error(`Tag: ${a} - overwriting already defined CloudObject class ${Te.get(a).F.name} with ${b.name}`);let d=null;const e=c.length;if(0<e){d=Array(e);for(let f=0;f<e;f++){let g=c[f];d[f]='string'===typeof g?new olympe.W.xb(g):g}}b=new olympe.dc.Ma.Entry(a,b,d);Te.set(a,b);return b.F.entry=b}static hc(a){let b,c;return null!=(c=null==(b=a.entry)?void 0:b.X())?c:null}};function bf(a,b){a.C=b}function T(a,b){b=b.fc();$e(b.X(),b.Ha(),a.F);return b}function cf(a){a.G=!0;return a}
526
526
  olympe.dc.Ma.Entry=class{constructor(a,b,c){this.tag=a;this.F=b;this.bn=c||null;this.C=null;this.G=!1}X(){return this.tag}instantiate(a,b){const c=this.F;if(this.Nm()&&b.getParameter(olympe.dc.U.so)){var d=olympe.dc.ia();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.X()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ma.ab('dc').error(d)}return this.bn?(a=[void 0,a].concat(ra(b,this.bn)),new c(...a)):new c(void 0,
527
- a)}ka(a){return new olympe.dc.Ma.Property(a)}ra(a,b=olympe.dc.ua.DESTINATION){$e(a,b,this.F);return new olympe.dc.da.Me(a,b)}Nm(){return this.G}};x('olympe.dc.registry.Entry',olympe.dc.Ma.Entry);olympe.dc.Ma.Entry.prototype.addRelation=olympe.dc.Ma.Entry.prototype.ra;olympe.dc.Ma.Entry.prototype.addProperty=olympe.dc.Ma.Entry.prototype.ka;olympe.dc.Ma.Entry.xa=[olympe.dc.Ie];olympe.dc.Ma.Property=class{constructor(a){this.tag=a}X(){return this.tag}toString(){return`Property: ${this.tag}`}};olympe.dc.Ma.Property.prototype.getTag=olympe.dc.Ma.Property.prototype.X;olympe.dc.Ma.Property.xa=[olympe.dc.Ie];olympe.dc.Ma.Relation=class{constructor(a,b=olympe.dc.ua.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.ga(a);this.direction=b;this.origin=c;this.L=d}X(){return this.tag}Ha(){return this.direction}type(){return this.L}fc(){return new olympe.dc.Ma.Relation(this.tag,this.direction===olympe.dc.ua.DESTINATION?olympe.dc.ua.ORIGIN:olympe.dc.ua.DESTINATION,this.L,this.origin)}Qa(a){return a instanceof olympe.dc.Ma.Relation?a.X()===this.X()&&a.Ha()===this.Ha():!1}toString(){return`${this.direction}${olympe.dc.ia().name(this.tag)} (${this.tag})`}};
528
- olympe.dc.Ma.Relation.prototype.getInverse=olympe.dc.Ma.Relation.prototype.fc;olympe.dc.Ma.Relation.prototype.getDirection=olympe.dc.Ma.Relation.prototype.Ha;olympe.dc.Ma.Relation.prototype.getTag=olympe.dc.Ma.Relation.prototype.X;olympe.dc.Ma.Relation.xa=[olympe.dc.Ie];olympe.dc.db={};function df(a,b){const c=a.G,d=olympe.dc.ia(),e=olympe.dc.db.Database.C.oi,f=olympe.dc.db.Database.C.He,g=olympe.dc.db.Database.C.ORIGIN,h=olympe.dc.db.Database.C.DESTINATION,k=new olympe.dc.db.Vc('rev-'+b.V());a.H.debug('Generate the reverse graphLayer of',b.V());b.Ab.forEach((l,n)=>{if(l.G()){k.F(n,olympe.dc.Zb.NONE);for(const [r,t]of l.xd())k.kc(r,n,t)}else{var p=c.get(n);if(void 0!==p)if(l.Ld())for(const r of ef(d,n,l.P())){l=c.get(r);const t=new Map;l.forEach((u,w)=>{const y=w[0],z=w.substring(1);
527
+ a)}ka(a){return new olympe.dc.Ma.Property(a)}ra(a,b=olympe.dc.ua.DESTINATION){$e(a,b,this.F);return new olympe.dc.da.Me(a,b)}Nm(){return this.G}};x('olympe.dc.registry.Entry',olympe.dc.Ma.Entry);olympe.dc.Ma.Entry.prototype.addRelation=olympe.dc.Ma.Entry.prototype.ra;olympe.dc.Ma.Entry.prototype.addProperty=olympe.dc.Ma.Entry.prototype.ka;olympe.dc.Ma.Entry.xa=[olympe.dc.Ie];olympe.dc.Ma.Property=class{constructor(a){this.tag=a}X(){return this.tag}toString(){return`Property: ${this.tag}`}};olympe.dc.Ma.Property.prototype.getTag=olympe.dc.Ma.Property.prototype.X;olympe.dc.Ma.Property.xa=[olympe.dc.Ie];olympe.dc.Ma.Relation=class{constructor(a,b=olympe.dc.ua.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.ga(a);this.direction=b;this.origin=c;this.K=d}X(){return this.tag}Ha(){return this.direction}type(){return this.K}fc(){return new olympe.dc.Ma.Relation(this.tag,this.direction===olympe.dc.ua.DESTINATION?olympe.dc.ua.ORIGIN:olympe.dc.ua.DESTINATION,this.K,this.origin)}Qa(a){return a instanceof olympe.dc.Ma.Relation?a.X()===this.X()&&a.Ha()===this.Ha():!1}toString(){return`${this.direction}${olympe.dc.ia().name(this.tag)} (${this.tag})`}};
528
+ olympe.dc.Ma.Relation.prototype.getInverse=olympe.dc.Ma.Relation.prototype.fc;olympe.dc.Ma.Relation.prototype.getDirection=olympe.dc.Ma.Relation.prototype.Ha;olympe.dc.Ma.Relation.prototype.getTag=olympe.dc.Ma.Relation.prototype.X;olympe.dc.Ma.Relation.xa=[olympe.dc.Ie];olympe.dc.db={};function df(a,b){const c=a.G,d=olympe.dc.ia(),e=olympe.dc.db.Database.C.oi,f=olympe.dc.db.Database.C.He,g=olympe.dc.db.Database.C.ORIGIN,h=olympe.dc.db.Database.C.DESTINATION,k=new olympe.dc.db.Vc('rev-'+b.V());a.H.debug('Generate the reverse graphLayer of',b.V());b.Ab.forEach((l,n)=>{if(l.G()){k.F(n,olympe.dc.Zb.NONE);for(const [r,t]of l.xd())k.kc(r,n,t)}else{var p=c.get(n);if(void 0!==p)if(l.Md())for(const r of ef(d,n,l.P())){l=c.get(r);const t=new Map;l.forEach((u,w)=>{const y=w[0],z=w.substring(1);
529
529
  y===e?t.set(z,u):y===f?t.set(w,u):y===g?u.forEach((A,C)=>{k.Ea(z,C,r)}):y===h&&u.forEach((A,C)=>{k.Ea(z,r,C)})});l=l.source();k.Pc(r,l,t)}else{const r=new Map;for(const t of l.Cb().keys()){var q=t[0]===f;const u=q?t.substring(1):t;q=q?ff(p,u,!0):p.Ia(u,!0);let w;r.set(t,null!=(w=q)?w:null)}0<r.size&&k.Sc(n,r);for(const [t,u,w]of l.xd())w?k.kc(t,n,u):k.Ea(t,n,u)}}});return k}
530
530
  function gf(a,b,c){const d=b.V();if(a.F.has(d))throw Error(`You try to execute the patch ${d} a second times whereas the first execution has not been validated yet.`);const e=new hf(b,df(a,b));a.C.push(d);a.F.set(d,e);a.G.pk(c);a.write(b,!1)}function jf(a,b,c){return a.C.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>e?e.Jc(d):d,b)}
531
- olympe.dc.db.ms=class{constructor(a,b,c,d){this.H=a;this.G=b;this.ia=c;this.L=d;this.C=[];this.F=new Map}Jc(a){const b=a.V();this.C.includes(b)?this.push(b):this.write(jf(this,a,this.C.length),!0)}push(a){const b=this.C.indexOf(a);if(-1<b){const c=this.F.get(a);this.C.splice(b,1);jf(this,c.F,b);this.F.delete(a)}}write(a,b){(new olympe.dc.db.Tq(this.H,this.G,this.ia,this.L,b)).write(a)}};
531
+ olympe.dc.db.ms=class{constructor(a,b,c,d){this.H=a;this.G=b;this.ia=c;this.K=d;this.C=[];this.F=new Map}Jc(a){const b=a.V();this.C.includes(b)?this.push(b):this.write(jf(this,a,this.C.length),!0)}push(a){const b=this.C.indexOf(a);if(-1<b){const c=this.F.get(a);this.C.splice(b,1);jf(this,c.F,b);this.F.delete(a)}}write(a,b){(new olympe.dc.db.Tq(this.H,this.G,this.ia,this.K,b)).write(a)}};
532
532
  function kf(a,b,c,d){const e=olympe.dc.ua.DESTINATION;c=c.tag();const f=a.C.Rc(c);b.Cb().forEach((g,h)=>{f.ka(h,g);b.ea(h)});for(const [g,h,k,l]of b.oa()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.C.Ea(g,n,p);d.P(g,n,p)}}function lf(a,b,c,d){const e=olympe.dc.ua.DESTINATION,f=c.tag(),g=a.C.Rc(f);b.Cb().forEach((h,k)=>{void 0!==c.Ia(k)&&(g.ka(k,h),b.ea(k))});for(const [h,k,l]of b.xd()){const n=c.ub(h,e,k);void 0!==n&&(d.P(h,f,k),n===l&&a.C.P(h,f,k))}}
533
- class hf{constructor(a,b){this.F=a;this.C=b;this.db=olympe.dc.ia()}V(){return this.F.V()}Jc(a){var b=this.F.Ab,c=a.Ab;const d=b.size>c.size,e=d?b:c;b=d?c:b;for(const [g,h]of b){b=g;var f=e.get(b);void 0!==f&&(c=d?f:h,f=d?h:f,f.Ld()?c.G()||this.C.G(b,f.P()):c.Ld()?(kf(this,f,c,a),a.G(b,c.P())):lf(this,f,c,a))}return a}};const mf=olympe.dc.nc.Wc,nf=olympe.dc.nc.Wh,of=olympe.dc.ua.ORIGIN,pf=olympe.dc.ua.DESTINATION;
533
+ class hf{constructor(a,b){this.F=a;this.C=b;this.db=olympe.dc.ia()}V(){return this.F.V()}Jc(a){var b=this.F.Ab,c=a.Ab;const d=b.size>c.size,e=d?b:c;b=d?c:b;for(const [g,h]of b){b=g;var f=e.get(b);void 0!==f&&(c=d?f:h,f=d?h:f,f.Md()?c.G()||this.C.G(b,f.P()):c.Md()?(kf(this,f,c,a),a.G(b,c.P())):lf(this,f,c,a))}return a}};const mf=olympe.dc.nc.Wc,nf=olympe.dc.nc.Wh,of=olympe.dc.ua.ORIGIN,pf=olympe.dc.ua.DESTINATION;
534
534
  olympe.dc.db.Database=class a extends Map{constructor(b,c,d){super();let e;this.id=null!=(e=d.get('selfTag'))?e:olympe.dc.Pa.SELF;this.H=b;this.jc=olympe.D.Wa();this.T=olympe.dc.db.Database.G.IDLE;this.aa=new Map;this.oa=[];this.G=[];this.ea=new Map;var f;b=null!=(f=d.get('garbageCollector'))?f:olympe.dc.db.ef.C.al;let g;f=null!=(g=d.get('garbageCollectorDelay'))?g:5E3;this.Mc=new olympe.dc.db.ef(c,this,b,f);d.get('debug')&&this.gk()}V(){return this.id}getState(){return this.T}ab(){return this.H}create(b,
535
535
  c,d,e=!1){var f=this.F(b,!0);if(!f.e&&null!==c&&(null===f.G||f.G===c)){f.G=c;let g;(null==(g=f.model())?0:g.e)&&f.db.Z(f,!0)}e&&f.persist();d&&this.Tb(f,d);this.C(a.F.Xo,b)}update(b,c){c&&(b=this.F(b,!0),this.Tb(b,c))}za(b){const c=this.get(b);void 0!==c&&(this.Z(c,!1),this.C(a.F.Yo,b))}link(b,c,d){c=this.F(c,!0);d=this.F(d,!0);switch(b){case mf:qf(c,d);break;case nf:rf(c,d);break;default:c.link(b,d)}}unlink(b,c,d){c=this.get(c);d=this.get(d);if(void 0!==c&&void 0!==d)switch(b){case mf:sf(c,d);break;
536
536
  case nf:tf(c,d);break;default:c.unlink(b,d)}}jb(b){for(const c of b)uf(this.F(c))}ub(b){for(const c of b)(b=this.get(c))&&vf(b)}pk(b){b.forEach(c=>{this.F(c).persist()})}sd(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.F.qo,b))}F(b,c=!1){let d=this.get(b);void 0===d&&(d=new olympe.dc.db.Instance(b,this),this.set(b,d),this.C(a.F.po,b),c&&this.C(a.F.fm,b));return d}pb(b){wf(this.G[0],olympe.Y.Dh(),b)}P(b){this.G[0].C.delete(b)}C(b,c,...d){this.aa.has(b)&&this.aa.get(b).forEach(e=>
537
- {e(c,...d)})}Z(b,c){this.ea.set(b,c)}Qe(b,c,d,e){let f;null!=(f=this.G[0])&&xf(f,b).ka(e?yf+c:c,d)}tf(b,c,d,e,f){let g;null!=(g=this.G[0])&&(d===zf?f?xf(g,b).link(c,e):xf(g,b).unlink(c,e):f?xf(g,b).Lb(c,e):xf(g,b).Tb(c,e))}Lb(b,c,d){let e;null!=(e=this.G[0])&&xf(e,b).ud(c,d)}addEventListener(b,c){let d=this.aa.get(b);void 0===d&&(d=[],this.aa.set(b,d));d.push(c)}Ja(b){this.oa.push(b)}L(b){return this.G.reduce((c,d)=>d.P.has(b)||c,!1)}ye(){this.T===a.G.IDLE&&(this.T=a.G.Vr);this.G.unshift(new olympe.dc.db.Bs(this,
537
+ {e(c,...d)})}Z(b,c){this.ea.set(b,c)}Qe(b,c,d,e){let f;null!=(f=this.G[0])&&xf(f,b).ka(e?yf+c:c,d)}tf(b,c,d,e,f){let g;null!=(g=this.G[0])&&(d===zf?f?xf(g,b).link(c,e):xf(g,b).unlink(c,e):f?xf(g,b).Mb(c,e):xf(g,b).Tb(c,e))}Mb(b,c,d){let e;null!=(e=this.G[0])&&xf(e,b).ud(c,d)}addEventListener(b,c){let d=this.aa.get(b);void 0===d&&(d=[],this.aa.set(b,d));d.push(c)}Ja(b){this.oa.push(b)}K(b){return this.G.reduce((c,d)=>d.P.has(b)||c,!1)}ye(){this.T===a.G.IDLE&&(this.T=a.G.Vr);this.G.unshift(new olympe.dc.db.Bs(this,
538
538
  this.jc))}ud(){this.T=a.G.Ze;this.rk();Af(this.G[0]);this.G.shift();0===this.G.length&&(this.T=a.G.IDLE,this.oa.forEach(b=>{b()}),Bf(this.Mc))}Tb(b,c){const d=a.C.He;for(const [e,f]of c)void 0!==f&&(e[0]===d?Cf(b,e.substring(1),f):b.update(e,f))}rk(){const b=this.G[0];for(const [c,d]of this.ea)this.cc(new Set,c).filter(e=>{var f=d;const g=e.e!==f;g&&(f?(e.e=f,Df(e)):(Ef(e),e.e=f),e.db.C(f?Ff.dl:Ff.yc,e.C));return g}).forEach(e=>{e=e.tag();d?xf(b,e).create():xf(b,e).delete()});this.ea.clear()}cc(b,
539
539
  c,d=[]){const e=c.tag();if(!b.has(e)&&(b.add(e),d.push(c),c=c.get(of+mf)))for(const f of c.values())null!==f.source()&&this.cc(b,f,d);return d}gk(){const b=a.F.dl,c=a.F.Jj,d=new Set,e=new Map;this.addEventListener(a.F.Xo,f=>{d.add(f)});this.addEventListener(b,f=>{d.delete(f);e.delete(f)});this.addEventListener(c,(f,...g)=>{if(g[0]===nf&&g[1]===pf){const h=g[2];this.get(h).Ga()||(g=e.get(h)||new Set,0===g.size&&e.set(h,g),g.add(f))}});this.Ja(()=>{d.forEach(f=>{const g=this.get(f);g&&null===g.model()&&
540
540
  this.H.error(`\n[DEBUG - DATABASE]\nInstance ${f} created but does not exist !\n${g.toString()}`)});d.clear();e.forEach((f,g)=>{const h=this.get(g);h&&this.H.error(`\n[DEBUG - DATABASE]\nThe model ${g} is extended by other models but does not exist !`+`\nExtension models: ${Array.from(f.values()).join(', ')}`+`\n\n ${h.toString()}`)});e.clear()})}};olympe.dc.db.Database.C={oi:'$',Us:'~',He:'?',Dk:'=',Uo:'|',Mn:'@',ORIGIN:olympe.dc.ua.ORIGIN,DESTINATION:olympe.dc.ua.DESTINATION};
541
- olympe.dc.db.Database.F={po:0,qo:1,Kq:2,fm:3,Nn:4,On:5,dl:6,yc:7,Jj:8,Rl:9,Xo:10,Yo:11,Xp:12};olympe.dc.db.Database.G={IDLE:0,Vr:1,Ze:2};function Gf(a,b,c=[]){const d=b.V();gf(a.F,b,c);return e=>{if(e)a.F.push(d);else{e=a.F;const f=e.F.get(d);if(void 0!==f){const g=e.C.indexOf(d);e.C.splice(g,1);e.write(jf(e,f.C,e.C.length),!1);e.F.delete(d)}}}}function Hf(a,b){a.C.Ja(b)}olympe.dc.db.xs=class{constructor(a,b,c,d,e){this.H=a;this.C=b;this.view=c;this.F=new olympe.dc.db.ms(a,b,c,d);this.nx=new olympe.dc.db.Nt(a,c,b,e)}ab(){return this.H}Jc(a){this.F.Jc(a)}};const If=olympe.dc.db.Database.C.ORIGIN,Jf=olympe.dc.db.Database.C.DESTINATION,Kf=olympe.dc.db.Database.C.oi,Lf=olympe.dc.db.Database.C.He,Mf=olympe.dc.db.Database.C.Dk,Nf=olympe.dc.db.Database.C.Uo,Of=If+Jf,Pf=Kf+Kf,Qf=olympe.dc.db.Database.G;let Rf=0;function Fe(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=Sf(e,'',c);void 0!==f&&(a.C.getState()!==Qf.Ze||e.L()&&!d||a.C.P(c),d||!e.Ga()&&!e.L()||f(!1,b))}}
541
+ olympe.dc.db.Database.F={po:0,qo:1,Kq:2,fm:3,Nn:4,On:5,dl:6,yc:7,Jj:8,Rl:9,Xo:10,Yo:11,Xp:12};olympe.dc.db.Database.G={IDLE:0,Vr:1,Ze:2};function Gf(a,b,c=[]){const d=b.V();gf(a.F,b,c);return e=>{if(e)a.F.push(d);else{e=a.F;const f=e.F.get(d);if(void 0!==f){const g=e.C.indexOf(d);e.C.splice(g,1);e.write(jf(e,f.C,e.C.length),!1);e.F.delete(d)}}}}function Hf(a,b){a.C.Ja(b)}olympe.dc.db.xs=class{constructor(a,b,c,d,e){this.H=a;this.C=b;this.view=c;this.F=new olympe.dc.db.ms(a,b,c,d);this.nx=new olympe.dc.db.Nt(a,c,b,e)}ab(){return this.H}Jc(a){this.F.Jc(a)}};const If=olympe.dc.db.Database.C.ORIGIN,Jf=olympe.dc.db.Database.C.DESTINATION,Kf=olympe.dc.db.Database.C.oi,Lf=olympe.dc.db.Database.C.He,Mf=olympe.dc.db.Database.C.Dk,Nf=olympe.dc.db.Database.C.Uo,Of=If+Jf,Pf=Kf+Kf,Qf=olympe.dc.db.Database.G;let Rf=0;function Fe(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=Sf(e,'',c);void 0!==f&&(a.C.getState()!==Qf.Ze||e.K()&&!d||a.C.P(c),d||!e.Ga()&&!e.K()||f(!1,b))}}
542
542
  function Ge(a,b,c,d){a=a.C.F(olympe.dc.ga(b));d=null!=d?d:Tf();Uf(a,'',d,c)&&a.Ga()&&c(!0,b);return d}function ef(a,b,c){return{[Symbol.iterator]:function*(d,e,f){const g=(new Set).add(e);for(const h of g)yield h,d.jk(h,f).forEach(([k,,,l])=>{l&&g.add(k)})}.bind(null,a,b,c)}}function Tf(){++Rf;return String(Rf)}
543
543
  function Vf(a,b,c,d,e){a=a.C.F(olympe.dc.ga(b));c=olympe.dc.ga(c);b=Kf+c;e=null!=e?e:Tf();if(Uf(a,b,e,d)&&a.Ga()){let f=!1;b=a.get(b);void 0===b&&(f=!0,b=a.get(Mf+c));void 0!==b&&d(b,f)}return e}function U(a,b,c=!1){if(b)return a=a.C.get(olympe.dc.ga(b)),!a||c&&!a.Ga()?null:a;throw Error('DBView: Impossible to get instance, provided tag is null or undefined.');}function Wf(a,b,c,d){b=U(a,b);null!==b&&(c=olympe.dc.ga(c),Sf(b,Kf+c,d),a.C.getState()===Qf.Ze&&a.C.P(d))}
544
- function Xf(a,b,c,d){a=a.C.F(olympe.dc.ga(b));d=null!=d?d:Tf();Uf(a,Pf,d,c)&&a.Ga()&&a.forEach((e,f)=>{const g=f[0];g!==Kf&&g!==Mf||c(f.substring(1),e,g===Mf)});return d}function Yf(a,b,c){b=U(a,b);null!==b&&(Sf(b,Pf,c),a.C.getState()===Qf.Ze&&a.C.P(c))}function Zf(a,b,c,d,e){let f;null==(f=a.get(b))||f.forEach((g,h)=>{if(g.Ga()||!c&&g.L())e?d(b.substring(1),b[0],c,h):d(c,h)})}
545
- function V(a,b,c,d,e){a=a.C.F(olympe.dc.ga(b));c=c.Ha()+c.X();e=null!=e?e:Tf();(d=$f(a,c,e,d))&&a.Ga()&&Zf(a,c,!0,d,!1);return e}function ag(a,b,c,d){const e=a.C.F(olympe.dc.ga(b));a=null!=d?d:Tf();const f=$f(e,Of,a,c);f&&e.Ga()&&e.forEach((g,h)=>{g=h[0];g!==If&&g!==Jf||Zf(e,h,!0,f,!0)})}function bg(a,b,c){const d=U(a,b);if(null!==d){const e=Sf(d,Of,c);void 0!==e&&(a.C.getState()!==Qf.Ze||d.L()||a.C.P(c),!d.Ga()&&!d.L()||d.forEach((f,g)=>{f=g[0];(f===If||f===Jf)&&e&&Zf(d,g,!1,e,!0)}))}}
544
+ function Xf(a,b,c,d){a=a.C.F(olympe.dc.ga(b));d=null!=d?d:Tf();Uf(a,Pf,d,c)&&a.Ga()&&a.forEach((e,f)=>{const g=f[0];g!==Kf&&g!==Mf||c(f.substring(1),e,g===Mf)});return d}function Yf(a,b,c){b=U(a,b);null!==b&&(Sf(b,Pf,c),a.C.getState()===Qf.Ze&&a.C.P(c))}function Zf(a,b,c,d,e){let f;null==(f=a.get(b))||f.forEach((g,h)=>{if(g.Ga()||!c&&g.K())e?d(b.substring(1),b[0],c,h):d(c,h)})}
545
+ function V(a,b,c,d,e){a=a.C.F(olympe.dc.ga(b));c=c.Ha()+c.X();e=null!=e?e:Tf();(d=$f(a,c,e,d))&&a.Ga()&&Zf(a,c,!0,d,!1);return e}function ag(a,b,c,d){const e=a.C.F(olympe.dc.ga(b));a=null!=d?d:Tf();const f=$f(e,Of,a,c);f&&e.Ga()&&e.forEach((g,h)=>{g=h[0];g!==If&&g!==Jf||Zf(e,h,!0,f,!0)})}function bg(a,b,c){const d=U(a,b);if(null!==d){const e=Sf(d,Of,c);void 0!==e&&(a.C.getState()!==Qf.Ze||d.K()||a.C.P(c),!d.Ga()&&!d.K()||d.forEach((f,g)=>{f=g[0];(f===If||f===Jf)&&e&&Zf(d,g,!1,e,!0)}))}}
546
546
  function cg(a,b,c){b=U(a,b,!1);if(!b)return[];const d=olympe.dm.Relation.C.Tl,e=olympe.dm.Relation.C.mu,f=olympe.dm.Relation.C.em,g=olympe.dm.Relation.C.Yp,h=Kf+c,k=[];b.forEach((l,n)=>{const p=n[0];if(l instanceof olympe.dc.Bc&&(p===Kf||p===Lf))(l=a.C.get(l.X()))&&k.push([l,n.substring(1),null,!0]);else if(p===If){const q=n.substring(1);let r,t;const u=null!=(t=null==(r=a.C.get(q))?void 0:r.get(h))?t:0;(d|e)&u&&l.forEach(w=>{k.push([w,q,p,!!(d&u)])})}else if(p===Jf){const q=n.substring(1);let r,
547
- t;const u=null!=(t=null==(r=a.C.get(q))?void 0:r.get(h))?t:0;(f|g)&u&&l.forEach(w=>{k.push([w,q,p,!!(f&u)])})}});return k}function dg(a,b,c,d,e){const f=a.C.F(olympe.dc.ga(b));e=null!=e?e:Tf();const g=$f(f,Nf+c,e,d);g&&f.Ga()&&cg(a,b,c).forEach(([h,...k])=>{h.Ga()&&g(...k,!0,h.tag())})}function eg(a,b,c,d){const e=U(a,b);if(null!==e){const f=Sf(e,Nf+c,d);void 0!==f&&(a.C.getState()!==Qf.Ze||e.L()||a.C.P(d),!e.Ga()&&!e.L()||cg(a,b,c).forEach(([g,...h])=>{(g.Ga()||g.L())&&f(...h,!1,g.tag())}))}}
547
+ t;const u=null!=(t=null==(r=a.C.get(q))?void 0:r.get(h))?t:0;(f|g)&u&&l.forEach(w=>{k.push([w,q,p,!!(f&u)])})}});return k}function dg(a,b,c,d,e){const f=a.C.F(olympe.dc.ga(b));e=null!=e?e:Tf();const g=$f(f,Nf+c,e,d);g&&f.Ga()&&cg(a,b,c).forEach(([h,...k])=>{h.Ga()&&g(...k,!0,h.tag())})}function eg(a,b,c,d){const e=U(a,b);if(null!==e){const f=Sf(e,Nf+c,d);void 0!==f&&(a.C.getState()!==Qf.Ze||e.K()||a.C.P(d),!e.Ga()&&!e.K()||cg(a,b,c).forEach(([g,...h])=>{(g.Ga()||g.K())&&f(...h,!1,g.tag())}))}}
548
548
  function fg(a,b){a=U(a,b,!0);b=new Map;if(a)for(const [c,d]of a)c[0]===Lf&&b.set(c.substring(1),d);return b}function gg(a,b,c){return c===olympe.dc.Zb.NONE?0:a.Ia(b,c,!0)||0}function hg(a,b){return function*(c){if(c)for(const [d,e]of c)if(c=d[0],c===If||c===Jf){const f=d.substring(1);for(const g of e.keys())yield[f,c,g]}}(U(a,b,!0))}
549
549
  function ig(a,b,c){if(!a.Ga(b))return a.H.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.ga(b)];for(const f of e){const g=a.bb(f,c);d.set(f,g);for(const h of g.filter(k=>!d.has(k)))e.push(h)}a.H.debug(`Found ${d.size} instances in sub-tree rooted at ${olympe.dc.ga(b)}`);return d}function jg(a,b,c,d){return(c=(a=U(a,b,!0))&&a.get(d+c))?Array.from(c.values()).filter(e=>e.Ga()).length:0}
550
- olympe.dc.ib=class{constructor(a,b){this.H=a;this.C=b}V(){return this.C.V()}F(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Ha()+b.X();const e=Sf(a,b,c);void 0!==e&&(this.C.getState()!==Qf.Ze||a.L()&&!d||this.C.P(c),d||!a.Ga()&&!a.L()||Zf(a,b,!1,e,!1))}}Ga(a){a=this.C.get(olympe.dc.ga(a));return!(null==a||!a.Ga())}name(a){let b,c;return null!=(c=null==(b=U(this,a))?void 0:b.Ia(olympe.dc.CloudObject.nameProp.X()))?c:''}model(a){return(a=(a=U(this,a,!0))?a.model():null)?a.tag():null}Re(a){return(a=(a=U(this,
550
+ olympe.dc.ib=class{constructor(a,b){this.H=a;this.C=b}V(){return this.C.V()}F(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Ha()+b.X();const e=Sf(a,b,c);void 0!==e&&(this.C.getState()!==Qf.Ze||a.K()&&!d||this.C.P(c),d||!a.Ga()&&!a.K()||Zf(a,b,!1,e,!1))}}Ga(a){a=this.C.get(olympe.dc.ga(a));return!(null==a||!a.Ga())}name(a){let b,c;return null!=(c=null==(b=U(this,a))?void 0:b.Ia(olympe.dc.CloudObject.nameProp.X()))?c:''}model(a){return(a=(a=U(this,a,!0))?a.model():null)?a.tag():null}Re(a){return(a=(a=U(this,
551
551
  a,!0))&&a.Re())?a.tag():null}Ih(a){a=U(this,a,!0);return!(!a||!a.Re())}Qb(a,b){a=(a=U(this,a,!0))&&a.model();return!(!a||!this.zf(a.tag(),b))}source(a){return(a=U(this,a,!0))&&a.source()}Xf(a){a=U(this,a,!1);return!a||a.P}Ia(a,b,c){let d;a=null==(d=U(this,a,!0))?void 0:d.Ia(olympe.dc.ga(b),c);return void 0!==a?a:null}Cb(a,b=!1){var c=U(this,a,!0);a=new Map;if(c)for(const [d,e]of c)c=d[0],(c===Kf||!b&&c===Mf)&&a.set(d.substring(1),e);return a}jk(a,b){return cg(this,a,b).filter(([c])=>c.Ga()).map(([c,
552
- ...d])=>[c.tag(),...d])}bb(a,b){a=U(this,a,!0);b=b.Ha()+b.X();b=null==a?void 0:a.get(b);a=[];if(b)for(const c of b.values())c.Ga()&&a.push(c.tag());return a}yr(a,b,c){let d,e;a=null==(d=U(this,a,!0))?void 0:null==(e=d.get(b.Ha()+b.X()))?void 0:e.get(olympe.dc.ga(c));return!(null==a||!a.Ga())}Jm(a,b){a=U(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=U(this,d,!0).get(c.Ha()+c.X()),void 0!==a)for(const e of a.values())e.Ga()&&b.push(e.tag());a=b}return a}Nb(a,b){var c=
552
+ ...d])=>[c.tag(),...d])}bb(a,b){a=U(this,a,!0);b=b.Ha()+b.X();b=null==a?void 0:a.get(b);a=[];if(b)for(const c of b.values())c.Ga()&&a.push(c.tag());return a}yr(a,b,c){let d,e;a=null==(d=U(this,a,!0))?void 0:null==(e=d.get(b.Ha()+b.X()))?void 0:e.get(olympe.dc.ga(c));return!(null==a||!a.Ga())}Jm(a,b){a=U(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=U(this,d,!0).get(c.Ha()+c.X()),void 0!==a)for(const e of a.values())e.Ga()&&b.push(e.tag());a=b}return a}Jb(a,b){var c=
553
553
  U(this,a,!0);const d=b.Ha()+b.X();c=null==c?void 0:c.get(d);if(1<(null==c?void 0:c.size))return this.H.warn(`Relation ${b.X()} to instance ${a} is not unique: found ${c.size} related items`),null;a=null==c?void 0:c.values().next().value;return(null==a?0:a.Ga())?a.tag():null}Mg(a,b,c){a=olympe.dc.ga(a);const d=ig(this,a,b);d.delete(a);return c?(c=olympe.dc.ga(c),d.has(c)?Array.from(ig(this,c,b.fc()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}ir(a,b,c){if(!this.Ga(a))return null;b=ig(this,
554
554
  a,b);const d=[olympe.dc.ga(a)];for(const e of d){if(c(e))return e;if(a=b.get(e))for(const f of a.filter(g=>!d.includes(g)))d.push(f)}return null}Am(a,b,c){return this.Jm(a,b).find(c)||null}Lv(a,b,c){return this.Jm(a,b).filter(c)}nr(a,b=olympe.dc.CloudObject){var c=U(this,a,!0);const d=b&&U(this,b,!0),e=[c];for(;c&&c!==d;){c=c.Re();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Ga())throw a=`Try to get all extensions of the model ${olympe.dc.ga(a)} but one of them does not exists (${c.tag()})`,
555
555
  Error(a);null!==c&&e.push(c)}c=U(this,olympe.dc.CloudObject,!0);if(d!==c&&e[e.length-1]===c)throw Error(`The model "${this.name(a)}" (tag = ${a}) does not extend the expected model "${this.name(b)}" (tag = ${b}).`);return e.map(f=>f.tag())}zf(a,b){const c=olympe.dc.ga(b);return!!this.ir(a,olympe.dc.CloudObject.extendRel,d=>d===c)}Zc(a){return this.bb(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.ib.prototype.getInstances=olympe.dc.ib.prototype.Zc;olympe.dc.ib.prototype.isExtending=olympe.dc.ib.prototype.zf;
556
- olympe.dc.ib.prototype.getExtendedModels=olympe.dc.ib.prototype.nr;olympe.dc.ib.prototype.findAllRelated=olympe.dc.ib.prototype.Lv;olympe.dc.ib.prototype.findRelated=olympe.dc.ib.prototype.Am;olympe.dc.ib.prototype.findRecursive=olympe.dc.ib.prototype.ir;olympe.dc.ib.prototype.getRecursiveRelated=olympe.dc.ib.prototype.Mg;olympe.dc.ib.prototype.getUniqueRelated=olympe.dc.ib.prototype.Nb;olympe.dc.ib.prototype.getMultiRelated=olympe.dc.ib.prototype.Jm;olympe.dc.ib.prototype.isRelated=olympe.dc.ib.prototype.yr;
556
+ olympe.dc.ib.prototype.getExtendedModels=olympe.dc.ib.prototype.nr;olympe.dc.ib.prototype.findAllRelated=olympe.dc.ib.prototype.Lv;olympe.dc.ib.prototype.findRelated=olympe.dc.ib.prototype.Am;olympe.dc.ib.prototype.findRecursive=olympe.dc.ib.prototype.ir;olympe.dc.ib.prototype.getRecursiveRelated=olympe.dc.ib.prototype.Mg;olympe.dc.ib.prototype.getUniqueRelated=olympe.dc.ib.prototype.Jb;olympe.dc.ib.prototype.getMultiRelated=olympe.dc.ib.prototype.Jm;olympe.dc.ib.prototype.isRelated=olympe.dc.ib.prototype.yr;
557
557
  olympe.dc.ib.prototype.getRelated=olympe.dc.ib.prototype.bb;olympe.dc.ib.prototype.getProperties=olympe.dc.ib.prototype.Cb;olympe.dc.ib.prototype.getProperty=olympe.dc.ib.prototype.Ia;olympe.dc.ib.prototype.isPersisted=olympe.dc.ib.prototype.Xf;olympe.dc.ib.prototype.instanceOf=olympe.dc.ib.prototype.Qb;olympe.dc.ib.prototype.isModel=olympe.dc.ib.prototype.Ih;olympe.dc.ib.prototype.extension=olympe.dc.ib.prototype.Re;olympe.dc.ib.prototype.model=olympe.dc.ib.prototype.model;
558
558
  olympe.dc.ib.prototype.name=olympe.dc.ib.prototype.name;olympe.dc.ib.prototype.exist=olympe.dc.ib.prototype.Ga;const kg=olympe.dc.db.Database.C.ORIGIN,zf=olympe.dc.db.Database.C.DESTINATION,yf=olympe.dc.db.Database.C.Dk,lg=olympe.dc.db.Database.C.oi,mg=olympe.dc.db.Database.C.Uo,ng=olympe.dc.db.Database.C.Mn,og=kg+zf,pg=lg+lg,qg=Array.from(Object.values(olympe.dc.Zb)).filter(a=>null!==a);function wf(a,b,c){let d=a.C.get(b);void 0===d&&(d=[],a.C.set(b,d));a.buffer.push([b,d.length]);d.push(c)}
559
- function Af(a){const b=a.L;a.F.forEach((c,d)=>{var e=b.get(d);if(c.G()||c.Ld()){var f=e.get(ng);f&&rg(a,f,c.G(),d);c.Ld()&&a.P.add(d)}for(const [n,p]of c.Cb()){var g=n[0]===yf,h=g?n.substring(1):n;f=a;var k=e,l=p;const q=k.get(ng+lg+h);q&&rg(f,q,l,g);(k=k.get(ng+pg))&&rg(f,k,h,l,g)}for(const n of c.oa())sg(a,e,...n);(e=c.aa)&&tg(a,b.get(e),c.cc,!c.Ld(),d)});a.F.clear();a.G.clear();ug(a)}function xf(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.eh(b),a.F.set(b,c));return c}
559
+ function Af(a){const b=a.K;a.F.forEach((c,d)=>{var e=b.get(d);if(c.G()||c.Md()){var f=e.get(ng);f&&rg(a,f,c.G(),d);c.Md()&&a.P.add(d)}for(const [n,p]of c.Cb()){var g=n[0]===yf,h=g?n.substring(1):n;f=a;var k=e,l=p;const q=k.get(ng+lg+h);q&&rg(f,q,l,g);(k=k.get(ng+pg))&&rg(f,k,h,l,g)}for(const n of c.oa())sg(a,e,...n);(e=c.aa)&&tg(a,b.get(e),c.cc,!c.Md(),d)});a.F.clear();a.G.clear();ug(a)}function xf(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.eh(b),a.F.set(b,c));return c}
560
560
  function rg(a,b,...c){b.forEach((d,e)=>{wf(a,e,d.bind(null,...c))})}function sg(a,b,c,d,e,f){var g=b.get(ng+d+c);g&&rg(a,g,f,e);(g=b.get(ng+og))&&rg(a,g,c,d,f,e);vg(a,c,d).forEach((h,k)=>{(k=b.get(ng+mg+k))&&rg(a,k,c,d,h,f,e)})}function tg(a,b,c,d,e){qg.forEach(f=>{(f=b.get(ng+mg+f))&&rg(a,f,c,null,!0,d,e)})}function ug(a){a.T.run(()=>{const b=a.C;for(const [c,d]of a.buffer){let e,f,g;null==(e=b.get(c))||null==(g=(f=e)[d])||g.call(f)}});a.C.clear();a.buffer.length=0}
561
- function vg(a,b,c){const d=b+c;let e=a.G.get(d);if(!e){const f=a.L.get(b);e=new Map;qg.forEach(g=>{let h;const k=null!=(h=null==f?void 0:f.get(lg+g))?h:0;(c===kg?12:3)&k&&e.set(g,!!((c===kg?8:2)&k))});a.G.set(d,e)}return e}olympe.dc.db.Bs=class{constructor(a,b){this.L=a;this.T=b;this.F=new Map;this.P=new Set;this.C=new Map;this.G=new Map;this.buffer=[]}};function Bf(a){if(!a.G&&0<a.F.size)switch(a.mode){case olympe.dc.db.ef.C.jn:a.G=!0;setTimeout(()=>a.run(),a.delay);break;case olympe.dc.db.ef.C.Bu:a.G=!0,a.run()}}
561
+ function vg(a,b,c){const d=b+c;let e=a.G.get(d);if(!e){const f=a.K.get(b);e=new Map;qg.forEach(g=>{let h;const k=null!=(h=null==f?void 0:f.get(lg+g))?h:0;(c===kg?12:3)&k&&e.set(g,!!((c===kg?8:2)&k))});a.G.set(d,e)}return e}olympe.dc.db.Bs=class{constructor(a,b){this.K=a;this.T=b;this.F=new Map;this.P=new Set;this.C=new Map;this.G=new Map;this.buffer=[]}};function Bf(a){if(!a.G&&0<a.F.size)switch(a.mode){case olympe.dc.db.ef.C.jn:a.G=!0;setTimeout(()=>a.run(),a.delay);break;case olympe.dc.db.ef.C.Bu:a.G=!0,a.run()}}
562
562
  olympe.dc.db.ef=class{constructor(a,b,c,d){this.H=a;this.C=b;this.F=new Set;this.mode=c;this.delay=d;this.G=!1;c!==olympe.dc.db.ef.C.al&&this.init()}run(){const a=this.C;this.H.debug('Start garbage collector with',this.F.size,'instances to check');for(const b of this.F){const c=a.get(b);!c||0<c.c||(this.H.debug('Remove unused instance',b,'from database'),a.sd(b))}this.F.clear();this.G=!1}init(){const a=olympe.dc.db.Database.F.Kq,b=olympe.dc.db.Database.F.Yo,c=olympe.dc.db.Database.F.Xp,d=olympe.dc.db.Database.G.IDLE,
563
563
  e=f=>{this.F.add(f);this.C.getState()===d&&Bf(this)};this.C.addEventListener(olympe.dc.db.Database.F.fm,e.bind(this));this.C.addEventListener(b,e.bind(this));this.C.addEventListener(a,f=>{this.F.delete(f)});this.C.addEventListener(c,(f,...g)=>{this.H.error(g[0])})}};olympe.dc.db.ef.C={al:0,Bu:1,jn:2};olympe.dc.db.ef.F=5E3;olympe.dc.db.Vc=class{constructor(a){this.id=null!=a?a:olympe.Y.uf();this.Ab=new Map}V(){return this.id}td(a){const b=olympe.dc.db.eh.C.Al,c=olympe.dc.db.eh.C.yc,d=olympe.dc.db.eh.C.Xj;this.Ab.forEach((e,f)=>{const g=e.Vb();switch(e.getState()){case b:const h=e.yb();if(null===h)throw Error(`GraphPatch: try to create the instance ${f} with no source`);const k=e.T()?e.Cb():void 0;a.Pc(f,h,k,g);break;case d:e.T()&&a.Sc(f,e.Cb(),g);break;case c:a.F(f,e.P(),g)}for(const [h,k,l]of e.xd())e=this.Ab.get(k),
564
- l?a.Ea(h,f,k,g,e.Vb()):a.kc(h,f,k,g,e.Vb())})}Hh(){return 0===this.Ab.size}L(){let a=0;this.Ab.forEach(b=>{a+=b.Mc()});return a}Pc(a,b,c,d=null){b=this.C(a).create(b);'string'===typeof d&&this.Ea(olympe.dc.nc.Wc,a,d,d,null);c&&b.om(c)}Sc(a,b,c=null){b&&this.C(a,c).om(b)}F(a,b=olympe.dc.Zb.NONE,c=null){const d=this.Ab.get(a);if(d&&d.G())this.G(a,b);else{this.C(a,c).delete(b);for(const e of this.jk(a,b,!1))this.Ab.get(e).Cb().clear(),this.Z(e,!0)}}Ea(a,b,c,d=null,e=null){this.C(b,d).link(a,c);this.C(c,
565
- e).Lb(a,b)}kc(a,b,c,d=null,e=null){this.C(b,d).unlink(a,c);this.C(c,e).Tb(a,b)}aa(a){var b=olympe.dc.ia();if(b.Ga(a)){const c=b.model(a),d=b.source(a),e=b.Cb(a,!0);fg(b,a).forEach((f,g)=>{e.set(`${olympe.dc.rj.He}${g}`,f)});this.Pc(a,d,e,c);(b=b.Re(a))&&this.Ea(olympe.dc.nc.Wh,a,b);e.forEach(f=>{f instanceof olympe.dc.Bc&&this.aa(f.X())})}}Zc(){return function*(a){for(const b of a.values())if(b.G()||b.Ld()||b.T())yield b}(this.Ab)}Rc(a){let b;return null!=(b=this.Ab.get(olympe.dc.ga(a)))?b:null}G(a,
566
- b=olympe.dc.Zb.NONE){a=this.jk(a,b);for(const c of a)this.Z(c,!1),this.Ab.delete(c)}xd(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.xd((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.Ab.values())}Mg(a,b,c=(d,e)=>[d,e]){return this.ea(a,b,c)}*ea(a,b,c,d=[]){d.push(a);a=this.Rc(a);for(const [e,f]of a.bb(b))d.includes(e)||(yield*this.ea(e,b,c,d),yield c(e,f))}P(a,b,c){const d=this.Ab.get(b),e=this.Ab.get(c);d&&d.L(a,olympe.dc.ua.DESTINATION,c);e&&e.L(a,olympe.dc.ua.ORIGIN,
567
- b)}Z(a,b){const c=olympe.dc.ua.ORIGIN,d=olympe.dc.ua.DESTINATION,e=this.Ab.get(a);for(const [g,h,k]of e.xd())if(k||!b){e.L(g,d,h);var f=this.Ab.get(h);f&&f.L(g,c,a)}for(const [g,h,k]of e.pb())if(k||!b)e.L(g,c,h),(f=this.Ab.get(h))&&f.L(g,d,a)}jk(a,b,c=!0){const d=olympe.dm.Relation.C.Tl,e=olympe.dm.Relation.C.em,f=olympe.dc.ua.ORIGIN,g=olympe.dc.ia();a=new Set([a]);const h=new Set;for(const l of a){var k=this.Ab.get(l);if(void 0!==k){for(const [n,p,q]of k.xd())q&&gg(g,n,b)&e?a.add(p):c||q||h.add(`${l}.${n}.${p}`);
568
- for(const [n,p,q]of k.pb())q&&gg(g,n,b)&d?a.add(p):c||q||h.add(`${p}.${n}.${l}`)}for(const [n,p,q]of hg(g,l))k=p===f?d:e,!h.has(p===f?`${q}.${n}.${l}`:`${l}.${n}.${q}`)&&gg(g,n,b)&k&&a.add(q)}return Array.from(a).filter(l=>this.Ab.has(l))}C(a,b){let c=this.Ab.get(a);void 0===c&&(c=new olympe.dc.db.eh(a),this.Ab.set(a,c));return b?c.Ja(b):c}T(a){const b=olympe.dc.ua.DESTINATION;var c=this.Ab;const d=a.Ab,e=(a=a.L()>this.L())?d:c;c=a?c:d;for(const [f,g]of c){c=e.get(f);if(void 0===c)continue;const h=
569
- a?g:c,k=a?c:g;if(k.Ld())this.G(f,k.P());else if(!h.Ld()){h.Cb().forEach((l,n)=>{void 0!==k.Ia(n)&&h.ea(n)});for(const [l,n,p]of h.xd())c=k.ub(l,b,n),void 0!==c&&p!==c&&this.P(l,f,n)}}}};olympe.dc.db.Vc.xa=[olympe.dc.Writable,olympe.dc.cu];const Ff=olympe.dc.db.Database.F,wg=olympe.dc.db.Database.C.oi,xg=olympe.dc.db.Database.C.Us,yg=olympe.dc.db.Database.C.He,zg=olympe.dc.db.Database.C.Dk,Ag=olympe.dc.db.Database.C.Mn,W=olympe.dc.ua.ORIGIN,X=olympe.dc.ua.DESTINATION,Bg=olympe.dc.nc.Wc,Cg=olympe.dc.nc.Wh;function ff(a,b,c=!1){const d=a.get(yg+b);return c||void 0!==d?d:a.get(xg+b)}
564
+ l?a.Ea(h,f,k,g,e.Vb()):a.kc(h,f,k,g,e.Vb())})}Hh(){return 0===this.Ab.size}K(){let a=0;this.Ab.forEach(b=>{a+=b.Mc()});return a}Pc(a,b,c,d=null){b=this.C(a).create(b);'string'===typeof d&&this.Ea(olympe.dc.nc.Wc,a,d,d,null);c&&b.om(c)}Sc(a,b,c=null){b&&this.C(a,c).om(b)}F(a,b=olympe.dc.Zb.NONE,c=null){const d=this.Ab.get(a);if(d&&d.G())this.G(a,b);else{this.C(a,c).delete(b);for(const e of this.jk(a,b,!1))this.Ab.get(e).Cb().clear(),this.Z(e,!0)}}Ea(a,b,c,d=null,e=null){this.C(b,d).link(a,c);this.C(c,
565
+ e).Mb(a,b)}kc(a,b,c,d=null,e=null){this.C(b,d).unlink(a,c);this.C(c,e).Tb(a,b)}aa(a){var b=olympe.dc.ia();if(b.Ga(a)){const c=b.model(a),d=b.source(a),e=b.Cb(a,!0);fg(b,a).forEach((f,g)=>{e.set(`${olympe.dc.rj.He}${g}`,f)});this.Pc(a,d,e,c);(b=b.Re(a))&&this.Ea(olympe.dc.nc.Wh,a,b);e.forEach(f=>{f instanceof olympe.dc.Bc&&this.aa(f.X())})}}Zc(){return function*(a){for(const b of a.values())if(b.G()||b.Md()||b.T())yield b}(this.Ab)}Rc(a){let b;return null!=(b=this.Ab.get(olympe.dc.ga(a)))?b:null}G(a,
566
+ b=olympe.dc.Zb.NONE){a=this.jk(a,b);for(const c of a)this.Z(c,!1),this.Ab.delete(c)}xd(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.xd((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.Ab.values())}Mg(a,b,c=(d,e)=>[d,e]){return this.ea(a,b,c)}*ea(a,b,c,d=[]){d.push(a);a=this.Rc(a);for(const [e,f]of a.bb(b))d.includes(e)||(yield*this.ea(e,b,c,d),yield c(e,f))}P(a,b,c){const d=this.Ab.get(b),e=this.Ab.get(c);d&&d.K(a,olympe.dc.ua.DESTINATION,c);e&&e.K(a,olympe.dc.ua.ORIGIN,
567
+ b)}Z(a,b){const c=olympe.dc.ua.ORIGIN,d=olympe.dc.ua.DESTINATION,e=this.Ab.get(a);for(const [g,h,k]of e.xd())if(k||!b){e.K(g,d,h);var f=this.Ab.get(h);f&&f.K(g,c,a)}for(const [g,h,k]of e.pb())if(k||!b)e.K(g,c,h),(f=this.Ab.get(h))&&f.K(g,d,a)}jk(a,b,c=!0){const d=olympe.dm.Relation.C.Tl,e=olympe.dm.Relation.C.em,f=olympe.dc.ua.ORIGIN,g=olympe.dc.ia();a=new Set([a]);const h=new Set;for(const l of a){var k=this.Ab.get(l);if(void 0!==k){for(const [n,p,q]of k.xd())q&&gg(g,n,b)&e?a.add(p):c||q||h.add(`${l}.${n}.${p}`);
568
+ for(const [n,p,q]of k.pb())q&&gg(g,n,b)&d?a.add(p):c||q||h.add(`${p}.${n}.${l}`)}for(const [n,p,q]of hg(g,l))k=p===f?d:e,!h.has(p===f?`${q}.${n}.${l}`:`${l}.${n}.${q}`)&&gg(g,n,b)&k&&a.add(q)}return Array.from(a).filter(l=>this.Ab.has(l))}C(a,b){let c=this.Ab.get(a);void 0===c&&(c=new olympe.dc.db.eh(a),this.Ab.set(a,c));return b?c.Ja(b):c}T(a){const b=olympe.dc.ua.DESTINATION;var c=this.Ab;const d=a.Ab,e=(a=a.K()>this.K())?d:c;c=a?c:d;for(const [f,g]of c){c=e.get(f);if(void 0===c)continue;const h=
569
+ a?g:c,k=a?c:g;if(k.Md())this.G(f,k.P());else if(!h.Md()){h.Cb().forEach((l,n)=>{void 0!==k.Ia(n)&&h.ea(n)});for(const [l,n,p]of h.xd())c=k.ub(l,b,n),void 0!==c&&p!==c&&this.P(l,f,n)}}}};olympe.dc.db.Vc.xa=[olympe.dc.Writable,olympe.dc.cu];const Ff=olympe.dc.db.Database.F,wg=olympe.dc.db.Database.C.oi,xg=olympe.dc.db.Database.C.Us,yg=olympe.dc.db.Database.C.He,zg=olympe.dc.db.Database.C.Dk,Ag=olympe.dc.db.Database.C.Mn,W=olympe.dc.ua.ORIGIN,X=olympe.dc.ua.DESTINATION,Bg=olympe.dc.nc.Wc,Cg=olympe.dc.nc.Wh;function ff(a,b,c=!1){const d=a.get(yg+b);return c||void 0!==d?d:a.get(xg+b)}
570
570
  function qf(a,b){const c=a.model();if(null!==c){if(c===b)return;a.unlink(Bg,c)}a.link(Bg,b);b.forEach((d,e)=>{if(e[0]===yg||e[0]===xg)e=e.substring(1),Dg(a,e,d)});null===a.G||!b.e&&b!==a||a.db.Z(a,!0)}function rf(a,b){const c=a.Re();if(null!==c){if(c===b)return;a.unlink(Cg,c)}a.link(Cg,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===yg||f[0]===xg)f=f.substring(1),a.has(yg+f)||(a.set(xg+f,e),d.set(f,e))});Eg(a,d)}
571
571
  function sf(a,b){a.unlink(Bg,b);a.forEach((c,d)=>{c=d.substring(1);Dg(a,c,null)});a.db.Z(a,!1)}function tf(a,b){a.unlink(Cg,b);const c=new Map;a.forEach((d,e)=>{e[0]===xg&&(a.delete(e),d=e.substring(1),c.set(d,null))});Eg(a,c)}function uf(a){a.c++;1===a.c&&a.db.C(Ff.Kq,a.C)}
572
572
  function vf(a){0<a.c?--a.c:a.db.C(Ff.Xp,a.C,`Try to decrease references on instance ${a.C} but the reference counter is already 0.\n`+'It happens when you try to remove a callback from an instance multiple times.\nThis counter reference is used for garbage collection of instances in the database.');0===a.c&&a.db.C(Ff.fm,a.C)}
573
573
  function Cf(a,b,c){const d=yg+b;var e=a.get(d);e=void 0===e?null:e;if(!Fg(e,c))if(Gg(a,b,e,c,!0),e=xg+b,null===c){a.delete(d);let f;c=null==(f=a.Re())?void 0:ff(f,b);c=void 0===c?null:c;null!==c&&a.set(e,c);Eg(a,(new Map).set(b,c))}else void 0!==a.get(e)&&a.delete(e),a.set(d,c),Eg(a,(new Map).set(b,c))}function Uf(a,b,c,d){const e=Hg(a,Ag+b);return e.has(c)?!1:(e.set(c,d),uf(a),a.db.C(Ff.Nn,a.C,b,c),!0)}function Sf(a,b,c){const d=Ig(a,Ag+b,c);void 0!==d&&(vf(a),a.db.C(Ff.On,a.C,b,c));return d}
574
574
  function $f(a,b,c,d){const e=(...f)=>{var g=f.length;const h=f[g-2];(g=a.db.get(f[g-1]))&&(h?uf(g):vf(g));d(...f)};return Uf(a,b,c,e)?e:null}function Fg(a,b){return a instanceof Date?b instanceof Date&&a.getTime()===b.getTime():null!==a&&'function'===typeof a.Qa?a.Qa(b):a===b}
575
- function Gg(a,b,c,d,e){c instanceof olympe.dc.Bc&&(Jg(a.db.get(c.X())),a.db.za(c.X()));d instanceof olympe.dc.Bc&&(c=a.db.F(d.X(),!0),c.F&&c.F.tag!==a.C&&a.db.ab().fatal('Instance',d.X(),'referenced multiple times!\nThis instance is currently property of',c.F.tag,'(for the property '+c.F.La+')','and is assigned as a property of',a.C,'(for the property '+b+')'),d=c,a=a.C,void 0===d.F&&(uf(d),d.db.Lb(d.C,a,b)),d.F={tag:a,La:b,$w:e})}function Kg(a,b,c,d){a.e&&a.db.Qe(a.C,b,c,d)}
575
+ function Gg(a,b,c,d,e){c instanceof olympe.dc.Bc&&(Jg(a.db.get(c.X())),a.db.za(c.X()));d instanceof olympe.dc.Bc&&(c=a.db.F(d.X(),!0),c.F&&c.F.tag!==a.C&&a.db.ab().fatal('Instance',d.X(),'referenced multiple times!\nThis instance is currently property of',c.F.tag,'(for the property '+c.F.La+')','and is assigned as a property of',a.C,'(for the property '+b+')'),d=c,a=a.C,void 0===d.F&&(uf(d),d.db.Mb(d.C,a,b)),d.F={tag:a,La:b,$w:e})}function Kg(a,b,c,d){a.e&&a.db.Qe(a.C,b,c,d)}
576
576
  function Eg(a,b,c=[]){const d=a.get(W+Bg);void 0!==d&&d.forEach(e=>{b.forEach((f,g)=>Dg(e,g,f))});a=a.get(W+Cg);void 0!==a&&a.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(yg+k)||(g.set(k,h),null!==h?e.set(xg+k,h):e.delete(xg+k))});Eg(e,g,[...c,f])}})}function Hg(a,b){let c=a.get(b);void 0===c&&(c=new Map,a.set(b,c));return c}function Lg(a,b,c,d,e){a.db.tf(a.C,b,c,d.C,e)}
577
577
  function Ig(a,b,c){const d=a.get(b);if(void 0!==d){const e=d.get(c);d.delete(c);0===d.size&&a.delete(b);return e}}function Dg(a,b,c){if(!a.has(wg+b)){const d=zg+b,e=a.get(d);Fg(c,void 0!==e?e:null)||(null===c?a.delete(d):a.set(d,c),Kg(a,b,c,null!==c))}}function Df(a){a.forEach((b,c)=>{const d=c[0];if(d===W||d===X){const e=c.substring(1),f=d===W?X:W;b.forEach(g=>{g.e&&(Lg(a,e,d,g,!0),Lg(g,e,f,a,!0))})}else if(d===wg||d===zg)c=c.substring(1),Kg(a,c,b,d===zg)})}
578
- function Ef(a){a.forEach((b,c)=>{const d=c[0];if(d!==Ag){var e=c.substring(1);d===W?b.forEach(f=>{f.unlink(e,a)}):d===X?b.forEach(f=>{a.unlink(e,f)}):d===wg?a.update(e,null):d===yg&&Cf(a,e,null);a.delete(c)}});if(void 0!==a.F){const b=a.db.get(a.F.tag),c=a.F.$w;let d,e;(null==(d=b.get(`${c?yg:wg}${a.F.La}`))?void 0:null==(e=d.X)?void 0:e.call(d))===a.C&&(c?Cf(b,a.F.La,null):b.update(a.F.La,null))}}function Jg(a){void 0!==a.F&&(vf(a),a.db.Lb(a.C,a.F.tag,a.F.La),a.F=void 0)}
579
- olympe.dc.db.Instance=class extends Map{constructor(a,b){super();this.C=a;this.G=null;this.e=!1;this.F=void 0;this.c=0;this.P=!1;this.db=b}tag(){return this.C}Ga(){return this.e}L(){return this.db.L(this.C)}source(){return this.G}model(){const a=this.get(X+Bg);let b;return null!=(b=a&&Array.from(a.values())[0])?b:null}Re(){const a=this.get(X+Cg);let b;return null!=(b=a&&Array.from(a.values())[0])?b:null}toString(){var a=this.Ia(olympe.dc.CloudObject.nameProp.X());a=`Instance: ${this.C}, Exist: ${this.e}, Name: ${a}`;
578
+ function Ef(a){a.forEach((b,c)=>{const d=c[0];if(d!==Ag){var e=c.substring(1);d===W?b.forEach(f=>{f.unlink(e,a)}):d===X?b.forEach(f=>{a.unlink(e,f)}):d===wg?a.update(e,null):d===yg&&Cf(a,e,null);a.delete(c)}});if(void 0!==a.F){const b=a.db.get(a.F.tag),c=a.F.$w;let d,e;(null==(d=b.get(`${c?yg:wg}${a.F.La}`))?void 0:null==(e=d.X)?void 0:e.call(d))===a.C&&(c?Cf(b,a.F.La,null):b.update(a.F.La,null))}}function Jg(a){void 0!==a.F&&(vf(a),a.db.Mb(a.C,a.F.tag,a.F.La),a.F=void 0)}
579
+ olympe.dc.db.Instance=class extends Map{constructor(a,b){super();this.C=a;this.G=null;this.e=!1;this.F=void 0;this.c=0;this.P=!1;this.db=b}tag(){return this.C}Ga(){return this.e}K(){return this.db.K(this.C)}source(){return this.G}model(){const a=this.get(X+Bg);let b;return null!=(b=a&&Array.from(a.values())[0])?b:null}Re(){const a=this.get(X+Cg);let b;return null!=(b=a&&Array.from(a.values())[0])?b:null}toString(){var a=this.Ia(olympe.dc.CloudObject.nameProp.X());a=`Instance: ${this.C}, Exist: ${this.e}, Name: ${a}`;
580
580
  var b=this.model();if(b){var c=b.Ia(olympe.dc.CloudObject.nameProp.X())||'No model name';a+=`\nModel: ${b.C}, Exist: ${b.e}, Model name: ${c}`}else a+='\nModel: no model';(b=this.Re())?(c=b.Ia(olympe.dc.CloudObject.nameProp.X())||'No extension name',a+=`\nExtension: ${b.C}, Exist: ${b.e}, Extension name: ${c}`):a+='\nExtension: no extension';return a}Ia(a,b=!1){const c=this.get(wg+a);return b||void 0!==c?c:this.get(zg+a)}update(a,b){const c=wg+a;var d=this.get(c);d=void 0===d?null:d;if(!Fg(d,b))if(Gg(this,
581
581
  a,d,b,!1),d=zg+a,null===b){this.delete(c);let e;b=null==(e=this.model())?void 0:ff(e,a);void 0!==b?(this.set(d,b),Kg(this,a,b,!0)):Kg(this,a,null,!1)}else this.set(c,b),this.delete(d),Kg(this,a,b,!1)}link(a,b){var c=W+a;const d=Hg(this,X+a);c=Hg(b,c);d.has(b.C)||(d.set(b.C,b),c.set(this.C,this),this.db.C(Ff.Jj,this.C,a,X,b.C),this.db.C(Ff.Jj,b.C,a,W,this.C),this.e&&b.e&&(Lg(this,a,X,b,!0),Lg(b,a,W,this,!0)))}unlink(a,b){const c=W+a;void 0!==Ig(this,X+a,b.C)&&(Ig(b,c,this.C),this.db.C(Ff.Rl,this.C,
582
582
  a,X,b.C),this.db.C(Ff.Rl,b.C,a,W,this.C),this.e&&b.e&&(Lg(this,a,X,b,!1),Lg(b,a,W,this,!1)))}persist(){this.P=!0;return this}clear(){this.forEach((a,b)=>{const c=b[0];if(c===W||c===X){const d=b.substring(1),e=c===W?X:W;a.forEach(f=>{const g=f.get(e+d);g.delete(this.C);0===g.size&&f.delete(e+d)})}c===wg&&a instanceof olympe.dc.Bc&&Jg(this.db.get(a.X()))});void 0!==this.F&&this.db.get(this.F.tag).delete(wg+this.F.La)}};olympe.dc.db.eh=class a{constructor(b){this.jc=b;this.Z=this.jb=null;this.ec=olympe.dc.Zb.NONE;this.F=a.C.Xj;this.C=this.nb=this.cc=this.aa=this.properties=null}tag(){return this.jc}Vb(){return this.Z}yb(){return this.jb}getState(){return this.F}Ja(b){if(null===this.Z)this.Z=b;else if(this.Z!==b)throw Error(`Try to set a model relation with another model ${b} than the one set initially ${this.Z}`);return this}P(){return this.F===a.C.yc?this.ec:olympe.dc.Zb.NONE}create(b){this.F=a.C.Al;this.jb=null!=
583
583
  b?b:null;return this}delete(b=olympe.dc.Zb.NONE){this.F=a.C.yc;this.ec=b;this.properties=null;return this}ka(b,c){if(this.F===a.C.yc)return this;this.properties||(this.properties=new Map);this.properties.set(b,c);return this}om(b){this.F!==a.C.yc&&(this.properties||(this.properties=new Map),b.forEach((c,d)=>{this.properties.set(d,c)}))}ud(b,c){if(null!==this.aa&&this.aa!==b)throw Error('An instance should never be set as complex property of multiple instances');this.aa=b;this.cc=c}ea(b){let c;null==
584
- (c=this.properties)||c.delete(b);0===this.properties.size&&(this.properties=null)}link(b,c){null===this.nb&&(this.nb=new Map);b===olympe.dc.nc.Wc&&this.Ja(c);this.ra(this.nb,b,c,!0);return this}unlink(b,c){null===this.nb&&(this.nb=new Map);b===olympe.dc.nc.Wc&&this.Ja(c);this.ra(this.nb,b,c,!1);return this}Lb(b,c){null===this.C&&(this.C=new Map);this.ra(this.C,b,c,!0)}Tb(b,c){null===this.C&&(this.C=new Map);this.ra(this.C,b,c,!1)}ub(b,c,d){if(c=c===olympe.dc.ua.ORIGIN?this.C:this.nb)return(b=c.get(b))&&
585
- b.get(d)}L(b,c,d){const e=(c=c===olympe.dc.ua.ORIGIN?this.C:this.nb)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}G(){return this.F===a.C.Al}Ld(){return this.F===a.C.yc}Mc(){let b=this.properties?this.properties.size:0,c;null==(c=this.nb)||c.forEach(d=>{b+=d.size});return b}T(){return null!==this.properties}sd(){return null!==this.nb||null!==this.C}Cb(){let b;return null!=(b=this.properties)?b:new Map}Ia(b){if(this.properties)return this.properties.get(b)}bb(b,c=(d,e)=>[d,e]){return function*(d){if(d=
586
- d&&d.get(b.X()))for(const [e,f]of d)yield c(e,f)}(b.Ha()===olympe.dc.ua.ORIGIN?this.C:this.nb)}Nb(b){const c=b.Ha()===olympe.dc.ua.ORIGIN?this.C:this.nb;return(b=c&&c.get(b.X()))&&0!==b.size?Array.from(b.keys())[0]:null}xd(b=(c,d,e)=>[c,d,e]){return this.za(this.nb,b)}pb(b=(c,d,e)=>[c,d,e]){return this.za(this.C,b)}oa(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.ua.ORIGIN,d=olympe.dc.ua.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,l)=>b(h,d,k,l));yield*e(g,(h,k,l)=>b(h,c,k,l))}(this.za.bind(this),
584
+ (c=this.properties)||c.delete(b);0===this.properties.size&&(this.properties=null)}link(b,c){null===this.nb&&(this.nb=new Map);b===olympe.dc.nc.Wc&&this.Ja(c);this.ra(this.nb,b,c,!0);return this}unlink(b,c){null===this.nb&&(this.nb=new Map);b===olympe.dc.nc.Wc&&this.Ja(c);this.ra(this.nb,b,c,!1);return this}Mb(b,c){null===this.C&&(this.C=new Map);this.ra(this.C,b,c,!0)}Tb(b,c){null===this.C&&(this.C=new Map);this.ra(this.C,b,c,!1)}ub(b,c,d){if(c=c===olympe.dc.ua.ORIGIN?this.C:this.nb)return(b=c.get(b))&&
585
+ b.get(d)}K(b,c,d){const e=(c=c===olympe.dc.ua.ORIGIN?this.C:this.nb)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}G(){return this.F===a.C.Al}Md(){return this.F===a.C.yc}Mc(){let b=this.properties?this.properties.size:0,c;null==(c=this.nb)||c.forEach(d=>{b+=d.size});return b}T(){return null!==this.properties}sd(){return null!==this.nb||null!==this.C}Cb(){let b;return null!=(b=this.properties)?b:new Map}Ia(b){if(this.properties)return this.properties.get(b)}bb(b,c=(d,e)=>[d,e]){return function*(d){if(d=
586
+ d&&d.get(b.X()))for(const [e,f]of d)yield c(e,f)}(b.Ha()===olympe.dc.ua.ORIGIN?this.C:this.nb)}Jb(b){const c=b.Ha()===olympe.dc.ua.ORIGIN?this.C:this.nb;return(b=c&&c.get(b.X()))&&0!==b.size?Array.from(b.keys())[0]:null}xd(b=(c,d,e)=>[c,d,e]){return this.za(this.nb,b)}pb(b=(c,d,e)=>[c,d,e]){return this.za(this.C,b)}oa(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.ua.ORIGIN,d=olympe.dc.ua.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,l)=>b(h,d,k,l));yield*e(g,(h,k,l)=>b(h,c,k,l))}(this.za.bind(this),
587
587
  this.nb,this.C)}ra(b,c,d,e){if(this.F!==a.C.yc||!e){var f=b.get(c);if(void 0===f)f=new Map,b.set(c,f);else if(b=f.get(d),void 0!==b&&b!==e){f.delete(d);return}f.set(d,e)}}*za(b,c){if(null!==b)for(const [d,e]of b){b=e.entries();for(const [f,g]of b)yield c(d,f,g)}}};olympe.dc.db.eh.C={Al:0,Xj:1,yc:2};olympe.dc.db.Nt=class{constructor(a,b,c,d){this.H=a;this.view=b;this.C=c;d&&this.init()}debug(a){const b=olympe.dc.ga(a);if(this.C.has(b)){var c=this.C.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Ga()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.C.get(d[d.length-1]);const e=olympe.dc.db.Database.C.oi+olympe.dc.CloudObject.nameProp.X();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
588
588
  d.join(' --M--\x3e ')}this.H.info(a)}else this.H.info('[DATABASE] Instance',b,'has never been created or referred by the database')}init(){const a=olympe.dc.db.Database.F.qo,b=olympe.dc.db.Database.F.dl,c=olympe.dc.db.Database.F.yc,d=olympe.dc.db.Database.F.Jj,e=olympe.dc.db.Database.F.Rl,f=olympe.dc.db.Database.F.Nn,g=olympe.dc.db.Database.F.On,h=()=>{};this.C.addEventListener(olympe.dc.db.Database.F.po,()=>{});this.C.addEventListener(a,()=>{});this.C.addEventListener(b,k=>{this.C.pb(()=>{ag(this.view,
589
- k,h,`monitorRelations${k}`)})});this.C.addEventListener(c,k=>{this.C.pb(()=>{bg(this.view,k,`monitorRelations${k}`)})});this.C.addEventListener(d,()=>{});this.C.addEventListener(e,()=>{});this.C.addEventListener(f,()=>{});this.C.addEventListener(g,()=>{})}};olympe.dc.db.Tq=class{constructor(a,b,c,d,e){this.H=a;this.C=b;this.ia=c;this.G=d;this.L=e}write(a){if(this.G){const b=new Mg(this.ia);a.td(b);this.H.info(b.flush())}this.C.ye();a.td(this);this.C.ud()}Pc(a,b,c){this.C.create(a,b,c,this.L)}Sc(a,b){this.C.update(a,b)}F(a,b=olympe.dc.Zb.NONE){for(const c of ef(this.ia,a,b))this.C.za(c)}Ea(a,b,c){this.C.link(a,b,c)}kc(a,b,c){this.C.unlink(a,b,c)}};
589
+ k,h,`monitorRelations${k}`)})});this.C.addEventListener(c,k=>{this.C.pb(()=>{bg(this.view,k,`monitorRelations${k}`)})});this.C.addEventListener(d,()=>{});this.C.addEventListener(e,()=>{});this.C.addEventListener(f,()=>{});this.C.addEventListener(g,()=>{})}};olympe.dc.db.Tq=class{constructor(a,b,c,d,e){this.H=a;this.C=b;this.ia=c;this.G=d;this.K=e}write(a){if(this.G){const b=new Mg(this.ia);a.td(b);this.H.info(b.flush())}this.C.ye();a.td(this);this.C.ud()}Pc(a,b,c){this.C.create(a,b,c,this.K)}Sc(a,b){this.C.update(a,b)}F(a,b=olympe.dc.Zb.NONE){for(const c of ef(this.ia,a,b))this.C.za(c)}Ea(a,b,c){this.C.link(a,b,c)}kc(a,b,c){this.C.unlink(a,b,c)}};
590
590
  function Ng(a,b,c){if(!b)return'';let d='';if(c&&1<c)return'...';for(const [e,f]of b)if(d+=(d?', "':'"')+e+'":',!f)d+=JSON.stringify(f);else if(f instanceof olympe.dc.Bc||f instanceof olympe.dc.CloudObject)d+='Reference("'+f.X()+'")';else if(f instanceof olympe.D.Color)d+='Color("'+f.Ng()+','+f.Kg()+','+f.Gg()+','+f.Fg()+'")';else if(f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString'))d+=JSON.stringify(f.toString());else if('object'===typeof f){let g;d+=Ng(a,f,
591
591
  (null!=(g=c)?g:0)+1)}return'{'+(d?d:'')+'}'}function Og(a,b){let c;return'string'===typeof b?null!=(c=a.db.name(b))?c:b:''}function Pg(a,b){let c;return b===olympe.dc.nc.Wc?'Model':null!=(c=a.db.name(b))?c:b}
592
592
  class Mg{constructor(a){this.db=a;this.output='Applying patch on the local database'}flush(){const a=this.output;this.output='';return a}log(a,b){this.output+=`\ndb.${a};${b?`// ${b}`:''}`}Pc(a,b,c,d){this.log(`createInstance(tag: ${a}, source: ${b}, ${Ng(this,c)})`,Og(this,d))}Sc(a,b,c){this.log(`updateInstance(tag: ${a}, ${Ng(this,b)})`,Og(this,c))}F(a,b,c){this.log(`deleteInstance("${a}", rule: ${b})`,Og(this,c))}Ea(a,b,c){this.log(`createRelation("${a}", "${b}", "${c}")`,Pg(this,a))}kc(a,b,c){this.log(`deleteRelation("${a}", "${b}", "${c}")`,
@@ -594,67 +594,67 @@ Pg(this,a))}}olympe.dc.db.Tq.xa=[olympe.dc.Writable,olympe.dc.Writable];olympe.d
594
594
  olympe.W.config(function(a){F(a,olympe.dc.db.U.Eo,olympe.dc.db.ef.C.jn);F(a,olympe.dc.db.U.Fo,5E3);F(a,olympe.dc.db.U.ii,!1);F(a,olympe.dc.db.U.ho,!1);E(a,olympe.dc.db.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('db'));E(a,olympe.dc.db.R.hl,[olympe.ma.R.Fa],b=>b.Qc('gc'));E(a,olympe.dc.db.R.gj,[olympe.dc.db.R.Ca,olympe.dc.db.R.hl,new olympe.W.ja(olympe.dc.U.wg),new olympe.W.ja(olympe.dc.db.U.Eo),new olympe.W.ja(olympe.dc.db.U.Fo),new olympe.W.ja(olympe.dc.U.rh),new olympe.W.ja(olympe.dc.db.U.ho)],(b,c,d,e,f,g,
595
595
  h)=>{e=g?olympe.dc.db.ef.C.al:e;d=(new Map).set('selfTag',d).set('garbageCollector',e).set('garbageCollectorDelay',f).set('debug',h);return new olympe.dc.db.Database(b,c,d)});D(a,olympe.dc.db.R.Xk,olympe.dc.ib,olympe.dc.db.R.Ca,olympe.dc.db.R.gj);E(a,olympe.dc.db.R.ii,[olympe.dc.db.R.Fa],b=>b.nx);D(a,olympe.dc.db.R.Fa,olympe.dc.db.xs,olympe.dc.db.R.Ca,olympe.dc.db.R.gj,olympe.dc.db.R.Xk,new olympe.W.ja(olympe.dc.U.Hf),new olympe.W.ja(olympe.dc.db.U.ii))},'olympe.dc.db');
596
596
  olympe.W.run([olympe.dc.db.R.gj,olympe.dc.db.R.ii],(a,b)=>{olympe.ie().db=a;olympe.ie().dbMonitor=b},'DC.DB debug service injection');olympe.dc.query={};function Qg(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
597
- olympe.dc.query.af=class{constructor(a,b,c){this.db=olympe.dc.ia();this.C=a;this.La=b;this.gi=c}ha(){return{p:this.La.X(),o:this.gi}}toString(){return'sortByQueryPart-'+this.gi+this.La.X()}Ig(){const a=this.db.Nb(this.La,olympe.dm.Property.typeRel),b=olympe.dc.ga;if(this.db.zf(a,olympe.dm.String))return Qg((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return Qg((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return Qg((c,d)=>c.getTime()-d.getTime());if(a===b(olympe.dm.Color))return Qg((c,
597
+ olympe.dc.query.af=class{constructor(a,b,c){this.db=olympe.dc.ia();this.C=a;this.La=b;this.gi=c}ha(){return{p:this.La.X(),o:this.gi}}toString(){return'sortByQueryPart-'+this.gi+this.La.X()}Ig(){const a=this.db.Jb(this.La,olympe.dm.Property.typeRel),b=olympe.dc.ga;if(this.db.zf(a,olympe.dm.String))return Qg((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return Qg((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return Qg((c,d)=>c.getTime()-d.getTime());if(a===b(olympe.dm.Color))return Qg((c,
598
598
  d)=>c.compare(d));olympe.ma.ab('dc.query').warn(`No comparator found for type with tag ${a}`);return Qg(()=>-1)}Ia(){return this.La}};function Rg(a,b){return new olympe.dc.query.od((new olympe.dc.transaction.Cj(b)).C(a),b)}olympe.dc.query.od=class{constructor(a,b){this.C=a;this.source=b}static Ii(a){return new olympe.dc.query.od(new olympe.dc.db.Vc(`DataResult_${a.V()}`),a.yb())}create(a,b,c){this.C.Pc(a,this.source,c,b);return this}Ea(a,b,c){this.C.Ea(a,b,c,null,null);return this}Wb(){return this.C}ha(){const a=new olympe.dc.transaction.qg;this.C.td(a);return{s:this.source,p:Sg(a)}}};
599
- olympe.dc.query.od.prototype.createRelation=olympe.dc.query.od.prototype.Ea;olympe.dc.query.od.prototype.create=olympe.dc.query.od.prototype.create;olympe.dc.query.od.fromQuery=olympe.dc.query.od.Ii;olympe.dc.Ie=class{X(){}};olympe.dc.Ie.prototype.getTag=olympe.dc.Ie.prototype.X;olympe.dc.Hz=olympe.dc.Ie;function Tg(a){let b;if(null==(b=a.C)?0:b.Hh())if(a=a.L,!a.P){let c;null==(c=a.T)||c.call(a)}}function Ug(a,b,c,d,e){Tg(a);let f,g;b?null==(f=a.C)||f.Ea(c,d,e):null==(g=a.C)||g.kc(c,d,e)}
600
- olympe.dc.query.Rt=class{constructor(a,b,c,d){this.H=a;this.source=b;this.F=c;this.L=d;this.C=this.G=null;this.db=olympe.dc.ia()}watch(a,b){if(this.db.source(a)===this.source){var c=`${this.F}:${a}:notif`;Ge(this.db,a,(d,e)=>{if(d){Tg(this);let f;null==(f=this.C)||f.aa(e)}else if(b&&Yf(this.db,e,c),!this.db.Ga(e)){Tg(this);let f;null==(f=this.C)||f.F(e,olympe.dc.Zb.NONE)}},c);b&&Xf(this.db,a,(d,e,f)=>{Tg(this);let g;f||null!=(g=this.C)&&g.Sc(a,new Map([[d,e]]))},c)}}stop(a){Fe(this.db,a,`${this.F}:${a}:notif`)}};olympe.dc.query.Dj={ASC:'ASC',DESC:'DESC'};function Vg(a){const b=Wg(a.query),c=new Map;for(let e=b.length;0<=e;e--){const f=0<e?b[e-1].V():a.G,g=0<e?b[e-1].C:'root',h=0<e&&b[e-1].T(),k=a.C.get(f),l=new Set(k.Zc()),n=new Map,p=a.L.has(f);let q=p?';':'';if(c.has(f)){const [r,t,u]=c.get(f);c.delete(f);q+=u;r.forEach((w,y)=>{for(const z of k.F(y)){let A;n.set(z,Array.from(w).map(C=>p?`${y};${C}`:C).reduce((C,M)=>C.add(M),null!=(A=n.get(z))?A:new Set))}l.delete(y)});t&&l.forEach(w=>{const y=p?`${w};${u}`:u;for(const z of k.F(w)){let A;n.set(z,
599
+ olympe.dc.query.od.prototype.createRelation=olympe.dc.query.od.prototype.Ea;olympe.dc.query.od.prototype.create=olympe.dc.query.od.prototype.create;olympe.dc.query.od.fromQuery=olympe.dc.query.od.Ii;olympe.dc.Ie=class{X(){}};olympe.dc.Ie.prototype.getTag=olympe.dc.Ie.prototype.X;olympe.dc.Hz=olympe.dc.Ie;function Tg(a){let b;if(null==(b=a.C)?0:b.Hh())if(a=a.K,!a.P){let c;null==(c=a.T)||c.call(a)}}function Ug(a,b,c,d,e){Tg(a);let f,g;b?null==(f=a.C)||f.Ea(c,d,e):null==(g=a.C)||g.kc(c,d,e)}
600
+ olympe.dc.query.Rt=class{constructor(a,b,c,d){this.H=a;this.source=b;this.F=c;this.K=d;this.C=this.G=null;this.db=olympe.dc.ia()}watch(a,b){if(this.db.source(a)===this.source){var c=`${this.F}:${a}:notif`;Ge(this.db,a,(d,e)=>{if(d){Tg(this);let f;null==(f=this.C)||f.aa(e)}else if(b&&Yf(this.db,e,c),!this.db.Ga(e)){Tg(this);let f;null==(f=this.C)||f.F(e,olympe.dc.Zb.NONE)}},c);b&&Xf(this.db,a,(d,e,f)=>{Tg(this);let g;f||null!=(g=this.C)&&g.Sc(a,new Map([[d,e]]))},c)}}stop(a){Fe(this.db,a,`${this.F}:${a}:notif`)}};olympe.dc.query.Dj={ASC:'ASC',DESC:'DESC'};function Vg(a){const b=Wg(a.query),c=new Map;for(let e=b.length;0<=e;e--){const f=0<e?b[e-1].V():a.G,g=0<e?b[e-1].C:'root',h=0<e&&b[e-1].T(),k=a.C.get(f),l=new Set(k.Zc()),n=new Map,p=a.K.has(f);let q=p?';':'';if(c.has(f)){const [r,t,u]=c.get(f);c.delete(f);q+=u;r.forEach((w,y)=>{for(const z of k.F(y)){let A;n.set(z,Array.from(w).map(C=>p?`${y};${C}`:C).reduce((C,M)=>C.add(M),null!=(A=n.get(z))?A:new Set))}l.delete(y)});t&&l.forEach(w=>{const y=p?`${w};${u}`:u;for(const z of k.F(w)){let A;n.set(z,
601
601
  (null!=(A=n.get(z))?A:new Set).add(y))}})}else l.forEach(r=>{const t=p?`${r};`:'';for(const u of k.F(r))n.has(u)?n.get(u).add(t):n.set(u,(new Set).add(t))});if(0<e&&c.has(g)){const [r,t,u]=c.get(g),w=new Map;n.forEach((y,z)=>{let A;null==(A=r.get(z))||A.forEach(C=>{let M;const K=null!=(M=w.get(z))?M:new Set;y.forEach(ta=>K.add(ta+C));w.set(z,K)});n.delete(z);r.delete(z)});t&&n.forEach((y,z)=>{w.set(z,new Set(Array.from(y).map(A=>A+u)))});b[e-1].T()&&r.forEach((y,z)=>{w.set(z,new Set(Array.from(y).map(A=>
602
602
  q+A)))});c.set(g,[w,t&&h,q+u])}else c.set(g,[n,h,q])}let d;a=null==(d=c.get('root'))?void 0:d[0].get('root');return Array.from(null!=a?a:[]).map(e=>e.slice(0,-1).split(';'))}function Xg(a){if(null===a.F){const b={Gb:a.query.Ig(),Dd:a.Dd,max:a.query.C.max,offset:a.query.C.offset};a.F=olympe.dc.Oa.from(a.Z,Vg(a),b)}return a.F}function Yg(a,b){a.T=b}function Zg(a){if(!a.P){null!==a.F&&(a.Z=a.F);a.F=null;a.P=!0;let b;null==(b=a.T)||b.call(a)}}
603
- function $g(a,b){let c;return null!=(c=a.C.get(b).Zc())?c:[]}function ah(a,b,c){let d,e;return null!=(e=null==(d=a.C.get(c))?void 0:d.has(b))?e:!1}function bh(a,b,c=a.G,d='root'){const e=a.C.get(c);if(!e)return a.H.error('Try to insert result entry to a higher level than possible'),null;const f=!e.has(b);e.G(b,d)&&Zg(a);let g;f&&(null==(g=a.Be)||g.watch(b,a.L.has(c)));return f}function ch(a,b,c,d,e,f){null!==a.Be&&(d===olympe.dc.ua.ORIGIN?Ug(a.Be,b,c,f,e):Ug(a.Be,b,c,e,f))}
604
- function dh(a){a.H.C()&&a.H.debug(`Start sending notifications for query ${a.query.V()}`);const b=new olympe.dc.query.Rt(a.H,a.query.yb(),a.query.V(),a);a.C.forEach((c,d)=>{for(const e of c.Zc())b.watch(e,a.L.has(d))});null!=b.C||(b.C=new olympe.dc.db.Vc);a.Be=b}function eh(a){null!==a.Be&&(a.H.C()&&a.H.debug(`Stop sending notifications for query ${a.query.V()}`),a.C.forEach(b=>{for(const c of b.Zc())a.Be.stop(c)}),a.Be=null)}
605
- function fh(a){a.P=!1;if(null!=(a=a.Be)){let b;const c=!(null==(b=a.C)?0:b.Hh());a.G=c?a.C:null;c&&(a.C=new olympe.dc.db.Vc,a.H.C()&&a.H.debug(`Commit notification with ${a.G.L()} operations for query ${a.F}`))}}
606
- olympe.dc.query.Qp=class{constructor(a,b){this.H=a;this.query=b;this.G=olympe.Y.wb(b.F);this.va=new Map;this.C=(new Map).set(this.G,new olympe.dc.query.va.Wl);this.L=new Set(b.L);this.Dd=-1;this.P=!1;this.T=null;this.Z=olympe.dc.Oa.empty();this.Be=this.F=null;a=Wg(b);a.forEach(c=>{const d=c.V();this.va.set(d,c.P());this.C.set(d,c.za())});b=b.Ig();if(null!==b){b=b.C;let c=-1;for(const d of[this.G].concat(a.map(e=>e.V())))if(c+=this.L.has(d)?1:0,b===d){this.Dd=c;break}}}remove(a,b=this.G,c='root'){b=
607
- this.C.get(b);if(null==b||!b.has(a))return!0;b.remove(a,c)&&Zg(this);if(!b.has(a)){let d;null==(d=this.Be)||d.stop(a);return!0}return!1}Gc(a){const b=a.F,c=olympe.Y.wb(b);a=Wg(a);const d=[];for(const [f,g]of this.C){if(g.P(b))return!0;g.has(b)&&d.push(f)}const e=(new Map).set(c,d);return 0<d.length&&a.every(f=>{let g;const h=(null!=(g=e.get(f.C))?g:[]).flatMap(k=>f.aa(k,this.va.get(k))).filter(k=>{let l,n;return null!=(n=null==(l=this.va.get(k))?void 0:l.Gc(f))?n:!1});e.set(f.V(),h);return 0<h.length})}};function gh(a){if(!olympe.dc.ia().Qb(a,olympe.dm.Property))throw new olympe.dc.query.Id(`The specified property while trying to build a query predicate is invalid: ${a}`);}
603
+ function $g(a,b){let c;return null!=(c=a.C.get(b).Zc())?c:[]}function ah(a,b,c){let d,e;return null!=(e=null==(d=a.C.get(c))?void 0:d.has(b))?e:!1}function bh(a,b,c=a.G,d='root'){const e=a.C.get(c);if(!e)return a.H.error('Try to insert result entry to a higher level than possible'),null;const f=!e.has(b);e.G(b,d)&&Zg(a);let g;f&&(null==(g=a.Be)||g.watch(b,a.K.has(c)));return f}function ch(a,b,c,d,e,f){null!==a.Be&&(d===olympe.dc.ua.ORIGIN?Ug(a.Be,b,c,f,e):Ug(a.Be,b,c,e,f))}
604
+ function dh(a){a.H.C()&&a.H.debug(`Start sending notifications for query ${a.query.V()}`);const b=new olympe.dc.query.Rt(a.H,a.query.yb(),a.query.V(),a);a.C.forEach((c,d)=>{for(const e of c.Zc())b.watch(e,a.K.has(d))});null!=b.C||(b.C=new olympe.dc.db.Vc);a.Be=b}function eh(a){null!==a.Be&&(a.H.C()&&a.H.debug(`Stop sending notifications for query ${a.query.V()}`),a.C.forEach(b=>{for(const c of b.Zc())a.Be.stop(c)}),a.Be=null)}
605
+ function fh(a){a.P=!1;if(null!=(a=a.Be)){let b;const c=!(null==(b=a.C)?0:b.Hh());a.G=c?a.C:null;c&&(a.C=new olympe.dc.db.Vc,a.H.C()&&a.H.debug(`Commit notification with ${a.G.K()} operations for query ${a.F}`))}}
606
+ olympe.dc.query.Qp=class{constructor(a,b){this.H=a;this.query=b;this.G=olympe.Y.wb(b.F);this.va=new Map;this.C=(new Map).set(this.G,new olympe.dc.query.va.Wl);this.K=new Set(b.K);this.Dd=-1;this.P=!1;this.T=null;this.Z=olympe.dc.Oa.empty();this.Be=this.F=null;a=Wg(b);a.forEach(c=>{const d=c.V();this.va.set(d,c.P());this.C.set(d,c.za())});b=b.Ig();if(null!==b){b=b.C;let c=-1;for(const d of[this.G].concat(a.map(e=>e.V())))if(c+=this.K.has(d)?1:0,b===d){this.Dd=c;break}}}remove(a,b=this.G,c='root'){b=
607
+ this.C.get(b);if(null==b||!b.has(a))return!0;b.remove(a,c)&&Zg(this);if(!b.has(a)){let d;null==(d=this.Be)||d.stop(a);return!0}return!1}Gc(a){const b=a.F,c=olympe.Y.wb(b);a=Wg(a);const d=[];for(const [f,g]of this.C){if(g.P(b))return!0;g.has(b)&&d.push(f)}const e=(new Map).set(c,d);return 0<d.length&&a.every(f=>{let g;const h=(null!=(g=e.get(f.C))?g:[]).flatMap(k=>f.aa(k,this.va.get(k))).filter(k=>{let l,n;return null!=(n=null==(l=this.va.get(k))?void 0:l.Gc(f))?n:!1});e.set(f.V(),h);return 0<h.length})}};function gh(a){if(!olympe.dc.ia().Qb(a,olympe.dm.Property))throw new olympe.dc.query.Jd(`The specified property while trying to build a query predicate is invalid: ${a}`);}
608
608
  function hh(a){var b=olympe.dc.query.Aa.C.Eq;const c=olympe.dc.query.Aa.C.ro,d=olympe.dc.query.Aa.C.ej,e=olympe.dc.query.Aa.C.Vo,f=olympe.dc.query.Aa.C.up,g=olympe.dc.query.Aa.C.Zp,h=olympe.dc.query.Aa.C.gn,k=olympe.dc.query.Aa.C.Fp;switch(a.pr){case b:return new olympe.dc.query.$.am(a.t);case c:b=a.v;switch(a.t){case 2:b=new Date(b);break;case 3:b=olympe.dc.CloudObject.get(b);break;case 4:b=olympe.D.Color.create(b.r,b.g,b.b,b.a)}return new olympe.dc.query.$.re(a.p,b,olympe.dc.ia());case d:return new olympe.dc.query.$.bf(a.p,
609
- a.s,olympe.dc.ia(),a.c);case e:return new olympe.dc.query.$.di(olympe.dc.ia(),a.p,a.b,a.l,a.s);case f:return new olympe.dc.query.$.$d(hh(a.v));case g:return new olympe.dc.query.$.lf(a.p,new RegExp(a.r),olympe.dc.ia(),a.c);case k:return new olympe.dc.query.$.te(...a.p.map(l=>hh(l)));case h:return new olympe.dc.query.$.Ed(...a.p.map(l=>hh(l)));default:return null}}
610
- olympe.dc.query.Aa=class{observe(){}mb(){}compile(){return[[this]]}md(){return new olympe.dc.query.$.$d(this)}Cb(){}Gc(){}clear(){}ha(){}Lc(){}toString(){}Qa(a){return this===a}static Uw(...a){return new olympe.dc.query.$.am(a)}static Qa(a,b){gh(a);return new olympe.dc.query.$.re(a,b,olympe.dc.ia())}static contains(a,b,c=!0){gh(a);return new olympe.dc.query.$.bf(a,b,olympe.dc.ia(),c)}static Mx(a,b,c=!0){gh(a);return new olympe.dc.query.$.lf(a,b,olympe.dc.ia(),c)}static nk(a,b,c=!0){gh(a);return new olympe.dc.query.$.di(olympe.dc.ia(),
611
- a,b,!1,c)}static Wi(a,b,c=!0){gh(a);return new olympe.dc.query.$.di(olympe.dc.ia(),a,b,!0,c)}static and(...a){if(!a.every(b=>b instanceof olympe.dc.query.Aa))throw new olympe.dc.query.Id(`Some specified predicates, while trying to build an AND query predicate are invalid: ${a}`);return new olympe.dc.query.$.Ed(...a)}static or(...a){if(!a.every(b=>b instanceof olympe.dc.query.Aa))throw new olympe.dc.query.Id(`Some specified predicates, while trying to build an OR query predicate are invalid: ${a}`);
612
- return new olympe.dc.query.$.te(...a)}static md(a){if(!(a instanceof olympe.dc.query.Aa))throw new olympe.dc.query.Id(`The specified predicate, while trying to build a NOT query predicate is invalid: ${a}`);return new olympe.dc.query.$.$d(a)}};olympe.dc.query.Aa.not=olympe.dc.query.Aa.md;olympe.dc.query.Aa.or=olympe.dc.query.Aa.or;olympe.dc.query.Aa.and=olympe.dc.query.Aa.and;olympe.dc.query.Aa.smallerThan=olympe.dc.query.Aa.Wi;olympe.dc.query.Aa.greaterThan=olympe.dc.query.Aa.nk;
609
+ a.s,olympe.dc.ia(),a.c);case e:return new olympe.dc.query.$.di(olympe.dc.ia(),a.p,a.b,a.l,a.s);case f:return new olympe.dc.query.$.ae(hh(a.v));case g:return new olympe.dc.query.$.lf(a.p,new RegExp(a.r),olympe.dc.ia(),a.c);case k:return new olympe.dc.query.$.te(...a.p.map(l=>hh(l)));case h:return new olympe.dc.query.$.Ed(...a.p.map(l=>hh(l)));default:return null}}
610
+ olympe.dc.query.Aa=class{observe(){}mb(){}compile(){return[[this]]}md(){return new olympe.dc.query.$.ae(this)}Cb(){}Gc(){}clear(){}ha(){}Lc(){}toString(){}Qa(a){return this===a}static Uw(...a){return new olympe.dc.query.$.am(a)}static Qa(a,b){gh(a);return new olympe.dc.query.$.re(a,b,olympe.dc.ia())}static contains(a,b,c=!0){gh(a);return new olympe.dc.query.$.bf(a,b,olympe.dc.ia(),c)}static Mx(a,b,c=!0){gh(a);return new olympe.dc.query.$.lf(a,b,olympe.dc.ia(),c)}static nk(a,b,c=!0){gh(a);return new olympe.dc.query.$.di(olympe.dc.ia(),
611
+ a,b,!1,c)}static Wi(a,b,c=!0){gh(a);return new olympe.dc.query.$.di(olympe.dc.ia(),a,b,!0,c)}static and(...a){if(!a.every(b=>b instanceof olympe.dc.query.Aa))throw new olympe.dc.query.Jd(`Some specified predicates, while trying to build an AND query predicate are invalid: ${a}`);return new olympe.dc.query.$.Ed(...a)}static or(...a){if(!a.every(b=>b instanceof olympe.dc.query.Aa))throw new olympe.dc.query.Jd(`Some specified predicates, while trying to build an OR query predicate are invalid: ${a}`);
612
+ return new olympe.dc.query.$.te(...a)}static md(a){if(!(a instanceof olympe.dc.query.Aa))throw new olympe.dc.query.Jd(`The specified predicate, while trying to build a NOT query predicate is invalid: ${a}`);return new olympe.dc.query.$.ae(a)}};olympe.dc.query.Aa.not=olympe.dc.query.Aa.md;olympe.dc.query.Aa.or=olympe.dc.query.Aa.or;olympe.dc.query.Aa.and=olympe.dc.query.Aa.and;olympe.dc.query.Aa.smallerThan=olympe.dc.query.Aa.Wi;olympe.dc.query.Aa.greaterThan=olympe.dc.query.Aa.nk;
613
613
  olympe.dc.query.Aa.regex=olympe.dc.query.Aa.Mx;olympe.dc.query.Aa.contains=olympe.dc.query.Aa.contains;olympe.dc.query.Aa.equals=olympe.dc.query.Aa.Qa;olympe.dc.query.Aa['in']=olympe.dc.query.Aa.Uw;olympe.dc.query.Aa.C={Eq:0,ro:1,ej:2,Vo:3,up:4,Zp:5,Fp:6,gn:7};function Wg(a){return Array.from(a.va)}
614
- function ih(a,b){var c=b.relation,d=olympe.dm.Relation.originModelRel,e=olympe.dm.Relation.destinationModelRel;d=a.db.Nb(c,c.Ha()===olympe.dc.ua.ORIGIN?e:d);if(0>a.G)e=a.C.Ce;else if(e=a.va[a.G],null!==e.oa)e=e.oa;else{var f=olympe.dc.ua.ORIGIN;e=olympe.dc.ia().Nb(e.relation,e.relation.Ha()===f?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel)}if(null===d||!a.db.zf(d,e)&&!a.db.zf(e,d))throw new olympe.dc.query.Id(`The specified relation "${c}" is invalid at the current level "${a.db.name(e)} (${e})" of the Query you are building. Please make sure you did not forget a .back() or another relation.`);d=
615
- b.V();for(c=a.G+1;c<a.va.length&&a.va[c].V()!==d;)c++;b=c<a.va.length?a.va:a.va.concat(b);return new olympe.dc.pa(a.F,a.source,b,c,a.L,a.C)}function jh(a,b=a.G){return 0<=b?a.va[b].V():olympe.Y.wb(a.F)}function kh(a,b,c,d={}){var e=olympe.dc.Zb.Of;const f=(null==d?0:d.Nd)?d.Nd:olympe.dc.pa.Xc.Gf;d=(null==d?0:d.an)?'__code-as-data__':void 0;b=olympe.dc.ga(b);const g=olympe.dc.Ud().ze(b);b=(new olympe.dc.pa(b,g)).ee();b.va=[new olympe.dc.query.va.Yd(jh(b),e,c)];return b.observe(a,{Nd:f,bk:d})}
616
- function lh(a){const b=0===a.L.size?a.ee():a;if(null!==b.C.Dd&&!b.L.has(jh(a,b.C.Dd)))throw new olympe.dc.query.Id('AndReturn was not called for the current level before sortBy operator');return b}
617
- olympe.dc.pa=class{constructor(a,b,c=[],d=-1,e=new Set,f={max:-1,offset:0,Dd:null,Ce:null}){this.db=olympe.dc.ia();this.F=a;this.source=b;this.va=c;this.G=d;this.L=e;this.C=f;this.id=null}static from(a,b){a=olympe.dc.ga(a);if(!olympe.dc.CloudObject.exists(a))throw new olympe.dc.query.Id(`Try to create a query from an instance that does not exist (${a}). Please try to use \`Query.fromTag()\` instead.`);b=null!=b?b:olympe.dc.Ud().ze(a);b=new olympe.dc.pa(a,b);b.C.Ce=olympe.dc.ia().model(a);return b}static ze(a,
618
- b,c){if(!olympe.dc.CloudObject.exists(b))throw new olympe.dc.query.Id(`Try to create a query from an instance (${a}) with an explicit datatype that does not exist (${b})`);a=olympe.dc.ga(a);c=null!=c?c:olympe.dc.Ud().fromModel(b);c=new olympe.dc.pa(a,c);c.C.Ce=olympe.dc.ga(b);return c}static sk(a,b=!0,c){const d=olympe.dc.ga(a);var e=olympe.dc.ia();if(!e.Ih(d))throw new olympe.dc.query.Id(`Try to create a query to get instances of ${a}, which is not a data type or does not exist.`);a=null!=c?c:olympe.dc.Ud().fromModel(d);
619
- a=new olympe.dc.pa(d,a);a.C.Ce=e.model(d);b&&(a=ih(a,new olympe.dc.query.va.Mf(jh(a),olympe.dc.CloudObject.extendedByRel,!0,!1)));b=a;e=new olympe.dc.query.va.Zh(jh(a),olympe.dc.CloudObject.instancesRel,!1);e.oa=d;return ih(b,e)}static ec(a,b,c,d,e){const f=(null==e?0:e.Nd)?e.Nd:olympe.dc.pa.Xc.Gf;e=(null==e?0:e.an)?'__code-as-data__':void 0;b=olympe.dc.ga(b);d=null!=d?d:olympe.dc.Ud().ze(b);d=(new olympe.dc.pa(b,d)).ee();d.va=[new olympe.dc.query.va.Yd(jh(d),c)];return d.observe(a,{Nd:f,bk:e})}cb(a,
620
- b=!1){if(!(a instanceof olympe.dc.Ma.Relation))throw new olympe.dc.query.Id(`The relation given to follow() is invalid: ${a}`);return ih(this,new olympe.dc.query.va.Zh(jh(this),a,b))}Uf(a,b=!1,c=!1){if(!(a instanceof olympe.dc.Ma.Relation))throw new olympe.dc.query.Id(`The relation given to followRecursively() is invalid: ${a}`);return ih(this,new olympe.dc.query.va.Mf(jh(this),a,b,c))}ee(){const a=(new Set(this.L)).add(jh(this));return new olympe.dc.pa(this.F,this.source,this.va,this.G,a,this.C)}filter(a){if(!(a instanceof
621
- olympe.dc.query.Aa))throw new olympe.dc.query.Id(`The specified predicate while trying to filter a query is invalid: ${a}`);const b=Array.from(this.va);b[this.G]=b[this.G].filter(a);return new olympe.dc.pa(this.F,this.source,b,this.G,this.L,this.C)}Ei(){return this}Pi(a,b=0){return new olympe.dc.pa(this.F,this.source,this.va,this.G,this.L,{Dd:this.C.Dd,max:a,offset:b,Ce:this.C.Ce})}Ak(a,b=olympe.dc.query.Dj.ASC){if(0>this.G)throw new olympe.dc.query.Id('You are trying to sort an empty query. Please first follow at least one relation to sort a query.');
622
- if(!olympe.dc.ia().Qb(a,olympe.dm.Property))throw new olympe.dc.query.Id(`The specified property while trying to sort a query is invalid: ${a}`);const c=this.va[this.G],d={Dd:this.G,max:this.C.max,offset:this.C.offset,Ce:this.C.Ce},e=Array.from(this.va);e[this.G]=c.sort(a,b);return new olympe.dc.pa(this.F,this.source,e,this.G,this.L,d)}Ig(){const a=this.C.Dd;let b;return null!==a?null==(b=this.va[a])?void 0:b.Ig():null}back(a=1){if(0>this.G||1>a)return this;let b=this.G;for(let c=0;c<a;c++){const d=
623
- this.va[b].C;for(b--;-1<b&&jh(this,b)!==d;)b--}return new olympe.dc.pa(this.F,this.source,Array.from(this.va),b,this.L,this.C)}parse(){const a=new Map,b=jh(this,-1),c={limit:this.C.max,offset:this.C.offset,returned:this.L.has(b),filter:[],optional:!1,inheritance:!1,next:[]};a.set(b,c);this.db.Ih(this.F)?c.dataType=olympe.dc.ga(this.F):(c.root=olympe.dc.ga(this.F),c.dataType=this.C.Ce);this.va.forEach((d,e)=>{const f=d.V(),g=d.Lc();Object.assign(g,{returned:this.L.has(f),next:[]});a.set(f,g);g.sort&&
624
- this.C.Dd!==e&&delete g.sort;if(1>=e&&d instanceof olympe.dc.query.va.Zh&&d.relation.Qa(olympe.dc.CloudObject.instancesRel))Object.assign(c,g);else if(0===e&&d instanceof olympe.dc.query.va.Mf&&d.relation.Qa(olympe.dc.CloudObject.extendedByRel))Object.assign(c,g),c.inheritance=!0;else{let h;null==(h=a.get(d.C))||h.next.push(g)}});return c}mb(a){const b=(null==a?0:a.Nd)?a.Nd:olympe.dc.pa.Xc.Nl;let c;return olympe.dc.query.mk().executeQuery(lh(this),b,{zh:null!=(c=null==a?void 0:a.bk)?c:null==a?void 0:
625
- a.cacheId,Yc:null==a?void 0:a.Yc}).then(d=>{let e;return null!=(e=null==d?void 0:Xg(d))?e:olympe.dc.Oa.empty()})}ld(){return Xg(mh(olympe.dc.query.mk(),lh(this)))}observe(a,b){const c=(null==b?0:b.Nd)?b.Nd:olympe.dc.pa.Xc.Gf;a='function'===typeof a.F?a.F():a;let d;return nh(olympe.dc.query.mk(),lh(this),a,olympe.dc.Pa.SELF,c,{zh:null!=(d=null==b?void 0:b.bk)?d:null==b?void 0:b.cacheId,Yc:null==b?void 0:b.Yc}).pipe(rxjs.operators.map(e=>Xg(e)),rxjs.operators.distinctUntilChanged())}V(){null===this.id&&
626
- (this.id=olympe.Y.wb(this.F+Wg(this).map(a=>a.L()).join()+Array.from(new Set(this.L)).sort().toString()+this.C.Dd+this.C.max+this.C.offset));return this.id}yb(){return this.source}ha(){let a;return{b:this.F,p:this.va.map(b=>b.ha()),r:Array.from(this.L),s:this.source,e:{m:this.C.max,o:this.C.offset,s:this.C.Dd,rm:null!=(a=this.C.Ce)?a:this.db.model(this.F)}}}toString(){return`Query: ${JSON.stringify(this)}`}toJSON(){return{origin:this.db.Ga(this.F)?olympe.dc.CloudObject.get(this.F):this.F,relations:this.va.map(a=>
614
+ function ih(a,b){var c=b.relation,d=olympe.dm.Relation.originModelRel,e=olympe.dm.Relation.destinationModelRel;d=a.db.Jb(c,c.Ha()===olympe.dc.ua.ORIGIN?e:d);if(0>a.G)e=a.C.Ce;else if(e=a.va[a.G],null!==e.oa)e=e.oa;else{var f=olympe.dc.ua.ORIGIN;e=olympe.dc.ia().Jb(e.relation,e.relation.Ha()===f?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel)}if(null===d||!a.db.zf(d,e)&&!a.db.zf(e,d))throw new olympe.dc.query.Jd(`The specified relation "${c}" is invalid at the current level "${a.db.name(e)} (${e})" of the Query you are building. Please make sure you did not forget a .back() or another relation.`);d=
615
+ b.V();for(c=a.G+1;c<a.va.length&&a.va[c].V()!==d;)c++;b=c<a.va.length?a.va:a.va.concat(b);return new olympe.dc.pa(a.F,a.source,b,c,a.K,a.C)}function jh(a,b=a.G){return 0<=b?a.va[b].V():olympe.Y.wb(a.F)}function kh(a,b,c,d={}){var e=olympe.dc.Zb.Of;const f=(null==d?0:d.Od)?d.Od:olympe.dc.pa.Xc.Gf;d=(null==d?0:d.an)?'__code-as-data__':void 0;b=olympe.dc.ga(b);const g=olympe.dc.Vd().ze(b);b=(new olympe.dc.pa(b,g)).ee();b.va=[new olympe.dc.query.va.Zd(jh(b),e,c)];return b.observe(a,{Od:f,bk:d})}
616
+ function lh(a){const b=0===a.K.size?a.ee():a;if(null!==b.C.Dd&&!b.K.has(jh(a,b.C.Dd)))throw new olympe.dc.query.Jd('AndReturn was not called for the current level before sortBy operator');return b}
617
+ olympe.dc.pa=class{constructor(a,b,c=[],d=-1,e=new Set,f={max:-1,offset:0,Dd:null,Ce:null}){this.db=olympe.dc.ia();this.F=a;this.source=b;this.va=c;this.G=d;this.K=e;this.C=f;this.id=null}static from(a,b){a=olympe.dc.ga(a);if(!olympe.dc.CloudObject.exists(a))throw new olympe.dc.query.Jd(`Try to create a query from an instance that does not exist (${a}). Please try to use \`Query.fromTag()\` instead.`);b=null!=b?b:olympe.dc.Vd().ze(a);b=new olympe.dc.pa(a,b);b.C.Ce=olympe.dc.ia().model(a);return b}static ze(a,
618
+ b,c){if(!olympe.dc.CloudObject.exists(b))throw new olympe.dc.query.Jd(`Try to create a query from an instance (${a}) with an explicit datatype that does not exist (${b})`);a=olympe.dc.ga(a);c=null!=c?c:olympe.dc.Vd().fromModel(b);c=new olympe.dc.pa(a,c);c.C.Ce=olympe.dc.ga(b);return c}static sk(a,b=!0,c){const d=olympe.dc.ga(a);var e=olympe.dc.ia();if(!e.Ih(d))throw new olympe.dc.query.Jd(`Try to create a query to get instances of ${a}, which is not a data type or does not exist.`);a=null!=c?c:olympe.dc.Vd().fromModel(d);
619
+ a=new olympe.dc.pa(d,a);a.C.Ce=e.model(d);b&&(a=ih(a,new olympe.dc.query.va.Mf(jh(a),olympe.dc.CloudObject.extendedByRel,!0,!1)));b=a;e=new olympe.dc.query.va.Zh(jh(a),olympe.dc.CloudObject.instancesRel,!1);e.oa=d;return ih(b,e)}static ec(a,b,c,d,e){const f=(null==e?0:e.Od)?e.Od:olympe.dc.pa.Xc.Gf;e=(null==e?0:e.an)?'__code-as-data__':void 0;b=olympe.dc.ga(b);d=null!=d?d:olympe.dc.Vd().ze(b);d=(new olympe.dc.pa(b,d)).ee();d.va=[new olympe.dc.query.va.Zd(jh(d),c)];return d.observe(a,{Od:f,bk:e})}cb(a,
620
+ b=!1){if(!(a instanceof olympe.dc.Ma.Relation))throw new olympe.dc.query.Jd(`The relation given to follow() is invalid: ${a}`);return ih(this,new olympe.dc.query.va.Zh(jh(this),a,b))}Uf(a,b=!1,c=!1){if(!(a instanceof olympe.dc.Ma.Relation))throw new olympe.dc.query.Jd(`The relation given to followRecursively() is invalid: ${a}`);return ih(this,new olympe.dc.query.va.Mf(jh(this),a,b,c))}ee(){const a=(new Set(this.K)).add(jh(this));return new olympe.dc.pa(this.F,this.source,this.va,this.G,a,this.C)}filter(a){if(!(a instanceof
621
+ olympe.dc.query.Aa))throw new olympe.dc.query.Jd(`The specified predicate while trying to filter a query is invalid: ${a}`);const b=Array.from(this.va);b[this.G]=b[this.G].filter(a);return new olympe.dc.pa(this.F,this.source,b,this.G,this.K,this.C)}Ei(){return this}Pi(a,b=0){return new olympe.dc.pa(this.F,this.source,this.va,this.G,this.K,{Dd:this.C.Dd,max:a,offset:b,Ce:this.C.Ce})}Ak(a,b=olympe.dc.query.Dj.ASC){if(0>this.G)throw new olympe.dc.query.Jd('You are trying to sort an empty query. Please first follow at least one relation to sort a query.');
622
+ if(!olympe.dc.ia().Qb(a,olympe.dm.Property))throw new olympe.dc.query.Jd(`The specified property while trying to sort a query is invalid: ${a}`);const c=this.va[this.G],d={Dd:this.G,max:this.C.max,offset:this.C.offset,Ce:this.C.Ce},e=Array.from(this.va);e[this.G]=c.sort(a,b);return new olympe.dc.pa(this.F,this.source,e,this.G,this.K,d)}Ig(){const a=this.C.Dd;let b;return null!==a?null==(b=this.va[a])?void 0:b.Ig():null}back(a=1){if(0>this.G||1>a)return this;let b=this.G;for(let c=0;c<a;c++){const d=
623
+ this.va[b].C;for(b--;-1<b&&jh(this,b)!==d;)b--}return new olympe.dc.pa(this.F,this.source,Array.from(this.va),b,this.K,this.C)}parse(){const a=new Map,b=jh(this,-1),c={limit:this.C.max,offset:this.C.offset,returned:this.K.has(b),filter:[],optional:!1,inheritance:!1,next:[]};a.set(b,c);this.db.Ih(this.F)?c.dataType=olympe.dc.ga(this.F):(c.root=olympe.dc.ga(this.F),c.dataType=this.C.Ce);this.va.forEach((d,e)=>{const f=d.V(),g=d.Lc();Object.assign(g,{returned:this.K.has(f),next:[]});a.set(f,g);g.sort&&
624
+ this.C.Dd!==e&&delete g.sort;if(1>=e&&d instanceof olympe.dc.query.va.Zh&&d.relation.Qa(olympe.dc.CloudObject.instancesRel))Object.assign(c,g);else if(0===e&&d instanceof olympe.dc.query.va.Mf&&d.relation.Qa(olympe.dc.CloudObject.extendedByRel))Object.assign(c,g),c.inheritance=!0;else{let h;null==(h=a.get(d.C))||h.next.push(g)}});return c}mb(a){const b=(null==a?0:a.Od)?a.Od:olympe.dc.pa.Xc.Nl;let c;return olympe.dc.query.mk().executeQuery(lh(this),b,{zh:null!=(c=null==a?void 0:a.bk)?c:null==a?void 0:
625
+ a.cacheId,Yc:null==a?void 0:a.Yc}).then(d=>{let e;return null!=(e=null==d?void 0:Xg(d))?e:olympe.dc.Oa.empty()})}ld(){return Xg(mh(olympe.dc.query.mk(),lh(this)))}observe(a,b){const c=(null==b?0:b.Od)?b.Od:olympe.dc.pa.Xc.Gf;a='function'===typeof a.F?a.F():a;let d;return nh(olympe.dc.query.mk(),lh(this),a,olympe.dc.Pa.SELF,c,{zh:null!=(d=null==b?void 0:b.bk)?d:null==b?void 0:b.cacheId,Yc:null==b?void 0:b.Yc}).pipe(rxjs.operators.map(e=>Xg(e)),rxjs.operators.distinctUntilChanged())}V(){null===this.id&&
626
+ (this.id=olympe.Y.wb(this.F+Wg(this).map(a=>a.K()).join()+Array.from(new Set(this.K)).sort().toString()+this.C.Dd+this.C.max+this.C.offset));return this.id}yb(){return this.source}ha(){let a;return{b:this.F,p:this.va.map(b=>b.ha()),r:Array.from(this.K),s:this.source,e:{m:this.C.max,o:this.C.offset,s:this.C.Dd,rm:null!=(a=this.C.Ce)?a:this.db.model(this.F)}}}toString(){return`Query: ${JSON.stringify(this)}`}toJSON(){return{origin:this.db.Ga(this.F)?olympe.dc.CloudObject.get(this.F):this.F,relations:this.va.map(a=>
627
627
  a.toJSON())}}};olympe.dc.pa.prototype.observe=olympe.dc.pa.prototype.observe;olympe.dc.pa.prototype.executeFromCache=olympe.dc.pa.prototype.ld;olympe.dc.pa.prototype.execute=olympe.dc.pa.prototype.mb;olympe.dc.pa.prototype.parse=olympe.dc.pa.prototype.parse;olympe.dc.pa.prototype.back=olympe.dc.pa.prototype.back;olympe.dc.pa.prototype.sortBy=olympe.dc.pa.prototype.Ak;olympe.dc.pa.prototype.limit=olympe.dc.pa.prototype.Pi;olympe.dc.pa.prototype.cast=olympe.dc.pa.prototype.Ei;
628
628
  olympe.dc.pa.prototype.filter=olympe.dc.pa.prototype.filter;olympe.dc.pa.prototype.andReturn=olympe.dc.pa.prototype.ee;olympe.dc.pa.prototype.followRecursively=olympe.dc.pa.prototype.Uf;olympe.dc.pa.prototype.follow=olympe.dc.pa.prototype.cb;olympe.dc.pa.followRule=olympe.dc.pa.ec;olympe.dc.pa.instancesOf=olympe.dc.pa.sk;olympe.dc.pa.fromTag=olympe.dc.pa.ze;olympe.dc.pa.from=olympe.dc.pa.from;olympe.dc.pa.Xc={Gf:1,Nl:2,Ol:3};olympe.dc.pa.C={Pk:'cacheBucketName',ap:'isCacheable'};function mh(a,b){const c=new olympe.dc.query.Qp(a.H,b);if(a.C.view.Ga(b.F)){bh(c,b.F);for(const d of Wg(b))d.mb(c)}return c}
629
- function nh(a,b,c,d,e,f){const g=b.V();let h=a.F.get(g);if(!h){var k=b.yb();a.H.debug(`Create new subscription for query ${g} for subscriber ${d}, to be executed by the data source ${k}`);k=!1===f.Yc||a.L&&k===olympe.dc.Pa.SERVER?[]:Array.from(a.F.values());h=new olympe.dc.query.Wp(a.H,a.C,b,a.P.bind(a,e,f));a.F.set(g,h);oh(h,l=>a.G.add(l));h.start(k)&&(null==f?0:f.zh)&&ph(a,b,e,f).catch(l=>{a.H.error(`Was not able to get the result of the subscribed query ${g} to add it to the cache: ${l}`)})}return new rxjs.Observable(l=>
629
+ function nh(a,b,c,d,e,f){const g=b.V();let h=a.F.get(g);if(!h){var k=b.yb();a.H.debug(`Create new subscription for query ${g} for subscriber ${d}, to be executed by the data source ${k}`);k=!1===f.Yc||a.K&&k===olympe.dc.Pa.SERVER?[]:Array.from(a.F.values());h=new olympe.dc.query.Wp(a.H,a.C,b,a.P.bind(a,e,f));a.F.set(g,h);oh(h,l=>a.G.add(l));h.start(k)&&(null==f?0:f.zh)&&ph(a,b,e,f).catch(l=>{a.H.error(`Was not able to get the result of the subscribed query ${g} to add it to the cache: ${l}`)})}return new rxjs.Observable(l=>
630
630
  {const n=()=>{p&&c.Qe(p);l.complete();if(q){var r=q;const u=a.F.get(g);a.H.debug(`${d} unsubscribed from ${g}`);if(null==u)r=0;else{var t=u;t.G.delete(r)&&t.H.debug(`Remove subscriber ${d} for query ${t.query.V()}, now have ${t.G.size} subscribers`);d!==olympe.dc.Pa.SELF&&(t.Z--,0===t.Z&&eh(t.C));r=0===t.G.size}r&&(a.H.debug(`No more subscriber to ${g}, remove the subscription`),a.G.delete(g),a.F.delete(g),u.destroy())}},p=c.Z(n),q=qh(h,d,l);return n})}
631
631
  function rh(a){a.G.forEach(b=>{let c;null==(c=a.F.get(b))||sh(c)});a.G.clear()}function th(a){a.H.debug('Send GetContext request to the orchestrator');const b=new olympe.dc.Request(olympe.dc.Request.C.jg,olympe.dc.Pa.SERVER);return a.Yb.request(b).then(c=>{a.C.Jc(c.Wb())})}
632
- function uh(a,b){const c=b.yb();if(c===olympe.dc.Pa.SELF||a.L&&c===olympe.dc.Pa.SERVER)return Promise.resolve(!0);a=Array.from(a.F.values()).filter(d=>d.Gc(b)).map(d=>new Promise(e=>d.Ad(f=>e(!f))));return Promise.all(a).then(d=>d.some(e=>e))}function ph(a,b,c,d){return v(function*(){var e=b.yb();e=Ke(Ke(new olympe.dc.Request(olympe.dc.Request.C.sg,e,b),olympe.dc.pa.C.ap,c===olympe.dc.pa.Xc.Ol),olympe.dc.pa.C.Pk,null==d?void 0:d.zh);return a.Yb.request(e)})}
632
+ function uh(a,b){const c=b.yb();if(c===olympe.dc.Pa.SELF||a.K&&c===olympe.dc.Pa.SERVER)return Promise.resolve(!0);a=Array.from(a.F.values()).filter(d=>d.Gc(b)).map(d=>new Promise(e=>d.Ad(f=>e(!f))));return Promise.all(a).then(d=>d.some(e=>e))}function ph(a,b,c,d){return v(function*(){var e=b.yb();e=Ke(Ke(new olympe.dc.Request(olympe.dc.Request.C.sg,e,b),olympe.dc.pa.C.ap,c===olympe.dc.pa.Xc.Ol),olympe.dc.pa.C.Pk,null==d?void 0:d.zh);return a.Yb.request(e)})}
633
633
  function vh(a,b,c){const d=[];for(const e of a.F.values())wh(e,b,c)&&d.push(ph(a,e.query,olympe.dc.pa.Xc.Nl,{}).then(f=>{a.C.Jc(f.Wb())}));return Promise.all(d).then(()=>{})}
634
- olympe.dc.query.iu=class{constructor(a,b,c,d){this.H=a;this.C=b;this.Yb=c;this.L=d;this.F=new Map;this.G=new Set;Hf(b,()=>rh(this));Qe(c,olympe.dc.Request.C.bo,e=>{this.C.Jc(e.content)})}executeQuery(a,b,c){const d=this;return v(function*(){const e='boolean'===typeof c.Yc?c.Yc:yield uh(d,a);if(!e||(null==c?0:c.zh))try{const f=yield ph(d,a,b,c);e||d.C.Jc(f.Wb())}catch(f){return d.H.error(`Error while sending a query to data source ${a.yb()}: ${f}`),null}return mh(d,a)})}P(a,b,c,d,e){const f=c.yb();
635
- if(f===olympe.dc.Pa.SELF||b.Yc||this.L&&f===olympe.dc.Pa.SERVER)return d(),null;if(a!==olympe.dc.pa.Xc.Gf)return ph(this,c,a,b).then(q=>{this.C.Jc(q.Wb());d()}).catch(e),null;let g,h=!1;const k=q=>{g=[];q&&this.H.debug(`Resend subscription ${c.V()} after detection of dead subscription in the remote service`);ph(this,c,a,b).then(r=>{if(h)this.H.warn(`Received data result after query subscription ${c.V()} has been destroyed. Could happen with queries observed multiple times successively quickly.`);
634
+ olympe.dc.query.iu=class{constructor(a,b,c,d){this.H=a;this.C=b;this.Yb=c;this.K=d;this.F=new Map;this.G=new Set;Hf(b,()=>rh(this));Qe(c,olympe.dc.Request.C.bo,e=>{this.C.Jc(e.content)})}executeQuery(a,b,c){const d=this;return v(function*(){const e='boolean'===typeof c.Yc?c.Yc:yield uh(d,a);if(!e||(null==c?0:c.zh))try{const f=yield ph(d,a,b,c);e||d.C.Jc(f.Wb())}catch(f){return d.H.error(`Error while sending a query to data source ${a.yb()}: ${f}`),null}return mh(d,a)})}P(a,b,c,d,e){const f=c.yb();
635
+ if(f===olympe.dc.Pa.SELF||b.Yc||this.K&&f===olympe.dc.Pa.SERVER)return d(),null;if(a!==olympe.dc.pa.Xc.Gf)return ph(this,c,a,b).then(q=>{this.C.Jc(q.Wb());d()}).catch(e),null;let g,h=!1;const k=q=>{g=[];q&&this.H.debug(`Resend subscription ${c.V()} after detection of dead subscription in the remote service`);ph(this,c,a,b).then(r=>{if(h)this.H.warn(`Received data result after query subscription ${c.V()} has been destroyed. Could happen with queries observed multiple times successively quickly.`);
636
636
  else{this.C.Jc(r.Wb());let t;null==(t=g)||t.forEach(u=>this.C.Jc(u));g=null}d()}).catch(e)},l=c.V();k(!1);const n=Ke(new olympe.dc.Request(olympe.dc.Request.C.Hj,f,c),olympe.dc.pa.C.Pk,null==b?void 0:b.zh),p=Pe(this.Yb,n,k.bind(this,!0)).pipe(olympe.N.operators.Ui(olympe.N.errors.No,()=>{},0)).pipe(olympe.N.operators.Ui(olympe.N.errors.In,(q,r)=>{this.H.debug(`Data Provider: Subscribe to topic ${q.V()} now that we are back online, after waiting for ${r}ms`);k(!0)},0)).subscribe(rxjs.Subscriber.create(q=>
637
- {Array.isArray(g)?g.push(q):this.C.Jc(q)},q=>{this.H.error(`An error occurred with the subscription ${l}: ${q}`);e(String(q))}));return()=>{h=!0;this.H.debug(`Unsubscribe to query ${l} from data source ${f}`);p.unsubscribe()}}};function Ne(a){return a.L.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function Oe(a){return a.G.map(b=>a.F.get(a.C[b]))}function xh(a){const b=olympe.dc.ia();let c=!1;const d=a.k.map(e=>{const f=e.split('.').map(g=>b.Ga(g)?olympe.dc.CloudObject.get(g):(olympe.ma.ab('dc.query').error(`CloudObject with tag ${g} not present but required for deserialization`),c=!0,null));return[e,1===f.length?f[0]:f]});return c?null:olympe.dc.Oa.create(d,a.a,a.r)}
638
- olympe.dc.Oa=class{constructor(){this.C=[];this.F=new Map;this.G=[];this.L=[];this.hash=''}static empty(){return new olympe.dc.Oa}[Symbol.iterator](){let a=0;return{next:()=>{var b={done:!0};a<this.C.length&&(b=this.C[a],b={value:[b,this.F.get(b)],done:!1},a++);return b}}}entries(){return this.C.map(a=>[a,this.F.get(a)])}values(){return this.F.values()}keys(){return this.C.values()}De(){return this.C.map(a=>this.F.get(a))}size(){return this.C.length}has(a){return this.F.has(a)||this.De().includes(a)}indexOf(a){return null===
637
+ {Array.isArray(g)?g.push(q):this.C.Jc(q)},q=>{this.H.error(`An error occurred with the subscription ${l}: ${q}`);e(String(q))}));return()=>{h=!0;this.H.debug(`Unsubscribe to query ${l} from data source ${f}`);p.unsubscribe()}}};function Ne(a){return a.K.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function Oe(a){return a.G.map(b=>a.F.get(a.C[b]))}function xh(a){const b=olympe.dc.ia();let c=!1;const d=a.k.map(e=>{const f=e.split('.').map(g=>b.Ga(g)?olympe.dc.CloudObject.get(g):(olympe.ma.ab('dc.query').error(`CloudObject with tag ${g} not present but required for deserialization`),c=!0,null));return[e,1===f.length?f[0]:f]});return c?null:olympe.dc.Oa.create(d,a.a,a.r)}
638
+ olympe.dc.Oa=class{constructor(){this.C=[];this.F=new Map;this.G=[];this.K=[];this.hash=''}static empty(){return new olympe.dc.Oa}[Symbol.iterator](){let a=0;return{next:()=>{var b={done:!0};a<this.C.length&&(b=this.C[a],b={value:[b,this.F.get(b)],done:!1},a++);return b}}}entries(){return this.C.map(a=>[a,this.F.get(a)])}values(){return this.F.values()}keys(){return this.C.values()}De(){return this.C.map(a=>this.F.get(a))}size(){return this.C.length}has(a){return this.F.has(a)||this.De().includes(a)}indexOf(a){return null===
639
639
  a||void 0===a?-1:'string'===typeof a?this.C.indexOf(a):this.De().indexOf(a)}get(a){return(a=this.F.get(a))?a:null}Cc(){return this.ge(0)}ge(a){return a<this.C.length?this.F.get(this.C[a]):null}push(...a){const b=this.De();b.push(...a);return b}pop(){if(0===this.C.length)return[];const a=this.De();a.pop();return a}shift(){if(0<this.C.length){const a=this.De();a.shift();return a}return[]}filter(a){return this.De().filter(a)}find(a){return(a=this.De().find(a))?a:null}forEach(a){this.C.forEach((b,c)=>
640
- a(this.F.get(b),c))}map(a){return this.De().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.Oa.create(b,Array.from(this.G),Array.from(this.L))}reduce(a,b){return this.De().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.G);for(const d of a)c=c.concat(d.G.map(e=>e+c.length));a=this.L.concat(...a.map(d=>d.L));return olympe.dc.Oa.create(b,c,a)}toString(){return`QueryResult: ${JSON.stringify(this)}`}toJSON(){return this.De()}static from(a,
640
+ a(this.F.get(b),c))}map(a){return this.De().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.Oa.create(b,Array.from(this.G),Array.from(this.K))}reduce(a,b){return this.De().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.G);for(const d of a)c=c.concat(d.G.map(e=>e+c.length));a=this.K.concat(...a.map(d=>d.K));return olympe.dc.Oa.create(b,c,a)}toString(){return`QueryResult: ${JSON.stringify(this)}`}toJSON(){return this.De()}static from(a,
641
641
  b,{Gb:c,Dd:d,offset:e,max:f}={}){if(null!==c&&-1<d){const p=olympe.dc.ia(),q=c.gi===olympe.dc.query.Dj.ASC?1:-1,r=c.Ig(),t=c.Ia();b.sort((u,w)=>{w=w[d];u=p.Ia(u[d],t);w=p.Ia(w,t);return null===u?-q:null===w?q:q*r(olympe.dc.lb.vc(u),olympe.dc.lb.vc(w))})}else b.sort((p,q)=>p.reduce((r,t,u)=>r||t.localeCompare(q[u]),0));if(0<e||-1<f)b=b.slice(e,-1<f?e+f:void 0);c=olympe.Y.wb(b.flat().join(''));if(c===a.hash)return a;const g=p=>''===p?null:olympe.dc.CloudObject.get(p);e=b.map(p=>[p.join('.'),1===p.length?
642
- g(p[0]):p.map(g)]);const h=new Set(e.map(p=>p[0])),k=new Set(a.keys()),l=[],n=[];e.forEach(([p],q)=>{!k.has(p)&&l.push(q)});k.forEach(p=>{!h.has(p)&&n.push(p)});return olympe.dc.Oa.create(e,l,n,c)}static create(a,b,c,d){const e=new olympe.dc.Oa;e.C=a.map(f=>f[0]);e.F=new Map(a);e.hash=d||olympe.Y.wb(e.C.join(''));e.G=b||e.C.map((f,g)=>g);e.L=c||[];return e}ha(a){a&&this.C.flatMap(b=>b.split('.')).forEach(a);return{k:this.C,a:this.G,r:this.L}}};olympe.dc.Oa.prototype.concat=olympe.dc.Oa.prototype.concat;
642
+ g(p[0]):p.map(g)]);const h=new Set(e.map(p=>p[0])),k=new Set(a.keys()),l=[],n=[];e.forEach(([p],q)=>{!k.has(p)&&l.push(q)});k.forEach(p=>{!h.has(p)&&n.push(p)});return olympe.dc.Oa.create(e,l,n,c)}static create(a,b,c,d){const e=new olympe.dc.Oa;e.C=a.map(f=>f[0]);e.F=new Map(a);e.hash=d||olympe.Y.wb(e.C.join(''));e.G=b||e.C.map((f,g)=>g);e.K=c||[];return e}ha(a){a&&this.C.flatMap(b=>b.split('.')).forEach(a);return{k:this.C,a:this.G,r:this.K}}};olympe.dc.Oa.prototype.concat=olympe.dc.Oa.prototype.concat;
643
643
  olympe.dc.Oa.prototype.reduce=olympe.dc.Oa.prototype.reduce;olympe.dc.Oa.prototype.sort=olympe.dc.Oa.prototype.sort;olympe.dc.Oa.prototype.map=olympe.dc.Oa.prototype.map;olympe.dc.Oa.prototype.forEach=olympe.dc.Oa.prototype.forEach;olympe.dc.Oa.prototype.find=olympe.dc.Oa.prototype.find;olympe.dc.Oa.prototype.filter=olympe.dc.Oa.prototype.filter;olympe.dc.Oa.prototype.shift=olympe.dc.Oa.prototype.shift;olympe.dc.Oa.prototype.pop=olympe.dc.Oa.prototype.pop;olympe.dc.Oa.prototype.push=olympe.dc.Oa.prototype.push;
644
644
  olympe.dc.Oa.prototype.getAt=olympe.dc.Oa.prototype.ge;olympe.dc.Oa.prototype.getFirst=olympe.dc.Oa.prototype.Cc;olympe.dc.Oa.prototype.get=olympe.dc.Oa.prototype.get;olympe.dc.Oa.prototype.indexOf=olympe.dc.Oa.prototype.indexOf;olympe.dc.Oa.prototype.has=olympe.dc.Oa.prototype.has;olympe.dc.Oa.prototype.size=olympe.dc.Oa.prototype.size;olympe.dc.Oa.prototype.toArray=olympe.dc.Oa.prototype.De;olympe.dc.Oa.prototype.keys=olympe.dc.Oa.prototype.keys;olympe.dc.Oa.prototype.values=olympe.dc.Oa.prototype.values;
645
645
  olympe.dc.Oa.prototype.entries=olympe.dc.Oa.prototype.entries;olympe.dc.Oa.empty=olympe.dc.Oa.empty;function yh(a){return 1<a.size()?(olympe.ma.ab('dc').warn(`a follow() on a QuerySingle has ${a.size()} results (0 or 1 expected) -> returns null`),null):a.Cc()||null}olympe.dc.ed=class{constructor(a){this.query=a}static from(a){return new olympe.dc.ed(olympe.dc.pa.from(a))}cb(a){return new olympe.dc.ed(this.query.cb(a))}Ei(){return this}mb(a){return this.query.mb(a).then(b=>yh(b))}ld(){return yh(this.query.ld())}};olympe.dc.ed.prototype.executeFromCache=olympe.dc.ed.prototype.ld;
646
646
  olympe.dc.ed.prototype.execute=olympe.dc.ed.prototype.mb;olympe.dc.ed.prototype.cast=olympe.dc.ed.prototype.Ei;olympe.dc.ed.prototype.follow=olympe.dc.ed.prototype.cb;const zh=olympe.dc.ua.ORIGIN,Ah=olympe.dc.ua.DESTINATION;function oh(a,b){Yg(a.C,()=>b(a.query.V()))}function qh(a,b,c){const d=a.aa;a.aa++;a.G.set(d,c);b===olympe.dc.Pa.SELF?a.Ad(e=>e?c.error(e):c.next(a.C)):(a.Z++,1===a.Z&&a.Ad(()=>dh(a.C)));a.H.debug(`Add subscriber ${b} for query ${a.query.V()}, now have ${a.G.size} subscribers`);return d}
647
647
  function wh(a,b,c){if(a.query.yb()!==b)return!1;c.td(a.ea);(b=a.ea.flush())&&a.H.debug(`Subscription ${a.query.V()} is considered as obsolete after the transaction ${c.V()} applied on DB`);return b}function sh(a){fh(a.C);a.G.forEach(b=>{b.next(a.C)})}function Bh(a,b,c){const d=[];let e=!1;const f=new olympe.async.Ej(olympe.D.Jg());for(const g of b)g.Gc(a.query)&&(e||(e=!0),f.add(h=>g.Ad(k=>{!k&&d.push(g);h()})));zc(f,g=>c(g?d:[]));f.start();return e}
648
648
  function Ch(a){const b=a.query.V(),c=new Map,d=q=>{const r=c.get(q);return r?1===r.size?Array.from(r)[0]:(t,u,w,y)=>r.forEach(z=>z(t,u,w,y)):()=>{}},e=Wg(a.query),f=a.C;for(let q=e.length-1;0<=q;q--){var g=e[q];const r=g.V(),t=g.C;g=g.observe(f,d(r));let u;c.set(t,(null!=(u=c.get(t))?u:new Set).add(g))}const h=a.db,k=a.query.F,l=olympe.Y.wb(k),n=Ge(h,k,(q,r)=>{q?bh(f,r):f.remove(r);d(l)(q,r,null,b)});let p;null==(p=a.T)||p.push(()=>{Fe(h,k,n)});Dh(a)}
649
- function Eh(a){const b=a.oa(a.query,()=>{null===a.P||a.eb()||Ch(a)},d=>{a.eb()||(a.H.error(`Error while getting data from data source (${a.query.yb()}) to ensure coverage of the query ${a.query.V()}: ${d}`),Dh(a))});let c;b&&(null==(c=a.T)||c.push(b))}function Fh(a,b){a.L.delete(b);0===a.L.size&&(a.L=null,Promise.resolve().then(()=>{!a.eb()&&Eh(a)}))}function Dh(a){const b=a.P;a.P=null;null==b||b.forEach(c=>c())}
650
- olympe.dc.query.Wp=class{constructor(a,b,c,d){this.H=a;this.db=b.view;this.query=c;this.C=new olympe.dc.query.Qp(this.H,c);this.Z=0;this.aa=1;this.T=[];this.G=new Map;this.P=[()=>fh(this.C)];this.oa=d;this.ea=new Gh(a,this.db,c,this.C);this.F=this.L=null}start(a){return Bh(this,a,b=>{0<b.length?(this.L=new Set(b),this.L.forEach(c=>{null===c.F&&(c.F=new Set);c.F.add(this)}),Ch(this)):Eh(this)})}Gc(a){return!this.eb()&&this.query.yb()===a.yb()&&(this.query.V()===a.V()||(null===this.P||this.query.F===
651
- a.F)&&this.C.Gc(a))}Ad(a){null!==this.P?this.P.push(a):a();return this}destroy(a){a?this.H.error(`Destroy subscription ${this.query.V()} after error: ${a}`):this.H.debug(`Destroy subscription ${this.query.V()}`);const b=this.T;this.T=null;this.G.forEach(e=>a?e.error(a):e.complete());let c;null==(c=this.F)||c.forEach(e=>Fh(e,this));let d;null==(d=this.L)||d.forEach(e=>{e.F.delete(this);0===e.F.size&&(e.F=null)});b.forEach(e=>e())}eb(){return null===this.T}};
649
+ function Eh(a){const b=a.oa(a.query,()=>{null===a.P||a.eb()||Ch(a)},d=>{a.eb()||(a.H.error(`Error while getting data from data source (${a.query.yb()}) to ensure coverage of the query ${a.query.V()}: ${d}`),Dh(a))});let c;b&&(null==(c=a.T)||c.push(b))}function Fh(a,b){a.K.delete(b);0===a.K.size&&(a.K=null,Promise.resolve().then(()=>{!a.eb()&&Eh(a)}))}function Dh(a){const b=a.P;a.P=null;null==b||b.forEach(c=>c())}
650
+ olympe.dc.query.Wp=class{constructor(a,b,c,d){this.H=a;this.db=b.view;this.query=c;this.C=new olympe.dc.query.Qp(this.H,c);this.Z=0;this.aa=1;this.T=[];this.G=new Map;this.P=[()=>fh(this.C)];this.oa=d;this.ea=new Gh(a,this.db,c,this.C);this.F=this.K=null}start(a){return Bh(this,a,b=>{0<b.length?(this.K=new Set(b),this.K.forEach(c=>{null===c.F&&(c.F=new Set);c.F.add(this)}),Ch(this)):Eh(this)})}Gc(a){return!this.eb()&&this.query.yb()===a.yb()&&(this.query.V()===a.V()||(null===this.P||this.query.F===
651
+ a.F)&&this.C.Gc(a))}Ad(a){null!==this.P?this.P.push(a):a();return this}destroy(a){a?this.H.error(`Destroy subscription ${this.query.V()} after error: ${a}`):this.H.debug(`Destroy subscription ${this.query.V()}`);const b=this.T;this.T=null;this.G.forEach(e=>a?e.error(a):e.complete());let c;null==(c=this.F)||c.forEach(e=>Fh(e,this));let d;null==(d=this.K)||d.forEach(e=>{e.F.delete(this);0===e.F.size&&(e.F=null)});b.forEach(e=>e())}eb(){return null===this.T}};
652
652
  function Hh(a,b){return a.G.has(Ah+b)||a.G.has(zh+b)}
653
- class Gh{constructor(a,b,c,d){this.H=a;this.db=b;this.L=d;this.T=[];this.P=-1<c.C.max||0<c.C.offset;this.G=new Map;this.C=!1;const e=new Map;for(const f of Wg(c)){a=f.V();this.T.push(a);if(f instanceof olympe.dc.query.va.oh){a=f.relation;a=`${a.Ha()}${a.X()}`;let g;b=null!=(g=this.G.get(a))?g:[];b.push(f);this.G.set(a,b)}Ih(f).forEach(g=>{let h;const k=null!=(h=e.get(g))?h:[];k.push(f.V());e.set(g,k)})}this.properties=Array.from(e.entries())}flush(){const a=this.C;this.C=!1;return a}Pc(){}Sc(a,b){if(!(this.C||
654
- !this.P&&this.db.Ga(a))){var c;this.C||(this.C=null==(c=this.properties)?void 0:c.some(([d,e])=>b.has(d)&&ah(this.L,a,e)))}}F(a){this.C||this.db.Ga(a)&&!this.P||this.C||(this.C=this.T.some(b=>ah(this.L,a,b)))}Ea(a,b,c){if(!this.C&&Hh(this,a)){var d=this.db.Ga(b),e=this.db.Ga(c);if(d&&!e||!d&&e){const f=this.G.get(Ah+a);a=this.G.get(zh+a);this.C||(this.C=d&&(null==f?void 0:f.some(g=>ah(this.L,b,g.C)))||e&&(null==a?void 0:a.some(g=>ah(this.L,c,g.C))))}}}kc(a,b,c){if(!this.C&&this.P&&Hh(this,a)&&this.db.yr(b,
655
- new olympe.dc.Ma.Relation(a),c)){const d=this.G.get(Ah+a);a=this.G.get(zh+a);const e=this.L;this.C||(this.C=(null==d?void 0:d.some(f=>ah(e,b,f.C)&&ah(e,c,f.V())))||(null==a?void 0:a.some(f=>ah(e,c,f.C)&&ah(e,b,f.V()))))}}}olympe.dc.query.Wp.xa=[olympe.dc.Writable];function Jh(a){return new olympe.dc.query.Relation(a.tag,a.direction,!0)}
653
+ class Gh{constructor(a,b,c,d){this.H=a;this.db=b;this.K=d;this.T=[];this.P=-1<c.C.max||0<c.C.offset;this.G=new Map;this.C=!1;const e=new Map;for(const f of Wg(c)){a=f.V();this.T.push(a);if(f instanceof olympe.dc.query.va.oh){a=f.relation;a=`${a.Ha()}${a.X()}`;let g;b=null!=(g=this.G.get(a))?g:[];b.push(f);this.G.set(a,b)}Ih(f).forEach(g=>{let h;const k=null!=(h=e.get(g))?h:[];k.push(f.V());e.set(g,k)})}this.properties=Array.from(e.entries())}flush(){const a=this.C;this.C=!1;return a}Pc(){}Sc(a,b){if(!(this.C||
654
+ !this.P&&this.db.Ga(a))){var c;this.C||(this.C=null==(c=this.properties)?void 0:c.some(([d,e])=>b.has(d)&&ah(this.K,a,e)))}}F(a){this.C||this.db.Ga(a)&&!this.P||this.C||(this.C=this.T.some(b=>ah(this.K,a,b)))}Ea(a,b,c){if(!this.C&&Hh(this,a)){var d=this.db.Ga(b),e=this.db.Ga(c);if(d&&!e||!d&&e){const f=this.G.get(Ah+a);a=this.G.get(zh+a);this.C||(this.C=d&&(null==f?void 0:f.some(g=>ah(this.K,b,g.C)))||e&&(null==a?void 0:a.some(g=>ah(this.K,c,g.C))))}}}kc(a,b,c){if(!this.C&&this.P&&Hh(this,a)&&this.db.yr(b,
655
+ new olympe.dc.Ma.Relation(a),c)){const d=this.G.get(Ah+a);a=this.G.get(zh+a);const e=this.K;this.C||(this.C=(null==d?void 0:d.some(f=>ah(e,b,f.C)&&ah(e,c,f.V())))||(null==a?void 0:a.some(f=>ah(e,c,f.C)&&ah(e,b,f.V()))))}}}olympe.dc.query.Wp.xa=[olympe.dc.Writable];function Jh(a){return new olympe.dc.query.Relation(a.tag,a.direction,!0)}
656
656
  olympe.dc.query.Relation=class extends olympe.dc.Ma.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.X())+', ';a+='"direction": '+JSON.stringify(this.Ha())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static Ub(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.query.Relation(b.tag,b.direction,b.recursive)}static from(a,b){return new olympe.dc.query.Relation(a.X(),a.Ha(),null!=b?b:a instanceof olympe.dc.da.ve)}fc(){const a=
657
- olympe.dc.ua.DESTINATION,b=olympe.dc.ua.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}V(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.R={Ca:'dc.query.Logger',Gj:'dc.query.QueryProcessor'};olympe.W.config(function(a){E(a,olympe.dc.query.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('query'));D(a,olympe.dc.query.R.Gj,olympe.dc.query.iu,olympe.dc.query.R.Ca,olympe.dc.db.R.Fa,olympe.dc.R.ug,new olympe.W.ja(olympe.dc.U.rh))});olympe.W.run([olympe.dc.query.R.Gj],a=>{olympe.dc.query.mk=()=>a});olympe.dc.query.Id=class extends Error{};olympe.dc.query.$={};olympe.dc.query.$.Ed=class extends olympe.dc.query.Aa{constructor(...a){super();this.$=a}compile(){return this.$.reduce((a,b)=>{const c=[];for(const d of b.compile()){for(const e of a)d.push(...e);c.push(d)}return c},[])}md(){return new olympe.dc.query.$.te(...this.$.map(a=>a.md()))}Cb(){return this.$.flatMap(a=>a.Cb())}Gc(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}mb(a){return this.$.reduce((b,c)=>b&&c.mb(a),!0)}observe(a,b,c){const d=
657
+ olympe.dc.ua.DESTINATION,b=olympe.dc.ua.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}V(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.R={Ca:'dc.query.Logger',Gj:'dc.query.QueryProcessor'};olympe.W.config(function(a){E(a,olympe.dc.query.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('query'));D(a,olympe.dc.query.R.Gj,olympe.dc.query.iu,olympe.dc.query.R.Ca,olympe.dc.db.R.Fa,olympe.dc.R.ug,new olympe.W.ja(olympe.dc.U.rh))});olympe.W.run([olympe.dc.query.R.Gj],a=>{olympe.dc.query.mk=()=>a});olympe.dc.query.Jd=class extends Error{};olympe.dc.query.$={};olympe.dc.query.$.Ed=class extends olympe.dc.query.Aa{constructor(...a){super();this.$=a}compile(){return this.$.reduce((a,b)=>{const c=[];for(const d of b.compile()){for(const e of a)d.push(...e);c.push(d)}return c},[])}md(){return new olympe.dc.query.$.te(...this.$.map(a=>a.md()))}Cb(){return this.$.flatMap(a=>a.Cb())}Gc(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}mb(a){return this.$.reduce((b,c)=>b&&c.mb(a),!0)}observe(a,b,c){const d=
658
658
  Array(this.$.length).fill(!1);let e=null;const f=(g,h)=>{d[g]=h;g=d.every(k=>k);e!==g&&(e=g,c(g))};this.$.forEach((g,h)=>{g.observe(a,olympe.Y.wb('AND-'+b+a+h),f.bind(null,h))})}ha(){return{pr:olympe.dc.query.Aa.C.gn,p:this.$.map(a=>a.ha())}}Lc(){throw Error('toObject for AND predicate should not be called');}toString(){return'And-'+this.$.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.$.forEach((c,d)=>{c.clear(a,olympe.Y.wb('AND-'+b+a+d))})}};olympe.dc.query.$.bf=class extends olympe.dc.query.Aa{constructor(a,b,c,d=!1){super();this.La=olympe.dc.ga(a);this.substring=b;this.db=c;this.C=d}Cb(){return[this.La]}Gc(a,b){return a instanceof olympe.dc.query.$.bf&&a.La===this.La?b?a.C?a.substring.toLowerCase().includes(this.substring.toLowerCase()):a.substring.includes(this.substring):this.C?this.substring.toLowerCase().includes(a.substring.toLowerCase()):this.substring.includes(a.substring):!1}Ia(){return this.La}mb(a){return this.apply(this.db.Ia(a,
659
659
  this.La))}observe(a,b,c){Vf(this.db,a,this.La,d=>{c(this.apply(d))},olympe.Y.wb(b+a+this.toString()))}apply(a){a=olympe.dc.lb.vc(a);return'string'===typeof a?this.C?a.includes(this.substring):a.toLowerCase().includes(this.substring.toLowerCase()):!1}toString(){return'Contains'+this.La+'-'+this.substring+'-'+this.C}clear(a,b){Wf(this.db,a,this.La,olympe.Y.wb(b+a+this.toString()))}Lc(){return{name:'CONTAINS',property:this.Ia(),value:this.substring,caseSensitive:this.C}}ha(){return{pr:olympe.dc.query.Aa.C.ej,
660
660
  p:this.La,s:this.substring,c:this.C}}};olympe.dc.query.$.re=class extends olympe.dc.query.Aa{constructor(a,b,c){super();this.La=olympe.dc.ga(a);this.C=olympe.dc.lb.vc(null!=b?b:null);this.db=c}Cb(){return[this.La]}Gc(a){if(a instanceof olympe.dc.query.$.re&&this.La===a.La)if('object'===typeof this.C&&null!==this.C){if(this.C instanceof olympe.dc.CloudObject)return this.C.Qa(a.C);if(this.C instanceof Date)return a.C instanceof Date&&this.C.getTime()===a.C.getTime();if(this.C instanceof olympe.D.Color)return this.C.Qa(a.C)}else return this.C===
@@ -662,150 +662,150 @@ a.C;return!1}mb(a){return this.apply(this.db.Ia(a,this.La))}observe(a,b,c){Vf(th
662
662
  this.C}toString(){let a,b;const c=null!=(b=null==(a=this.C)?void 0:a.toString())?b:'null';return'Equals-'+this.La+'-'+c}Lc(){return{name:'EQUALS',property:this.La,value:this.C}}ha(){let a=1,b=this.C;switch(!0){case this.C instanceof Date:a=2;b=this.C.toJSON();break;case this.C instanceof olympe.dc.CloudObject:a=3;b=this.C.X();break;case this.C instanceof olympe.D.Color:a=4,b=this.C.toJSON()}return{pr:olympe.dc.query.Aa.C.ro,p:this.La,t:a,v:b}}};function Kh(a,b){return'number'===typeof a.C?a.C:a.db.Ia(b,a.C)}function Lh(a,b,c){return olympe.Y.wb(c+b+a.C+a.La)}
663
663
  olympe.dc.query.$.di=class extends olympe.dc.query.Aa{constructor(a,b,c,d=!0,e=!0){super();this.db=a;this.La=olympe.dc.ga(b);this.C='number'===typeof c?c:olympe.dc.ga(c);this.F=d;this.G=e}md(){return new olympe.dc.query.$.di(this.db,this.La,this.C,!this.F,!this.G)}Cb(){return[this.La]}Gc(a,b){if(b)throw Error('Check coverage of inequality should not happen with opposite = true');return a instanceof olympe.dc.query.$.di&&this.La===a.La?typeof this.C!==typeof a.C||this.F!==a.F?!1:'number'===typeof this.C?
664
664
  this.F&&this.C>=a.C||!this.F&&this.C<=a.C:this.C===a.C:!1}Ia(){return this.La}mb(a){return this.compare(this.db.Ia(a,this.La),Kh(this,a))}observe(a,b,c){'string'===typeof this.C&&Vf(this.db,a,this.C,d=>{const e=this.db.Ia(a,this.La);null!==e&&c(this.compare(e,d))},Lh(this,a,b));Vf(this.db,a,this.La,d=>{const e=Kh(this,a);c(null!==e?this.compare(d,e):!0)},Lh(this,a,b))}compare(a,b){return null===a?!1:null===b?!0:this.G?this.F?a<b:a>b:this.F?a<=b:a>=b}clear(a,b){Wf(this.db,a,this.La,Lh(this,a,b));'string'===
665
- typeof this.C&&Wf(this.db,a,this.C,Lh(this,a,b))}Lc(){return{name:'INEQUALITY_OPERATOR',property:this.Ia(),operator:this.F?'<':'>',strict:this.G,value:this.C}}ha(){return{pr:olympe.dc.query.Aa.C.Vo,p:this.La,b:this.C,l:this.F,s:this.G}}toString(){return'GreaterThan-'+this.La+'-'+this.G+'-'+this.C}};olympe.dc.query.$.$d=class extends olympe.dc.query.Aa{constructor(a){super();this.C=a}compile(){const a=this.C.md();return this.Qa(a)?super.compile():a.compile()}md(){return this.C}Cb(){return this.C.Cb()}Gc(a,b){return a instanceof olympe.dc.query.$.$d?this.C.Gc(a.C,b):this.C.Gc(a,!b)}mb(a){return!this.C.mb(a)}observe(a,b,c){let d=null;this.C.observe(a,olympe.Y.wb('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}Lc(){return{name:'NOT',predicate:this.C.Lc()}}ha(){return{pr:olympe.dc.query.Aa.C.up,v:this.C.ha()}}toString(){return`NOT-${this.C.toString()}`}clear(a,
666
- b){this.C.clear(a,olympe.Y.wb('NOT'+b+a))}Qa(a){return a instanceof olympe.dc.query.$.$d?this.C.Qa(a.C):!1}};olympe.dc.query.$.te=class extends olympe.dc.query.Aa{constructor(...a){super();this.$=a}compile(){return this.$.map(a=>a.compile()).flat()}md(){return new olympe.dc.query.$.Ed(...this.$.map(a=>a.md()))}Cb(){return this.$.flatMap(a=>a.Cb())}Gc(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}mb(a){return this.$.reduce((b,c)=>b||c.mb(a),!1)}observe(a,b,c){const d=Array(this.$.length).fill(!1);let e=null;const f=(g,h)=>{d[g]=h;g=d.some(k=>
665
+ typeof this.C&&Wf(this.db,a,this.C,Lh(this,a,b))}Lc(){return{name:'INEQUALITY_OPERATOR',property:this.Ia(),operator:this.F?'<':'>',strict:this.G,value:this.C}}ha(){return{pr:olympe.dc.query.Aa.C.Vo,p:this.La,b:this.C,l:this.F,s:this.G}}toString(){return'GreaterThan-'+this.La+'-'+this.G+'-'+this.C}};olympe.dc.query.$.ae=class extends olympe.dc.query.Aa{constructor(a){super();this.C=a}compile(){const a=this.C.md();return this.Qa(a)?super.compile():a.compile()}md(){return this.C}Cb(){return this.C.Cb()}Gc(a,b){return a instanceof olympe.dc.query.$.ae?this.C.Gc(a.C,b):this.C.Gc(a,!b)}mb(a){return!this.C.mb(a)}observe(a,b,c){let d=null;this.C.observe(a,olympe.Y.wb('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}Lc(){return{name:'NOT',predicate:this.C.Lc()}}ha(){return{pr:olympe.dc.query.Aa.C.up,v:this.C.ha()}}toString(){return`NOT-${this.C.toString()}`}clear(a,
666
+ b){this.C.clear(a,olympe.Y.wb('NOT'+b+a))}Qa(a){return a instanceof olympe.dc.query.$.ae?this.C.Qa(a.C):!1}};olympe.dc.query.$.te=class extends olympe.dc.query.Aa{constructor(...a){super();this.$=a}compile(){return this.$.map(a=>a.compile()).flat()}md(){return new olympe.dc.query.$.Ed(...this.$.map(a=>a.md()))}Cb(){return this.$.flatMap(a=>a.Cb())}Gc(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}mb(a){return this.$.reduce((b,c)=>b||c.mb(a),!1)}observe(a,b,c){const d=Array(this.$.length).fill(!1);let e=null;const f=(g,h)=>{d[g]=h;g=d.some(k=>
667
667
  k);e!==g&&(e=g,c(g))};this.$.forEach((g,h)=>{g.observe(a,olympe.Y.wb('OR-'+b+a+h),f.bind(null,h))})}Lc(){throw Error('toObject for OR predicate should not be called');}ha(){return{pr:olympe.dc.query.Aa.C.Fp,p:this.$.map(a=>a.ha())}}toString(){return'And-'+this.$.reduce((a,b)=>a.toString()+'-'+b.toString(),'')}clear(a,b){this.$.forEach((c,d)=>{c.clear(a,olympe.Y.wb('OR-'+b+a+d))})}};olympe.dc.query.$.lf=class extends olympe.dc.query.Aa{constructor(a,b,c,d=!0){super();this.La=olympe.dc.ga(a);this.C='string'===typeof b?new RegExp(d?b:b.toLowerCase()):d?b:new RegExp(b.source.toLowerCase());this.db=c;this.F=d}Cb(){return[this.La]}Gc(a){return a instanceof olympe.dc.query.$.lf&&this.La===a.La&&this.C.toString()===a.C.toString()}mb(a){return this.apply(this.db.Ia(a,this.La))}observe(a,b,c){Vf(this.db,a,this.La,d=>{c(this.apply(d))},olympe.Y.wb(b+a+this.toString()))}apply(a){a=olympe.dc.lb.vc(a);
668
668
  return'string'===typeof a?this.C.test(this.F?a:a.toLowerCase()):!1}toString(){return'Regex'+this.La+'-'+this.C.toString()+'-'+this.F}Lc(){return{name:'REGEX',property:this.La,pattern:this.C,caseSensitive:this.F}}ha(){return{pr:olympe.dc.query.Aa.C.Zp,p:this.La,r:this.C.source,c:this.F}}clear(a,b){Wf(this.db,a,this.La,olympe.Y.wb(b+a+this.toString()))}};olympe.dc.query.$.am=class extends olympe.dc.query.Aa{constructor(a){super();this.C=new Set(a.map(olympe.dc.ga))}Cb(){return[]}Gc(a){return a instanceof olympe.dc.query.$.am&&Array.from(a.C).every(b=>this.C.has(b))}mb(a){return this.C.has(a)}observe(a,b,c){c(this.C.has(a))}clear(){}toString(){return'Tags-'+Array.from(this.C)}Lc(){return{name:'IS',tags:Array.from(this.C)}}ha(){return{pr:olympe.dc.query.Aa.C.Eq,t:Array.from(this.C)}}};olympe.dc.query.va={};function Ih(a){let b,c;const d=new Set(null!=(c=null==(b=a.F)?void 0:b.Cb())?c:[]);let e;a.Gb&&d.add(null==(e=a.Gb)?void 0:e.Ia().X());return d}function Mh(a){if(!a.ea){let b,c;a.ea=null!=(c=null==(b=a.F)?void 0:b.compile())?c:[]}return a.ea}function Nh(a,b){for(const c of b)if(a.some(d=>d.Gc(c,!1)))return!0;return!1}
669
669
  function Oh(a,b){if(null===a.F)return b;let c=!1;const d=a.toString();return(e,f,g,h)=>{const k=olympe.Y.wb(h+f+d);e?a.F.observe(f,k,l=>{c||b(l,f,g,k)}):(c=!0,a.F.clear(f,k),c=!1,b(!1,f,g,k))}}function Ph(a,b,c){if(null===a.Gb)return c;const d=a.toString();return(e,f,g,h)=>{const k=a.Gb.Ia();h=olympe.Y.wb(h+d);e?Vf(a.db,f,k,()=>{Zg(b)},h):Wf(a.db,f,k,h);c(e,f,g,h)}}
670
- olympe.dc.query.va.Pl=class{constructor(a,b){this.db=olympe.dc.ia();this.C=a;this.optional=b;this.ea=this.Gb=this.F=this.id=null}static C(a){var b=a.i;if('string'===typeof a.f)return new olympe.dc.query.va.Yd(b,a.f);var c=a.o;const d=new olympe.dc.Ma.Relation(a.t,a.d);b='boolean'===typeof a.s?new olympe.dc.query.va.Mf(b,d,a.s,c):new olympe.dc.query.va.Zh(b,d,c);void 0!==a.p&&(b.F=hh(a.p));void 0!==a.c&&(c=b.V(),a=a.c,a=new olympe.dc.query.af(c,new olympe.dc.Ma.Property(a.p),a.o),b.Gb=a);return b}P(){}L(){let a,
670
+ olympe.dc.query.va.Pl=class{constructor(a,b){this.db=olympe.dc.ia();this.C=a;this.optional=b;this.ea=this.Gb=this.F=this.id=null}static C(a){var b=a.i;if('string'===typeof a.f)return new olympe.dc.query.va.Zd(b,a.f);var c=a.o;const d=new olympe.dc.Ma.Relation(a.t,a.d);b='boolean'===typeof a.s?new olympe.dc.query.va.Mf(b,d,a.s,c):new olympe.dc.query.va.Zh(b,d,c);void 0!==a.p&&(b.F=hh(a.p));void 0!==a.c&&(c=b.V(),a=a.c,a=new olympe.dc.query.af(c,new olympe.dc.Ma.Property(a.p),a.o),b.Gb=a);return b}P(){}K(){let a,
671
671
  b,c,d;return`${this.C}-${this.optional}${null!=(c=null==(a=this.F)?void 0:a.toString())?c:''}${null!=(d=null==(b=this.Gb)?void 0:b.toString())?d:''}`}Lc(){}toJSON(){}ha(){const a={i:this.C,o:this.optional};null!==this.F&&(a.p=this.F.ha());null!==this.Gb&&(a.c=this.Gb.ha());return a}Z(){}za(){return new olympe.dc.query.va.Wl}aa(){}V(){null===this.id&&(this.id=this.Z());return this.id}T(){return this.optional}Gc(a){const b=Mh(this);if(0===b.length)return!0;a=Mh(a);if(0===a.length)return!1;for(const c of a)if(!b.some(d=>
672
672
  Nh(d,c)))return!1;return!0}filter(a){const b=this.P(),c=b.F;null===c?b.F=a:b.F=c instanceof olympe.dc.query.$.Ed?new olympe.dc.query.$.Ed(...Array.from(c.$),a):new olympe.dc.query.$.Ed(b.F,a);return b}sort(a,b){const c=this.P();c.Gb=new olympe.dc.query.af(this.V(),a,b);return c}Ig(){return this.Gb}mb(a){if(null!==this.F){var b=this.V();for(const c of $g(a,b))this.F.mb(c)||a.remove(c,b,null)}}observe(a,b){const c=this.V();return Oh(this,Ph(this,a,(d,e,f,g)=>{(d?bh(a,e,c,f):a.remove(e,c,f))&&b(d,e,
673
- f,g)}))}};olympe.dc.query.va.oh=class extends olympe.dc.query.va.Pl{constructor(a,b,c){super(a,c);this.relation=b;this.oa=null}};olympe.dc.query.va.Pp=class{has(){}P(){}F(){}Zc(){}G(){}remove(){}};olympe.dc.query.va.Yn=class{constructor(a){this.C=null;this.content=new Map;this.L=null!=a?a:null}Zc(){return this.content.keys()}F(a){return this.content.has(a)&&null!==this.C?[this.C].values():[].values()}has(a){return this.content.has(a)}P(a){let b;return(null==(b=this.L)?void 0:b.call(this,a))||!1}G(a,b){if(null===this.C)this.C=b;else if(b!==this.C)throw Error('Should never try to insert multi parent in the same counter part result. To be used with FollowRulePart only');let c;b=null!=(c=this.content.get(a))?
674
- c:0;this.content.set(a,b+1);return 0===b}remove(a,b){if(null===b)return this.content.delete(a);b=this.content.get(a);1<b?this.content.set(a,b-1):this.content.delete(a);return 1===b}};olympe.dc.query.va.Yn.xa=[olympe.dc.query.va.Pp];olympe.dc.query.va.Zh=class extends olympe.dc.query.va.oh{constructor(a,b,c){super(a,olympe.dc.query.Relation.from(b,!1),c)}P(){const a=new olympe.dc.query.va.Zh(this.C,this.relation,this.optional);a.F=this.F;a.Gb=this.Gb;return a}Z(){return olympe.Y.wb(this.C+this.relation.V())}aa(a,b){return b instanceof olympe.dc.query.va.Yd?[a]:[a+this.relation.V(),a+Jh(this.relation).V(),a+'followRules'].map(c=>olympe.Y.wb(c))}mb(a){const b=this.V();for(const c of $g(a,this.C))this.db.bb(c,this.relation).forEach(d=>
675
- {bh(a,d,b,c)});super.mb(a)}observe(a,b){const c=super.observe(a,b),d=this.relation.X(),e=this.relation.Ha();return(f,g,h,k)=>{const l=olympe.Y.wb(k+g+this.toString());f?V(this.db,g,this.relation,(n,p)=>{ch(a,n,d,e,g,p);c(n,p,g,l)},l):this.db.F(g,this.relation,l)}}ha(){return Object.assign(super.ha(),{t:this.relation.X(),d:this.relation.Ha()})}L(){return`followPart-${this.relation.V()}-${super.L()}`}Lc(){const a={recursive:!1,relation:this.relation,filter:Mh(this).map(b=>b.map(c=>c.Lc())),optional:this.T()};
676
- this.Gb&&(a.sort={property:this.Gb.Ia(),order:this.Gb.gi});return a}toString(){return`Follow Part: ${this.relation}`}toJSON(){return{type:'follow',relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.Ha()}}};olympe.dc.query.va.Mf=class extends olympe.dc.query.va.oh{constructor(a,b,c,d){super(a,olympe.dc.query.Relation.from(b,!0),d);this.G=c}P(){const a=new olympe.dc.query.va.Mf(this.C,this.relation,this.G,this.optional);a.F=this.F;a.Gb=this.Gb;return a}Z(){return olympe.Y.wb(this.C+this.relation.V()+this.G)}aa(a,b){return b instanceof olympe.dc.query.va.Yd?[a]:[a+this.relation.V(),a+'followRules'].map(c=>olympe.Y.wb(c))}mb(a){const b=this.V();for(const c of $g(a,this.C))this.G&&bh(a,c,b,c),this.db.Mg(c,
677
- this.relation).forEach(d=>{bh(a,d,b,c)});super.mb(a)}observe(a,b){const c=super.observe(a,b),d=this.relation.X(),e=this.relation.Ha(),f=new Set,g=(h,k,l,n,p)=>{k=olympe.Y.wb(k+h+p+l);if(this.G||0<l)0<l&&ch(a,n,d,e,h,p),c(n,p,h,k);n?f.has(p)||(f.add(p),V(this.db,p,this.relation,g.bind(this,h,k,l+1),k)):(f.delete(p),this.db.F(p,this.relation,k))};return(h,k,l,n)=>g(k,n+this.toString(),0,h,k)}ha(){return Object.assign(super.ha(),{s:this.G,t:this.relation.X(),d:this.relation.Ha()})}L(){return`followRecursivelyPart-${this.relation.V()}-${this.G}-${super.L()}`}Lc(){const a=
678
- {recursive:this.G?'INCLUDE_SELF':'EXCLUDE_SELF',relation:this.relation,filter:Mh(this).map(b=>b.map(c=>c.Lc())),optional:this.T()};this.Gb&&(a.sort={property:this.Gb.Ia(),order:this.Gb.gi});return a}toString(){return`FollowRecursively Part: ${this.relation}`}toJSON(){return{type:'follow recursively',relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.Ha()}}};olympe.dc.query.va.Yd=class extends olympe.dc.query.va.Pl{constructor(a,b,c){super(a,!1);this.ec=b;this.G=null!=c?c:null}P(){return new olympe.dc.query.va.Yd(this.C,this.ec,this.G)}Z(){return olympe.Y.wb(this.C+'followRules')}za(){return new olympe.dc.query.va.Yn(this.G)}aa(a,b){return b instanceof olympe.dc.query.va.Yd?[a]:[olympe.Y.wb(a+'followRules')]}Gc(a){if(a instanceof olympe.dc.query.va.oh){const b=olympe.dc.ua.ORIGIN,c=olympe.dc.ua.DESTINATION,d=olympe.dc.nc.Wc,e=olympe.dc.nc.Wh,f=olympe.dm.Relation.C.Tl,
679
- g=olympe.dm.Relation.C.em;a=a.relation;const h=a.Ha(),k=a.X();return h!==c||k!==d&&k!==e?!!(gg(this.db,a,this.ec)&(a.Ha()===b?f:g)):!0}return a instanceof olympe.dc.query.va.Yd?this.ec===a.ec:!1}mb(a){const b=this.V();for(const c of $g(a,this.C))for(const d of ef(this.db,c,this.ec))bh(a,d,b,c)}observe(a,b){const c=this.V(),d=(e,f,g,h)=>{const k=`${h}:${g}`;f?dg(this.db,g,this.ec,(l,n,p,q,r)=>{p&&(p=q?bh(a,r,c,e):a.remove(r,c,e),null!==n&&ch(a,q,l,n,g,r),p&&d(e,q,r,h))},k):eg(this.db,g,this.ec,k);
680
- b(f,g,e,k)};return(e,f,g,h)=>{g=olympe.Y.wb(h+f+this.toString());(e?bh(a,f,c,f):a.remove(f,c,f))&&d(f,e,f,g)}}ha(){return Object.assign(super.ha(),{f:this.ec})}L(){return`followRulePart-${this.ec}-${super.L()}`}Lc(){throw Error('Try to parse a part of an implicit query. Data connectors do not support those queries.');}toString(){return`FollowRule Part: ${this.db.name(this.ec)} (${this.ec})`}toJSON(){return{type:'follow rule',rule:`${this.db.name(this.ec)} (${this.ec})`}}T(){return!1}filter(){olympe.ma.ab('dc.query').warn('Should never try to filter on queries with follow rules, ignore...');
681
- return this}sort(){olympe.ma.ab('dc.query').warn('Should never try to sort queries with follow rules, ignore...');return this}};olympe.dc.query.va.Yd.F='followRules';olympe.dc.query.va.Wl=class{constructor(){this.content=new Map}Zc(){return this.content.keys()}F(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.values())?c:[]}has(a){return this.content.has(a)}P(){return!1}G(a,b){let c=this.content.get(a);c||(c=new Set,this.content.set(a,c));a=c.size;c.add(b);return a<c.size}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a);b=c.delete(b);0===c.size&&this.content.delete(a);return b}};olympe.dc.query.va.Wl.xa=[olympe.dc.query.va.Pp];olympe.dc.sources={};olympe.dc.sources.lq=class extends Error{};olympe.dc.sources.jj=class{V(){}init(){}destroy(){}request(){return v(function*(){})}ea(){}};const Qh=olympe.net.Ba.Qd.GET,Rh=olympe.net.Ba.Qd.lh,Sh=olympe.net.Ba.Qd.yc,Th=olympe.net.Ba.Qd.Op,Uh=olympe.net.Ba.Headers.Th,Vh=olympe.net.Ba.Headers.un,Wh=olympe.net.Ba.ac.jh,Xh=olympe.net.Ba.ac.Pn,Yh=olympe.net.Ba.ac.zo,Zh=olympe.net.Ba.ac.pi,$h=olympe.net.Ba.ac.Cl;
682
- function ai(a){const b=`/${olympe.W.getParameter(olympe.dc.sources.U.jl)}/:${'sourceId'}/:${'requestType'}`.replace(/\/+/g,'/').replace(/\/$/,'');a.T.L('_DataSourcesHTTPService',b,[Qh,Rh,Sh,Th],(c,d,e)=>v(function*(){const f=d.get('sourceId');var g=a.G.get(d.get('sourceId'));if(!g){var h;g=null!=(h=olympe.dc.ia().name(f))?h:'name unknown';return Promise.resolve(new olympe.net.Zd(`No handler found for datasource ${f} called '${g}'`,$h,'Invalid source id'))}h=c.method;const k=c.Li();try{var l=yield bi(a,
683
- k[Vh])}catch(r){return new olympe.net.Zd(`Invalid token ${r}`,Yh,'Access denied')}try{var n=Number(d.get('requestType')),p=c.body;const r=olympe.dc.Request.C.Kb,t=olympe.dc.Request.C.sg,u=olympe.dc.Request.C.Bg,w=olympe.dc.Request.C.Cg,y=olympe.dc.Request.C.Xg,z=olympe.dc.Request.C.hg,A=olympe.dc.Request.C.Jf,C=olympe.dc.Request.C.Qf;let M;switch(n){case r:break;case t:case u:case y:case w:M=a.F.F(p);break;case C:case z:case A:M={tag:e.get('tag'),model:e.get('model'),mimeType:k[Uh]};p instanceof Uint8Array&&
684
- (M.content=p);break;default:throw Error(`Data Http request type not supported ${n}`);}let K;const ta=null!=(K=k['X-Source-Origin'])?K:olympe.dc.Pa.kf;var q=Je(new olympe.dc.Request(n,f,M,l),ta);const Ka=yield g(q);let Lc;void 0===Ka?Lc='':Ka instanceof Blob||Ka instanceof Uint8Array||Ka instanceof ArrayBuffer||'function'===typeof(null==Ka?void 0:Ka.pipe)?Lc=Ka:Lc=JSON.stringify(a.F.ha(Ka));return new olympe.net.Zd(Lc,h===Th?Xh:Wh)}catch(r){return r instanceof olympe.dc.sources.lq?new olympe.net.Zd(`Authorization error: ${r}`,
685
- Yh,'Forbidden'):new olympe.net.Zd(`Internal server error: ${r}`,Zh,'Internal server error')}})).catch(c=>a.H.error(`Error while starting the HTTP Service: ${c}`));a.H.debug(`Started HTTP service with path: ${b}`)}function ci(a){a.T.Z('_DataSourcesHTTPService').catch(b=>{a.H.error(`An error occurred while stopping the data sources http service: ${b}`)})}function di(a,b,c){0===a.G.size&&ai(a);a.G.set(b,c);return()=>{a.G.delete(b);0===a.G.size&&ci(a)}}
673
+ f,g)}))}};olympe.dc.query.va.oh=class extends olympe.dc.query.va.Pl{constructor(a,b,c){super(a,c);this.relation=b;this.oa=null}};olympe.dc.query.va.Pp=class{has(){}P(){}F(){}Zc(){}G(){}remove(){}};olympe.dc.query.va.Yn=class{constructor(a){this.C=null;this.content=new Map;this.K=null!=a?a:null}Zc(){return this.content.keys()}F(a){return this.content.has(a)&&null!==this.C?[this.C].values():[].values()}has(a){return this.content.has(a)}P(a){let b;return(null==(b=this.K)?void 0:b.call(this,a))||!1}G(a,b){if(null===this.C)this.C=b;else if(b!==this.C)throw Error('Should never try to insert multi parent in the same counter part result. To be used with FollowRulePart only');let c;b=null!=(c=this.content.get(a))?
674
+ c:0;this.content.set(a,b+1);return 0===b}remove(a,b){if(null===b)return this.content.delete(a);b=this.content.get(a);1<b?this.content.set(a,b-1):this.content.delete(a);return 1===b}};olympe.dc.query.va.Yn.xa=[olympe.dc.query.va.Pp];olympe.dc.query.va.Zh=class extends olympe.dc.query.va.oh{constructor(a,b,c){super(a,olympe.dc.query.Relation.from(b,!1),c)}P(){const a=new olympe.dc.query.va.Zh(this.C,this.relation,this.optional);a.F=this.F;a.Gb=this.Gb;return a}Z(){return olympe.Y.wb(this.C+this.relation.V())}aa(a,b){return b instanceof olympe.dc.query.va.Zd?[a]:[a+this.relation.V(),a+Jh(this.relation).V(),a+'followRules'].map(c=>olympe.Y.wb(c))}mb(a){const b=this.V();for(const c of $g(a,this.C))this.db.bb(c,this.relation).forEach(d=>
675
+ {bh(a,d,b,c)});super.mb(a)}observe(a,b){const c=super.observe(a,b),d=this.relation.X(),e=this.relation.Ha();return(f,g,h,k)=>{const l=olympe.Y.wb(k+g+this.toString());f?V(this.db,g,this.relation,(n,p)=>{ch(a,n,d,e,g,p);c(n,p,g,l)},l):this.db.F(g,this.relation,l)}}ha(){return Object.assign(super.ha(),{t:this.relation.X(),d:this.relation.Ha()})}K(){return`followPart-${this.relation.V()}-${super.K()}`}Lc(){const a={recursive:!1,relation:this.relation,filter:Mh(this).map(b=>b.map(c=>c.Lc())),optional:this.T()};
676
+ this.Gb&&(a.sort={property:this.Gb.Ia(),order:this.Gb.gi});return a}toString(){return`Follow Part: ${this.relation}`}toJSON(){return{type:'follow',relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.Ha()}}};olympe.dc.query.va.Mf=class extends olympe.dc.query.va.oh{constructor(a,b,c,d){super(a,olympe.dc.query.Relation.from(b,!0),d);this.G=c}P(){const a=new olympe.dc.query.va.Mf(this.C,this.relation,this.G,this.optional);a.F=this.F;a.Gb=this.Gb;return a}Z(){return olympe.Y.wb(this.C+this.relation.V()+this.G)}aa(a,b){return b instanceof olympe.dc.query.va.Zd?[a]:[a+this.relation.V(),a+'followRules'].map(c=>olympe.Y.wb(c))}mb(a){const b=this.V();for(const c of $g(a,this.C))this.G&&bh(a,c,b,c),this.db.Mg(c,
677
+ this.relation).forEach(d=>{bh(a,d,b,c)});super.mb(a)}observe(a,b){const c=super.observe(a,b),d=this.relation.X(),e=this.relation.Ha(),f=new Set,g=(h,k,l,n,p)=>{k=olympe.Y.wb(k+h+p+l);if(this.G||0<l)0<l&&ch(a,n,d,e,h,p),c(n,p,h,k);n?f.has(p)||(f.add(p),V(this.db,p,this.relation,g.bind(this,h,k,l+1),k)):(f.delete(p),this.db.F(p,this.relation,k))};return(h,k,l,n)=>g(k,n+this.toString(),0,h,k)}ha(){return Object.assign(super.ha(),{s:this.G,t:this.relation.X(),d:this.relation.Ha()})}K(){return`followRecursivelyPart-${this.relation.V()}-${this.G}-${super.K()}`}Lc(){const a=
678
+ {recursive:this.G?'INCLUDE_SELF':'EXCLUDE_SELF',relation:this.relation,filter:Mh(this).map(b=>b.map(c=>c.Lc())),optional:this.T()};this.Gb&&(a.sort={property:this.Gb.Ia(),order:this.Gb.gi});return a}toString(){return`FollowRecursively Part: ${this.relation}`}toJSON(){return{type:'follow recursively',relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.Ha()}}};olympe.dc.query.va.Zd=class extends olympe.dc.query.va.Pl{constructor(a,b,c){super(a,!1);this.ec=b;this.G=null!=c?c:null}P(){return new olympe.dc.query.va.Zd(this.C,this.ec,this.G)}Z(){return olympe.Y.wb(this.C+'followRules')}za(){return new olympe.dc.query.va.Yn(this.G)}aa(a,b){return b instanceof olympe.dc.query.va.Zd?[a]:[olympe.Y.wb(a+'followRules')]}Gc(a){if(a instanceof olympe.dc.query.va.oh){const b=olympe.dc.ua.ORIGIN,c=olympe.dc.ua.DESTINATION,d=olympe.dc.nc.Wc,e=olympe.dc.nc.Wh,f=olympe.dm.Relation.C.Tl,
679
+ g=olympe.dm.Relation.C.em;a=a.relation;const h=a.Ha(),k=a.X();return h!==c||k!==d&&k!==e?!!(gg(this.db,a,this.ec)&(a.Ha()===b?f:g)):!0}return a instanceof olympe.dc.query.va.Zd?this.ec===a.ec:!1}mb(a){const b=this.V();for(const c of $g(a,this.C))for(const d of ef(this.db,c,this.ec))bh(a,d,b,c)}observe(a,b){const c=this.V(),d=(e,f,g,h)=>{const k=`${h}:${g}`;f?dg(this.db,g,this.ec,(l,n,p,q,r)=>{p&&(p=q?bh(a,r,c,e):a.remove(r,c,e),null!==n&&ch(a,q,l,n,g,r),p&&d(e,q,r,h))},k):eg(this.db,g,this.ec,k);
680
+ b(f,g,e,k)};return(e,f,g,h)=>{g=olympe.Y.wb(h+f+this.toString());(e?bh(a,f,c,f):a.remove(f,c,f))&&d(f,e,f,g)}}ha(){return Object.assign(super.ha(),{f:this.ec})}K(){return`followRulePart-${this.ec}-${super.K()}`}Lc(){throw Error('Try to parse a part of an implicit query. Data connectors do not support those queries.');}toString(){return`FollowRule Part: ${this.db.name(this.ec)} (${this.ec})`}toJSON(){return{type:'follow rule',rule:`${this.db.name(this.ec)} (${this.ec})`}}T(){return!1}filter(){olympe.ma.ab('dc.query').warn('Should never try to filter on queries with follow rules, ignore...');
681
+ return this}sort(){olympe.ma.ab('dc.query').warn('Should never try to sort queries with follow rules, ignore...');return this}};olympe.dc.query.va.Zd.F='followRules';olympe.dc.query.va.Wl=class{constructor(){this.content=new Map}Zc(){return this.content.keys()}F(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.values())?c:[]}has(a){return this.content.has(a)}P(){return!1}G(a,b){let c=this.content.get(a);c||(c=new Set,this.content.set(a,c));a=c.size;c.add(b);return a<c.size}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a);b=c.delete(b);0===c.size&&this.content.delete(a);return b}};olympe.dc.query.va.Wl.xa=[olympe.dc.query.va.Pp];olympe.dc.sources={};olympe.dc.sources.lq=class extends Error{};olympe.dc.sources.jj=class{V(){}init(){}destroy(){}request(){return v(function*(){})}ea(){}};const Qh=olympe.net.Ba.Rd.GET,Rh=olympe.net.Ba.Rd.lh,Sh=olympe.net.Ba.Rd.yc,Th=olympe.net.Ba.Rd.Op,Uh=olympe.net.Ba.Headers.Th,Vh=olympe.net.Ba.Headers.un,Wh=olympe.net.Ba.ac.jh,Xh=olympe.net.Ba.ac.Pn,Yh=olympe.net.Ba.ac.zo,Zh=olympe.net.Ba.ac.pi,$h=olympe.net.Ba.ac.Cl;
682
+ function ai(a){const b=`/${olympe.W.getParameter(olympe.dc.sources.U.jl)}/:${'sourceId'}/:${'requestType'}`.replace(/\/+/g,'/').replace(/\/$/,'');a.T.K('_DataSourcesHTTPService',b,[Qh,Rh,Sh,Th],(c,d,e)=>v(function*(){const f=d.get('sourceId');var g=a.G.get(d.get('sourceId'));if(!g){var h;g=null!=(h=olympe.dc.ia().name(f))?h:'name unknown';return Promise.resolve(new olympe.net.$d(`No handler found for datasource ${f} called '${g}'`,$h,'Invalid source id'))}h=c.method;const k=c.Li();try{var l=yield bi(a,
683
+ k[Vh])}catch(r){return new olympe.net.$d(`Invalid token ${r}`,Yh,'Access denied')}try{var n=Number(d.get('requestType')),p=c.body;const r=olympe.dc.Request.C.Lb,t=olympe.dc.Request.C.sg,u=olympe.dc.Request.C.Bg,w=olympe.dc.Request.C.Cg,y=olympe.dc.Request.C.Xg,z=olympe.dc.Request.C.hg,A=olympe.dc.Request.C.Jf,C=olympe.dc.Request.C.Qf;let M;switch(n){case r:break;case t:case u:case y:case w:M=a.F.F(p);break;case C:case z:case A:M={tag:e.get('tag'),model:e.get('model'),mimeType:k[Uh]};p instanceof Uint8Array&&
684
+ (M.content=p);break;default:throw Error(`Data Http request type not supported ${n}`);}let K;const ta=null!=(K=k['X-Source-Origin'])?K:olympe.dc.Pa.kf;var q=Je(new olympe.dc.Request(n,f,M,l),ta);const Ka=yield g(q);let Lc;void 0===Ka?Lc='':Ka instanceof Blob||Ka instanceof Uint8Array||Ka instanceof ArrayBuffer||'function'===typeof(null==Ka?void 0:Ka.pipe)?Lc=Ka:Lc=JSON.stringify(a.F.ha(Ka));return new olympe.net.$d(Lc,h===Th?Xh:Wh)}catch(r){return r instanceof olympe.dc.sources.lq?new olympe.net.$d(`Authorization error: ${r}`,
685
+ Yh,'Forbidden'):new olympe.net.$d(`Internal server error: ${r}`,Zh,'Internal server error')}})).catch(c=>a.H.error(`Error while starting the HTTP Service: ${c}`));a.H.debug(`Started HTTP service with path: ${b}`)}function ci(a){a.T.Z('_DataSourcesHTTPService').catch(b=>{a.H.error(`An error occurred while stopping the data sources http service: ${b}`)})}function di(a,b,c){0===a.G.size&&ai(a);a.G.set(b,c);return()=>{a.G.delete(b);0===a.G.size&&ci(a)}}
686
686
  function ei(a,b,c){c=b instanceof olympe.dm.DataSource?b.Ae(c):fi(b,c);null===c&&a.H.error(`Impossible to build URL for data source ${b}`);return c}
687
- function gi(a,b,c){if(b===olympe.dc.Pa.SERVER){var d;return null!=(d=gd(a.L,a.ea.get(c)))?d:null}var e=a.P.get(b);if(!e){d=a.aa.yb(b);e=olympe.dc.sources.U.kl;const f=olympe.dc.sources.U.ai,g=olympe.dc.sources.U.So,h=olympe.dc.sources.U.jl;let k;e=`${ei(a,null!=d?d:b,g)?'https':'http'}://${ei(a,null!=d?d:b,e)}:${null!=(k=ei(a,null!=d?d:b,f))?k:ei(a,null!=d?d:b,g)?443:80}`+`/${ei(a,null!=d?d:b,h)}/${b}`.replace(/\/+/g,'/').replace(/\/$/,'');a.P.set(b,e)}return`${e}/${c}`}
688
- function hi(a,b){return b instanceof olympe.net.ci?id(a.L,b,Oc(a.Z).wd()):Promise.reject('No http request to send')}function ii(a,b){var c=gi(a,b.pc(),b.getType());if(!c)return Promise.reject(`No destination URL to send the query to destination: ${b.pc()}`);const d=b.content,e=JSON.stringify(a.F.ha(d));c=O(c,Rh,e);P(c,{['X-Source-Origin']:b.origin,[Uh]:'application/json'});return hi(a,c).then(f=>'string'===typeof f?a.F.F(JSON.parse(f)):olympe.dc.query.od.Ii(d))}
687
+ function gi(a,b,c){if(b===olympe.dc.Pa.SERVER){var d;return null!=(d=gd(a.K,a.ea.get(c)))?d:null}var e=a.P.get(b);if(!e){d=a.aa.yb(b);e=olympe.dc.sources.U.kl;const f=olympe.dc.sources.U.ai,g=olympe.dc.sources.U.So,h=olympe.dc.sources.U.jl;let k;e=`${ei(a,null!=d?d:b,g)?'https':'http'}://${ei(a,null!=d?d:b,e)}:${null!=(k=ei(a,null!=d?d:b,f))?k:ei(a,null!=d?d:b,g)?443:80}`+`/${ei(a,null!=d?d:b,h)}/${b}`.replace(/\/+/g,'/').replace(/\/$/,'');a.P.set(b,e)}return`${e}/${c}`}
688
+ function hi(a,b){return b instanceof olympe.net.ci?id(a.K,b,Oc(a.Z).wd()):Promise.reject('No http request to send')}function ii(a,b){var c=gi(a,b.pc(),b.getType());if(!c)return Promise.reject(`No destination URL to send the query to destination: ${b.pc()}`);const d=b.content,e=JSON.stringify(a.F.ha(d));c=O(c,Rh,e);P(c,{['X-Source-Origin']:b.origin,[Uh]:'application/json'});return hi(a,c).then(f=>'string'===typeof f?a.F.F(JSON.parse(f)):olympe.dc.query.od.Ii(d))}
689
689
  function ji(a,b){var c=gi(a,b.pc(),b.getType());if(!c)return Promise.reject(`No destination URL to send the transaction to destination: ${b.pc()}`);const d=JSON.stringify(a.F.ha(b.content));c=O(c,Rh,d);P(c,{['X-Source-Origin']:b.origin,[Uh]:'application/json'});return hi(a,c).then()}function bi(a,b){return'string'!==typeof b?Promise.reject('Please provide an authorization token.'):new Promise((c,d)=>{a.Z.Qg(b,(e,f)=>{e?d(e):c(f)})})}
690
- olympe.dc.sources.Ms=class{constructor(a,b,c,d,e,f){this.H=a;this.T=b;this.L=c;this.Z=d;this.aa=e;this.F=f;this.G=new Map;new olympe.D.$b('Http service of remote data provider');this.P=new Map;this.C=new Map;this.ea=new Map([[olympe.dc.Request.C.jg,olympe.N.bc.jg],[olympe.dc.Request.C.Jf,olympe.N.bc.mj],[olympe.dc.Request.C.Qf,olympe.N.bc.mj],[olympe.dc.Request.C.hg,olympe.N.bc.mj],[olympe.dc.Request.C.wn,olympe.N.bc.vn],[olympe.dc.Request.C.cq,olympe.N.bc.bq],[olympe.dc.Request.C.Lo,olympe.N.bc.Ko],
690
+ olympe.dc.sources.Ms=class{constructor(a,b,c,d,e,f){this.H=a;this.T=b;this.K=c;this.Z=d;this.aa=e;this.F=f;this.G=new Map;new olympe.D.$b('Http service of remote data provider');this.P=new Map;this.C=new Map;this.ea=new Map([[olympe.dc.Request.C.jg,olympe.N.bc.jg],[olympe.dc.Request.C.Jf,olympe.N.bc.mj],[olympe.dc.Request.C.Qf,olympe.N.bc.mj],[olympe.dc.Request.C.hg,olympe.N.bc.mj],[olympe.dc.Request.C.wn,olympe.N.bc.vn],[olympe.dc.Request.C.cq,olympe.N.bc.bq],[olympe.dc.Request.C.Lo,olympe.N.bc.Ko],
691
691
  [olympe.dc.Request.C.sg,olympe.N.bc.Kn],[olympe.dc.Request.C.Cg,olympe.N.bc.TRANSACTION]])}Dc(a){var b=gi(this,a.pc(),a.getType());if(!b)return Promise.reject(`No destination URL to send the status request to destination: ${a.pc()}`);b=O(b,Qh);P(b,{['X-Source-Origin']:a.origin});return hi(this,b)}uploadFileContent(a){const {tag:b,model:c,content:d}=a.content,e=a.pc(),f=gi(this,e,a.getType());if(!f)return Promise.reject(`No destination URL to upload the file. ${b}`);const g=O(e===olympe.dc.Pa.SERVER?
692
692
  `${f}/${b}`:`${f}?tag=${b}&model=${c}`,Th,d);P(g,{[Uh]:'application/octet-stream'});e!==olympe.dc.Pa.SERVER&&P(g,{['X-Source-Origin']:a.origin});return hi(this,g).then(()=>(new URL(g.C())).pathname)}deleteFileContent(a){const {tag:b,model:c}=a.content,d=a.pc();var e=gi(this,d,a.getType());if(!e)return Promise.reject(`No destination URL to delete the file. ${b}`);e=O(d===olympe.dc.Pa.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,Sh,b);d!==olympe.dc.Pa.SERVER&&P(e,{['X-Source-Origin']:a.origin});return hi(this,
693
693
  e).then()}downloadFileContent(a){const {tag:b,model:c}=a.content,d=a.pc();var e=gi(this,d,a.getType());if(!e)return Promise.reject(Error(`No destination URL to download the file. ${b}`));var f;const g=null!=(f=this.C.get(b))?f:[];f=new Promise((h,k)=>{g.push({done:h,Ch:k})});if(this.C.has(b))return f;this.C.set(b,g);e=O(d===olympe.dc.Pa.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,Qh,b,olympe.net.Ba.ResponseType.Hq);d!==olympe.dc.Pa.SERVER&&P(e,{['X-Source-Origin']:a.origin});hi(this,e).then(h=>
694
- {const k=h instanceof ArrayBuffer?new Uint8Array(h,0,h.byteLength):h;let l;null==(l=this.C.get(b))||l.forEach(n=>n.done(k))}).catch(h=>{let k;null==(k=this.C.get(b))||k.forEach(l=>l.Ch(`${h}`))}).finally(()=>{this.C.delete(b)});return f}};olympe.dc.sources.$o=class{constructor(a,b){this.H=a;this.Yb=b}};olympe.dc.sources.$o.ac={si:0,EA:1,FA:3,bA:4};const ki=olympe.dc.Request.C.Kb,li=olympe.dc.Request.C.sg,mi=olympe.dc.Request.C.Hj,ni=olympe.dc.Request.C.Qf,oi=olympe.dc.Request.C.Jf,pi=olympe.dc.Request.C.hg,qi=olympe.dc.Request.C.Rh,ri=olympe.dc.Request.C.Xg,si=olympe.dc.Request.C.Bg,ti=olympe.dc.Request.C.Cg;
694
+ {const k=h instanceof ArrayBuffer?new Uint8Array(h,0,h.byteLength):h;let l;null==(l=this.C.get(b))||l.forEach(n=>n.done(k))}).catch(h=>{let k;null==(k=this.C.get(b))||k.forEach(l=>l.Ch(`${h}`))}).finally(()=>{this.C.delete(b)});return f}};olympe.dc.sources.$o=class{constructor(a,b){this.H=a;this.Yb=b}};olympe.dc.sources.$o.ac={si:0,EA:1,FA:3,bA:4};const ki=olympe.dc.Request.C.Lb,li=olympe.dc.Request.C.sg,mi=olympe.dc.Request.C.Hj,ni=olympe.dc.Request.C.Qf,oi=olympe.dc.Request.C.Jf,pi=olympe.dc.Request.C.hg,qi=olympe.dc.Request.C.Rh,ri=olympe.dc.Request.C.Xg,si=olympe.dc.Request.C.Bg,ti=olympe.dc.Request.C.Cg;
695
695
  function ui(a,b){const c=b.V();null===a.F&&(a.F=new olympe.Y.bm(6E4),Ma(a.F,(f,g)=>{a.applyTransaction(g,!1).catch(h=>{a.H.error(`Error occurred when applying burst transaction ${f} to the data source: ${h}`)})}),Na(a.F,()=>{a.F=null}));let d;const e=null!=(d=a.F.get(c))?d:new olympe.dc.db.Vc(c);b.td(e);Ja(a.F.C,c)||a.F.set(c,e)}
696
696
  function vi(a,b){const c=b.V();let d,e;const f=null!=(e=null==(d=a.F)?void 0:d.get(c))?e:new olympe.dc.db.Vc(c);let g;null==(g=a.F)||g.delete(c);b.td(f);return a.applyTransaction(f,!1).catch(h=>{a.H.error(`Error occurred when applying burst transaction ${c} to the data source: ${h}`)})}function wi(a,b){const c=rxjs.defer(()=>a.C.executeQuery(b).then(d=>d.Wb()));return 0<a.T?rxjs.interval(a.T).pipe(rxjs.operators.switchMap(()=>c)):c}
697
- olympe.dc.sources.np=class{constructor(a,b){this.H=a;this.C=b;this.Yb=null;this.P=olympe.dc.query.mk();this.L=olympe.dc.Em();this.G=new olympe.D.$b('Context of source '+this.V());let c;this.T=null!=(c=b.Ae(olympe.dc.sources.U.Ll))?c:-1;this.F=null}V(){return this.C.V()}init(a){this.Yb=a;if(this.V()===olympe.dc.Pa.SELF)return this;(new Promise((b,c)=>{let d=!0;xi(this.C,this.G).subscribe(rxjs.Subscriber.create(e=>{if(this.H.C()){this.H.debug(`Data source ${this.C.name()} has loaded ${e.size()} data types in its cache:`);
698
- for(const [f,g]of e)this.H.debug(`=> DataType: ${g.name()} (${f})`)}d&&(d=!1,b())},c))})).then(()=>this.C.init(this.G)).catch(b=>{this.H.error(`Error while initialization of DataSource ${this.C.name()} (${this.V()}): ${b}`)});return this}healthCheck(){return this.C.healthCheck().then(()=>`Data source ${this.C.name()} (${this.C.V()}) OK`)}destroy(){this.G.destroy();return this.C.destroy()}request(a){const b=a.content;var c=a.getType();switch(c){case ki:const d=olympe.dm.DataSource.Kb.Fb,e=olympe.dm.DataSource.Kb.nh;
699
- return this.C.healthCheck().then(()=>({s:e})).catch(g=>({s:d,r:String(g)}));case li:return this.C.executeQuery(b);case qi:return c=b.Wb(),ui(this,c),this.L.Jc(c),Promise.resolve();case si:case ti:const f=b.Wb();return this.applyTransaction(f,c===ti).finally(()=>{if(a.origin===olympe.dc.Pa.SELF){var g=f.V();g=Je(new olympe.dc.Request(olympe.dc.Request.C.nj,olympe.dc.Pa.SELF,{id:g,finalize:olympe.dc.transaction.mf.C.ki,error:null}),this.V());let h;null==(h=this.Yb)||h.nd(g)}});case ri:return vi(this,
697
+ olympe.dc.sources.np=class{constructor(a,b){this.H=a;this.C=b;this.Yb=null;this.P=olympe.dc.query.mk();this.K=olympe.dc.Em();this.G=new olympe.D.$b('Context of source '+this.V());let c;this.T=null!=(c=b.Ae(olympe.dc.sources.U.Ll))?c:-1;this.F=null}V(){return this.C.V()}init(a){this.Yb=a;if(this.V()===olympe.dc.Pa.SELF)return this;(new Promise((b,c)=>{let d=!0;xi(this.C,this.G).subscribe(rxjs.Subscriber.create(e=>{if(this.H.C()){this.H.debug(`Data source ${this.C.name()} has loaded ${e.size()} data types in its cache:`);
698
+ for(const [f,g]of e)this.H.debug(`=> DataType: ${g.name()} (${f})`)}d&&(d=!1,b())},c))})).then(()=>this.C.init(this.G)).catch(b=>{this.H.error(`Error while initialization of DataSource ${this.C.name()} (${this.V()}): ${b}`)});return this}healthCheck(){return this.C.healthCheck().then(()=>`Data source ${this.C.name()} (${this.C.V()}) OK`)}destroy(){this.G.destroy();return this.C.destroy()}request(a){const b=a.content;var c=a.getType();switch(c){case ki:const d=olympe.dm.DataSource.Lb.Fb,e=olympe.dm.DataSource.Lb.nh;
699
+ return this.C.healthCheck().then(()=>({s:e})).catch(g=>({s:d,r:String(g)}));case li:return this.C.executeQuery(b);case qi:return c=b.Wb(),ui(this,c),this.K.Jc(c),Promise.resolve();case si:case ti:const f=b.Wb();return this.applyTransaction(f,c===ti).finally(()=>{if(a.origin===olympe.dc.Pa.SELF){var g=f.V();g=Je(new olympe.dc.Request(olympe.dc.Request.C.nj,olympe.dc.Pa.SELF,{id:g,finalize:olympe.dc.transaction.mf.C.ki,error:null}),this.V());let h;null==(h=this.Yb)||h.nd(g)}});case ri:return vi(this,
700
700
  b.Wb());case ni:return b.content instanceof Uint8Array?this.C.uploadFileContent(b.tag,b.model,b.content).then(()=>`datasource://${b.tag}`):Promise.reject('File content is undefined');case oi:return this.C.downloadFileContent(b.tag,b.model);case pi:return this.C.deleteFileContent(b.tag,b.model);default:return Promise.reject(`Request of type ${a.getType()} is not supported by the data source`)}}ea(a){if(a.getType()===mi){const b=a.content;a=a.origin;return a===olympe.dc.Pa.SELF?wi(this,b):nh(this.P,
701
- b,this.G,a,olympe.dc.pa.Xc.Gf,{}).pipe(rxjs.operators.map(c=>{let d,e;return null!=(e=null==(d=c.Be)?void 0:d.G)?e:null}),rxjs.operators.filter(c=>null!==c))}return rxjs.throwError(()=>Error('Subscription request not supported'))}applyTransaction(a,b){const c=this;return v(function*(){const d=yi(a);yield c.C.applyTransaction(d,{batch:b});yield vh(c.P,c.V(),a);c.L.Jc(a)})}};olympe.dc.sources.np.xa=[olympe.dc.sources.jj];function yi(a){const b=olympe.dc.sources.Pf.C.js,c=olympe.dc.sources.Pf.C.Tu,d=olympe.dc.sources.Pf.C.qs,e=olympe.dc.sources.Pf.C.ks,f=olympe.dc.sources.Pf.C.rs,g=[],h=[],k=[],l=[],n=[];a.Ab.forEach((p,q)=>{const r=p.Vb();p.G()?g.push(zi(b,q,r,p.T()?p.Cb():null)):p.Ld()?k.push(zi(d,q,r,null,p.P())):p.T()&&h.push(zi(c,q,r,p.Cb()));for(const [t,u,w]of p.xd())p=a.Rc(u),w?l.push(new Ai(e,t,q,u,r,p.Vb())):n.push(new Ai(f,t,q,u,r,p.Vb()))});return n.concat(k,g,h,l)}
701
+ b,this.G,a,olympe.dc.pa.Xc.Gf,{}).pipe(rxjs.operators.map(c=>{let d,e;return null!=(e=null==(d=c.Be)?void 0:d.G)?e:null}),rxjs.operators.filter(c=>null!==c))}return rxjs.throwError(()=>Error('Subscription request not supported'))}applyTransaction(a,b){const c=this;return v(function*(){const d=yi(a);yield c.C.applyTransaction(d,{batch:b});yield vh(c.P,c.V(),a);c.K.Jc(a)})}};olympe.dc.sources.np.xa=[olympe.dc.sources.jj];function yi(a){const b=olympe.dc.sources.Pf.C.js,c=olympe.dc.sources.Pf.C.Tu,d=olympe.dc.sources.Pf.C.qs,e=olympe.dc.sources.Pf.C.ks,f=olympe.dc.sources.Pf.C.rs,g=[],h=[],k=[],l=[],n=[];a.Ab.forEach((p,q)=>{const r=p.Vb();p.G()?g.push(zi(b,q,r,p.T()?p.Cb():null)):p.Md()?k.push(zi(d,q,r,null,p.P())):p.T()&&h.push(zi(c,q,r,p.Cb()));for(const [t,u,w]of p.xd())p=a.Rc(u),w?l.push(new Ai(e,t,q,u,r,p.Vb())):n.push(new Ai(f,t,q,u,r,p.Vb()))});return n.concat(k,g,h,l)}
702
702
  function zi(a,b,c,d,e){if('string'!==typeof c)throw Error(`Patch: model of instance ${b} is missing. It is invalid transaction.`);return new Bi(a,b,c,d,e)}olympe.dc.sources.Pf=class{constructor(a){this.type=a}};class Bi extends olympe.dc.sources.Pf{constructor(a,b,c,d,e){super(a);this.object=b;this.model=c;this.properties=null!=d?d:null;this.deleteRules=null!=e?e:olympe.dc.Zb.NONE}}
703
703
  class Ai extends olympe.dc.sources.Pf{constructor(a,b,c,d,e,f){super(a);this.relation=b;this.from=c;this.to=d;this.fromModel=e;this.toModel=f}}olympe.dc.sources.Pf.C={js:'CREATE',Tu:'UPDATE',qs:'DELETE',ks:'CREATE_RELATION',rs:'DELETE_RELATION'};function Ci(a,b){b=Je(new olympe.dc.Request(olympe.dc.Request.C.nj,olympe.dc.Pa.SELF,{id:b,finalize:olympe.dc.transaction.mf.C.ki,error:null}),a.V());let c;null==(c=a.Yb)||c.nd(b)}
704
- olympe.dc.sources.Sk=class{constructor(a,b){this.H=a;this.F=b;this.Yb=null}V(){}T(){}Z(){}init(a){this.Yb=a;return this}destroy(){return Promise.resolve()}request(a){const b=this;return v(function*(){if(!b.F.F)return b.T(a);var c=olympe.dc.Request.C.Kb,d=olympe.dc.Request.C.sg;const e=olympe.dc.Request.C.Bg,f=olympe.dc.Request.C.Cg;var g=olympe.dc.Request.C.Rh;const h=olympe.dc.Request.C.Xg,k=olympe.dc.Request.C.Qf;var l=olympe.dc.Request.C.Jf;const n=olympe.dc.Request.C.hg,p=olympe.dc.sources.Sd(),
704
+ olympe.dc.sources.Sk=class{constructor(a,b){this.H=a;this.F=b;this.Yb=null}V(){}T(){}Z(){}init(a){this.Yb=a;return this}destroy(){return Promise.resolve()}request(a){const b=this;return v(function*(){if(!b.F.F)return b.T(a);var c=olympe.dc.Request.C.Lb,d=olympe.dc.Request.C.sg;const e=olympe.dc.Request.C.Bg,f=olympe.dc.Request.C.Cg;var g=olympe.dc.Request.C.Rh;const h=olympe.dc.Request.C.Xg,k=olympe.dc.Request.C.Qf;var l=olympe.dc.Request.C.Jf;const n=olympe.dc.Request.C.hg,p=olympe.dc.sources.Td(),
705
705
  q=a.getType();var r=a.pc();if(Jc(b.F)){q===d&&(c=a.content,(g=Le(a).get(olympe.dc.pa.C.Pk))&&(yield Di(p,c.V(),g)),b.H.debug(`Data Provider: Query ${c.V()} will be executed with its default Remote or Server provider`));if(q===l&&(l=a.content,'string'===typeof(null==l?void 0:l.url)&&l.url.startsWith('offline://')))return p.downloadFileContent(l.tag);l=yield b.T(a);if(q===d)d=a.content,yield Ei(p,d.V(),r,l.Wb(),!0),b.H.C()&&b.H.debug(`Data Provider: Data result for query ${d.V()}`,l.Wb().Ab.size,'instances',
706
- Array.from(l.Wb().xd()).length,'relations');else if(q===e||q===f||q===h)b.H.debug('Data Provider: Persisting graph patch in offline cache after successful transaction'),yield Ei(p,null,r,a.content.Wb(),!1);return l}b.H.debug(`Data Provider: Request (type: ${q}) will be sent to the cache data provider: ${a.content}`);switch(q){case c:return{s:olympe.dm.DataSource.Kb.ae};case d:return p.executeQuery(a.content);case e:case f:case h:d=a.content;const t=d.Wb().V();return p.applyTransaction(d,r).finally(()=>
707
- Ci(b,t));case g:return Promise.resolve();case k:return r=a.content,p.uploadFileContent(r.tag,r.content,r.mimeType);case l:return p.downloadFileContent(a.content.tag);case n:return p.deleteFileContent(a.content.tag);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${b.V()}`)}})}ea(a,b){if(!this.F.F)return this.Z(a,b);const c=olympe.dc.sources.Sd(),d=a.content,e=a.pc();return rxjs.of(null).pipe(rxjs.operators.switchMap(()=>{if(Jc(this.F)){const f=new rxjs.Observable(h=>
708
- {olympe.D.Br([this.F.Wf()],()=>{h.error(new olympe.N.errors.No('Go Offline',d.V()))})}),g=this.Z(a,b);return rxjs.merge(f,g)}return new rxjs.Observable(f=>{olympe.D.Br([this.F.Wf()],()=>{f.error(new olympe.N.errors.In('Back Online',d.V()))})})})).pipe(rxjs.operators.switchMap(f=>rxjs.from(Ei(c,d.V(),e,f).then(()=>f).catch(g=>{this.H.error(`Data Provider: Cache database failed to handle the data result with message: ${g}`);throw g;}))))}};olympe.dc.sources.Sk.xa=[olympe.dc.sources.jj];const Fi=olympe.dc.Request.C.Kb,Gi=olympe.dc.Request.C.sg,Hi=olympe.dc.Request.C.Hj,Ii=olympe.dc.Request.C.Bg,Ji=olympe.dc.Request.C.Cg,Ki=olympe.dc.Request.C.Rh,Li=olympe.dc.Request.C.Xg,Mi=olympe.dc.Request.C.Qf,Ni=olympe.dc.Request.C.Jf,Oi=olympe.dc.Request.C.hg;function Pi(a,b){let c;return(null==(c=a.za.yb(b))?void 0:c.Ae(olympe.dc.sources.U.Fe))!==olympe.dm.DataSource.Fe.Oo}function Qi(a,b){let c;return(null==(c=a.za.yb(b))?void 0:c.Ae(olympe.dc.sources.U.Fe))!==olympe.dm.DataSource.Fe.zn}
706
+ Array.from(l.Wb().xd()).length,'relations');else if(q===e||q===f||q===h)b.H.debug('Data Provider: Persisting graph patch in offline cache after successful transaction'),yield Ei(p,null,r,a.content.Wb(),!1);return l}b.H.debug(`Data Provider: Request (type: ${q}) will be sent to the cache data provider: ${a.content}`);switch(q){case c:return{s:olympe.dm.DataSource.Lb.be};case d:return p.executeQuery(a.content);case e:case f:case h:d=a.content;const t=d.Wb().V();return p.applyTransaction(d,r).finally(()=>
707
+ Ci(b,t));case g:return Promise.resolve();case k:return r=a.content,p.uploadFileContent(r.tag,r.content,r.mimeType);case l:return p.downloadFileContent(a.content.tag);case n:return p.deleteFileContent(a.content.tag);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${b.V()}`)}})}ea(a,b){if(!this.F.F)return this.Z(a,b);const c=olympe.dc.sources.Td(),d=a.content,e=a.pc();return rxjs.of(null).pipe(rxjs.operators.switchMap(()=>{if(Jc(this.F)){const f=new rxjs.Observable(h=>
708
+ {olympe.D.Br([this.F.Wf()],()=>{h.error(new olympe.N.errors.No('Go Offline',d.V()))})}),g=this.Z(a,b);return rxjs.merge(f,g)}return new rxjs.Observable(f=>{olympe.D.Br([this.F.Wf()],()=>{f.error(new olympe.N.errors.In('Back Online',d.V()))})})})).pipe(rxjs.operators.switchMap(f=>rxjs.from(Ei(c,d.V(),e,f).then(()=>f).catch(g=>{this.H.error(`Data Provider: Cache database failed to handle the data result with message: ${g}`);throw g;}))))}};olympe.dc.sources.Sk.xa=[olympe.dc.sources.jj];const Fi=olympe.dc.Request.C.Lb,Gi=olympe.dc.Request.C.sg,Hi=olympe.dc.Request.C.Hj,Ii=olympe.dc.Request.C.Bg,Ji=olympe.dc.Request.C.Cg,Ki=olympe.dc.Request.C.Rh,Li=olympe.dc.Request.C.Xg,Mi=olympe.dc.Request.C.Qf,Ni=olympe.dc.Request.C.Jf,Oi=olympe.dc.Request.C.hg;function Pi(a,b){let c;return(null==(c=a.za.yb(b))?void 0:c.Ae(olympe.dc.sources.U.Fe))!==olympe.dm.DataSource.Fe.Oo}function Qi(a,b){let c;return(null==(c=a.za.yb(b))?void 0:c.Ae(olympe.dc.sources.U.Fe))!==olympe.dm.DataSource.Fe.zn}
709
709
  function Ri(a,b){b=b.wc();if(b!==olympe.dm.User.C&&a.Ae(olympe.dc.sources.U.Sl))throw a=`User ${b} has no right to access the restricted data source ${a.name()} (${a.V()}). Please use an admin account instead.`,new olympe.dc.sources.lq(a);}
710
710
  function Si(a,b,c,d,e){return v(function*(){var f=olympe.N.Request.qb.SEND,g=olympe.N.Request.qb.GET;const h=olympe.N.Request.qb.PUBLISH,k=olympe.N.Request.qb.SUBSCRIBE,l=d.Kh();var n=d.body();if(e!==n.wc())throw Error('Access denied: try to impersonate a user');Ri(c,n);let p;if(null==(p=a.Yb)||!p.sources.has(n.pc()))throw Error(`Try to process a message with destination data source ${n.pc()} coming from remote but not started here`);if(l===k){if(n.getType()===Hi)f=n.content.V();else throw Error('Not supported type of subscription');
711
711
  g=yield d.Tm(f);a.aa.set(g,f);g=a.P.get(f);g||(g=new Ti(a.H,f,b,Je(n,olympe.dc.Pa.kf)),a.P.set(f,g));n=g;n.C++;n.H.debug(`Data subscription ${n.F} has ${n.C} subscribers`)}else l===g?(n=yield b.request(n),void 0!==n?yield d.nd(n):a.H.warn(`Request from ${d.source()} requires an output value, but got undefined instead.`)):l===f?(yield b.request(n),yield d.Yq()):l===h&&(yield b.request(n))})}
712
- olympe.dc.sources.kq=class extends olympe.dc.sources.Sk{constructor(a,b,c,d,e,f){super(a,d);this.L=b;this.C=c;this.db=e;this.G=new olympe.D.$b('Remote Provider Context');this.oa=new Map;this.P=new Map;this.aa=new Map;this.za=f}V(){return olympe.dc.Pa.kf}T(a){var b=olympe.N.xb;const c=a.pc(),d=a.getType();this.H.C()&&this.H.debug(`Request (type: ${d}) will be sent to remote data provider ${c}: ${a.content}`);switch(d){case Fi:const e=olympe.dm.DataSource.Kb.Fb,f=olympe.dm.DataSource.Kb.nh;b=Pi(this,
712
+ olympe.dc.sources.kq=class extends olympe.dc.sources.Sk{constructor(a,b,c,d,e,f){super(a,d);this.K=b;this.C=c;this.db=e;this.G=new olympe.D.$b('Remote Provider Context');this.oa=new Map;this.P=new Map;this.aa=new Map;this.za=f}V(){return olympe.dc.Pa.kf}T(a){var b=olympe.N.xb;const c=a.pc(),d=a.getType();this.H.C()&&this.H.debug(`Request (type: ${d}) will be sent to remote data provider ${c}: ${a.content}`);switch(d){case Fi:const e=olympe.dm.DataSource.Lb.Fb,f=olympe.dm.DataSource.Lb.nh;b=Pi(this,
713
713
  c)?b.get(c,a):Promise.resolve({s:f});a=Qi(this,c)?this.C.Dc(a):Promise.resolve({s:f});return Promise.all([b,a]).then(([k,l])=>{if((null==k?void 0:k.s)===e||(null==l?void 0:l.s)===e){let n,p;return{s:e,r:`${null!=(n=null==k?void 0:k.r)?n:''} ${null!=(p=null==l?void 0:l.r)?p:''}`}}return{s:f}});case Gi:return Qi(this,c)?ii(this.C,a):b.get(c,a);case Ii:const g=a.content.Wb().V();return(Pi(this,c)?b.send(c,a):ji(this.C,a)).finally(()=>Ci(this,g));case Ji:const h=a.content.Wb().V();return(Qi(this,c)?ji(this.C,
714
714
  a):b.send(c,a)).finally(()=>Ci(this,h));case Ki:return Pi(this,c)?b.publish(c,a).catch(k=>{this.H.error(`An error occurred while sending "burst transaction" to the data source ${c}: ${k}`)}):Promise.resolve();case Li:return Pi(this,c)?b.publish(c,a).catch(k=>{this.H.error(`An error occurred while sending "burst transaction done" to the data source ${c}: ${k}`)}):ji(this.C,a);case Mi:return Qi(this,c)?this.C.uploadFileContent(a):b.get(c,a);case Ni:return Qi(this,c)?this.C.downloadFileContent(a):b.get(c,
715
715
  a);case Oi:return Qi(this,c)?this.C.deleteFileContent(a):b.send(c,a);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${this.V()}`)}}Z(a,b){const c=a.pc(),d=a.getType();if(!Pi(this,c))return rxjs.throwError(()=>Error(`Subscription request not supported for data source ${this.db.name(c)} (${c}) which uses HTTP only.`));this.H.C()&&this.H.debug(`Subscription (type: ${d}) will be sent to remote data provider ${c}: ${a.content}`);return d===Hi?olympe.N.xb.observe(c,
716
- this.G,a,{onRetry:b}):rxjs.throwError(()=>Error(`Do not handle subscription request of type ${d}`))}init(a){super.init(a);if(a.G)return this;olympe.dc.pa.from(this.L,this.L).cb(olympe.dm.DataSource.Si).filter(olympe.dc.query.Aa.Qa(olympe.dm.DataSource.xh,!0)).filter(olympe.dc.query.Aa.Qa(olympe.dm.DataSource.hr,!0)).observe(this.G).subscribe(b=>{Oe(b).forEach(this.jb.bind(this,a));Ne(b).forEach(c=>{let d;null==(d=this.oa.get(c))||d.destroy();this.oa.delete(c)})});this.db.Ia(this.L,olympe.dm.DataSource.hr)&&
717
- (new olympe.N.xb(this.L,this.G)).listen().subscribe(b=>{b=b.body();b instanceof olympe.dc.Request?a.nd(b):this.H.error('Self source received something else than a data request, ignore it.')});return this}destroy(){return v(function*(){})}jb(a,b){const c=b.X(),d=new olympe.D.$b(`Published data provider context ${c}`,this.G);this.oa.set(c,d);let e,f;Ui(b,d).subscribe(g=>{let h;null==(h=e)||h();let k;null==(k=f)||k.stop();g!==olympe.dm.DataSource.Fe.zn&&(e=di(this.C,c,l=>{Ri(b,l);return a.request(l)}),
716
+ this.G,a,{onRetry:b}):rxjs.throwError(()=>Error(`Do not handle subscription request of type ${d}`))}init(a){super.init(a);if(a.G)return this;olympe.dc.pa.from(this.K,this.K).cb(olympe.dm.DataSource.Si).filter(olympe.dc.query.Aa.Qa(olympe.dm.DataSource.xh,!0)).filter(olympe.dc.query.Aa.Qa(olympe.dm.DataSource.hr,!0)).observe(this.G).subscribe(b=>{Oe(b).forEach(this.jb.bind(this,a));Ne(b).forEach(c=>{let d;null==(d=this.oa.get(c))||d.destroy();this.oa.delete(c)})});this.db.Ia(this.K,olympe.dm.DataSource.hr)&&
717
+ (new olympe.N.xb(this.K,this.G)).listen().subscribe(b=>{b=b.body();b instanceof olympe.dc.Request?a.nd(b):this.H.error('Self source received something else than a data request, ignore it.')});return this}destroy(){return v(function*(){})}jb(a,b){const c=b.X(),d=new olympe.D.$b(`Published data provider context ${c}`,this.G);this.oa.set(c,d);let e,f;Ui(b,d).subscribe(g=>{let h;null==(h=e)||h();let k;null==(k=f)||k.stop();g!==olympe.dm.DataSource.Fe.zn&&(e=di(this.C,c,l=>{Ri(b,l);return a.request(l)}),
718
718
  d.onDestroy(()=>{let l;return null==(l=e)?void 0:l()}));g!==olympe.dm.DataSource.Fe.Oo&&(g=new olympe.D.$b(`Bus Service of data source ${c}`,d),f=(new olympe.N.xb(c,g)).Fr(this.Ja.bind(this)),f.listen().subscribe(l=>{l.Nh().then(n=>Si(this,a,b,l,n)).catch(n=>{this.H.warn(`Error occurred while processing request from ${l.source()}: ${n}`);return l.Ch(n instanceof Error?n:Error(n))})}))})}Ja(a){const b=this.aa.get(a);this.aa.delete(a);if(a=b)null==(a=this.P.get(b))?a=0:(0<a.C&&--a.C,0===a.C?(a.H.debug(`Data subscription ${a.F} has more subscriber: unsubscribe`),
719
- a.G.unsubscribe(),a=!0):(a.H.debug(`Data subscription ${a.F} has ${a.C} subscribers`),a=!1));a&&this.P.delete(b)}};class Ti{constructor(a,b,c,d){this.H=a;this.F=b;this.C=0;this.G=Pe(c,d).subscribe({next:e=>{olympe.N.xb.publish(b,e).catch(f=>a.error(`Error occurred while publishing a data notification: ${f}`))},error:e=>a.error(`Error occurred while trying to subscribe to topic ${b} for a datasource: ${e}`)})}}olympe.dc.sources.kq.xa=[olympe.dc.sources.jj];olympe.dc.sources.yg=class extends olympe.N.yg{constructor(a){super();this.db=a;this.L=new Map}ha(a){a=this.C(a);if(0<this.L.size){const b=Array.from(this.L.values());this.L.clear();return{t:0,i:b,v:a}}return a}F(a){if(0===(null==a?void 0:a.t)){const b=a.i.reduce((c,d)=>{const e=new Map(Array.from(Object.entries(d.p).map(([f,g])=>[f,this.G(g)])));c.Pc(d.t,d.s,e,d.m);d.r.forEach(f=>c.Ea(f.r,d.t,f.d));return c},new olympe.dc.db.Vc);olympe.dc.Em().Jc(b);return this.G(a.v)}return this.G(a)}C(a){switch(!0){case a instanceof
720
- olympe.dc.CloudObject:return a=a.X(),this.P(a),{t:10,v:a};case a instanceof olympe.dc.pa:return{t:11,v:a.ha()};case a instanceof olympe.dc.Oa:return{t:12,v:a.ha(this.P.bind(this))};case a instanceof olympe.dc.db.Vc:const b=new olympe.dc.transaction.qg;a.td(b);return{t:13,i:a.V(),v:Sg(b)};case a instanceof olympe.dc.Request:return{t:14,r:a.getType(),o:a.origin,d:a.pc(),u:a.wc(),c:this.C(a.content)};case a instanceof olympe.dc.transaction.xi:return{t:15,r:a.Tg(),p:this.C(a.Wb())};case a instanceof olympe.dc.query.od:return{t:16,
721
- v:a.ha()};case a instanceof olympe.dc.Bc:return{t:17,v:a.X()};default:return super.C(a)}}G(a){if('object'!==typeof a||'number'!==typeof(null==a?void 0:a.t))return super.G(a);switch(a.t){case 10:return olympe.dc.CloudObject.get(a.v);case 11:a=a.v;var b=a.p.map(olympe.dc.query.va.Pl.C),c=a.e;return new olympe.dc.pa(a.b,a.s,b,b.length-1,new Set(a.r),{max:c.m,offset:c.o,Dd:c.s,Ce:c.rm});case 12:return xh(a.v);case 13:return(new olympe.dc.transaction.Cj).C(a.v,a.i);case 14:return c=null!=(b=this.G(a.c))?
722
- b:void 0,Je(new olympe.dc.Request(a.r,a.d,c,a.u),a.o);case 15:return b=this.G(a.p),new olympe.dc.transaction.xi(b,a.r);case 16:return a=a.v,new olympe.dc.query.od((new olympe.dc.transaction.Cj).C(a.p),a.s);case 17:return new olympe.dc.Bc(a.v);default:return super.G(a)}}P(a){if(!this.L.has(a)){if(!this.db.Ga(a))throw new olympe.dc.Gp(a);var b={};this.db.Cb(a).forEach((d,e)=>{b[e]=this.C(d)});var c={t:a,m:this.db.model(a),s:this.db.source(a),p:b,r:[]};this.L.set(a,c);for(const [d,e,f]of hg(this.db,
723
- a)){const g=this.L.get(f);void 0!==g&&(e===olympe.dc.ua.DESTINATION?c.r.push({r:d,d:f}):g.r.push({r:d,d:a}))}}}};const Vi=olympe.dc.Request.C.jg,Wi=olympe.dc.Request.C.Bg,Xi=olympe.dc.Request.C.Cg,Yi=olympe.dc.Request.C.Rh,Zi=olympe.dc.Request.C.wn,$i=olympe.dc.Request.C.cq,aj=olympe.dc.Request.C.sg,bj=olympe.dc.Request.C.Hj,cj=olympe.dc.Request.C.Lo,dj=olympe.dc.Request.C.Hs,ej=olympe.dc.Request.C.Is,fj=olympe.dc.Request.C.Js,gj=olympe.dc.Request.C.hg,hj=olympe.dc.Request.C.Jf,ij=olympe.dc.Request.C.Qf,jj=olympe.dc.Request.C.nj,kj=olympe.dc.Request.C.Ru,lj=olympe.dc.Request.C.ku,mj=olympe.dc.Request.C.Go,nj=
724
- olympe.dc.Request.C.Xg,oj=olympe.dc.Request.C.cs,pj=olympe.dc.Request.C.Kb;function qj(a){return rj(a,olympe.dc.Request.C.jg).then(b=>{b=b.p;const c=Rg(b,a.V());a.H.C()&&a.H.debug('< Get Context result',b);a.H.P()&&a.H.log('< Get Context result has',b.length,'operations');return c})}function sj(a,b){const c=b.Wb();b=new olympe.dc.transaction.qg({zk:!0,de:!1,yh:!1});c.td(b);return rj(a,Xi,Sg(b)).finally(()=>{tj(a,jj,{id:c.V(),finalize:olympe.dc.transaction.mf.C.ki})}).then()}
719
+ a.G.unsubscribe(),a=!0):(a.H.debug(`Data subscription ${a.F} has ${a.C} subscribers`),a=!1));a&&this.P.delete(b)}};class Ti{constructor(a,b,c,d){this.H=a;this.F=b;this.C=0;this.G=Pe(c,d).subscribe({next:e=>{olympe.N.xb.publish(b,e).catch(f=>a.error(`Error occurred while publishing a data notification: ${f}`))},error:e=>a.error(`Error occurred while trying to subscribe to topic ${b} for a datasource: ${e}`)})}}olympe.dc.sources.kq.xa=[olympe.dc.sources.jj];olympe.dc.sources.yg=class extends olympe.N.yg{constructor(a){super();this.db=a;this.K=new Map}ha(a){a=this.C(a);if(0<this.K.size){const b=Array.from(this.K.values());this.K.clear();return{t:0,i:b,v:a}}return a}F(a){if(0===(null==a?void 0:a.t)){const b=a.i.reduce((c,d)=>{const e=new Map(Array.from(Object.entries(d.p).map(([f,g])=>[f,this.G(g)])));c.Pc(d.t,d.s,e,d.m);d.r.forEach(f=>c.Ea(f.r,d.t,f.d));return c},new olympe.dc.db.Vc);olympe.dc.Em().Jc(b);return this.G(a.v)}return this.G(a)}C(a){switch(!0){case a instanceof
720
+ olympe.dc.CloudObject:return{t:10,v:this.P(a.X())};case a instanceof olympe.dc.pa:return{t:11,v:a.ha()};case a instanceof olympe.dc.Oa:return{t:12,v:a.ha(this.P.bind(this))};case a instanceof olympe.dc.db.Vc:const b=new olympe.dc.transaction.qg;a.td(b);return{t:13,i:a.V(),v:Sg(b)};case a instanceof olympe.dc.Request:return{t:14,r:a.getType(),o:a.origin,d:a.pc(),u:a.wc(),c:this.C(a.content)};case a instanceof olympe.dc.transaction.xi:return{t:15,r:a.Tg(),p:this.C(a.Wb())};case a instanceof olympe.dc.query.od:return{t:16,
721
+ v:a.ha()};case a instanceof olympe.dc.Bc:return{t:17,v:this.P(a.X())};default:return super.C(a)}}G(a){if('object'!==typeof a||'number'!==typeof(null==a?void 0:a.t))return super.G(a);switch(a.t){case 10:return olympe.dc.CloudObject.get(a.v);case 11:a=a.v;var b=a.p.map(olympe.dc.query.va.Pl.C),c=a.e;return new olympe.dc.pa(a.b,a.s,b,b.length-1,new Set(a.r),{max:c.m,offset:c.o,Dd:c.s,Ce:c.rm});case 12:return xh(a.v);case 13:return(new olympe.dc.transaction.Cj).C(a.v,a.i);case 14:return c=null!=(b=this.G(a.c))?
722
+ b:void 0,Je(new olympe.dc.Request(a.r,a.d,c,a.u),a.o);case 15:return b=this.G(a.p),new olympe.dc.transaction.xi(b,a.r);case 16:return a=a.v,new olympe.dc.query.od((new olympe.dc.transaction.Cj).C(a.p),a.s);case 17:return new olympe.dc.Bc(a.v);default:return super.G(a)}}P(a){if(this.K.has(a))return a;if(!this.db.Ga(a))throw new olympe.dc.Gp(a);const b={};this.db.Cb(a).forEach((d,e)=>{b[e]=this.C(d)});const c={t:a,m:this.db.model(a),s:this.db.source(a),p:b,r:[]};this.K.set(a,c);for(const [d,e,f]of hg(this.db,
723
+ a)){const g=this.K.get(f);void 0!==g&&(e===olympe.dc.ua.DESTINATION?c.r.push({r:d,d:f}):g.r.push({r:d,d:a}))}return a}};const Vi=olympe.dc.Request.C.jg,Wi=olympe.dc.Request.C.Bg,Xi=olympe.dc.Request.C.Cg,Yi=olympe.dc.Request.C.Rh,Zi=olympe.dc.Request.C.wn,$i=olympe.dc.Request.C.cq,aj=olympe.dc.Request.C.sg,bj=olympe.dc.Request.C.Hj,cj=olympe.dc.Request.C.Lo,dj=olympe.dc.Request.C.Hs,ej=olympe.dc.Request.C.Is,fj=olympe.dc.Request.C.Js,gj=olympe.dc.Request.C.hg,hj=olympe.dc.Request.C.Jf,ij=olympe.dc.Request.C.Qf,jj=olympe.dc.Request.C.nj,kj=olympe.dc.Request.C.Ru,lj=olympe.dc.Request.C.ku,mj=olympe.dc.Request.C.Go,nj=
724
+ olympe.dc.Request.C.Xg,oj=olympe.dc.Request.C.cs,pj=olympe.dc.Request.C.Lb;function qj(a){return rj(a,olympe.dc.Request.C.jg).then(b=>{b=b.p;const c=Rg(b,a.V());a.H.C()&&a.H.debug('< Get Context result',b);a.H.P()&&a.H.log('< Get Context result has',b.length,'operations');return c})}function sj(a,b){const c=b.Wb();b=new olympe.dc.transaction.qg({zk:!0,de:!1,yh:!1});c.td(b);return rj(a,Xi,Sg(b)).finally(()=>{tj(a,jj,{id:c.V(),finalize:olympe.dc.transaction.mf.C.ki})}).then()}
725
725
  function uj(a,b){const c=new olympe.dc.transaction.qg({de:!1,yh:!1}),d=b.Wb();d.td(c);return vj(a,Yi,{i:d.V(),r:b.Tg(),p:Sg(c)},!1).catch(e=>a.H.error(`Error while publishing burst transaction: ${e}`))}function wj(a,b){const c=encodeURI(Ga(olympe.Y.Te(),JSON.stringify(xj(a,b))));a.H.C()&&a.H.debug(`Static GraphDef query ${b} sent to orchestrator`);return rj(a,aj,void 0,`query=${c}&v=${a.version}`).then(d=>yj(a,d))}
726
726
  function zj(a,b){const c=b.V();a.H.C()&&a.H.debug(`Query (${c}) sent to orchestrator: ${b}`);b=xj(a,b);return rj(a,cj,b).then(d=>yj(a,d))}function vj(a,b,c,d=!0){const e=olympe.N.Ke.$n,f={c:b};Object.assign(f,c);if(d)return new Promise((g,h)=>{rd(a.G,e,f,(k,l)=>{k?h(k):g(l)})});rd(a.G,e,f);return Promise.resolve()}
727
- function xj(a,b){const c=Wg(b);b={i:b.V(),b:[b.F],m:!0,v:!0};if(c[0]instanceof olympe.dc.query.va.Yd)Object.assign(b,{f:c[0].ec,q:[]});else{const d=new Map;for(let e=c.length-1;0<=e;e--){const f=c[e],g=f.C;let h;const k=(null!=(h=d.get(g))?h:new Set).add(f);if(f instanceof olympe.dc.query.va.Mf&&f.G){let l;null==(l=d.get(f.V()))||l.forEach(n=>k.add(n))}d.set(g,k)}Object.assign(b,{f:olympe.dc.Zb.NONE,q:c.map(a.aa.bind(a,d))})}return b}
728
- function tj(a,b,c){b=Je(new olympe.dc.Request(b,olympe.dc.Pa.SELF,c),a.V());let d;null==(d=a.Yb)||d.nd(b)}function rj(a,b,c,d){const e=gi(a.C,a.V(),b);if('string'!==typeof e)return Promise.reject(`ServerProvider: no url for type ${b}`);b=O(`${e}${'string'===typeof d&&0<d.length?`?${d}`:''}`,void 0!==c?olympe.net.Ba.Qd.lh:olympe.net.Ba.Qd.GET,c&&JSON.stringify(c));P(b,{[olympe.net.Ba.Headers.Th]:'application/json'});return hi(a.C,b).then(f=>'string'===typeof f&&0<f.length?JSON.parse(f):f)}
727
+ function xj(a,b){const c=Wg(b);b={i:b.V(),b:[b.F],m:!0,v:!0};if(c[0]instanceof olympe.dc.query.va.Zd)Object.assign(b,{f:c[0].ec,q:[]});else{const d=new Map;for(let e=c.length-1;0<=e;e--){const f=c[e],g=f.C;let h;const k=(null!=(h=d.get(g))?h:new Set).add(f);if(f instanceof olympe.dc.query.va.Mf&&f.G){let l;null==(l=d.get(f.V()))||l.forEach(n=>k.add(n))}d.set(g,k)}Object.assign(b,{f:olympe.dc.Zb.NONE,q:c.map(a.aa.bind(a,d))})}return b}
728
+ function tj(a,b,c){b=Je(new olympe.dc.Request(b,olympe.dc.Pa.SELF,c),a.V());let d;null==(d=a.Yb)||d.nd(b)}function rj(a,b,c,d){const e=gi(a.C,a.V(),b);if('string'!==typeof e)return Promise.reject(`ServerProvider: no url for type ${b}`);b=O(`${e}${'string'===typeof d&&0<d.length?`?${d}`:''}`,void 0!==c?olympe.net.Ba.Rd.lh:olympe.net.Ba.Rd.GET,c&&JSON.stringify(c));P(b,{[olympe.net.Ba.Headers.Th]:'application/json'});return hi(a.C,b).then(f=>'string'===typeof f&&0<f.length?JSON.parse(f):f)}
729
729
  function yj(a,b){if(b&&'object'===typeof b){if(0<b.s)throw Error(b.info.error.reason);return Rg(b.p,a.V())}throw Error('Data result can be created only from Object');}
730
- olympe.dc.sources.yq=class extends olympe.dc.sources.Sk{constructor(a,b,c,d,e){super(a,c);this.G=b;this.C=d;this.P=new olympe.dc.transaction.Cj(this.V());this.L=new Map;this.version=e||'unknown';olympe.D.Ni(this.F.Wf(),()=>{this.L.forEach((f,g)=>{f.error(new olympe.N.errors.wj('Connection to server has been recovered',g))})})}V(){return olympe.dc.Pa.SERVER}T(a){var b=a.getType(),c=a.content,d=Le(a);switch(b){case pj:return c=olympe.dm.DataSource.Kb.Fb,a=olympe.dm.DataSource.Kb.nh,Promise.resolve(md(this.G)?
730
+ olympe.dc.sources.yq=class extends olympe.dc.sources.Sk{constructor(a,b,c,d,e){super(a,c);this.G=b;this.C=d;this.P=new olympe.dc.transaction.Cj(this.V());this.K=new Map;this.version=e||'unknown';olympe.D.Ni(this.F.Wf(),()=>{this.K.forEach((f,g)=>{f.error(new olympe.N.errors.wj('Connection to server has been recovered',g))})})}V(){return olympe.dc.Pa.SERVER}T(a){var b=a.getType(),c=a.content,d=Le(a);switch(b){case pj:return c=olympe.dm.DataSource.Lb.Fb,a=olympe.dm.DataSource.Lb.nh,Promise.resolve(md(this.G)?
731
731
  {s:a}:{s:c,r:'Disconnected'});case Vi:return qj(this);case Wi:return a=new olympe.dc.transaction.qg({de:!1,yh:!1}),b=c.Wb(),b.td(a),vj(this,Wi,{i:b.V(),r:c.Tg(),p:Sg(a)}).then();case Xi:return sj(this,c);case Yi:return uj(this,c);case nj:return a=new olympe.dc.transaction.qg({de:!1,yh:!1}),c=c.Wb(),c.td(a),vj(this,nj,{i:c.V(),p:Sg(a)}).then();case aj:return d.get(olympe.dc.pa.C.ap)?wj(this,c):zj(this,c);case Zi:return md(this.G)?(c=xj(this,olympe.dc.pa.from(c)),c.f=olympe.dc.Zb.ko,c=O(gi(this.C,olympe.dc.Pa.SERVER,
732
- Zi),olympe.net.Ba.Qd.lh,JSON.stringify(c),olympe.net.Ba.ResponseType.Hq),P(c,{[olympe.net.Ba.Headers.Th]:olympe.net.Ba.Vk.JSON}),c=hi(this.C,c)):(this.H.error(`Server is disconnected, backup of instance ${c} is canceled.`),c=Promise.reject('Server is disconnected')),c;case $i:return a=c.nD,b=c.debug,c=c.optional,md(this.G)?(d=gi(this.C,olympe.dc.Pa.SERVER,$i),c=O(d+`?debug=${b}&optional=${c}`,olympe.net.Ba.Qd.lh,a),P(c,{[olympe.net.Ba.Headers.Th]:olympe.net.Ba.Vk.$u}),c=hi(this.C,c)):(this.H.error('Server is disconnected, restore of instance is canceled.'),
733
- c=Promise.reject('Server is disconnected')),c;case kj:case lj:case mj:case oj:return vj(this,b,{});case hj:return this.C.downloadFileContent(a);case gj:return this.C.deleteFileContent(a);case ij:return this.C.uploadFileContent(a);default:return Promise.reject(`ServerProvider: Message of type ${b} not supported yet`)}}Z(a,b){if(a.getType()===bj){const c=a.content,d=c.V();return(new rxjs.Observable(e=>{const f=xj(this,c);this.L.set(d,e);vj(this,dj,f).catch(g=>e.error(g))})).pipe(olympe.N.operators.Ui(olympe.N.errors.wj,
734
- (e,f)=>{this.H.debug(`Subscribe to topic ${e.V()} now that we are back online, after waiting for ${f}ms`);b()}),rxjs.operators.finalize(()=>{vj(this,ej,{i:d}).catch(e=>{this.H.warn(`Fail to unsubscribe to graphdef ${d}: ${e}`)}).finally(()=>{this.L.delete(d)})}))}return rxjs.throwError(()=>Error(`Subscription of type ${a.getType()} is not supported`))}init(a){super.init(a);kd(this.G,olympe.N.Ke.$n,this.oa.bind(this));return this}destroy(){return v(function*(){})}oa(a){var b=olympe.dc.Request.C.yn;
735
- const c=olympe.dc.Request.C.Bl;var d=a.c;if(d===olympe.dc.Request.C.bo)a=this.P.C(a.p),tj(this,d,a);else if(d===b){var e=a.error.reason;b=this.P.C(a.p);tj(this,d,{id:a.i,rollback:b,error:e})}else d===fj?(d=a.i,a=this.P.C(a.p),null==(e=this.L.get(d))||e.next(a)):d===c&&tj(this,jj,{id:a.i,finalize:olympe.dc.transaction.mf.C.Bl,error:0<a.s?a.info.error.reason:null})}aa(a,b){if(b instanceof olympe.dc.query.va.oh){const c=b.relation;let d;b=Array.from(null!=(d=a.get(b.V()))?d:[]);return{t:c.X(),d:c.Ha()===
736
- olympe.dc.ua.ORIGIN?1:2,v:!0,r:c.recursive,q:b.map(this.aa.bind(this,a))}}return{}}};olympe.dc.sources.yq.xa=[olympe.dc.sources.jj];function Aj(a,b,c){const d=new olympe.D.$b(`Source solver ${b.X()}`);b.cb(olympe.dm.pd.G.fc()).cb(olympe.dm.pd.F).ee().back().cb(olympe.dm.pd.C).ee().observe(d,{Nd:c}).subscribe(e=>{Oe(e).forEach(([f,g])=>{a.F.set(f.X(),g.V())});Ne(e).forEach(([f])=>{a.F.delete(f)})});b.cb(olympe.dm.hb.F).observe(d,{Nd:c}).subscribe(e=>{let f,g;a.G=null!=(g=null==(f=e.Cc())?void 0:f.V())?g:null});d.onDestroy(()=>{a.F.clear();a.G=null})}
737
- olympe.dc.sources.Uj=class{constructor(a,b,c){this.db=a;this.C=b;this.P=c;this.F=new Map;this.G=null;this.L=!1}fromModel(a){a=olympe.dc.ga(a);return this.F.has(a)?this.F.get(a):this.G&&this.T(a)?this.G:this.P}ze(a){let b;return null!=(b=this.db.source(a))?b:this.P}yb(a){return a===this.C?olympe.dc.CloudObject.get(this.C):a===olympe.dc.Pa.SERVER?olympe.dc.CloudObject.get(olympe.dm.DataSource.SERVER):this.db.Ga(a)&&this.db.Qb(a,olympe.dm.DataSource)?olympe.dc.CloudObject.get(a):null}T(){return!1}init(){if(!this.L){this.L=
732
+ Zi),olympe.net.Ba.Rd.lh,JSON.stringify(c),olympe.net.Ba.ResponseType.Hq),P(c,{[olympe.net.Ba.Headers.Th]:olympe.net.Ba.Vk.JSON}),c=hi(this.C,c)):(this.H.error(`Server is disconnected, backup of instance ${c} is canceled.`),c=Promise.reject('Server is disconnected')),c;case $i:return a=c.nD,b=c.debug,c=c.optional,md(this.G)?(d=gi(this.C,olympe.dc.Pa.SERVER,$i),c=O(d+`?debug=${b}&optional=${c}`,olympe.net.Ba.Rd.lh,a),P(c,{[olympe.net.Ba.Headers.Th]:olympe.net.Ba.Vk.$u}),c=hi(this.C,c)):(this.H.error('Server is disconnected, restore of instance is canceled.'),
733
+ c=Promise.reject('Server is disconnected')),c;case kj:case lj:case mj:case oj:return vj(this,b,{});case hj:return this.C.downloadFileContent(a);case gj:return this.C.deleteFileContent(a);case ij:return this.C.uploadFileContent(a);default:return Promise.reject(`ServerProvider: Message of type ${b} not supported yet`)}}Z(a,b){if(a.getType()===bj){const c=a.content,d=c.V();return(new rxjs.Observable(e=>{const f=xj(this,c);this.K.set(d,e);vj(this,dj,f).catch(g=>e.error(g))})).pipe(olympe.N.operators.Ui(olympe.N.errors.wj,
734
+ (e,f)=>{this.H.debug(`Subscribe to topic ${e.V()} now that we are back online, after waiting for ${f}ms`);b()}),rxjs.operators.finalize(()=>{vj(this,ej,{i:d}).catch(e=>{this.H.warn(`Fail to unsubscribe to graphdef ${d}: ${e}`)}).finally(()=>{this.K.delete(d)})}))}return rxjs.throwError(()=>Error(`Subscription of type ${a.getType()} is not supported`))}init(a){super.init(a);kd(this.G,olympe.N.Ke.$n,this.oa.bind(this));return this}destroy(){return v(function*(){})}oa(a){var b=olympe.dc.Request.C.yn;
735
+ const c=olympe.dc.Request.C.Bl;var d=a.c;if(d===olympe.dc.Request.C.bo)a=this.P.C(a.p),tj(this,d,a);else if(d===b){var e=a.error.reason;b=this.P.C(a.p);tj(this,d,{id:a.i,rollback:b,error:e})}else d===fj?(d=a.i,a=this.P.C(a.p),null==(e=this.K.get(d))||e.next(a)):d===c&&tj(this,jj,{id:a.i,finalize:olympe.dc.transaction.mf.C.Bl,error:0<a.s?a.info.error.reason:null})}aa(a,b){if(b instanceof olympe.dc.query.va.oh){const c=b.relation;let d;b=Array.from(null!=(d=a.get(b.V()))?d:[]);return{t:c.X(),d:c.Ha()===
736
+ olympe.dc.ua.ORIGIN?1:2,v:!0,r:c.recursive,q:b.map(this.aa.bind(this,a))}}return{}}};olympe.dc.sources.yq.xa=[olympe.dc.sources.jj];function Aj(a,b,c){const d=new olympe.D.$b(`Source solver ${b.X()}`);b.cb(olympe.dm.pd.G.fc()).cb(olympe.dm.pd.F).ee().back().cb(olympe.dm.pd.C).ee().observe(d,{Od:c}).subscribe(e=>{Oe(e).forEach(([f,g])=>{a.F.set(f.X(),g.V())});Ne(e).forEach(([f])=>{a.F.delete(f)})});b.cb(olympe.dm.hb.F).observe(d,{Od:c}).subscribe(e=>{let f,g;a.G=null!=(g=null==(f=e.Cc())?void 0:f.V())?g:null});d.onDestroy(()=>{a.F.clear();a.G=null})}
737
+ olympe.dc.sources.Uj=class{constructor(a,b,c){this.db=a;this.C=b;this.P=c;this.F=new Map;this.G=null;this.K=!1}fromModel(a){a=olympe.dc.ga(a);return this.F.has(a)?this.F.get(a):this.G&&this.T(a)?this.G:this.P}ze(a){let b;return null!=(b=this.db.source(a))?b:this.P}yb(a){return a===this.C?olympe.dc.CloudObject.get(this.C):a===olympe.dc.Pa.SERVER?olympe.dc.CloudObject.get(olympe.dm.DataSource.SERVER):this.db.Ga(a)&&this.db.Qb(a,olympe.dm.DataSource)?olympe.dc.CloudObject.get(a):null}T(){return!1}init(){if(!this.K){this.K=
738
738
  !0;var a=new olympe.dc.Xa;Y(a.create(olympe.dm.DataSource,this.C).Lh(this.C),olympe.dm.DataSource.xh,!0);a.Ea(olympe.dm.DataSource.Si,this.C,this.C);a.mb(()=>{olympe.dc.pa.from(this.C).observe(olympe.D.Jg()).subscribe(()=>{})})}}};olympe.dc.sources.R={Ca:'dc.sources.Logger',ml:'dc.sources.HTTPService',Xs:'dc.sources.IOService',aq:'dc.sources.RemoteProvider',rq:'dc.sources.ServerProvider',cA:'dc.sources.OfflineProvider',Ne:'dc.sources.SourceSolver',ce:'dc.sources.Serializer',co:'dc.sources.cache.Cache',eo:'dc.sources.cache.DATABASE',Qk:'dc.sources.cache.Logger'};
739
739
  olympe.dc.sources.U={kl:'data.httpHost',ai:'data.httpPort',So:'data.httpSSL',jl:'data.httpBasePath',Ll:'data.pollingFrequency',Fe:'data.communicationMode',Sl:'data.restrictedUse',VERSION:'version.version'};
740
740
  olympe.W.config(function(a){var b=a.getParameter(olympe.N.U.Yk);F(a,olympe.dc.sources.U.kl,b);var c=a.getParameter(olympe.dc.sources.U.kl);c=(b=['localhost','127.0.0.1'].includes(c))||c.endsWith(a.getParameter(olympe.net.U.tj));F(a,olympe.dc.sources.U.ai,b?3141:c?80:443);F(a,olympe.dc.sources.U.So,!c);F(a,olympe.dc.sources.U.jl,'runtime/data');F(a,olympe.dc.sources.U.Ll,null);F(a,olympe.dc.sources.U.Fe,null);F(a,olympe.dc.sources.U.Sl,null);E(a,olympe.dc.sources.R.Ca,[olympe.ma.R.Fa],d=>d.Qc('data'));
741
741
  D(a,olympe.dc.sources.R.ce,olympe.dc.sources.yg,olympe.dc.R.cf);xa(a,olympe.N.R.ce,olympe.dc.sources.R.ce);D(a,olympe.dc.sources.R.ml,olympe.dc.sources.Ms,olympe.dc.sources.R.Ca,olympe.net.R.zi,olympe.N.R.ll,olympe.auth.R.Fa,olympe.dc.sources.R.Ne,olympe.N.R.ce,new olympe.W.ja(olympe.N.U.Lk));D(a,olympe.dc.sources.R.Xs,olympe.dc.sources.$o,olympe.dc.sources.R.Ca,olympe.dc.R.ug,olympe.net.R.Fa,olympe.auth.R.Fa);D(a,olympe.dc.sources.R.aq,olympe.dc.sources.kq,olympe.dc.sources.R.Ca,new olympe.W.ja(olympe.dc.U.wg),
742
742
  olympe.dc.sources.R.ml,olympe.N.R.$e,olympe.dc.R.cf,olympe.dc.sources.R.Ne);D(a,olympe.dc.sources.R.rq,olympe.dc.sources.yq,olympe.dc.sources.R.Ca,olympe.N.R.Mj,olympe.N.R.$e,olympe.dc.sources.R.ml,new olympe.W.ja(olympe.dc.sources.U.VERSION));D(a,olympe.dc.sources.R.Ne,olympe.dc.sources.Uj,olympe.dc.R.cf,new olympe.W.ja(olympe.dc.U.wg),new olympe.W.ja(olympe.dc.U.$k));E(a,olympe.dc.sources.R.Qk,[olympe.ma.R.Fa],d=>d.Qc('datacache'));D(a,olympe.dc.sources.R.co,olympe.dc.sources.cache.Cache,olympe.dc.sources.R.Qk,
743
- olympe.dc.R.ug,olympe.dc.sources.R.eo,olympe.dc.db.R.Fa,olympe.net.R.Fa,olympe.N.R.$e,olympe.Db.R.yl,olympe.Y.R.dg,new olympe.W.ja(olympe.net.U.Dp),new olympe.W.ja(olympe.dc.sources.U.VERSION));D(a,olympe.dc.sources.R.eo,olympe.dc.sources.cache.Aj,olympe.Db.R.xg,olympe.dc.sources.R.Qk,olympe.dc.sources.R.ce,olympe.Db.R.sj)},'olympe.dc.sources');olympe.W.run([olympe.dc.sources.R.Ne,olympe.dc.sources.R.co],(a,b)=>{olympe.dc.Ud=()=>a;olympe.dc.sources.Sd=()=>b});olympe.dc.sources.cache={};olympe.dc.sources.cache.errors={};olympe.dc.sources.cache.errors.Yl=class extends Error{constructor(a){super(a)}};olympe.dc.sources.cache.errors.ns=class extends olympe.dc.sources.cache.errors.Yl{};olympe.dc.sources.cache.errors.Ou=class extends olympe.dc.sources.cache.errors.Yl{};olympe.dc.sources.cache.errors.Xu=class extends olympe.dc.sources.cache.errors.Yl{};function Di(a,b,c){return v(function*(){Bj(a,'queries',b);yield a.init();const d=a.F.has(c)?a.F.get(c):new Set;d.has(b)||(d.add(b),a.F.set(c,d),a.P.next(Cj(a)));return Dj(a.C,b,c)})}
744
- function Ei(a,b,c,d,e=!1){return v(function*(){yield a.init();a.H.debug(`Cache: handle query ${b} graph patch: ${d.V()}`);d.T(a.G);(()=>v(function*(){try{const f=null===b?[]:Array.from(a.F.entries()).filter(([,h])=>h.has(b)).map(([h])=>h),g=1===f.length&&'__code-as-data__'===f[0];if(null===b||!g||a.aa)a.H.debug('Cache: persist graph patch',d.V()),e&&b&&(Array.from(d.Zc()).filter(h=>!h.Ld()).map(h=>h.tag()),yield Ej(a.C)),yield Fj(a.C,d,0<f.length?b:null),Gj(a,d,c).catch(h=>{a.H.error(`Cache: Failed to download files of a graph patch: ${h}`)})}catch(f){a.H.error(`Cache: Failed to handle graph patch ${d.V()} with message: ${f}`),
745
- a.jc.next(f)}finally{b&&Hj(a,'queries',b)}}))().then(()=>{})})}function Ij(){var a=olympe.dc.sources.Sd();a.aa=!0;a.ub=!0}function Bj(a,b,c){const d=a.status.getValue();b in d||(d[b]={total:0,processed:0,values:new Set});d[b].total+=1;d[b].values.add(c);d.processing=!0;a.status.next(d)}
743
+ olympe.dc.R.ug,olympe.dc.sources.R.eo,olympe.dc.db.R.Fa,olympe.net.R.Fa,olympe.N.R.$e,olympe.Db.R.yl,olympe.Y.R.dg,new olympe.W.ja(olympe.net.U.Dp),new olympe.W.ja(olympe.dc.sources.U.VERSION));D(a,olympe.dc.sources.R.eo,olympe.dc.sources.cache.Aj,olympe.Db.R.xg,olympe.dc.sources.R.Qk,olympe.dc.sources.R.ce,olympe.Db.R.sj)},'olympe.dc.sources');olympe.W.run([olympe.dc.sources.R.Ne,olympe.dc.sources.R.co],(a,b)=>{olympe.dc.Vd=()=>a;olympe.dc.sources.Td=()=>b});olympe.dc.sources.cache={};olympe.dc.sources.cache.errors={};olympe.dc.sources.cache.errors.Yl=class extends Error{constructor(a){super(a)}};olympe.dc.sources.cache.errors.ns=class extends olympe.dc.sources.cache.errors.Yl{};olympe.dc.sources.cache.errors.Ou=class extends olympe.dc.sources.cache.errors.Yl{};olympe.dc.sources.cache.errors.Xu=class extends olympe.dc.sources.cache.errors.Yl{};function Di(a,b,c){return v(function*(){Bj(a,'queries',b);yield a.init();const d=a.F.has(c)?a.F.get(c):new Set;d.has(b)||(d.add(b),a.F.set(c,d),a.P.next(Cj(a)));return Dj(a.C,b,c)})}
744
+ function Ei(a,b,c,d,e=!1){return v(function*(){yield a.init();a.H.debug(`Cache: handle query ${b} graph patch: ${d.V()}`);d.T(a.G);(()=>v(function*(){try{const f=null===b?[]:Array.from(a.F.entries()).filter(([,h])=>h.has(b)).map(([h])=>h),g=1===f.length&&'__code-as-data__'===f[0];if(null===b||!g||a.aa)a.H.debug('Cache: persist graph patch',d.V()),e&&b&&(Array.from(d.Zc()).filter(h=>!h.Md()).map(h=>h.tag()),yield Ej(a.C)),yield Fj(a.C,d,0<f.length?b:null),Gj(a,d,c).catch(h=>{a.H.error(`Cache: Failed to download files of a graph patch: ${h}`)})}catch(f){a.H.error(`Cache: Failed to handle graph patch ${d.V()} with message: ${f}`),
745
+ a.jc.next(f)}finally{b&&Hj(a,'queries',b)}}))().then(()=>{})})}function Ij(){var a=olympe.dc.sources.Td();a.aa=!0;a.ub=!0}function Bj(a,b,c){const d=a.status.getValue();b in d||(d[b]={total:0,processed:0,values:new Set});d[b].total+=1;d[b].values.add(c);d.processing=!0;a.status.next(d)}
746
746
  function Hj(a,b,c){const d=a.status.getValue();let e,f;null!=(f=null==(e=d[b])?void 0:e.values)&&f.delete(c)&&(d[b].processed+=1,0===d[b].values.size&&(delete d[b],('queries'===b?'files':'queries')in d||(d.processing=!1)),a.status.next(d))}function Jj(a){return v(function*(){a.G=new olympe.dc.db.Vc;const b=yield Kj(a.C);for(const c of b)c.td(a.G);a.ea.next(0<b.length)})}
747
747
  function Gj(a,b,c){return v(function*(){const d=Lj(b),e=[];for(const g of d){const h=g.tag();if(!(yield Mj(a.C,h)))if(Bj(a,'files',h),!1===g.Ia(olympe.dm.File.C.X())&&g.Ia(olympe.dm.File.urlProp.X())){var f=g.Ia(olympe.dm.File.urlProp.X());const k=O(f);k.F=olympe.net.Ba.ResponseType.Kk;e.push(new Promise((l,n)=>{a.Mc.C(k,p=>{p=p.Dc();200<=p&&300>p?l():n(`Failed to download file ${g}. Response code ${p}`);Hj(a,'files',h)})}))}else{let k;const l=null!=(k=g.Ia(olympe.dm.File.mimeTypeProp.X()))?k:'application/octet-stream';
748
748
  f={tag:h,model:g.Vb(),mimeType:l};const n=new olympe.dc.Request(olympe.dc.Request.C.Jf,c,f);f=Fa(a.sd,()=>a.Yb.request(n).then(p=>Nj(a.C,h,p,l))).finally(()=>Hj(a,'files',h));e.push(f)}}yield Promise.allSettled(e).then(g=>{g.forEach((h,k)=>{if('rejected'===h.status){let l;a.H.warn(`Cache: File content for ${null==(l=d[k])?void 0:l.tag()} was not found`)}})})})}
749
749
  function Lj(a){const b=[olympe.dc.ga(olympe.dm.File)];if(olympe.dc.CloudObject.exists(olympe.dm.File))b.push(...olympe.dc.pa.from(olympe.dm.File).Uf(olympe.dc.CloudObject.extendedByRel).ld().keys());else for(const c of b){let d,e;b.push(...(null!=(e=null==(d=a.Rc(c))?void 0:d.bb(olympe.dc.CloudObject.extendedByRel,f=>f))?e:[]))}return b.reduce((c,d)=>{let e,f;d=Array.from(null!=(f=null==(e=a.Rc(d))?void 0:e.bb(olympe.dc.CloudObject.instancesRel,g=>g))?f:[]).map(g=>a.Rc(g));return c.concat(d)},[])}
750
750
  function Oj(a,b){return Array.from(a.F.values()).some(c=>c.has(b))}function Cj(a){return Array.from(a.F.keys()).filter(b=>'__code-as-data__'!==b)}function Pj(a,b){return v(function*(){yield a.init();if(b){var c,d=Array.from(null!=(c=a.F.get(b))?c:[]);a.F.delete(b);var e=Array.from(a.F.values()).reduce((f,g)=>{g.forEach(h=>f.add(h));return f},new Set);yield Qj(a.C,b);a.P.next(Cj(a));d.filter(f=>!e.has(f));yield Ej(a.C)}else yield Promise.all(Cj(a).map(f=>Pj(a,f)))})}
751
751
  function Rj(a){if(!(2>a.length))for(let b=a.length-1;0<b;b--)for(let c=b-1;0<=c;c--)a[c].T(a[b])}
752
- function Sj(a,b,c){return v(function*(){var d=olympe.dc.Request.C.Bg;const e=olympe.dc.Request.C.hg,f=olympe.dc.Request.C.Qf;a.H.debug('Sync Cache: Applying transaction patch to destination',c,b.V());const g=Lj(b);a.H.debug(`Sync Cache: Found ${g.length} files to send`);yield Promise.all(g.map(h=>v(function*(){const k=h.tag();var l=h.Vb();if(h.Ld())l=new olympe.dc.Request(e,c,{tag:k,model:l});else{const n=yield Tj(a.C,k);l=new olympe.dc.Request(f,c,{tag:k,model:l,content:n.content,mimeType:n.C})}if(!Jc(a.pb))throw Error('Lost connection, stop syncing');
752
+ function Sj(a,b,c){return v(function*(){var d=olympe.dc.Request.C.Bg;const e=olympe.dc.Request.C.hg,f=olympe.dc.Request.C.Qf;a.H.debug('Sync Cache: Applying transaction patch to destination',c,b.V());const g=Lj(b);a.H.debug(`Sync Cache: Found ${g.length} files to send`);yield Promise.all(g.map(h=>v(function*(){const k=h.tag();var l=h.Vb();if(h.Md())l=new olympe.dc.Request(e,c,{tag:k,model:l});else{const n=yield Tj(a.C,k);l=new olympe.dc.Request(f,c,{tag:k,model:l,content:n.content,mimeType:n.C})}if(!Jc(a.pb))throw Error('Lost connection, stop syncing');
753
753
  l=yield a.Yb.request(l);b.Sc(k,new Map([[olympe.dm.File.urlProp.X(),l]]))})));d=new olympe.dc.Request(d,c,new olympe.dc.transaction.xi(b,!1));if(!Jc(a.pb))throw Error('Lost connection, stop syncing');yield a.Yb.request(d)})}
754
754
  function Uj(a,b,c){return c instanceof olympe.N.errors.Wj||c instanceof olympe.N.errors.Vn?(a.H.error('Sync Cache: Timeout or Connection error',c),new olympe.dc.sources.cache.errors.ns('The connection has been lost. It can happen when the application loose connectivity or when the remote server is not responding correctly',c.message)):c instanceof olympe.N.errors.jq?(a.H.error(`Sync Cache: transaction has been rejected by ${b} data source`,c),new olympe.dc.sources.cache.errors.Ou('The transaction has been rejected by the datasource',
755
755
  c.message)):new olympe.dc.sources.cache.errors.Xu('Synchronisation error',c.message)}
756
- function Vj(){var a=olympe.dc.sources.Sd();if(a.T)return rxjs.throwError(()=>Error('Another synchronisation is in progress'));a.T=!0;a.H.info('Sync Cache: Start synchronising transactions');const b=new rxjs.BehaviorSubject([null,null]);(()=>v(function*(){yield a.init();const c=yield Wj(a.C);let d=0;const e=Array.from(c.values()).reduce((f,g)=>f+g.length,0);0<e&&b.next([e,d]);for(const [f,g]of c){Rj(g);for(const h of g){a.H.debug(`Sync Cache: Processing patch ${d+1}/${e} (${h.V()})`);try{yield Sj(a,
757
- h,f),yield Xj(a.C,h)}catch(k){throw Uj(a,f,k);}d+=1;b.next([e,d])}}a.L=null}))().then(()=>{a.T=!1;b.complete()}).catch(c=>{b.error(c.message)}).finally(()=>{Jj(a).finally(()=>{a.T=!1})});return b.asObservable()}
758
- function Yj(){const a=olympe.dc.sources.Sd();return v(function*(){var b=new Set;const c={files:[],patches:[],version:a.version};var d=Lj(a.G);for(const e of d)b.has(e.tag())||(d=yield Tj(a.C,e.tag()),c.files.push({t:e.tag(),m:d.C,c:a.za.C(d.content)}),b.add(e.tag()));b=yield Zj(a.C);c.patches.push(...b);return JSON.stringify(c)})}
759
- function ak(a){const b=olympe.dc.sources.Sd();return v(function*(){let c;try{c=JSON.parse(a)}catch(e){throw Error('Invalid pending changes, must be a JSON string');}var d=c.files;if(!Array.isArray(c.patches)||!Array.isArray(d))throw Error('Invalid pending changes, must contain a `patches` array and a `files` array');for(const e of c.files)d=b.za.G(e.c),yield Nj(b.C,e.t,d,e.m);yield bk(b.C,c.patches);yield Jj(b);b.Ja.Jc(b.G)})}
760
- function ck(){const a=olympe.dc.sources.Sd();return v(function*(){yield dk(a.C);yield Jj(a)})}
761
- olympe.dc.sources.cache.Cache=class{constructor(a,b,c,d,e,f,g,h,k,l){this.H=a;this.Yb=b;this.C=c;this.Ja=d;this.Mc=e;this.pb=f;this.jb=g;this.za=h;this.version=l;this.aa=this.version!==this.jb.get('__code-as-data-version__');this.Lb=this.ub=!1;this.F=new Map;this.P=new rxjs.BehaviorSubject([]);this.L=null;this.ea=new rxjs.BehaviorSubject(!1);this.G=new olympe.dc.db.Vc;this.Tb=this.cc=!1;this.oa=[];this.Z=0;this.ud=new rxjs.BehaviorSubject(!1);this.status=new rxjs.BehaviorSubject({processing:!1});
762
- this.T=!1;this.jc=new rxjs.Subject;this.sd=new olympe.Y.promise.Fu(k)}Dc(){return this.status.asObservable()}init(){const a=this;return v(function*(){if(!a.cc)if(a.Tb)yield new Promise(b=>{a.oa.push(b)});else{a.Tb=!0;(yield ek(a.C)).forEach(b=>{a.F.set(b.name,new Set(b.C))});a.P.next(Cj(a));yield Jj(a);a.Ja.Jc(a.G);for(const b of a.oa)b();a.cc=!0;a.oa=[]}})}executeQuery(a){const b=this;return v(function*(){yield b.init();return Oj(b,a.V())&&Wg(a).some(c=>c instanceof olympe.dc.query.va.Yd)?fk(b.C,
763
- a):b.C.executeQuery(a)})}applyTransaction(a,b){const c=this;return v(function*(){c.H.debug('Cache: apply transaction',a,b);yield c.init();const d=a.Wb(),e=Array.from(d.Ab.keys());let f,g;const h=Array.from(null!=(g=null==(f=c.L)?void 0:f.C.Ab.keys())?g:[]);let k;b!==(null==(k=c.L)?void 0:k.F)||e.some(l=>!h.includes(l))?(yield gk(c.C,d,b),c.L=new olympe.dc.sources.cache.ls(d,b),c.ea.next(!0)):(d.td(c.L.C),yield gk(c.C,c.L.C,b));d.td(c.G);yield Fj(c.C,d,'local-transaction')})}uploadFileContent(a,b,
756
+ function Vj(){var a=olympe.dc.sources.Td();if(a.T)return rxjs.throwError(()=>Error('Another synchronisation is in progress'));a.T=!0;a.H.info('Sync Cache: Start synchronising transactions');const b=new rxjs.BehaviorSubject([null,null]);(()=>v(function*(){yield a.init();const c=yield Wj(a.C);let d=0;const e=Array.from(c.values()).reduce((f,g)=>f+g.length,0);0<e&&b.next([e,d]);for(const [f,g]of c){Rj(g);for(const h of g){a.H.debug(`Sync Cache: Processing patch ${d+1}/${e} (${h.V()})`);try{yield Sj(a,
757
+ h,f),yield Xj(a.C,h)}catch(k){throw Uj(a,f,k);}d+=1;b.next([e,d])}}a.K=null}))().then(()=>{a.T=!1;b.complete()}).catch(c=>{b.error(c.message)}).finally(()=>{Jj(a).finally(()=>{a.T=!1})});return b.asObservable()}
758
+ function Yj(){const a=olympe.dc.sources.Td();return v(function*(){var b=new Set;const c={files:[],patches:[],version:a.version};var d=Lj(a.G);for(const e of d)b.has(e.tag())||(d=yield Tj(a.C,e.tag()),c.files.push({t:e.tag(),m:d.C,c:a.za.C(d.content)}),b.add(e.tag()));b=yield Zj(a.C);c.patches.push(...b);return JSON.stringify(c)})}
759
+ function ak(a){const b=olympe.dc.sources.Td();return v(function*(){let c;try{c=JSON.parse(a)}catch(e){throw Error('Invalid pending changes, must be a JSON string');}var d=c.files;if(!Array.isArray(c.patches)||!Array.isArray(d))throw Error('Invalid pending changes, must contain a `patches` array and a `files` array');for(const e of c.files)d=b.za.G(e.c),yield Nj(b.C,e.t,d,e.m);yield bk(b.C,c.patches);yield Jj(b);b.Ja.Jc(b.G)})}
760
+ function ck(){const a=olympe.dc.sources.Td();return v(function*(){yield dk(a.C);yield Jj(a)})}
761
+ olympe.dc.sources.cache.Cache=class{constructor(a,b,c,d,e,f,g,h,k,l){this.H=a;this.Yb=b;this.C=c;this.Ja=d;this.Mc=e;this.pb=f;this.jb=g;this.za=h;this.version=l;this.aa=this.version!==this.jb.get('__code-as-data-version__');this.Mb=this.ub=!1;this.F=new Map;this.P=new rxjs.BehaviorSubject([]);this.K=null;this.ea=new rxjs.BehaviorSubject(!1);this.G=new olympe.dc.db.Vc;this.Tb=this.cc=!1;this.oa=[];this.Z=0;this.ud=new rxjs.BehaviorSubject(!1);this.status=new rxjs.BehaviorSubject({processing:!1});
762
+ this.T=!1;this.jc=new rxjs.Subject;this.sd=new olympe.Y.promise.Fu(k)}Dc(){return this.status.asObservable()}init(){const a=this;return v(function*(){if(!a.cc)if(a.Tb)yield new Promise(b=>{a.oa.push(b)});else{a.Tb=!0;(yield ek(a.C)).forEach(b=>{a.F.set(b.name,new Set(b.C))});a.P.next(Cj(a));yield Jj(a);a.Ja.Jc(a.G);for(const b of a.oa)b();a.cc=!0;a.oa=[]}})}executeQuery(a){const b=this;return v(function*(){yield b.init();return Oj(b,a.V())&&Wg(a).some(c=>c instanceof olympe.dc.query.va.Zd)?fk(b.C,
763
+ a):b.C.executeQuery(a)})}applyTransaction(a,b){const c=this;return v(function*(){c.H.debug('Cache: apply transaction',a,b);yield c.init();const d=a.Wb(),e=Array.from(d.Ab.keys());let f,g;const h=Array.from(null!=(g=null==(f=c.K)?void 0:f.C.Ab.keys())?g:[]);let k;b!==(null==(k=c.K)?void 0:k.F)||e.some(l=>!h.includes(l))?(yield gk(c.C,d,b),c.K=new olympe.dc.sources.cache.ls(d,b),c.ea.next(!0)):(d.td(c.K.C),yield gk(c.C,c.K.C,b));d.td(c.G);yield Fj(c.C,d,'local-transaction')})}uploadFileContent(a,b,
764
764
  c){const d=this;return v(function*(){yield d.init();yield Nj(d.C,a,b,c);return`offline://${a}`})}downloadFileContent(a){const b=this;return v(function*(){yield b.init();return Tj(b.C,a).then(c=>c.content)})}deleteFileContent(a){const b=this;return v(function*(){yield b.init();yield hk(b.C,[a])})}};olympe.dc.sources.cache.ls=class{constructor(a,b){this.C=a;this.F=b}};olympe.dc.sources.cache.Cache.F='__code-as-data-version__';olympe.dc.sources.cache.Cache.C='__code-as-data__';function ek(a){return v(function*(){return(yield a.db.G('buckets')).map(b=>olympe.dc.sources.cache.Hp.Ub(b))})}function Kj(a){return v(function*(){return(yield a.db.G('pending-transactions')).map(b=>{b=olympe.dc.sources.cache.kh.Ub(b);return a.C.F(b.C)})})}function Dj(a,b,c){return v(function*(){a.H.debug(`Offline DB: Adding query ${b} in bucket ${c}`);return a.db.F()})}function Ej(a){return v(function*(){return a.db.F()})}
765
- function Fj(a,b,c){a.H.debug(`Offline DB: Apply patch ${b.V()} on local offline db`);Array.from(b.Ab.keys());return a.db.F().then(()=>{null===c&&(b.Ab.forEach((d,e)=>a.G.add(e)),a.L().then(()=>{}))})}function Mj(a,b){return new Promise((c,d)=>{null!==a.files?c(a.files.has(b)):a.F.push(e=>{let f;return e?d(e):c(!(null==(f=a.files)||!f.has(b)))})})}
765
+ function Fj(a,b,c){a.H.debug(`Offline DB: Apply patch ${b.V()} on local offline db`);Array.from(b.Ab.keys());return a.db.F().then(()=>{null===c&&(b.Ab.forEach((d,e)=>a.G.add(e)),a.K().then(()=>{}))})}function Mj(a,b){return new Promise((c,d)=>{null!==a.files?c(a.files.has(b)):a.F.push(e=>{let f;return e?d(e):c(!(null==(f=a.files)||!f.has(b)))})})}
766
766
  function Nj(a,b,c,d){c=new olympe.dc.sources.cache.Jl(b,c,d);a.files.add(b);return a.db.set('files',c.toJSON()).then(()=>{}).catch(e=>{a.files.delete(b);throw e;})}function Qj(a,b){return v(function*(){return a.db.remove('buckets',b).then(()=>{})})}function Wj(a){return v(function*(){return(yield a.db.G('pending-transactions')).reduce((b,c)=>{c=olympe.dc.sources.cache.kh.Ub(c);const d=c.F;let e;const f=null!=(e=b.get(d))?e:[];f.push(a.C.F(c.C));b.set(d,f);return b},new Map)})}
767
767
  function Xj(a,b){return v(function*(){return a.db.remove('pending-transactions',b.V()).then(()=>{})})}function Tj(a,b){return v(function*(){const c=yield a.db.get('files',b);if(!c)throw Error(`File ${b} not found in offline cache database`);return olympe.dc.sources.cache.Jl.Ub(c)})}function Zj(a){return v(function*(){return a.db.G('pending-transactions')})}
768
768
  function bk(a,b){return v(function*(){const c=new Map;for(const d of b){const e=olympe.dc.sources.cache.kh.Ub(d);e&&c.set(e.C.i,d)}yield a.db.ea()})}function dk(a){return v(function*(){return a.db.clear('pending-transactions').then(()=>{})})}
769
- function fk(a,b){return v(function*(){const c=b.yb();a.H.debug(`Offline DB: Executing query ${b.V()} by ID with source ${c}`);const d=olympe.dc.query.od.Ii(b);var e=(yield a.db.L(b.V())).map(f=>olympe.dc.sources.cache.pg.Ub(f));for(const f of e){if(f.source!==c)continue;e=olympe.dc.sources.cache.Aj.hc(f);const g=ik(a,f.Cd);d.create(f.tag,e,g);for(const h of f.nb)if(e=h.match(/^([a-z0-9]*)(<|>)([a-z0-9]*)$/)){const [,k,l,n]=e;e='<'===l;k===olympe.dc.nc.Wc&&!0===e||d.Ea(k,e?n:f.tag,e?f.tag:n)}}a.H.C()&&
769
+ function fk(a,b){return v(function*(){const c=b.yb();a.H.debug(`Offline DB: Executing query ${b.V()} by ID with source ${c}`);const d=olympe.dc.query.od.Ii(b);var e=(yield a.db.K(b.V())).map(f=>olympe.dc.sources.cache.pg.Ub(f));for(const f of e){if(f.source!==c)continue;e=olympe.dc.sources.cache.Aj.hc(f);const g=ik(a,f.Cd);d.create(f.tag,e,g);for(const h of f.nb)if(e=h.match(/^([a-z0-9]*)(<|>)([a-z0-9]*)$/)){const [,k,l,n]=e;e='<'===l;k===olympe.dc.nc.Wc&&!0===e||d.Ea(k,e?n:f.tag,e?f.tag:n)}}a.H.C()&&
770
770
  a.H.debug(`Offline DB: Data result for query ${b.V()}`,d.Wb().Ab.size,'instances',Array.from(d.Wb().xd()).length,'relations');return d})}function gk(a,b,c){b=a.C.ha(b);a.H.debug(`save transaction in destination '${c}'`,JSON.stringify(b));return a.db.set('pending-transactions',(new olympe.dc.sources.cache.kh(c,b,Date.now())).toJSON())}function jk(a){return v(function*(){return a.db.P('pending-transactions')})}function hk(a,b){return v(function*(){b.forEach(c=>a.files.delete(c));yield a.db.aa()})}
771
771
  function ik(a,b){return Object.entries(b).reduce((c,[d,e])=>c.set(d,a.C.F(e)),new Map)}
772
- olympe.dc.sources.cache.Aj=class{constructor(a,b,c,d){this.P=`Olympe_Cache_${a}`;this.H=b;this.C=c;this.db=d.F(this.P);this.G=new Set;this.F=[];this.files=null;this.db.T('files').then(e=>{this.files=new Set(e);this.F.forEach(f=>f(null))}).catch(e=>{this.F.forEach(f=>f(e))});this.L=olympe.Y.Promise.dk(()=>{const e=this;return v(function*(){if(!(0===e.G.size||0<(yield jk(e))))if(0<e.db.Z())e.L().then(()=>{}),e.H.debug('Offline DB GC: Postponing round while the stack is busy');else{e.H.debug(`Offline DB GC: Round with ${e.G.size} candidates`);
772
+ olympe.dc.sources.cache.Aj=class{constructor(a,b,c,d){this.P=`Olympe_Cache_${a}`;this.H=b;this.C=c;this.db=d.F(this.P);this.G=new Set;this.F=[];this.files=null;this.db.T('files').then(e=>{this.files=new Set(e);this.F.forEach(f=>f(null))}).catch(e=>{this.F.forEach(f=>f(e))});this.K=olympe.Y.Promise.dk(()=>{const e=this;return v(function*(){if(!(0===e.G.size||0<(yield jk(e))))if(0<e.db.Z())e.K().then(()=>{}),e.H.debug('Offline DB GC: Postponing round while the stack is busy');else{e.H.debug(`Offline DB GC: Round with ${e.G.size} candidates`);
773
773
  var f=Date.now();yield e.db.F().then(()=>{});e.H.debug(`Offline DB GC: has taken ${Date.now()-f}ms to run`)}})},5E3)}static hc(a){const b=new RegExp(`^(${olympe.dc.nc.Wc})>([a-z0-9]*)$`);for(const c of a.nb)if(a=c.match(b))return a[2];return null}executeQuery(a){const b=this;return v(function*(){const c=Date.now();b.H.debug(`Offline DB: Executing query ${a.V()} with source ${a.yb()}`);const d=olympe.dc.query.od.Ii(a),e=a.yb();var f=yield b.db.get('instances',a.F),g=olympe.dc.sources.cache.pg.Ub(f);
774
774
  if(!g)return d;f=new Map;const h=new Set([g.tag]);d.create(g.tag,olympe.dc.sources.cache.Aj.hc(g),ik(b,g.Cd));for(const p of Wg(a))if(p instanceof olympe.dc.query.va.oh){var k=p.relation;g=k.Ha()===olympe.dc.ua.ORIGIN;const q=k.X(),r=k.fc();k=new Set;f.set(p.V(),k);const t=[f.has(p.C)?new Set(f.get(p.C)):new Set([a.F])];for(const u of t){const w=new Map;var l=yield Promise.all(Array.from(u).map(y=>{if(!h.has(y))return b.H.warn(`Offline DB: Instance ${y} not found while processing query part, this should not happen`),
775
- Promise.resolve([]);r.X();return b.db.L().then(z=>z.map(A=>olympe.dc.sources.cache.pg.Ub(A))).then(z=>{w.set(y,z)})})).then(()=>w);for(const [y,z]of l){p instanceof olympe.dc.query.va.Mf&&p.G&&k.add(y);for(const A of z)if(l=A.tag,A.source===e){if(p instanceof olympe.dc.query.va.Mf&&!k.has(l)){var n=t[t.length-1];n||(n=new Set,t.push(n));n.add(l)}k.add(l);h.has(l)||(h.add(l),n=olympe.dc.sources.cache.Aj.hc(A),d.create(l,n,ik(b,A.Cd)));q===olympe.dc.nc.Wc&&!0===g||d.Ea(q,g?l:y,g?y:l)}}}}else p instanceof
776
- olympe.dc.query.va.Yd&&b.H.warn(`Offline DB: Trying to execute a query ${a.V()} on the Cache DB that contains a FollowRule part. This is not supported and designed not to happen.`);b.H.C()&&(b.H.debug(`Offline DB: Data result for query ${a.V()}`,d.Wb().Ab.size,'instances',Array.from(d.Wb().xd()).length,'relations'),b.H.debug(`Offline DB: Data result for query ${a.V()} took ${Date.now()-c}ms to be executed`));return d})}};
775
+ Promise.resolve([]);r.X();return b.db.K().then(z=>z.map(A=>olympe.dc.sources.cache.pg.Ub(A))).then(z=>{w.set(y,z)})})).then(()=>w);for(const [y,z]of l){p instanceof olympe.dc.query.va.Mf&&p.G&&k.add(y);for(const A of z)if(l=A.tag,A.source===e){if(p instanceof olympe.dc.query.va.Mf&&!k.has(l)){var n=t[t.length-1];n||(n=new Set,t.push(n));n.add(l)}k.add(l);h.has(l)||(h.add(l),n=olympe.dc.sources.cache.Aj.hc(A),d.create(l,n,ik(b,A.Cd)));q===olympe.dc.nc.Wc&&!0===g||d.Ea(q,g?l:y,g?y:l)}}}}else p instanceof
776
+ olympe.dc.query.va.Zd&&b.H.warn(`Offline DB: Trying to execute a query ${a.V()} on the Cache DB that contains a FollowRule part. This is not supported and designed not to happen.`);b.H.C()&&(b.H.debug(`Offline DB: Data result for query ${a.V()}`,d.Wb().Ab.size,'instances',Array.from(d.Wb().xd()).length,'relations'),b.H.debug(`Offline DB: Data result for query ${a.V()} took ${Date.now()-c}ms to be executed`));return d})}};
777
777
  olympe.dc.sources.cache.Hp=class{constructor(a,b){this.name=a;this.C=b}static Ub(a){return a?new olympe.dc.sources.cache.Hp(a.name,a.queryIds):null}toJSON(){return{name:this.name,queryIds:this.C}}};
778
778
  olympe.dc.sources.cache.pg=class{constructor(a,b,c,d,e){this.tag=a;this.source=b;this.Cd=null!=c?c:{};this.nb=null!=d?d:[];this.C=null!=e?e:[]}static Ub(a){return a?new olympe.dc.sources.cache.pg(a.tag,a.source,a.props,a.relations,a.queryIds):null}toJSON(){return{tag:this.tag,source:this.source,props:this.Cd,relations:this.nb,queryIds:this.C}}};
779
779
  olympe.dc.sources.cache.kh=class{constructor(a,b,c){this.F=a;this.C=b;this.timestamp=c}static Ub(a){return a?new olympe.dc.sources.cache.kh(a.destination,a.patch,a.timestamp):null}toJSON(){return{destination:this.F,patch:this.C,timestamp:this.timestamp}}};
780
780
  olympe.dc.sources.cache.Wt=class extends olympe.dc.sources.cache.kh{constructor(a,b,c,d){super(a,b,c);this.error=d}static Ub(a){return a?new olympe.dc.sources.cache.Wt(a.destination,a.patch,a.timestamp,a.error):null}toJSON(){return{destination:this.F,patch:this.C,timestamp:this.timestamp,error:this.error}}};
781
781
  olympe.dc.sources.cache.Jl=class{constructor(a,b,c){this.tag=a;this.content=b;this.C=c}static Ub(a){return a?new olympe.dc.sources.cache.Jl(a.tag,a.content,a.mimetype):null}toJSON(){return{tag:this.tag,content:this.content,mimetype:this.C}}};function kk(a,b){let c=a.P.get(b);c||(c=new Set(a.C.get(b).nb),a.P.set(b,c));return c}
782
- olympe.dc.sources.cache.Ps=class{constructor(a,b,c){this.H=a;this.G=c;this.C=new Map;this.T=new Set;this.Z=new Set;this.L=b;this.P=new Map}Zc(){this.T.forEach(a=>this.C.delete(a));Array.from(this.C.entries()).forEach(([a,b])=>{b||this.C.delete(a)});return this.C}Pc(a,b,c){const d=this.C.get(a);d||this.Z.add(a);var e;c=Array.from(null!=c?c:[]).reduce((h,k)=>{h[k[0]]=this.L.ha(k[1]);return h},null!=(e=null==d?void 0:d.Cd)?e:{});let f;e=null!=(f=null==d?void 0:d.C)?f:[];null===this.G||e.includes(this.G)||
783
- e.push(this.G);let g;b=new olympe.dc.sources.cache.pg(a,b,c,null!=(g=null==d?void 0:d.nb)?g:[],e);this.C.set(a,b)}Sc(a,b){const c=this.C.get(a);if(c){var d;c.Cd=Array.from(b).reduce((e,[f,g])=>{null===g?delete e[f]:e[f]=this.L.ha(g);return e},null!=(d=c.Cd)?d:{})}else this.H.warn(`Trying to update an instance (${a}) which do not exists in the cache database: ignoring.`)}F(a){this.T.add(a)}Ea(a,b,c){var d;const e=null!=(d=this.C.get(b))?d:new olympe.dc.sources.cache.pg(b,'unknown',{},[],[]);var f;
782
+ olympe.dc.sources.cache.Ps=class{constructor(a,b,c){this.H=a;this.G=c;this.C=new Map;this.T=new Set;this.Z=new Set;this.K=b;this.P=new Map}Zc(){this.T.forEach(a=>this.C.delete(a));Array.from(this.C.entries()).forEach(([a,b])=>{b||this.C.delete(a)});return this.C}Pc(a,b,c){const d=this.C.get(a);d||this.Z.add(a);var e;c=Array.from(null!=c?c:[]).reduce((h,k)=>{h[k[0]]=this.K.ha(k[1]);return h},null!=(e=null==d?void 0:d.Cd)?e:{});let f;e=null!=(f=null==d?void 0:d.C)?f:[];null===this.G||e.includes(this.G)||
783
+ e.push(this.G);let g;b=new olympe.dc.sources.cache.pg(a,b,c,null!=(g=null==d?void 0:d.nb)?g:[],e);this.C.set(a,b)}Sc(a,b){const c=this.C.get(a);if(c){var d;c.Cd=Array.from(b).reduce((e,[f,g])=>{null===g?delete e[f]:e[f]=this.K.ha(g);return e},null!=(d=c.Cd)?d:{})}else this.H.warn(`Trying to update an instance (${a}) which do not exists in the cache database: ignoring.`)}F(a){this.T.add(a)}Ea(a,b,c){var d;const e=null!=(d=this.C.get(b))?d:new olympe.dc.sources.cache.pg(b,'unknown',{},[],[]);var f;
784
784
  d=null!=(f=this.C.get(c))?f:new olympe.dc.sources.cache.pg(c,'unknown',{},[],[]);b=`${a}${olympe.dc.ua.ORIGIN}${b}`;f=(g,h)=>{this.C.set(g.tag,g);const k=kk(this,g.tag);k.has(h)||(g.nb.push(h),k.add(h));null===this.G||g.C.includes(this.G)||g.C.push(this.G)};f(e,`${a}${olympe.dc.ua.DESTINATION}${c}`);f(d,b)}kc(a,b,c){const d=this.C.get(b),e=this.C.get(c);c=`${a}${olympe.dc.ua.DESTINATION}${c}`;a=`${a}${olympe.dc.ua.ORIGIN}${b}`;b=(f,g)=>{const h=kk(this,f.tag);if(h.has(g)){const k=f.nb.indexOf(g);
785
- f.nb.splice(k,1);h.delete(g)}};d&&b(d,c);e&&b(e,a)}};olympe.dc.sources.cache.Ps.xa=[olympe.dc.Writable];olympe.dc.transaction={};olympe.dc.Sh=class a{constructor(b,c){this.id=null!=b?b:olympe.Y.Hc();this.F=new olympe.D.$b('BurstTransaction#'+this.id,c);this.ub=lk(this);this.T=!1;this.F.onDestroy(()=>this.P());this.Z=new Set;this.G=new Map;this.L=new Set;this.C=null;let d;this.jb=null!=(d=olympe.W.getParameter(olympe.dc.transaction.U.xn))?d:30;this.oa=[]}static C(b,c){return`${b},${c}`}Lb(b){for(const c of this.oa)c(b);this.stop()}Ja(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ea(this.L);0<b.size&&mk(this,
786
- b,!1);this.L.clear()}ea(b){const c=new Map;b.forEach(d=>{const e=d.split(',');let f=c.get(e[0]);void 0===f&&(f=new Map,c.set(e[0],f));f.set(e[1],this.G.get(d))});return c}aa(b,c,d){this.za(b,c,d);this.ub(b,c,d);null===this.C&&(this.C=setTimeout(this.Ja.bind(this),this.jb))}za(b,c,d){b=a.C(b,c);this.G.set(b,d);this.L.add(b)}pb(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.ga(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.ga(f),this.pb(d,e)!==g&&this.aa(d,e,g.valueOf())});this.Z.add(b)}complete(){return new Promise((b,
785
+ f.nb.splice(k,1);h.delete(g)}};d&&b(d,c);e&&b(e,a)}};olympe.dc.sources.cache.Ps.xa=[olympe.dc.Writable];olympe.dc.transaction={};olympe.dc.Sh=class a{constructor(b,c){this.id=null!=b?b:olympe.Y.Hc();this.F=new olympe.D.$b('BurstTransaction#'+this.id,c);this.ub=lk(this);this.T=!1;this.F.onDestroy(()=>this.P());this.Z=new Set;this.G=new Map;this.K=new Set;this.C=null;let d;this.jb=null!=(d=olympe.W.getParameter(olympe.dc.transaction.U.xn))?d:30;this.oa=[]}static C(b,c){return`${b},${c}`}Mb(b){for(const c of this.oa)c(b);this.stop()}Ja(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ea(this.K);0<b.size&&mk(this,
786
+ b,!1);this.K.clear()}ea(b){const c=new Map;b.forEach(d=>{const e=d.split(',');let f=c.get(e[0]);void 0===f&&(f=new Map,c.set(e[0],f));f.set(e[1],this.G.get(d))});return c}aa(b,c,d){this.za(b,c,d);this.ub(b,c,d);null===this.C&&(this.C=setTimeout(this.Ja.bind(this),this.jb))}za(b,c,d){b=a.C(b,c);this.G.set(b,d);this.K.add(b)}pb(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.ga(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.ga(f),this.pb(d,e)!==g&&this.aa(d,e,g.valueOf())});this.Z.add(b)}complete(){return new Promise((b,
787
787
  c)=>{this.P((d,e)=>{for(const f of this.Z)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.ga(b),f=olympe.dc.ga(c);void 0===e||void 0===f?olympe.dc.Og().ab().error('Burst transaction: instance tag or property tag is undefined'):(this.F.run(()=>{olympe.D.Wm([d],g=>{this.T=!0;if(g instanceof olympe.dc.Bc)olympe.dc.Og().ab().error('Cannot send complex property values in burst transactions');else{var h;this.aa(e,f,null!=(h=null==g?void 0:g.valueOf())?h:null)}})}),this.F.Z(()=>{this.P()}))}stop(){this.F.destroy();
788
- this.oa.length=0}getContext(){return this.F}V(){return this.id}Tg(){return!1}P(b){if(this.T){this.T=!1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.L.clear();const c=this.ea(new Set(this.G.keys()));mk(this,c,!0,b)}else null==b||b(!0)}toString(){return'Burst transaction #'+this.id}};olympe.dc.Sh.prototype.complete=olympe.dc.Sh.prototype.complete;olympe.dc.Sh.prototype.push=olympe.dc.Sh.prototype.push;olympe.dc.Jp=class{C(){}toString(){}};olympe.dc.transaction.Cj=class a{constructor(b){this.F=null!=b?b:olympe.dc.Pa.SERVER}C(b,c){c=new olympe.dc.db.Vc(c);this.G(b,c);return c}G(b,c){for(const d of b)switch(d.o){case 1:b=a.C(d.p||{});let e;c.Pc(d.t,null!=(e=d.s)?e:this.F,b,d.m);break;case 2:c.Sc(d.t,a.C(d.p),d.m);break;case 3:c.F(d.t,d.f,d.m);break;case 4:c.Ea(d.m,d.l,d.r,d.lm,d.rm);break;case 5:c.kc(d.m,d.l,d.r,d.lm,d.rm);break;case 6:break;default:throw Error('Undefined patch operation: '+d.o);}}static C(b){const c=new Map;for(const [d,
788
+ this.oa.length=0}getContext(){return this.F}V(){return this.id}Tg(){return!1}P(b){if(this.T){this.T=!1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.K.clear();const c=this.ea(new Set(this.G.keys()));mk(this,c,!0,b)}else null==b||b(!0)}toString(){return'Burst transaction #'+this.id}};olympe.dc.Sh.prototype.complete=olympe.dc.Sh.prototype.complete;olympe.dc.Sh.prototype.push=olympe.dc.Sh.prototype.push;olympe.dc.Jp=class{C(){}toString(){}};olympe.dc.transaction.Cj=class a{constructor(b){this.F=null!=b?b:olympe.dc.Pa.SERVER}C(b,c){c=new olympe.dc.db.Vc(c);this.G(b,c);return c}G(b,c){for(const d of b)switch(d.o){case 1:b=a.C(d.p||{});let e;c.Pc(d.t,null!=(e=d.s)?e:this.F,b,d.m);break;case 2:c.Sc(d.t,a.C(d.p),d.m);break;case 3:c.F(d.t,d.f,d.m);break;case 4:c.Ea(d.m,d.l,d.r,d.lm,d.rm);break;case 5:c.kc(d.m,d.l,d.r,d.lm,d.rm);break;case 6:break;default:throw Error('Undefined patch operation: '+d.o);}}static C(b){const c=new Map;for(const [d,
789
789
  e]of Object.entries(b)){b=d;let f=typeof e;20<b.length&&b.startsWith('fd')&&(b=olympe.dc.rj.He+b.substring(2));'object'===f&&(f=e&&e.c?String(e.c):'untyped');switch(f){case '1':case '2':case '3':throw Error('Complex format for primitive types not supported.');case 'string':c.set(b,String(e));break;case 'boolean':c.set(b,!!e);break;case 'number':c.set(b,Number(e));break;case '4':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d,e.h,e.m,e.s,e.S)));break;case '5':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d)));break;
790
- case '6':c.set(b,new Date(Date.UTC(e.y||1970,e.M&&e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.D.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Bc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};function nk(a,b){let c;return null!=(c=a.sources.get(b))?c:a.L.ze(b)}function ok(a,b){let c,d,e;return null!=(e=null!=(d=null==(c=a.C.Rc(b))?void 0:c.Vb())?d:a.db.model(b))?e:null}function Z(a,b){let c;return null!=(c=a.G.get(b))?c:a.db.Xf(b)||!a.db.Ga(b)}function pk(a,b){0===a.G.size?a.G=b:b.forEach((c,d)=>a.G.set(d,c))}function qk(a){return Array.from(a.C.Zc()).filter(b=>!b.Ld()).map(b=>b.tag())}
790
+ case '6':c.set(b,new Date(Date.UTC(e.y||1970,e.M&&e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.D.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Bc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};function nk(a,b){let c;return null!=(c=a.sources.get(b))?c:a.K.ze(b)}function ok(a,b){let c,d,e;return null!=(e=null!=(d=null==(c=a.C.Rc(b))?void 0:c.Vb())?d:a.db.model(b))?e:null}function Z(a,b){let c;return null!=(c=a.G.get(b))?c:a.db.Xf(b)||!a.db.Ga(b)}function pk(a,b){0===a.G.size?a.G=b:b.forEach((c,d)=>a.G.set(d,c))}function qk(a){return Array.from(a.C.Zc()).filter(b=>!b.Md()).map(b=>b.tag())}
791
791
  function rk(a,b,c,d){d(a.C);c&&b!==olympe.dc.Pa.SELF&&(c=a.F.get(b),c||(c=new olympe.dc.db.Vc(a.id),a.F.set(b,c)),d(c))}function sk(a,b,c){const d=nk(a,b),e=Z(a,b),f=ok(a,b);rk(a,d,e,g=>{g.F(b,c,f)})}
792
- olympe.dc.transaction.du=class{constructor(a,b,c){this.id=null!=c?c:olympe.Y.Hc();this.L=b;this.db=a;this.F=new Map;this.C=new olympe.dc.db.Vc(this.id);this.sources=new Map;this.G=new Map}Hh(){return 0===this.C.Ab.size}Pc(a,b,c,d){let e;const f=null!=(e=null!=c?c:this.sources.get(a))?e:this.L.fromModel(b);c=Z(this,a);this.sources.set(a,f);rk(this,f,c,g=>{g.Pc(a,f,d,b)})}Sc(a,b){const c=nk(this,a),d=Z(this,a),e=ok(this,a);rk(this,c,d,f=>{f.Sc(a,null!=b?b:new Map,e)})}Ea(a,b,c){const d=nk(this,b),e=
792
+ olympe.dc.transaction.du=class{constructor(a,b,c){this.id=null!=c?c:olympe.Y.Hc();this.K=b;this.db=a;this.F=new Map;this.C=new olympe.dc.db.Vc(this.id);this.sources=new Map;this.G=new Map}Hh(){return 0===this.C.Ab.size}Pc(a,b,c,d){let e;const f=null!=(e=null!=c?c:this.sources.get(a))?e:this.K.fromModel(b);c=Z(this,a);this.sources.set(a,f);rk(this,f,c,g=>{g.Pc(a,f,d,b)})}Sc(a,b){const c=nk(this,a),d=Z(this,a),e=ok(this,a);rk(this,c,d,f=>{f.Sc(a,null!=b?b:new Map,e)})}Ea(a,b,c){const d=nk(this,b),e=
793
793
  nk(this,c);var f=Z(this,b)&&Z(this,c)&&d!==olympe.dc.Pa.SELF&&e!==olympe.dc.Pa.SELF;f&&d!==e&&a!==olympe.dc.nc.Wc&&(f=g=>{let h;return null!=(h=olympe.dc.ia().name(g))?h:g},olympe.ma.ab('dc').warn(`Try to create a relation between 2 objects that have different locations: \n ${f(b)} (${b})-[${f(a)} (${a})]->${f(c)} (${c}), originSrc: ${f(d)} (${d}), destinationSrc: ${f(e)} (${e})`),f=!1);rk(this,d,f,g=>{g.Ea(a,b,c,ok(this,b),ok(this,c))})}kc(a,b,c){const d=nk(this,b),e=nk(this,c);let f=Z(this,b)&&
794
794
  Z(this,c)&&d!==olympe.dc.Pa.SELF&&e!==olympe.dc.Pa.SELF;f&&d!==e&&a!==olympe.dc.nc.Wc&&(olympe.ma.ab('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);rk(this,d,f,g=>{g.kc(a,b,c,ok(this,b),ok(this,c))})}};function tk(a,b,c){const d=Object.create(null);if(!b)return d;for(const f of Array.from(b.keys()).sort()){let g=f;var e=b.get(f);if(g===olympe.dc.cp.vq)if(e===olympe.dc.Pa.SELF)d[g]=olympe.dc.ia().V();else{if(e===olympe.dc.Pa.SERVER)continue}else g.startsWith(olympe.dc.rj.He)&&(g='fd'+g.substring(1));e=a.T(e);c&&e instanceof Object&&8===e.c?a.P.set(g,e):d[g]=e}return d}function uk(a){if(0===a.P.size)return null;const b=Object.create(null);a.P.forEach((c,d)=>{b[d]=c});a.P.clear();return b}
795
795
  class vk{constructor(){this.P=new Map}T(a){return a instanceof olympe.D.Na||a instanceof olympe.D.fa||a instanceof olympe.D.ba?a.valueOf():a instanceof Date||a instanceof olympe.D.gb?(a=a instanceof olympe.D.gb?a.valueOf():a,{c:4,y:a.getUTCFullYear(),M:a.getUTCMonth()+1,d:a.getUTCDate(),h:a.getUTCHours(),m:a.getUTCMinutes(),s:a.getUTCSeconds(),S:a.getUTCMilliseconds(),z:0}):a instanceof olympe.D.Color?{c:7,r:a.Ng().valueOf(),g:a.Kg().valueOf(),b:a.Gg().valueOf(),a:a.Fg().valueOf()}:a&&'function'===
796
- typeof a.X?{c:8,t:a.X()}:a}}function Sg(a){const b=a.L.concat(a.G).concat(a.P).concat(a.C).concat(a.T);a.P=[];a.G=[];a.C=[];a.T=[];a.L=[];return b}
797
- olympe.dc.transaction.qg=class{constructor({zk:a=!1,yh:b=!0,de:c=!0}={}){this.P=[];this.G=[];this.C=[];this.T=[];this.L=[];this.zk=null!=a?a:!1;this.de=null!=c?c:!0;this.yh=null!=b?b:!0;this.Z=olympe.D?new vk:new class extends vk{T(d){return d&&'function'===typeof d.X?{c:8,t:d.X()}:d}}}flush(){return JSON.stringify(Sg(this))}Pc(a,b,c,d=null){c=tk(this.Z,null!=c?c:null,this.zk);c={o:1,t:a,p:c};this.yh&&(c.s=b);this.de&&d&&(c.m=d);this.P.push(c);this.zk&&(b=uk(this.Z))&&this.C.push({o:2,t:a,p:b})}Sc(a,
796
+ typeof a.X?{c:8,t:a.X()}:a}}function Sg(a){const b=a.K.concat(a.G).concat(a.P).concat(a.C).concat(a.T);a.P=[];a.G=[];a.C=[];a.T=[];a.K=[];return b}
797
+ olympe.dc.transaction.qg=class{constructor({zk:a=!1,yh:b=!0,de:c=!0}={}){this.P=[];this.G=[];this.C=[];this.T=[];this.K=[];this.zk=null!=a?a:!1;this.de=null!=c?c:!0;this.yh=null!=b?b:!0;this.Z=olympe.D?new vk:new class extends vk{T(d){return d&&'function'===typeof d.X?{c:8,t:d.X()}:d}}}flush(){return JSON.stringify(Sg(this))}Pc(a,b,c,d=null){c=tk(this.Z,null!=c?c:null,this.zk);c={o:1,t:a,p:c};this.yh&&(c.s=b);this.de&&d&&(c.m=d);this.P.push(c);this.zk&&(b=uk(this.Z))&&this.C.push({o:2,t:a,p:b})}Sc(a,
798
798
  b,c=null){b=tk(this.Z,b||null,!1);a={o:2,t:a,p:b};this.de&&c&&(a.m=c);this.C.push(a)}F(a,b,c=null){a={o:3,t:a,f:b};this.de&&c&&(a.m=c);this.G.push(a)}Ea(a,b,c,d=null,e=null){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);a={o:4,m:a,l:b,r:c};this.de&&d&&(a.lm=d);this.de&&e&&(a.rm=e);this.T.push(a)}kc(a,b,c,d=null,e=null){if(!a)throw Error('Cannot delete relation of undefined type');
799
- if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');a={o:5,m:a,l:b,r:c};this.de&&d&&(a.lm=d);this.de&&e&&(a.rm=e);this.L.push(a)}};olympe.dc.transaction.qg.xa=[olympe.dc.Writable];function wk(a){var b=new olympe.dc.Xa;b.Z=a;return b}function xk(a,b){b instanceof olympe.dc.Xa&&b.F.forEach((c,d)=>a.F.set(d,c));a.Ya.push(b);return b}
799
+ if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');a={o:5,m:a,l:b,r:c};this.de&&d&&(a.lm=d);this.de&&e&&(a.rm=e);this.K.push(a)}};olympe.dc.transaction.qg.xa=[olympe.dc.Writable];function wk(a){var b=new olympe.dc.Xa;b.Z=a;return b}function xk(a,b){b instanceof olympe.dc.Xa&&b.F.forEach((c,d)=>a.F.set(d,c));a.Ya.push(b);return b}
800
800
  function yk(a,b,c,d){c=a.create(null!=c?c:olympe.dc.CloudObject,void 0);if('string'===typeof b)b=b||'',Y(c,olympe.dc.CloudObject.nameProp.X(),b);else for(const [f,g]of Object.entries(b))Y(c,f,g);b=c.X();d=null!=d?d:olympe.dc.CloudObject;const e=olympe.dc.CloudObject.extendRel.X();xk(a,new olympe.dc.transaction.Ya.mo(e,b));xk(a,new olympe.dc.transaction.Ya.Wk(e,b,d));return c}function zk(a){return 0<a.length?(b,c)=>{a.forEach(d=>null==d?void 0:d(b,c))}:void 0}
801
- olympe.dc.Xa=class{constructor(a){this.id=null!=a?a:olympe.Y.Hc();this.Ya=[];this.L=new Map;this.Z=!0;this.F=new Map;this.P=[];this.G=!1;this.T=[...olympe.dc.Og().T]}V(){return this.id}model(a){let b;return null!=(b=this.L.get(olympe.dc.ga(a)))?b:olympe.dc.ia().model(a)}C(a){pk(a,this.F);for(const b of this.Ya)b.C(a);try{this.T.forEach(b=>b(a))}catch(b){throw Error(`Transaction compilation error: ${b.message}`);}}create(a,b){b=xk(this,new olympe.dc.transaction.Ya.Zn(a,b));const c=b.X();this.L.set(c,
802
- olympe.dc.ga(a));let d;this.persist(c,null!=(d=this.F.get(c))?d:this.Z);return b}persist(a,b=!0){const c=olympe.dc.ga(a);var d=olympe.dc.ia();this.F.set(c,b);if(b){let f;b=null!=(f=this.L.get(c))?f:d.model(c);if(null===b)throw Error(`Try to persist an instance that does not exist: ${c}`);var e;d=null!=(e=d.source(a))?e:olympe.dc.Ud().fromModel(b);xk(this,new olympe.dc.transaction.Ya.eu(c,d))}else{if((e=d.Ga(c))&&d.Xf(c))throw Error(`Try to remove persistence of an instance already persisted: ${c}`);
803
- if(!e&&!this.L.has(c))throw Error(`Try to remove persistence of an instance that does not exist and is not part of the transaction: ${c}`);}return this}delete(a,b=olympe.dc.Zb.yc){xk(this,new olympe.dc.transaction.Ya.no(a,b))}update(a,b,c){return xk(this,new olympe.dc.transaction.Ya.Yu(a,b,c))}Ea(a,b,c){xk(this,new olympe.dc.transaction.Ya.Wk(a,b,c))}kc(a,b,c){xk(this,new olympe.dc.transaction.Ya.ys(a,b,c))}xm(a,b){xk(this,new olympe.dc.transaction.Ya.mo(a,b))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,
804
- f);Y(d,olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.rj.He+d.X(),e);this.Ea(olympe.dc.CloudObject.propertyRel,a,d);this.Ea(olympe.dm.Property.typeRel,d,b);this.Ea(olympe.dc.CloudObject.containsRel,a,d);return d}er(a,b,c='',{uC:d=olympe.dm.Relation.L.St,FC:e=olympe.dm.Relation.C.Yp,AC:f=olympe.dm.Relation.C.Wr,fD:g=olympe.dm.Relation.C.Qs,rC:h=olympe.dm.Fk.NONE,eD:k=olympe.dm.Relation.P|h}={},l=olympe.Y.Hc()){c=Y(Y(Y(Y(Y(Y(Y(Y(this.create(olympe.dm.Relation,l),olympe.dc.CloudObject.nameProp,
801
+ olympe.dc.Xa=class{constructor(a){this.id=null!=a?a:olympe.Y.Hc();this.Ya=[];this.K=new Map;this.Z=!0;this.F=new Map;this.P=[];this.G=!1;this.T=[...olympe.dc.Og().T]}V(){return this.id}model(a){let b;return null!=(b=this.K.get(olympe.dc.ga(a)))?b:olympe.dc.ia().model(a)}C(a){pk(a,this.F);for(const b of this.Ya)b.C(a);try{this.T.forEach(b=>b(a))}catch(b){throw Error(`Transaction compilation error: ${b.message}`);}}create(a,b){b=xk(this,new olympe.dc.transaction.Ya.Zn(a,b));const c=b.X();this.K.set(c,
802
+ olympe.dc.ga(a));let d;this.persist(c,null!=(d=this.F.get(c))?d:this.Z);return b}persist(a,b=!0){const c=olympe.dc.ga(a);var d=olympe.dc.ia();this.F.set(c,b);if(b){let f;b=null!=(f=this.K.get(c))?f:d.model(c);if(null===b)throw Error(`Try to persist an instance that does not exist: ${c}`);var e;d=null!=(e=d.source(a))?e:olympe.dc.Vd().fromModel(b);xk(this,new olympe.dc.transaction.Ya.eu(c,d))}else{if((e=d.Ga(c))&&d.Xf(c))throw Error(`Try to remove persistence of an instance already persisted: ${c}`);
803
+ if(!e&&!this.K.has(c))throw Error(`Try to remove persistence of an instance that does not exist and is not part of the transaction: ${c}`);}return this}delete(a,b=olympe.dc.Zb.yc){xk(this,new olympe.dc.transaction.Ya.no(a,b))}update(a,b,c){return xk(this,new olympe.dc.transaction.Ya.Yu(a,b,c))}Ea(a,b,c){xk(this,new olympe.dc.transaction.Ya.Wk(a,b,c))}kc(a,b,c){xk(this,new olympe.dc.transaction.Ya.ys(a,b,c))}xm(a,b){xk(this,new olympe.dc.transaction.Ya.mo(a,b))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,
804
+ f);Y(d,olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.rj.He+d.X(),e);this.Ea(olympe.dc.CloudObject.propertyRel,a,d);this.Ea(olympe.dm.Property.typeRel,d,b);this.Ea(olympe.dc.CloudObject.containsRel,a,d);return d}er(a,b,c='',{uC:d=olympe.dm.Relation.K.St,FC:e=olympe.dm.Relation.C.Yp,AC:f=olympe.dm.Relation.C.Wr,fD:g=olympe.dm.Relation.C.Qs,rC:h=olympe.dm.Fk.NONE,eD:k=olympe.dm.Relation.P|h}={},l=olympe.Y.Hc()){c=Y(Y(Y(Y(Y(Y(Y(Y(this.create(olympe.dm.Relation,l),olympe.dc.CloudObject.nameProp,
805
805
  c||''),olympe.dm.Relation.F,d),olympe.dm.Relation.G,k),olympe.dm.Relation.aa,e),olympe.dm.Relation.oa,e),olympe.dm.Relation.Z,f),olympe.dm.Relation.ea,g),olympe.dm.Relation.T,h);this.Ea(olympe.dc.CloudObject.Ri,a,c);this.Ea(olympe.dm.Relation.destinationModelRel,c,b);this.Ea(olympe.dc.CloudObject.containsRel,a,c);return c}Tg(){return!1}pm(a){this.P.push(olympe.D.Wa().G(a))}mb(a,b){if(this.G)throw Error('Operation not permitted: this transaction has already been executed');this.G=!0;a=zk([this.aa.bind(this),
806
- ...this.P,a].filter(c=>'function'===typeof c));Ak(this,a,b)}ym(a){if(this.G)throw Error('Operation not permitted: this transaction has already been executed');this.G=!0;a=zk([this.aa.bind(this),...this.P,a].filter(b=>'function'===typeof b));Bk(olympe.dc.Og(),this,a,!0)}aa(a){a||(this.G=!1)}toString(){return`Transaction #${this.id}`}};olympe.dc.Xa.xa=[olympe.dc.Jp];function lk(a){var b=olympe.dc.Og();const c=a.V();b.L.set(c,a);a.getContext().onDestroy(()=>{b.L.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.Vc(c);g.Sc(d,(new Map).set(e,f),b.db.model(d));b.G.Jc(g)}}
806
+ ...this.P,a].filter(c=>'function'===typeof c));Ak(this,a,b)}ym(a){if(this.G)throw Error('Operation not permitted: this transaction has already been executed');this.G=!0;a=zk([this.aa.bind(this),...this.P,a].filter(b=>'function'===typeof b));Bk(olympe.dc.Og(),this,a,!0)}aa(a){a||(this.G=!1)}toString(){return`Transaction #${this.id}`}};olympe.dc.Xa.xa=[olympe.dc.Jp];function lk(a){var b=olympe.dc.Og();const c=a.V();b.K.set(c,a);a.getContext().onDestroy(()=>{b.K.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.Vc(c);g.Sc(d,(new Map).set(e,f),b.db.model(d));b.G.Jc(g)}}
807
807
  function mk(a,b,c,d){var e=olympe.dc.Og();const f=olympe.dc.Request.C.Rh,g=olympe.dc.Request.C.Xg,h=a.V();a=a.Tg();const k=new Map;for(const l of b.keys()){const n=e.db.source(l);if(n===olympe.dc.Pa.SELF||!e.db.Xf(l))continue;let p=k.get(n);p||(p=new olympe.dc.db.Vc(h),k.set(n,p));p.Sc(l,b.get(l),e.db.model(l))}for(const [l,n]of k)b=new olympe.dc.Request(c?g:f,l,new olympe.dc.transaction.xi(n,a)),b=e.Yb.request(b).catch(p=>null==d?void 0:d(!1,`${p}`)),c&&b.then(()=>null==d?void 0:d(!0))}
808
- function Ak(a,b,c){var d=olympe.dc.Og();if(c&&'function'===typeof b){const e=a.V();d.C.set(e,b);Bk(d,a,(f,g)=>{f||(d.C.delete(e),b(f,g))},!1)}else Bk(d,a,b,!1)}function Ck(a){const b=olympe.dc.Request.C.nj;Qe(a.Yb,olympe.dc.Request.C.yn,c=>{var d=c.content;c=d.id;var e=d.rollback;d=d.error;const f=a.L.get(c);void 0!==f&&(a.L.delete(c),f.Lb(d));a.G.Jc(e);a.H.warn(`Fast update (id=${c}) has been refused and is rolled back. Error: ${d}`)});Qe(a.Yb,b,c=>{c=c.content;Dk(a,c.id,c.finalize,c.error)})}
808
+ function Ak(a,b,c){var d=olympe.dc.Og();if(c&&'function'===typeof b){const e=a.V();d.C.set(e,b);Bk(d,a,(f,g)=>{f||(d.C.delete(e),b(f,g))},!1)}else Bk(d,a,b,!1)}function Ck(a){const b=olympe.dc.Request.C.nj;Qe(a.Yb,olympe.dc.Request.C.yn,c=>{var d=c.content;c=d.id;var e=d.rollback;d=d.error;const f=a.K.get(c);void 0!==f&&(a.K.delete(c),f.Mb(d));a.G.Jc(e);a.H.warn(`Fast update (id=${c}) has been refused and is rolled back. Error: ${d}`)});Qe(a.Yb,b,c=>{c=c.content;Dk(a,c.id,c.finalize,c.error)})}
809
809
  function Ek(a,b,c){c&&a.aa.has(c)||a.T.push(b);return a}
810
810
  function Bk(a,b,c,d=!1){c=c?olympe.D.Wa().G(c):void 0;const e=b.V(),f=new olympe.dc.transaction.du(a.db,a.Z,e);try{b.C(f)}catch(l){null==c||c(!1,l.message);return}if(f.Hh()){null==c||c(!0);var g;null==(g=a.C.get(e))||g(!0);a.C.delete(e)}else{a.F.set(e,[]);var h=qk(f);a.G.C.jb(h);g=h.filter(l=>Z(f,l));var k=[Gf(a.G,f.C,g),c];Fk(a,f,g).then(l=>{k.splice(1,0,l);Gk(a,e,h,f.F.size+1);return Hk(a,f.F,d,b.Tg())}).then(()=>{k.forEach(l=>null==l?void 0:l(!0));Dk(a,e,olympe.dc.transaction.mf.C.ki)}).catch(l=>
811
811
  {a.H.error(l);k.forEach(n=>null==n?void 0:n(!1,l));Ik(a,e)})}}
@@ -814,7 +814,7 @@ else{var u=n.X(),w,y=null!=(w=n.get(olympe.dm.File.mimeTypeProp))?w:'application
814
814
  new olympe.dc.db.Vc);return Gf(a.G,n)})}function Gk(a,b,c,d){const e=olympe.D.Jg(),f=new olympe.async.Ej(e);0<a.timeout&&f.fn(a.timeout);const g=olympe.dc.transaction.mf.C.Ot;let h=!0;const k=a.F.get(b);for(let l=0;l<d;l++)f.add((n,p)=>{k.push(e.G((q,r)=>{h&&(h=q!==g);r?p(r):n()}))});zc(f,(l,n)=>{l||a.H.warn(`An error occurred while processing the notification of transaction (${b}): ${n}.`);h&&a.G.C.ub(c);Ik(a,b)});f.start()}
815
815
  function Hk(a,b,c,d){const e=c?olympe.dc.Request.C.Cg:olympe.dc.Request.C.Bg;return Promise.all(Array.from(b).map(([f,g])=>a.Yb.request(new olympe.dc.Request(e,f,new olympe.dc.transaction.xi(g,d))))).then()}function Dk(a,b,c,d){let e,f;null==(f=null==(e=a.F.get(b))?void 0:e.pop())||f(c,null!=d?d:null)}
816
816
  function Ik(a,b){var c;null==(c=a.F.get(b))||c.forEach(d=>{d(olympe.dc.transaction.mf.C.ki,null)});a.F.delete(b);if(0===a.F.size){for(const d of a.P)d();a.P=[]}a.C.has(b)&&(c=a.C.get(b),a.C.delete(b),c(!0))}function Jk(a,b){if(0<a.F.size){const c=olympe.D.Wa();a.P.push(()=>{!c.eb()&&c.run(b)})}else b()}
817
- olympe.dc.transaction.mf=class{constructor(a,b,c,d,e,f,g){this.H=a;this.G=b;this.db=b.view;this.Yb=c;this.Z=d;this.ea=e;this.timeout=f;this.T=[];this.aa=new Set(g);this.L=new Map;this.F=new Map;this.P=[];this.C=new Map;Ck(this)}ab(){return this.H}ke(a){this.Yb.request(new olympe.dc.Request(olympe.dc.Request.C.Go,olympe.dc.Pa.SERVER)).then(b=>{a(b.ids,b.undo_stack_size,b.redo_stack_size)}).catch(b=>this.H.error('Failed to process get stack request',b))}};olympe.dc.transaction.mf.C={Bl:0,ki:1,Ot:2};olympe.dc.transaction.xi=class{constructor(a,b=!1){this.C=a;this.F=b}Tg(){return this.F}Wb(){return this.C}};olympe.dc.transaction.R={Ca:'dc.transaction.Logger',Fa:'dc.transaction.Manager'};olympe.dc.transaction.U={TIMEOUT:'dc.transaction.timeout',xn:'dc.transaction.burstInterval',io:'dc.transaction.disabledCompilers'};
817
+ olympe.dc.transaction.mf=class{constructor(a,b,c,d,e,f,g){this.H=a;this.G=b;this.db=b.view;this.Yb=c;this.Z=d;this.ea=e;this.timeout=f;this.T=[];this.aa=new Set(g);this.K=new Map;this.F=new Map;this.P=[];this.C=new Map;Ck(this)}ab(){return this.H}ke(a){this.Yb.request(new olympe.dc.Request(olympe.dc.Request.C.Go,olympe.dc.Pa.SERVER)).then(b=>{a(b.ids,b.undo_stack_size,b.redo_stack_size)}).catch(b=>this.H.error('Failed to process get stack request',b))}};olympe.dc.transaction.mf.C={Bl:0,ki:1,Ot:2};olympe.dc.transaction.xi=class{constructor(a,b=!1){this.C=a;this.F=b}Tg(){return this.F}Wb(){return this.C}};olympe.dc.transaction.R={Ca:'dc.transaction.Logger',Fa:'dc.transaction.Manager'};olympe.dc.transaction.U={TIMEOUT:'dc.transaction.timeout',xn:'dc.transaction.burstInterval',io:'dc.transaction.disabledCompilers'};
818
818
  olympe.W.config(function(a){F(a,olympe.dc.transaction.U.TIMEOUT,6E4);F(a,olympe.dc.transaction.U.xn,30);F(a,olympe.dc.transaction.U.io,[]);E(a,olympe.dc.transaction.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('dc'));D(a,olympe.dc.transaction.R.Fa,olympe.dc.transaction.mf,olympe.dc.transaction.R.Ca,olympe.dc.db.R.Fa,olympe.dc.R.ug,olympe.dc.sources.R.Ne,olympe.dc.R.lj,new olympe.W.ja(olympe.dc.transaction.U.TIMEOUT),new olympe.W.ja(olympe.dc.transaction.U.io))},'olympe.dc.transaction');olympe.dc.transaction.Ya={};function Kk(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Ra(e));return c}olympe.dc.transaction.Ya.cg=class{constructor(){this.ia=olympe.dc.ia()}C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Ra(a){a=olympe.D.Ra(a);return void 0===a||null===a?null:olympe.D.xr(a)?a.valueOf():a}};olympe.dc.transaction.Ya.cg.xa=[olympe.dc.Jp];olympe.dc.transaction.Ya.qn=class extends olympe.dc.transaction.Ya.cg{constructor(a,b){super();this.relation=a instanceof olympe.dc.Ma.Relation?a:new olympe.dc.Ma.Relation(olympe.dc.ga(a));this.origin=this.ia.Ga(b)?olympe.dc.CloudObject.get(b):b}getType(){return this.relation.X()}Ha(){return this.relation.Ha()}C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}};function Y(a,b,c){a.Cd.set(olympe.dc.ga(b),c);return a}olympe.dc.transaction.Ya.Zn=class extends olympe.dc.transaction.Ya.cg{constructor(a,b){super();let c;this.tag=null!=(c=b&&olympe.dc.ga(b))?c:olympe.Y.uf();this.model=olympe.dc.ga(a);this.source=null;this.Cd=new Map}X(){return this.tag}hc(){return this.model}Lh(a){this.source=a;return this}C(a){const b=this.hc(),c=this.X();if(!b)throw Error('OperationError: Cannot create instance, model tag is undefined');a.Pc(c,b,this.source,Kk(this,this.Cd))}toString(){return`CreateInstance(${this.hc()}, ${this.X()})`}};
819
819
  olympe.dc.transaction.Ya.Zn.xa=[olympe.dc.Ie];olympe.dc.transaction.Ya.Wk=class extends olympe.dc.transaction.Ya.qn{constructor(a,b,c){super(a,b);this.F=this.ia.Ga(c)?olympe.dc.CloudObject.get(c):c}C(a){const b=this.getType();if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.nc.Wc)throw Error('OperationError: Cannot create the instance -> model relation');if(!this.origin)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
820
820
  if(!this.F)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.relation.Ha()===olympe.dc.ua.DESTINATION?a.Ea(b,olympe.dc.ga(this.origin),olympe.dc.ga(this.F)):a.Ea(b,olympe.dc.ga(this.F),olympe.dc.ga(this.origin))}toString(){return`CreateRelation('${this.relation.Ha()}${this.relation.X()}, ${olympe.dc.ga(this.origin)}, ${olympe.dc.ga(this.F)})`}};olympe.dc.transaction.Ya.Qy=class extends olympe.dc.transaction.Ya.cg{constructor(a,b=olympe.dc.Zb.yc){super();this.model=a instanceof olympe.dc.CloudObject?a:olympe.dc.CloudObject.get(a);this.ec=b}C(a){for(const b of this.ia.Zc(this.model))b!==olympe.dc.ga(this.model)&&(new olympe.dc.transaction.Ya.no(b,this.ec)).C(a)}toString(){return`DeleteAllInstances(${this.model.X()}, ${this.ec})`}};olympe.dc.transaction.Ya.mo=class extends olympe.dc.transaction.Ya.qn{C(a){const b=this.getType();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.nc.Wc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.ga(this.origin);if(!this.origin)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=this.Ha(),e=this.ia.bb(c,this.relation);for(const f of e)d===olympe.dc.ua.DESTINATION?
@@ -825,44 +825,44 @@ k)&&(h===olympe.dc.ua.ORIGIN?b.Ea(g,k,this.tag):b.Ea(g,this.tag,k))}}toString(){
825
825
  olympe.dc.defineProperty=function(a){return new olympe.dc.Ma.Property(a)};olympe.dc.er=function(a,b=olympe.dc.ua.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.ua.DESTINATION){const e=olympe.dc.ua.DESTINATION;return b===olympe.dc.ua.ORIGIN||b===e?new olympe.dc.Ma.Relation(a,b):new olympe.dc.Ma.Relation(a,d,b,c)};olympe.dc.Av=function(a){return a.fc()};olympe.dc.lb={};olympe.dc.lb.vm=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.D.zb(a):a instanceof olympe.D.Na?a:null;olympe.dc.lb.sm=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.Xb(a):a instanceof olympe.D.fa?a:null;olympe.dc.lb.um=a=>'number'===typeof a||a instanceof Number?olympe.D.sa(a):'string'===typeof a||a instanceof String?olympe.D.sa(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ba?a:null;
826
826
  olympe.dc.lb.tm=a=>'number'===typeof a||a instanceof Number?Gb(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.D.gb(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.D.gb(a):a instanceof olympe.D.gb?a:null;olympe.dc.lb.$q=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?Kb(a.valueOf()):null};olympe.dc.lb.ar=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Bc?olympe.dc.CloudObject.get(a.tag):null;
827
827
  olympe.dc.lb.Fi=a=>a instanceof olympe.dc.Bc?olympe.dc.CloudObject.get(a.tag):a;olympe.dc.lb.vc=a=>{a=a instanceof olympe.dc.Bc?olympe.dc.CloudObject.get(a.tag):a;let b;return null!=(b=a instanceof olympe.dc.CloudObject?a.vc():a)?b:null};
828
- olympe.dc.lb.Uv=a=>{switch(a){case olympe.D.fa:return olympe.dc.lb.sm;case olympe.D.Na:return olympe.dc.lb.vm;case olympe.D.ba:return olympe.dc.lb.um;case olympe.D.gb:return olympe.dc.lb.tm;case olympe.D.Color:return olympe.dc.lb.$q;case olympe.dc.CloudObject:return olympe.dc.lb.ar;default:return olympe.dc.lb.Fi}};olympe.dc.xc={};olympe.dc.af=class{la(){}G(){}compare(){}L(){}ha(){}toString(){}};function Lk(a){let b=null;for(a=[...a.da];null===b&&0<a.length;)b=a.pop().Ob();return b}function Mk(a,b){a.T()||(a=`Calling "${b}" on subscription with id ${a.V()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback. You can also consider to use Queries API instead of ListDefs (which are deprecated)',olympe.ma.ab('dc').warn(a))}
828
+ olympe.dc.lb.Uv=a=>{switch(a){case olympe.D.fa:return olympe.dc.lb.sm;case olympe.D.Na:return olympe.dc.lb.vm;case olympe.D.ba:return olympe.dc.lb.um;case olympe.D.gb:return olympe.dc.lb.tm;case olympe.D.Color:return olympe.dc.lb.$q;case olympe.dc.CloudObject:return olympe.dc.lb.ar;default:return olympe.dc.lb.Fi}};olympe.dc.xc={};olympe.dc.af=class{la(){}G(){}compare(){}K(){}ha(){}toString(){}};function Lk(a){let b=null;for(a=[...a.da];null===b&&0<a.length;)b=a.pop().Ob();return b}function Mk(a,b){a.T()||(a=`Calling "${b}" on subscription with id ${a.V()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback. You can also consider to use Queries API instead of ListDefs (which are deprecated)',olympe.ma.ab('dc').warn(a))}
829
829
  olympe.dc.ya=class{constructor(a,b,c){void 0===a||null===a?olympe.ma.ab('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.F=olympe.D.ta([a],olympe.dc.ga,String),this.da=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Lk(this),this.C=null,this.Yc=void 0)}je(){return olympe.dc.je()}mb(){if(null===this.C){const a=olympe.dc.xc.sw();this.C=Nk(a,this,this.Yc);null!==this.valueType&&this.C.Gd(this.valueType);olympe.D.Wa().Z(()=>
830
- {var b=this.C.V();a.H.debug('QueryMGR: [ID:',b,'] - Unregistered');const c=a.C.get(b);if(null==c)var d=0;else 0<c.counter&&c.counter--,d=0===c.counter;d&&(c.C.release(),a.C.delete(b));this.C=null})}return this}mc(){null===this.C&&this.mb();return this.C}Gd(a){this.valueType=a;null!==this.C&&this.C.Gd(this.valueType)}Ob(){return null!==this.C?this.C.Ob():null===this.valueType?olympe.dc.CloudObject:this.valueType}Rd(){return this.F}ul(){return this.da}Ad(a,b){return this.mc().Ad(a,b)}wk(a){this.mc().wk(a)}gt(){return this.mc().sd()}ft(){return this.mc().T()}get(a){return this.mc().get(a)}Gh(){return this.mc().Gh()}Eh(a){const b=
831
- this.mc();Mk(b,'getCurrent');return b.Eh(a)}has(a){return this.mc().has(a)}Rg(a){const b=this.mc();Mk(b,'hasCurrent');return b.Rg(a)}ge(a){return this.mc().ge(a)}ux(a){return this.ge(a).asObservable()}Ue(a){const b=this.mc();Mk(b,'getCurrentAt');return b.Ue(a)}Ve(a){return this.mc().Ve(a)}vf(a){const b=this.mc();Mk(b,'getCurrentKeyAt');return b.vf(a)}Td(a){return this.mc().Td(a)}zx(a){return this.Td(a).asObservable()}wf(a){const b=this.mc();Mk(b,'getCurrentRank');return b.wf(a)}Cc(){return this.mc().Cc()}vx(){return this.Cc().asObservable()}xf(){return this.mc().xf()}ff(){return this.mc().ff()}Ax(){return this.ff().asObservable()}Vf(){const a=
830
+ {var b=this.C.V();a.H.debug('QueryMGR: [ID:',b,'] - Unregistered');const c=a.C.get(b);if(null==c)var d=0;else 0<c.counter&&c.counter--,d=0===c.counter;d&&(c.C.release(),a.C.delete(b));this.C=null})}return this}mc(){null===this.C&&this.mb();return this.C}Gd(a){this.valueType=a;null!==this.C&&this.C.Gd(this.valueType)}Ob(){return null!==this.C?this.C.Ob():null===this.valueType?olympe.dc.CloudObject:this.valueType}Sd(){return this.F}ul(){return this.da}Ad(a,b){return this.mc().Ad(a,b)}wk(a){this.mc().wk(a)}gt(){return this.mc().sd()}ft(){return this.mc().T()}get(a){return this.mc().get(a)}Gh(){return this.mc().Gh()}Eh(a){const b=
831
+ this.mc();Mk(b,'getCurrent');return b.Eh(a)}has(a){return this.mc().has(a)}Rg(a){const b=this.mc();Mk(b,'hasCurrent');return b.Rg(a)}ge(a){return this.mc().ge(a)}ux(a){return this.ge(a).asObservable()}Ue(a){const b=this.mc();Mk(b,'getCurrentAt');return b.Ue(a)}Ve(a){return this.mc().Ve(a)}vf(a){const b=this.mc();Mk(b,'getCurrentKeyAt');return b.vf(a)}Ud(a){return this.mc().Ud(a)}zx(a){return this.Ud(a).asObservable()}wf(a){const b=this.mc();Mk(b,'getCurrentRank');return b.wf(a)}Cc(){return this.mc().Cc()}vx(){return this.Cc().asObservable()}xf(){return this.mc().xf()}ff(){return this.mc().ff()}Ax(){return this.ff().asObservable()}Vf(){const a=
832
832
  this.mc();Mk(a,'getCurrentSize');return a.Vf()}forEach(a,b){this.mc().forEach(a,b)}fe(a){const b=this.mc();Mk(b,'forEachCurrentValue');return b.fe(a)}Hi(a,b,c,d){a=new olympe.dc.da.gh(a,b);(new olympe.dc.ya(this.F,[...this.da,a],this.valueType)).forEach(c,d)}transform(...a){var b=a;if(Array.isArray(a[0])){if(1<a.length)throw Error('ListDef.transform() should be called either with one array argument, or with ... arguments, but not both');b=a[0]}a=[...this.da];for(const c of b){if(void 0===c)throw Error('ListDef.transform(): Trying to set an undefined transformer');
833
833
  if(c instanceof olympe.dc.Ma.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.C)break;a.push(c)}b=new olympe.dc.ya(this.F,a);b.Gd(Lk(b)||this.valueType||Object);return b}Bk(a){return this.transform(new olympe.dc.da.pf(a))}filter(a){return this.transform(new olympe.dc.da.df(a))}ak(){const a=new olympe.dc.uj(this.F,null===this.valueType?void 0:this.valueType);'boolean'===typeof this.Yc&&(a.Yc=this.Yc);let b=this.da;
834
834
  b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.da;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.Ra(this.F)+a+')'}et(){return this.mc().lg()}Kc(){return olympe.D.ta([this.ff()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.Ue(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.D.zb(b+']')},olympe.D.Na)}};olympe.dc.ya.prototype.filter=olympe.dc.ya.prototype.filter;olympe.dc.ya.prototype.union=olympe.dc.ya.prototype.Bk;
835
835
  olympe.dc.ya.prototype.transform=olympe.dc.ya.prototype.transform;olympe.dc.ya.prototype.forEachCurrentValue=olympe.dc.ya.prototype.fe;olympe.dc.ya.prototype.forEach=olympe.dc.ya.prototype.forEach;olympe.dc.ya.prototype.getCurrentSize=olympe.dc.ya.prototype.Vf;olympe.dc.ya.prototype.observeSize=olympe.dc.ya.prototype.Ax;olympe.dc.ya.prototype.observeFirst=olympe.dc.ya.prototype.vx;olympe.dc.ya.prototype.getCurrentRank=olympe.dc.ya.prototype.wf;olympe.dc.ya.prototype.observeRank=olympe.dc.ya.prototype.zx;
836
- olympe.dc.ya.prototype.getCurrentAt=olympe.dc.ya.prototype.Ue;olympe.dc.ya.prototype.observeAt=olympe.dc.ya.prototype.ux;olympe.dc.ya.prototype.offReady=olympe.dc.ya.prototype.wk;olympe.dc.ya.prototype.onReady=olympe.dc.ya.prototype.Ad;olympe.dc.ya.prototype.getBaseTag=olympe.dc.ya.prototype.Rd;olympe.dc.ya.xa=[olympe.D.jd];m=olympe.dc.ya.prototype;m.je.K=olympe.D.J.C;m.mb.K=olympe.D.J.L();m.mc.K=new olympe.D.J(()=>olympe.dc.xc.Subscription,[]);m.Gd.K=new olympe.D.J(()=>{},[]);
837
- m.Rd.K=new olympe.D.J(()=>String,[]);m.ul.K=new olympe.D.J(()=>Array,[]);m.Ad.K=new olympe.D.J(()=>String,[]);m.wk.K=new olympe.D.J(()=>{},[]);m.gt.K=olympe.D.J.P;m.ft.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Gh.K=new olympe.D.J(()=>Array,[]);m.Eh.K=olympe.D.J.C;m.has.K=olympe.D.J.P;m.Rg.K=olympe.D.J.C;m.ge.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Ue.K=olympe.D.J.C;m.Ve.K=new olympe.D.J(()=>String,[]);m.vf.K=olympe.D.J.C;m.Td.K=olympe.D.J.G;
838
- m.wf.K=olympe.D.J.C;m.Cc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.xf.K=new olympe.D.J(()=>String,[]);m.ff.K=olympe.D.J.G;m.Vf.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.fe.K=olympe.D.J.C;m.Hi.K=new olympe.D.J(()=>{},[]);m.transform.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.Bk.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.filter.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.ak.K=new olympe.D.J(()=>olympe.dc.uj,[]);m.toString.K=olympe.D.J.C;m.et.K=olympe.D.J.C;m.Kc.K=olympe.D.J.F;const Ok={iy:'append',fl:'filter_not',xo:'filter_and',yo:'filter_or'};function Pk(a,b){a=Qk(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.$a.rn(a,b)).F}
836
+ olympe.dc.ya.prototype.getCurrentAt=olympe.dc.ya.prototype.Ue;olympe.dc.ya.prototype.observeAt=olympe.dc.ya.prototype.ux;olympe.dc.ya.prototype.offReady=olympe.dc.ya.prototype.wk;olympe.dc.ya.prototype.onReady=olympe.dc.ya.prototype.Ad;olympe.dc.ya.prototype.getBaseTag=olympe.dc.ya.prototype.Sd;olympe.dc.ya.xa=[olympe.D.jd];m=olympe.dc.ya.prototype;m.je.L=olympe.D.J.C;m.mb.L=olympe.D.J.K();m.mc.L=new olympe.D.J(()=>olympe.dc.xc.Subscription,[]);m.Gd.L=new olympe.D.J(()=>{},[]);
837
+ m.Sd.L=new olympe.D.J(()=>String,[]);m.ul.L=new olympe.D.J(()=>Array,[]);m.Ad.L=new olympe.D.J(()=>String,[]);m.wk.L=new olympe.D.J(()=>{},[]);m.gt.L=olympe.D.J.P;m.ft.L=olympe.D.J.C;m.get.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Gh.L=new olympe.D.J(()=>Array,[]);m.Eh.L=olympe.D.J.C;m.has.L=olympe.D.J.P;m.Rg.L=olympe.D.J.C;m.ge.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Ue.L=olympe.D.J.C;m.Ve.L=new olympe.D.J(()=>String,[]);m.vf.L=olympe.D.J.C;m.Ud.L=olympe.D.J.G;
838
+ m.wf.L=olympe.D.J.C;m.Cc.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.xf.L=new olympe.D.J(()=>String,[]);m.ff.L=olympe.D.J.G;m.Vf.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.fe.L=olympe.D.J.C;m.Hi.L=new olympe.D.J(()=>{},[]);m.transform.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.Bk.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.filter.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.ak.L=new olympe.D.J(()=>olympe.dc.uj,[]);m.toString.L=olympe.D.J.C;m.et.L=olympe.D.J.C;m.Kc.L=olympe.D.J.F;const Ok={iy:'append',fl:'filter_not',xo:'filter_and',yo:'filter_or'};function Pk(a,b){a=Qk(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.$a.rn(a,b)).F}
839
839
  olympe.dc.uj=class{constructor(a,b){this.C=Qk(a);this.H=olympe.ma.ab('dc.query');this.valueType=void 0===b?olympe.dc.CloudObject:b;this.da=[];this.Ya=[];this.Yc=void 0}hi(){const a=new olympe.dc.ya(this.C,this.da,this.valueType);'boolean'===typeof this.Yc&&(a.Yc=this.Yc);return a}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Rk('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.Ma.Property)throw new Rk('transform','Properties cannot be used as transformer, unlike relations '+
840
840
  d);if(!d||'function'!==typeof d.C)throw new Rk('transform','one of the argument is not a Transformer '+d);const e=d.Ob();null!==e&&(this.valueType=e);this.da.push(d)}return this}Bk(a){this.da.push(new olympe.dc.da.pf(a));return this}gy(a){this.da.push(new olympe.dc.da.pf(Qk(a)));return this}it(a){this.valueType=a;return this}cb(a){this.da.push(a);this.valueType=a.Ob()||olympe.dc.CloudObject;return this}Ov(a){for(const b of a)this.da.push(b),this.valueType=b.Ob()||olympe.dc.CloudObject;return this}Nv(a,
841
- b,c){a=new olympe.dc.da.ve(a,a.Ha(),b,c);this.da.push(a);this.valueType=a.Ob()||olympe.dc.CloudObject;return this}Mv(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.X());void 0===c&&(c=e.Ha())}a=new olympe.dc.da.vj(b,c);this.da.push(a);this.valueType=a.Ob()||olympe.dc.CloudObject;return this}ht(){this.cb(olympe.dc.CloudObject.instancesRel);return this}Se(a){var b=this.Ya.pop();b===Ok.fl&&(a=new olympe.dc.$.$d(a),b=this.Ya.pop());switch(b){case Ok.xo:b=this.da.pop().F;b instanceof
842
- olympe.dc.$.Ed?(b=b.$,b.push(a),a=new olympe.dc.$.Ed(...b)):a=new olympe.dc.$.Ed(b,a);b=this.Ya.pop();break;case Ok.yo:b=this.da.pop().F,b instanceof olympe.dc.$.te?(b=b.$,b.push(a),a=new olympe.dc.$.te(...b)):a=new olympe.dc.$.te(b,a),b=this.Ya.pop()}b===Ok.fl&&(a=new olympe.dc.$.$d(a),this.Ya.pop());this.da.push(new olympe.dc.da.df(a));return this}Iv(a,b,c){return this.Se(new olympe.dc.$.re(Pk(a,c),new olympe.dc.$a.Ge(b)))}contains(a,b,c=!1,d){return this.Se(new olympe.dc.$.bf(Pk(a,d),new olympe.dc.$a.Ge(b),
841
+ b,c){a=new olympe.dc.da.ve(a,a.Ha(),b,c);this.da.push(a);this.valueType=a.Ob()||olympe.dc.CloudObject;return this}Mv(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.X());void 0===c&&(c=e.Ha())}a=new olympe.dc.da.vj(b,c);this.da.push(a);this.valueType=a.Ob()||olympe.dc.CloudObject;return this}ht(){this.cb(olympe.dc.CloudObject.instancesRel);return this}Se(a){var b=this.Ya.pop();b===Ok.fl&&(a=new olympe.dc.$.ae(a),b=this.Ya.pop());switch(b){case Ok.xo:b=this.da.pop().F;b instanceof
842
+ olympe.dc.$.Ed?(b=b.$,b.push(a),a=new olympe.dc.$.Ed(...b)):a=new olympe.dc.$.Ed(b,a);b=this.Ya.pop();break;case Ok.yo:b=this.da.pop().F,b instanceof olympe.dc.$.te?(b=b.$,b.push(a),a=new olympe.dc.$.te(...b)):a=new olympe.dc.$.te(b,a),b=this.Ya.pop()}b===Ok.fl&&(a=new olympe.dc.$.ae(a),this.Ya.pop());this.da.push(new olympe.dc.da.df(a));return this}Iv(a,b,c){return this.Se(new olympe.dc.$.re(Pk(a,c),new olympe.dc.$a.Ge(b)))}contains(a,b,c=!1,d){return this.Se(new olympe.dc.$.bf(Pk(a,d),new olympe.dc.$a.Ge(b),
843
843
  c))}Qb(a){if(!(a instanceof Array))throw new Rk('instanceOf','Provided argument "models" must be an array.');const b=[];for(let c=0;c<a.length;c++)b.push(Qk(a[c]));return this.Se(new olympe.dc.$.ei(b))}qk(a){return this.Se(new olympe.dc.$.re(new olympe.dc.$a.wi,new olympe.dc.$a.Ge(Qk(a))))}Jv(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.md().qk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().md().qk(a[b])}return this}Tw(a,b){if(!(a instanceof
844
844
  Array))throw new Rk('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];a.forEach(e=>{c.push(e);d.push(e.Ha())});return this.Se(new olympe.dc.$.bi(c,d,b))}nk(a,b,c){a=Pk(a,c);return this.Se(new olympe.dc.$.pj(a,new olympe.dc.$a.Ge(b)))}Wi(a,b,c){a=Pk(a,c);return this.Se(new olympe.dc.$.Tj(a,new olympe.dc.$a.Ge(b)))}lx(a,b,c,d){a=Pk(a,d);return this.Se(new olympe.dc.$.lf(a,b,c))}filter(a){const b=new class extends olympe.dc.$.bg{C(c,d){return a(olympe.dc.CloudObject.get(d))}};
845
- return this.Se(b)}md(){this.Ya.push(Ok.fl);return this}and(){this.da[this.da.length-1]instanceof olympe.dc.da.df&&this.Ya.push(Ok.xo);return this}or(){this.da[this.da.length-1]instanceof olympe.dc.da.df&&this.Ya.push(Ok.yo);return this}Ak(a,b,c){a=Qk(a);let d=null;switch(olympe.dc.ia().Nb(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.X():d=new olympe.dc.tc.String(new olympe.dc.$a.ti(a,c));break;case olympe.dm.Number.O.X():d=new olympe.dc.tc.Number(new olympe.dc.$a.li(a,c));break;case olympe.dm.DateTime.O.X():d=
845
+ return this.Se(b)}md(){this.Ya.push(Ok.fl);return this}and(){this.da[this.da.length-1]instanceof olympe.dc.da.df&&this.Ya.push(Ok.xo);return this}or(){this.da[this.da.length-1]instanceof olympe.dc.da.df&&this.Ya.push(Ok.yo);return this}Ak(a,b,c){a=Qk(a);let d=null;switch(olympe.dc.ia().Jb(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.X():d=new olympe.dc.tc.String(new olympe.dc.$a.ti(a,c));break;case olympe.dm.Number.O.X():d=new olympe.dc.tc.Number(new olympe.dc.$a.li(a,c));break;case olympe.dm.DateTime.O.X():d=
846
846
  new olympe.dc.tc.DateTime(new olympe.dc.$a.Uh(a,c))}c=d;null!==c&&this.da.push(new olympe.dc.da.zg(c,b));return this}sort(a,b,c){const d=new class extends olympe.dc.tc.bg{G(e,f){return a(olympe.dc.CloudObject.get(f))}compare(e,f){return b(e,f).valueOf()}};this.da.push(new olympe.dc.da.zg(d,c));return this}Ev(){this.da.push(new olympe.dc.da.Vh);return this}Pi(a,b){this.da.push(new olympe.dc.da.gh(a,b));return this}};class Rk extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
847
- function Qk(a){return'string'===typeof a||a instanceof olympe.D.Na?a:'function'===typeof a?olympe.dc.na.hc(a):olympe.D.fb(a)?a.uh===olympe.D.Na?a:olympe.D.ta([a],b=>olympe.D.zb(olympe.dc.ga(b)),olympe.D.Na):a.X()}m=olympe.dc.uj.prototype;m.hi.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.transform.K=olympe.D.J.L();m.Bk.K=olympe.D.J.L();m.gy.K=olympe.D.J.L();m.it.K=olympe.D.J.L();m.cb.K=olympe.D.J.L();m.Ov.K=olympe.D.J.L();m.Nv.K=olympe.D.J.L();m.Mv.K=olympe.D.J.L();m.ht.K=olympe.D.J.L();m.Se.K=olympe.D.J.L();
848
- m.Iv.K=olympe.D.J.L();m.contains.K=olympe.D.J.L();m.Qb.K=olympe.D.J.L();m.qk.K=olympe.D.J.L();m.Jv.K=olympe.D.J.L();m.Tw.K=olympe.D.J.L();m.nk.K=olympe.D.J.L();m.Wi.K=olympe.D.J.L();m.lx.K=olympe.D.J.L();m.filter.K=olympe.D.J.L();m.md.K=olympe.D.J.L();m.and.K=olympe.D.J.L();m.or.K=olympe.D.J.L();m.Ak.K=olympe.D.J.L();m.sort.K=olympe.D.J.L();m.Ev.K=olympe.D.J.L();m.Pi.K=olympe.D.J.L();function Nk(a,b,c){const d=b.Rd();var e=new olympe.dc.query.bu;let f;f=d;olympe.D.fb(f)&&(f=e.add(d));b=(b=b.ul())?Array.isArray(b)?b:[b]:null;e=olympe.dc.xc.Subscription.G(f,b,e);let g,h,k=null!=(h=null==(g=a.C.get(e))?void 0:g.C)?h:null;null===k&&(a.H.debug('QueryMGR: new',a.F?'local':'remote','subscription "',e,'": #',`${f},`,b),k=new olympe.dc.xc.Subscription(e,d,b,a.G));k.getContext().run(()=>a.process(k,c));return k}
849
- function Sk(a,b){if(b.T())a.H.debug('ListProcessor: [ID:',b.V(),'] - Subscription already booted, ignoring');else{a.H.debug('ListProcessor: [ID:',b.V(),'] - Booting subscription');var c=new olympe.dc.lc.Dq(a.db,a.H),d=b.V();olympe.D.Ic([b.Rd()],e=>{const f=olympe.dc.ga(e);a.H.debug('ListProcessor: [ID:',b.V(),'] - Booting with baseTag',f);b.gk()||b.rk();Ge(a.db,f,Tk(a,b,c),d);olympe.D.Wa().Z(()=>Fe(a.db,f,d));a.db.Ga(f.valueOf())||Uk(c);b.T()||(Uk(c),b.jc([]))})}}
850
- function Vk(a,b,c,d,e){const f=[b.Rd()],g=l=>l instanceof olympe.dc.da.pf;let h;const k=(null!=(h=b.Pg())?h:[]).filter(g);for(const l of k){f.push(l.Rd());let n;k.push(...(null!=(n=l.Pg())?n:[]).filter(g))}Jk(a.P,()=>{olympe.D.Ic(f,()=>{const l=b.ye(c);Wk(a,l,b.V(),d,e)})})}
851
- function Wk(a,b,c,d,e){a.H.debug('CoverageProcessor: [ID:',c,'] - checking coverage of remote query over',b.length,'paths.');const f=olympe.D.Wa(),g=new olympe.async.Ej(f);b.forEach(h=>{g.add((k,l)=>{let n=!1;nh(a.L,h,f,olympe.dc.Pa.SELF,olympe.dc.pa.Xc.Gf,{Yc:e}).subscribe(rxjs.Subscriber.create(()=>{n||(n=!0,f.run(k))},p=>f.run(()=>l(`The query ${c} is not covered by an existing graphdef, `+`and the specific graphdef id ${h.V()} has encountered an error: ${p}`))))})});zc(g,(h,k)=>d(k));g.start()}
847
+ function Qk(a){return'string'===typeof a||a instanceof olympe.D.Na?a:'function'===typeof a?olympe.dc.na.hc(a):olympe.D.fb(a)?a.uh===olympe.D.Na?a:olympe.D.ta([a],b=>olympe.D.zb(olympe.dc.ga(b)),olympe.D.Na):a.X()}m=olympe.dc.uj.prototype;m.hi.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.transform.L=olympe.D.J.K();m.Bk.L=olympe.D.J.K();m.gy.L=olympe.D.J.K();m.it.L=olympe.D.J.K();m.cb.L=olympe.D.J.K();m.Ov.L=olympe.D.J.K();m.Nv.L=olympe.D.J.K();m.Mv.L=olympe.D.J.K();m.ht.L=olympe.D.J.K();m.Se.L=olympe.D.J.K();
848
+ m.Iv.L=olympe.D.J.K();m.contains.L=olympe.D.J.K();m.Qb.L=olympe.D.J.K();m.qk.L=olympe.D.J.K();m.Jv.L=olympe.D.J.K();m.Tw.L=olympe.D.J.K();m.nk.L=olympe.D.J.K();m.Wi.L=olympe.D.J.K();m.lx.L=olympe.D.J.K();m.filter.L=olympe.D.J.K();m.md.L=olympe.D.J.K();m.and.L=olympe.D.J.K();m.or.L=olympe.D.J.K();m.Ak.L=olympe.D.J.K();m.sort.L=olympe.D.J.K();m.Ev.L=olympe.D.J.K();m.Pi.L=olympe.D.J.K();function Nk(a,b,c){const d=b.Sd();var e=new olympe.dc.query.bu;let f;f=d;olympe.D.fb(f)&&(f=e.add(d));b=(b=b.ul())?Array.isArray(b)?b:[b]:null;e=olympe.dc.xc.Subscription.G(f,b,e);let g,h,k=null!=(h=null==(g=a.C.get(e))?void 0:g.C)?h:null;null===k&&(a.H.debug('QueryMGR: new',a.F?'local':'remote','subscription "',e,'": #',`${f},`,b),k=new olympe.dc.xc.Subscription(e,d,b,a.G));k.getContext().run(()=>a.process(k,c));return k}
849
+ function Sk(a,b){if(b.T())a.H.debug('ListProcessor: [ID:',b.V(),'] - Subscription already booted, ignoring');else{a.H.debug('ListProcessor: [ID:',b.V(),'] - Booting subscription');var c=new olympe.dc.lc.Dq(a.db,a.H),d=b.V();olympe.D.Ic([b.Sd()],e=>{const f=olympe.dc.ga(e);a.H.debug('ListProcessor: [ID:',b.V(),'] - Booting with baseTag',f);b.gk()||b.rk();Ge(a.db,f,Tk(a,b,c),d);olympe.D.Wa().Z(()=>Fe(a.db,f,d));a.db.Ga(f.valueOf())||Uk(c);b.T()||(Uk(c),b.jc([]))})}}
850
+ function Vk(a,b,c,d,e){const f=[b.Sd()],g=l=>l instanceof olympe.dc.da.pf;let h;const k=(null!=(h=b.Pg())?h:[]).filter(g);for(const l of k){f.push(l.Sd());let n;k.push(...(null!=(n=l.Pg())?n:[]).filter(g))}Jk(a.P,()=>{olympe.D.Ic(f,()=>{const l=b.ye(c);Wk(a,l,b.V(),d,e)})})}
851
+ function Wk(a,b,c,d,e){a.H.debug('CoverageProcessor: [ID:',c,'] - checking coverage of remote query over',b.length,'paths.');const f=olympe.D.Wa(),g=new olympe.async.Ej(f);b.forEach(h=>{g.add((k,l)=>{let n=!1;nh(a.K,h,f,olympe.dc.Pa.SELF,olympe.dc.pa.Xc.Gf,{Yc:e}).subscribe(rxjs.Subscriber.create(()=>{n||(n=!0,f.run(k))},p=>f.run(()=>l(`The query ${c} is not covered by an existing graphdef, `+`and the specific graphdef id ${h.V()} has encountered an error: ${p}`))))})});zc(g,(h,k)=>d(k));g.start()}
852
852
  function Tk(a,b,c){const d=new olympe.dc.lc.aj;let e=!1;const f=olympe.D.Wa(),g=b.Pg(),h=[];h[g?g.length:0]=(k,l,n,p)=>{f.ad()||f.eb()||(k?b.Rg(n)?a.H.warn('Adding the same index twice (should never happen) for sub #',b.V(),', index #',n,', tag #',l):(a.H.debug('ListProcessor: [ID:',b.V(),'] - Adding Instance',l,'to the subscription'),b.ud(n,l)):(a.H.debug('ListProcessor: [ID:',b.V(),'] - Removing Instance',l,'from the subscription'),b.pk(n)),e||(Xk(c,()=>{p.Rf();Uk(c)}),f.run(()=>p.je().$f(b.jc.bind(b))),
853
853
  e=!0),Yk(c,n))};if(null!==g)for(let k=g.length-1;0<=k;k--)h[k]=g[k].C(f,c,h[k+1]);return(k,l)=>{const n=b.V();c.register(n,null);const p=d.C(k,l,n,null);if(null!==p)h[0](k,l,n,Zk(p,k,l,n))}}
854
- olympe.dc.xc.Gt=class{constructor(a,b,c,d,e){this.H=a;this.db=b;this.F=e;this.P=c;this.L=d;this.C=new Map;this.G=new olympe.D.$b('Legacy ListDef processor')}process(a,b){const c=a.V();var d=this.C.get(c);d||(d=new olympe.dc.xc.Hu(a),this.C.set(c,d));d.counter++;$k(d)?this.H.debug('ListProcessor: [ID:',c,'] - id already processed'):(this.H.debug('ListProcessor: [ID:',c,'] - NOT processed yet.'),d=a.tf(),b||this.F&&d===olympe.dc.Pa.SERVER||d===olympe.dc.Pa.SELF?(this.H.debug('QueryMGR: [ID:',c,'] - Local subscription, no need for coverage check, booting subscription '),
854
+ olympe.dc.xc.Gt=class{constructor(a,b,c,d,e){this.H=a;this.db=b;this.F=e;this.P=c;this.K=d;this.C=new Map;this.G=new olympe.D.$b('Legacy ListDef processor')}process(a,b){const c=a.V();var d=this.C.get(c);d||(d=new olympe.dc.xc.Hu(a),this.C.set(c,d));d.counter++;$k(d)?this.H.debug('ListProcessor: [ID:',c,'] - id already processed'):(this.H.debug('ListProcessor: [ID:',c,'] - NOT processed yet.'),d=a.tf(),b||this.F&&d===olympe.dc.Pa.SERVER||d===olympe.dc.Pa.SELF?(this.H.debug('QueryMGR: [ID:',c,'] - Local subscription, no need for coverage check, booting subscription '),
855
855
  Sk(this,a)):Vk(this,a,d,e=>{e?this.H.error(e):Sk(this,a)},b))}};function al(a){return olympe.D.fb(a)?'Node#'+a.Da.V():String(a)}function bl(a,b){return olympe.D.fb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
856
- olympe.dc.query.bu=class{constructor(){this.C=0;this.values=null}add(a){let b;b=olympe.D.fb(a)?'n'+a.Da.V():'p'+ ++this.C;null===this.values&&(this.values={});this.values[b]=a;return b}get(a){return this.values[a]}clear(){const a=this.values;if(null!==a)for(let b=Object.keys(a),c=b.length,d=0;d<c;d++)delete a[b[d]]}forEach(a){const b=this.values;if(null!==b)for(let c=Object.keys(b),d=c.length,e=0;e<d;e++)a(b[c[e]],c[e])}};olympe.dc.Aa=class{la(){}C(){}F(){}ha(){}toString(){}};olympe.dc.xc.Subscription=class a extends olympe.D.$i{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.$b('context subscription '+b,e));this.id=b;this.Mc=c;this.da=d||null;this.G=this.P.run(()=>olympe.D.Vd(olympe.dc.xc.Subscription.C.INIT));this.Tb=!1;this.aa=this.cc=null}static G(b,c,d){let e;try{e=b;if(c)for(let f=0,g=c.length;f<g;f++)e+='|'+c[f].ha(d);else e+='|null';e=olympe.Y.wb(e)}catch(f){e=olympe.Y.Hc()}return e}V(){return this.id}Rd(){return this.Mc}Pg(){return this.da}tf(){const b=
857
- olympe.dc.Ud(),c=olympe.D.Ra(this.Rd());let d;return olympe.dc.CloudObject.instancesRel.Qa(null==(d=this.da)?void 0:d[0])?b.fromModel(c):b.ze(c)}gk(){const b=olympe.D.Ra(this.G);return b&&b.valueOf()>=olympe.dc.xc.Subscription.C.wq}rk(){if(this.G.Da.eb())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.cc;this.cc=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);Db(this.G,olympe.D.Vd(olympe.dc.xc.Subscription.C.wq))}sd(){return olympe.D.ta([this.G],
858
- ()=>{},olympe.D.fa)}T(){const b=this.G.Da.Eb;return b&&b.valueOf()>=olympe.dc.xc.Subscription.C.nh}Ad(b,c){this.T()?b(this):(null===this.aa&&(this.aa=new Map),void 0===c&&(c=olympe.Y.Hc()),this.aa.set(c,olympe.D.Wa().G(b)));return c||''}wk(b){null!==this.aa&&b&&this.aa.delete(b)}Lb(){const b=olympe.dc.xc.Subscription.C.nh;if(!this.G.Da.eb()&&olympe.D.Ra(this.G)!==b&&(this.rf(),Db(this.G,b),null!==this.aa)){for(const c of this.aa.values())c(this);this.aa=null}}onDestroy(b){this.P.onDestroy(b)}release(){this.P.destroy()}jc(b){if(!this.G.Da.eb()){for(let c=
859
- 0,d=b.length;c<d;c++)this.km(b[c],c);if(this.T())this.rf();else{this.Tb=b=!0;for(let c in this.F)if(Object.prototype.hasOwnProperty.call(this.F,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.Lb()}}}ud(b,c){if(!this.G.Da.eb()&&(this.$j(b,olympe.dc.CloudObject.get(c)),b=this.T(),this.Tb&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,d)){b=!1;break}b&&this.Lb()}}pk(b){this.G.Da.eb()||(this.jm(b),
860
- this.Ci(b,!this.T()))}lg(){return this.T()?super.lg():'Subscription is not ready!'}ye(b){const c=olympe.D.Ra(this.Rd());return olympe.dc.xc.Subscription.F(c,b,this.Pg())}static F(b,c,d){var e=olympe.dc.pa.from(b,c).ee();if(null===d)return[e];b=[];b.push(e);for(let f=0,g=d.length;f<g;f++)if(e=d[f],e instanceof olympe.dc.da.Me){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.cb(h,!0))}else if(e instanceof olympe.dc.da.ve){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.Uf(h,!0,!0))}else if(e instanceof
861
- olympe.dc.da.pf)e=a.F(olympe.D.Ra(e.Rd()),c,e.Pg()),b.push(...e);else if(e instanceof olympe.dc.da.df||e instanceof olympe.dc.da.zg){const h=e.G();b=b.map(k=>{for(const l of h){for(const n of l)k=n.recursive?k.Uf(n,!0,!0):k.cb(n,!0);k=k.back(l.length)}return k})}return b}};olympe.dc.xc.Subscription.C={INIT:0,wq:1,nh:2};olympe.dc.xc.Subscription.prototype.lg.K=olympe.D.J.C;function $k(a){const b=a.F;a.F=!0;return b}olympe.dc.xc.Hu=class{constructor(a){this.counter=0;this.F=!1;this.C=a}};olympe.dc.nf=class{la(){}Ob(){}C(){}ha(){}toString(){}};olympe.dc.Sp=class{G(){}};olympe.dc.Yj=class{la(){}getValue(){}C(){}ha(){}toString(){}};olympe.dc.tc={};let cl=0;olympe.dc.tc.bg=class{constructor(){this.id=cl++}la(){return'CustomLocalComparator#'+cl}L(){return[]}G(){throw Error('GetComparedValue function was not implemented.');}compare(){throw Error('Compare function was not implemented.');}ha(){return`{"c":"${this.la()}"}`}toString(){return this.la()+'()'}};olympe.dc.tc.bg.xa=[olympe.dc.af];olympe.dc.tc.DateTime=class{constructor(a){this.C=a}la(){return S(olympe.dc.tc.DateTime)}L(){return this.C.C()}G(a,b){return this.C.getValue(a,b)}compare(a,b){if(!a)return b?-1:0;if(!b)return 1;a=a.getTime();b=b.getTime();return a!==b?a>b?1:-1:0}ha(a){return'{"c":"'+this.la()+'",a:['+this.C.ha(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};R('olympe.dc.comparators.DateTime',olympe.dc.tc.DateTime);olympe.dc.tc.DateTime.xa=[olympe.dc.af];olympe.dc.tc.Number=class{constructor(a){this.C=a}la(){return S(olympe.dc.tc.Number)}L(){return this.C.C()}G(a,b){return this.C.getValue(a,b)}compare(a,b){return a!==b?a>b?1:-1:0}ha(a){return`{"c":"${this.la()}",a:[${this.C.ha(a)}]}`}toString(){return`Number(${this.C.toString()})`}};R('olympe.dc.comparators.Number',olympe.dc.tc.Number);olympe.dc.tc.Number.xa=[olympe.dc.af];olympe.dc.tc.String=class{constructor(a){this.C=a}la(){return S(olympe.dc.tc.String)}L(){return this.C.C()}G(a,b){return olympe.D.ta([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.D.Na)}compare(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}ha(a){return`{"c":"${this.la()}",a:[${this.C.ha(a)}]}`}toString(){return`String(${this.C.toString()})`}};R('olympe.dc.comparators.String',olympe.dc.tc.String);olympe.dc.tc.String.xa=[olympe.dc.af];olympe.dc.$={};let dl=0;olympe.dc.$.bg=class{constructor(){this.id=dl++}la(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}ha(){return`{"c":"${this.la()}"}`}toString(){return this.la()+'()'}};olympe.dc.$.bg.xa=[olympe.dc.Aa];olympe.dc.$.Gk=class{constructor(a,b){this.G=a;this.L=b}la(){}F(){return[this.G.C(),this.L.C()]}C(a,b){return a.run(()=>olympe.D.ta([this.G.getValue(a,b),this.L.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return olympe.D.Xb(this.P('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d)))},olympe.D.fa))}P(){}ha(a){return'{"c":"'+this.la()+'","a":['+this.G.ha(a)+','+this.L.ha(a)+']}'}toString(){return this.la().replace(/^.+\./,'')+'('+this.G.toString()+','+this.L.toString()+')'}};
856
+ olympe.dc.query.bu=class{constructor(){this.C=0;this.values=null}add(a){let b;b=olympe.D.fb(a)?'n'+a.Da.V():'p'+ ++this.C;null===this.values&&(this.values={});this.values[b]=a;return b}get(a){return this.values[a]}clear(){const a=this.values;if(null!==a)for(let b=Object.keys(a),c=b.length,d=0;d<c;d++)delete a[b[d]]}forEach(a){const b=this.values;if(null!==b)for(let c=Object.keys(b),d=c.length,e=0;e<d;e++)a(b[c[e]],c[e])}};olympe.dc.Aa=class{la(){}C(){}F(){}ha(){}toString(){}};olympe.dc.xc.Subscription=class a extends olympe.D.$i{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.$b('context subscription '+b,e));this.id=b;this.Mc=c;this.da=d||null;this.G=this.P.run(()=>olympe.D.Wd(olympe.dc.xc.Subscription.C.INIT));this.Tb=!1;this.aa=this.cc=null}static G(b,c,d){let e;try{e=b;if(c)for(let f=0,g=c.length;f<g;f++)e+='|'+c[f].ha(d);else e+='|null';e=olympe.Y.wb(e)}catch(f){e=olympe.Y.Hc()}return e}V(){return this.id}Sd(){return this.Mc}Pg(){return this.da}tf(){const b=
857
+ olympe.dc.Vd(),c=olympe.D.Ra(this.Sd());let d;return olympe.dc.CloudObject.instancesRel.Qa(null==(d=this.da)?void 0:d[0])?b.fromModel(c):b.ze(c)}gk(){const b=olympe.D.Ra(this.G);return b&&b.valueOf()>=olympe.dc.xc.Subscription.C.wq}rk(){if(this.G.Da.eb())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.cc;this.cc=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);Db(this.G,olympe.D.Wd(olympe.dc.xc.Subscription.C.wq))}sd(){return olympe.D.ta([this.G],
858
+ ()=>{},olympe.D.fa)}T(){const b=this.G.Da.Eb;return b&&b.valueOf()>=olympe.dc.xc.Subscription.C.nh}Ad(b,c){this.T()?b(this):(null===this.aa&&(this.aa=new Map),void 0===c&&(c=olympe.Y.Hc()),this.aa.set(c,olympe.D.Wa().G(b)));return c||''}wk(b){null!==this.aa&&b&&this.aa.delete(b)}Mb(){const b=olympe.dc.xc.Subscription.C.nh;if(!this.G.Da.eb()&&olympe.D.Ra(this.G)!==b&&(this.rf(),Db(this.G,b),null!==this.aa)){for(const c of this.aa.values())c(this);this.aa=null}}onDestroy(b){this.P.onDestroy(b)}release(){this.P.destroy()}jc(b){if(!this.G.Da.eb()){for(let c=
859
+ 0,d=b.length;c<d;c++)this.km(b[c],c);if(this.T())this.rf();else{this.Tb=b=!0;for(let c in this.F)if(Object.prototype.hasOwnProperty.call(this.F,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.Mb()}}}ud(b,c){if(!this.G.Da.eb()&&(this.$j(b,olympe.dc.CloudObject.get(c)),b=this.T(),this.Tb&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,d)){b=!1;break}b&&this.Mb()}}pk(b){this.G.Da.eb()||(this.jm(b),
860
+ this.Ci(b,!this.T()))}lg(){return this.T()?super.lg():'Subscription is not ready!'}ye(b){const c=olympe.D.Ra(this.Sd());return olympe.dc.xc.Subscription.F(c,b,this.Pg())}static F(b,c,d){var e=olympe.dc.pa.from(b,c).ee();if(null===d)return[e];b=[];b.push(e);for(let f=0,g=d.length;f<g;f++)if(e=d[f],e instanceof olympe.dc.da.Me){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.cb(h,!0))}else if(e instanceof olympe.dc.da.ve){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.Uf(h,!0,!0))}else if(e instanceof
861
+ olympe.dc.da.pf)e=a.F(olympe.D.Ra(e.Sd()),c,e.Pg()),b.push(...e);else if(e instanceof olympe.dc.da.df||e instanceof olympe.dc.da.zg){const h=e.G();b=b.map(k=>{for(const l of h){for(const n of l)k=n.recursive?k.Uf(n,!0,!0):k.cb(n,!0);k=k.back(l.length)}return k})}return b}};olympe.dc.xc.Subscription.C={INIT:0,wq:1,nh:2};olympe.dc.xc.Subscription.prototype.lg.L=olympe.D.J.C;function $k(a){const b=a.F;a.F=!0;return b}olympe.dc.xc.Hu=class{constructor(a){this.counter=0;this.F=!1;this.C=a}};olympe.dc.nf=class{la(){}Ob(){}C(){}ha(){}toString(){}};olympe.dc.Sp=class{G(){}};olympe.dc.Yj=class{la(){}getValue(){}C(){}ha(){}toString(){}};olympe.dc.tc={};let cl=0;olympe.dc.tc.bg=class{constructor(){this.id=cl++}la(){return'CustomLocalComparator#'+cl}K(){return[]}G(){throw Error('GetComparedValue function was not implemented.');}compare(){throw Error('Compare function was not implemented.');}ha(){return`{"c":"${this.la()}"}`}toString(){return this.la()+'()'}};olympe.dc.tc.bg.xa=[olympe.dc.af];olympe.dc.tc.DateTime=class{constructor(a){this.C=a}la(){return S(olympe.dc.tc.DateTime)}K(){return this.C.C()}G(a,b){return this.C.getValue(a,b)}compare(a,b){if(!a)return b?-1:0;if(!b)return 1;a=a.getTime();b=b.getTime();return a!==b?a>b?1:-1:0}ha(a){return'{"c":"'+this.la()+'",a:['+this.C.ha(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};R('olympe.dc.comparators.DateTime',olympe.dc.tc.DateTime);olympe.dc.tc.DateTime.xa=[olympe.dc.af];olympe.dc.tc.Number=class{constructor(a){this.C=a}la(){return S(olympe.dc.tc.Number)}K(){return this.C.C()}G(a,b){return this.C.getValue(a,b)}compare(a,b){return a!==b?a>b?1:-1:0}ha(a){return`{"c":"${this.la()}",a:[${this.C.ha(a)}]}`}toString(){return`Number(${this.C.toString()})`}};R('olympe.dc.comparators.Number',olympe.dc.tc.Number);olympe.dc.tc.Number.xa=[olympe.dc.af];olympe.dc.tc.String=class{constructor(a){this.C=a}la(){return S(olympe.dc.tc.String)}K(){return this.C.C()}G(a,b){return olympe.D.ta([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.D.Na)}compare(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}ha(a){return`{"c":"${this.la()}",a:[${this.C.ha(a)}]}`}toString(){return`String(${this.C.toString()})`}};R('olympe.dc.comparators.String',olympe.dc.tc.String);olympe.dc.tc.String.xa=[olympe.dc.af];olympe.dc.$={};let dl=0;olympe.dc.$.bg=class{constructor(){this.id=dl++}la(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}ha(){return`{"c":"${this.la()}"}`}toString(){return this.la()+'()'}};olympe.dc.$.bg.xa=[olympe.dc.Aa];olympe.dc.$.Gk=class{constructor(a,b){this.G=a;this.K=b}la(){}F(){return[this.G.C(),this.K.C()]}C(a,b){return a.run(()=>olympe.D.ta([this.G.getValue(a,b),this.K.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return olympe.D.Xb(this.P('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d)))},olympe.D.fa))}P(){}ha(a){return'{"c":"'+this.la()+'","a":['+this.G.ha(a)+','+this.K.ha(a)+']}'}toString(){return this.la().replace(/^.+\./,'')+'('+this.G.toString()+','+this.K.toString()+')'}};
862
862
  olympe.dc.$.Gk.xa=[olympe.dc.Aa];olympe.dc.$.Ed=class{constructor(a){this.$=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.$=this.$.concat(arguments[c]):this.$.push(arguments[c])}la(){return S(olympe.dc.$.Ed)}F(){return this.$.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return a.run(()=>olympe.D.ta(this.$.map(c=>c.C(a,b)),(...c)=>olympe.D.Xb(c.every(d=>d.valueOf())),olympe.D.fa))}ha(a){const b=this.$.map(c=>c.ha(a));return'{"c":"'+this.la()+'","a":['+b.join(',')+']}'}toString(){return'And('+this.$.map(a=>
863
863
  a.toString()).join(',')+')'}};R('olympe.dc.predicates.And',olympe.dc.$.Ed);olympe.dc.$.Ed.xa=[olympe.dc.Aa];olympe.dc.$.Ok=class{constructor(a,b){this.G=a;this.value=b}C(a,b){return a.run(()=>olympe.D.ta([this.G,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return olympe.D.Xb((Number(c)&Number(d.valueOf()))===Number(c))},olympe.D.fa))}la(){return S(olympe.dc.$.Ok)}F(){return[this.value.C()]}ha(a){const b=olympe.D.fb(this.G)?this.G.Da.Eb.valueOf():this.G.valueOf();return'{"c":"'+this.la()+'","a":['+b+','+this.value.ha(a)+']}'}toString(){const a=olympe.D.fb(this.G)?this.G.Da.Eb.valueOf():this.G.valueOf();
864
864
  return this.la().replace(/^.+\./,'')+'('+a.toString()+','+this.value.toString()+')'}};R('olympe.dc.predicates.BitMask',olympe.dc.$.Ok);olympe.dc.$.Ok.xa=[olympe.dc.Aa];olympe.dc.$.bf=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}la(){return S(olympe.dc.$.bf)}F(){return[this.source.C(),this.value.C()]}yb(){return this.source}getValue(){return this.value}C(a,b){return a.run(()=>olympe.D.ta([this.source.getValue(a,b),this.value.getValue(a,b),this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.D.Xb(c.includes(d))},olympe.D.fa))}ha(a){const b=this.source.ha(a),c=this.value.ha(a);a=bl(a,this.G);
865
- return'{"c":"'+this.la()+'","a":['+b+','+c+','+a+']}'}toString(){const a=al(this.G);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};R('olympe.dc.predicates.Contains',olympe.dc.$.bf);olympe.dc.$.bf.xa=[olympe.dc.Aa];olympe.dc.$.re=class{constructor(a,b){this.G=a;this.L=b}la(){return S(olympe.dc.$.re)}F(){return[this.G.C(),this.L.C()]}C(a,b){return a.run(()=>olympe.D.ta([this.G.getValue(a,b),this.L.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.zd?c.zd(d):'object'===typeof d&&void 0!==d.zd?d.zd(c):olympe.D.Xb(c.valueOf()===d.valueOf()),olympe.D.fa,'Test equal predicate'))}ha(a){return'{"c":"'+this.la()+'","a":['+this.G.ha(a)+','+this.L.ha(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.L.toString()+
865
+ return'{"c":"'+this.la()+'","a":['+b+','+c+','+a+']}'}toString(){const a=al(this.G);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};R('olympe.dc.predicates.Contains',olympe.dc.$.bf);olympe.dc.$.bf.xa=[olympe.dc.Aa];olympe.dc.$.re=class{constructor(a,b){this.G=a;this.K=b}la(){return S(olympe.dc.$.re)}F(){return[this.G.C(),this.K.C()]}C(a,b){return a.run(()=>olympe.D.ta([this.G.getValue(a,b),this.K.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.zd?c.zd(d):'object'===typeof d&&void 0!==d.zd?d.zd(c):olympe.D.Xb(c.valueOf()===d.valueOf()),olympe.D.fa,'Test equal predicate'))}ha(a){return'{"c":"'+this.la()+'","a":['+this.G.ha(a)+','+this.K.ha(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.K.toString()+
866
866
  ')'}};R('olympe.dc.predicates.Equals',olympe.dc.$.re);olympe.dc.$.re.xa=[olympe.dc.Aa];olympe.dc.$.As=class extends olympe.dc.$.re{constructor(a,b){super(a,new olympe.dc.$a.Ge(b))}};olympe.dc.$.As.xa=[olympe.dc.Aa];olympe.dc.$.pj=class extends olympe.dc.$.Gk{constructor(a,b){super(a,b)}la(){return S(olympe.dc.$.pj)}P(a,b){return a>b}};R('olympe.dc.predicates.Greater',olympe.dc.$.pj);olympe.dc.$.bi=class{constructor(a,b,c){this.nb=[];this.G=c instanceof Array?c:void 0!==c?[olympe.dc.ga(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.da.ve?this.nb.push(new el(c.X(),c.Ha(),c.G,c.F)):this.nb.push(new el(olympe.dc.ga(c),b[d],1,1))}la(){return S(olympe.dc.$.bi)}F(){return[this.nb.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=a.run(()=>Eb(olympe.D.ic(Boolean),!1)),d=olympe.Y.Hc(),e=olympe.dc.ia();let f=0;a=(h,k)=>{0!==this.G.length&&!this.G.includes(k)||
867
867
  c.getContext().eb()||c.getContext().ad()||(f+=h?1:-1,c.update(0<f))};const g=this.nb;for(let h=g.length-1;0<=h;h--)a=fl(g[h],e,a,d+h);Ge(e,b,a,d);c.getContext().onDestroy(()=>{Fe(e,b,d)});return c.sb()}ha(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(this.nb.map(a=>a.ha()))+(0!==this.G.length?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.G.length?'#'+this.G.toString()+', ':'')+this.nb.map(a=>a.ha())+')'}};R('olympe.dc.predicates.HasRelated',olympe.dc.$.bi);
868
868
  function fl(a,b,c,d){const e=Object.create(null);d+=olympe.Y.Dh();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.C&&k>=a.C)){var l=d+k;g?e[h]||(e[h]=!0,V(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.F(h,a,l))}};return(g,h)=>f(g,h,0)}class el extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d}ha(){return`${this.X()}, ${this.Ha()}, ${this.F}, ${this.C}`}}olympe.dc.$.bi.xa=[olympe.dc.Aa];olympe.dc.$.nl=class{constructor(a,b,c){this.nb=[];this.G=void 0!==c?c.map(olympe.dc.ga):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.da.ve?this.nb.push(new gl(c.X(),c.Ha(),c.G,c.F)):this.nb.push(new gl(olympe.dc.ga(c),b[d],1,1))}la(){return S(olympe.dc.$.nl)}F(){return[this.nb.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=a.run(()=>Eb(olympe.D.ic(Boolean),!1)),d=olympe.dc.ia(),e=olympe.Y.Dh();let f=(k,l,n)=>{l&&(null===this.G||this.G.includes(n))&&k(1)};
@@ -870,25 +870,25 @@ const g=this.nb;for(let k=g.length-1;0<=k;k--)f=hl(g[k],d,f,e+k);let h=0;Ge(d,b,
870
870
  function hl(a,b,c,d){const e=a.G,f=a.P,g=new Set,h=(l,n,p)=>{f.has(n)?f.get(n).set(d+p,l):f.set(n,(new Map).set(d+p,l))},k=(l,n,p,q,r)=>{const t=olympe.Y.Dh();if(q){const u=p+r,w=y=>{const z=f.get(r);if(g.has(u))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${p} and ${r}`);void 0!==z&&null!==z&&(g.add(u),e.set(r,(e.get(r)||0)+y),Array.from(z.values()).forEach(A=>A(y)));g.delete(u)};h(l,r,p);e.has(r)?l(e.get(r)):(n>=a.F&&c(y=>
871
871
  {e.set(r,(e.get(r)||0)+y);l(y)},q,r),(0>a.C||n<=a.C)&&r!==p&&V(b,r,a,k.bind(a,w,n+1,r),t))}else l(-e.get(r)),f.get(r).delete(d+p),0===f.get(r).size&&(e.delete(r),f.delete(r),b.F(r,a,t))};return(l,n,p)=>k(l,0,'origin',n,p)}class gl extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d;this.P=new Map;this.G=new Map}ha(){return`${this.X()}, ${this.Ha()}, ${this.F}, ${this.C}`}}olympe.dc.$.nl.xa=[olympe.dc.Aa];olympe.dc.$.ei=class{constructor(a){this.G=new Set;a instanceof Array?a.forEach(b=>{this.G.add(olympe.dc.ga(b))}):this.G.add(olympe.dc.ga(a))}la(){return S(olympe.dc.$.ei)}F(){return[]}C(a,b){const c=a.run(()=>Eb(olympe.D.ic(olympe.D.fa),olympe.D.fa.C)),d=olympe.dc.ia();let e=[];const f=()=>{e.forEach(h=>{d.F(h.tag,h.relation,h.id)});e=[]},g=(h,k)=>{if(h)if(k===olympe.dc.ga(olympe.dc.CloudObject))c.update(olympe.D.Xb(this.G.has(k))),f();else{for(const l of e)if(l.tag===k)throw Error(`You should never extend a model to itself (${k})`);
872
872
  this.G.has(k)?(c.update(olympe.D.fa.F),f()):(h=new il(k,olympe.dc.CloudObject.extendRel),e.push(h),V(d,h.tag,h.relation,g,h.id))}};a=new il(b,olympe.dc.CloudObject.modelRel);e.push(a);V(d,a.tag,a.relation,g,a.id);c.getContext().onDestroy(f);return c.sb()}ha(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(Array.from(this.G))+']}'}toString(){return'InstanceOf('+Array.from(this.G).join(', ')+')'}};class il{constructor(a,b){this.tag=a;this.relation=b;this.id=olympe.Y.Dh()}}
873
- R('olympe.dc.predicates.InstanceOf',olympe.dc.$.ei);olympe.dc.$.ei.xa=[olympe.dc.Aa];olympe.dc.$.$d=class{constructor(a){this.G=a}la(){return S(olympe.dc.$.$d)}F(){return this.G.F()}C(a,b){return a.run(()=>olympe.D.ta([this.G.C(a,b)],c=>olympe.D.Xb(!c.valueOf()),olympe.D.fa))}ha(a){return`{"c":"${this.la()}","a":[${this.G.ha(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};R('olympe.dc.predicates.Not',olympe.dc.$.$d);olympe.dc.$.$d.xa=[olympe.dc.Aa];olympe.dc.$.te=class{constructor(a){this.$=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.$=this.$.concat(arguments[c]):this.$.push(arguments[c])}la(){return S(olympe.dc.$.te)}F(){return this.$.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return a.run(()=>olympe.D.ta(this.$.map(c=>c.C(a,b)),(...c)=>olympe.D.Xb(c.some(d=>d.valueOf())),olympe.D.fa))}ha(a){const b=this.$.map(c=>c.ha(a));return'{"c":"'+this.la()+'","a":['+b.join(',')+']}'}toString(){return'Or('+this.$.map(a=>a.toString()).join(',')+
874
- ')'}};R('olympe.dc.predicates.Or',olympe.dc.$.te);olympe.dc.$.te.xa=[olympe.dc.Aa];olympe.dc.$.lf=class{constructor(a,b,c){this.source=a;this.L=b;this.G=void 0===c?!0:c}la(){return S(olympe.dc.$.lf)}F(){return[this.source.C()]}yb(){return this.source}C(a,b){return a.run(()=>olympe.D.ta([this.source.getValue(a,b),this.L,this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.D.Xb((new RegExp(d)).test(c))},olympe.D.fa))}ha(a){const b=this.source.ha(a),c=bl(a,this.L);a=bl(a,this.G);return'{"c":"'+this.la()+'","a":['+b+','+c+','+a+
875
- ']}'}toString(){const a=al(this.G);return'Regex('+this.source.toString()+','+this.L+','+a+')'}};R('olympe.dc.predicates.Regex',olympe.dc.$.lf);olympe.dc.$.lf.xa=[olympe.dc.Aa];olympe.dc.$.Tj=class extends olympe.dc.$.Gk{constructor(a,b){super(a,b)}la(){return S(olympe.dc.$.Tj)}P(a,b){return a<b}};R('olympe.dc.predicates.Smaller',olympe.dc.$.Tj);olympe.dc.lc={};olympe.dc.lc.aj=class{constructor(){this.T=this.L=this.index=this.F=null}P(){return null!==this.F}Z(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.L;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.lc.kj(this),this.index=c,this.L=b):this.L=this.index=null;return b}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.T){const a=
876
- [];null!==this.L&&(0<=this.F?jl(kl(this.L,this.F),a):a.push(this.index));this.T(a)}}$f(a){this.T=a}};olympe.dc.lc.aj.xa=[olympe.dc.lc.Ta];function Zk(a,b,c,d){b?a.P[d]=c:delete a.P[d];null===a.F&&(a.F=new olympe.dc.lc.kj(a.C,a));return a.F}function kl(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function jl(a,b){a=a.P;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.lc.kj=class{constructor(a,b){this.C=a;this.depth=b?b.depth+1:0;this.P=Object.create(null);this.F=null}je(){return this.C}Rf(){this.C.P()?this.C.G():this.C.Z(this.depth-1)}};class ll extends olympe.dc.lc.kj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.Z=this.T=this.L=!1;this.G=null}}
877
- function ml(a,b,c,d,e){const f=Object.create(null),g=a.oa,h=a.L;let k,l,n;a.ea=!0;l=0;for(n=g.length;l<n;l++)f[g[l]]=null;g.length=0;l=c;for(n=Math.min(b.length,d);l<n;l++)k=b[l],c=h[k],void 0!==c&&(delete f[k],g.push(k),c.L||(c.L=!0,e(!0,c.tag,c.index,c)));for(k in f)Object.prototype.hasOwnProperty.call(f,k)&&(c=h[k],c.L&&(c.L=!1,e(!1,c.tag,c.index,c)),c.T&&(c.G=null,delete h[k]),delete f[k]);a.ea=!1;null!==a.F&&a.G()}
878
- olympe.dc.lc.zl=class{constructor(){this.L={};this.oa=[];this.F=null;this.ea=!1;this.T=[];this.aa=null}P(){return null!==this.F}Z(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.ea){var a=this.oa,b=a.length,c=this.L,d;for(d=this.T.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.T.push(e.index);else{if(!e.Z){var f=e,g=this.F;f.Z=!0;f.G=kl(f,
879
- g)}null!==e.G&&jl(e.G,this.T)}}this.aa&&this.aa(this.T)}}$f(a){this.aa=a}C(a,b,c){let d=this.L[c];a?void 0===d?(d=new ll(this,c,b),this.L[c]=d):(d.tag=b,d.T=!1):void 0!==d&&(d.T=!0);return d}};olympe.dc.lc.zl.xa=[olympe.dc.lc.Ta];olympe.dc.lc.Ta=class{constructor(){}C(){}P(){}Z(){}G(){}$f(){}};function nl(a,b){olympe.D.Xe(a.value)?(a.node=olympe.D.Um(a.value,b),kb(a.node)||b()):b()}function ol(a,b){if(olympe.D.Xe(a.value)){const c=olympe.D.Wa(),d=a.L;olympe.D.Ic([a.value],e=>{d!==e.valueOf()&&(c.run(()=>nl(a,b)),olympe.D.Wa().destroy())})}}
880
- class pl extends olympe.dc.lc.kj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.L=this.Ra();this.position=this.node=null;this.T=!1;this.G=null}Ra(){const a=olympe.D.Ra(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.G=this.value=null}eb(){return null===this.value}}
881
- function ql(a,b){if(!b.eb()){var c=a.F;var d=a.oa,e=b.Ra(),f=0;let g=c.length,h=0,k;for(null!==b.position&&--g;g>f;){h=Math.floor((f+g)/2);k=d(c[h].L,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].L,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.L=b.Ra();if(c!==b.position){d=a.F;e=d.length;f=b.position;null===f&&(f=e);if(c<f)for(e=f;e>c;e--)d[e]=d[e-1],d[e].position=e;else for(e=f;e<c;e++)d[e]=d[e+1],d[e].position=e;d[c]=b;d[c].position=c;b.T&&a.G()}}}
873
+ R('olympe.dc.predicates.InstanceOf',olympe.dc.$.ei);olympe.dc.$.ei.xa=[olympe.dc.Aa];olympe.dc.$.ae=class{constructor(a){this.G=a}la(){return S(olympe.dc.$.ae)}F(){return this.G.F()}C(a,b){return a.run(()=>olympe.D.ta([this.G.C(a,b)],c=>olympe.D.Xb(!c.valueOf()),olympe.D.fa))}ha(a){return`{"c":"${this.la()}","a":[${this.G.ha(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};R('olympe.dc.predicates.Not',olympe.dc.$.ae);olympe.dc.$.ae.xa=[olympe.dc.Aa];olympe.dc.$.te=class{constructor(a){this.$=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.$=this.$.concat(arguments[c]):this.$.push(arguments[c])}la(){return S(olympe.dc.$.te)}F(){return this.$.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return a.run(()=>olympe.D.ta(this.$.map(c=>c.C(a,b)),(...c)=>olympe.D.Xb(c.some(d=>d.valueOf())),olympe.D.fa))}ha(a){const b=this.$.map(c=>c.ha(a));return'{"c":"'+this.la()+'","a":['+b.join(',')+']}'}toString(){return'Or('+this.$.map(a=>a.toString()).join(',')+
874
+ ')'}};R('olympe.dc.predicates.Or',olympe.dc.$.te);olympe.dc.$.te.xa=[olympe.dc.Aa];olympe.dc.$.lf=class{constructor(a,b,c){this.source=a;this.K=b;this.G=void 0===c?!0:c}la(){return S(olympe.dc.$.lf)}F(){return[this.source.C()]}yb(){return this.source}C(a,b){return a.run(()=>olympe.D.ta([this.source.getValue(a,b),this.K,this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.D.Xb((new RegExp(d)).test(c))},olympe.D.fa))}ha(a){const b=this.source.ha(a),c=bl(a,this.K);a=bl(a,this.G);return'{"c":"'+this.la()+'","a":['+b+','+c+','+a+
875
+ ']}'}toString(){const a=al(this.G);return'Regex('+this.source.toString()+','+this.K+','+a+')'}};R('olympe.dc.predicates.Regex',olympe.dc.$.lf);olympe.dc.$.lf.xa=[olympe.dc.Aa];olympe.dc.$.Tj=class extends olympe.dc.$.Gk{constructor(a,b){super(a,b)}la(){return S(olympe.dc.$.Tj)}P(a,b){return a<b}};R('olympe.dc.predicates.Smaller',olympe.dc.$.Tj);olympe.dc.lc={};olympe.dc.lc.aj=class{constructor(){this.T=this.K=this.index=this.F=null}P(){return null!==this.F}Z(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.K;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.lc.kj(this),this.index=c,this.K=b):this.K=this.index=null;return b}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.T){const a=
876
+ [];null!==this.K&&(0<=this.F?jl(kl(this.K,this.F),a):a.push(this.index));this.T(a)}}$f(a){this.T=a}};olympe.dc.lc.aj.xa=[olympe.dc.lc.Ta];function Zk(a,b,c,d){b?a.P[d]=c:delete a.P[d];null===a.F&&(a.F=new olympe.dc.lc.kj(a.C,a));return a.F}function kl(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function jl(a,b){a=a.P;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.lc.kj=class{constructor(a,b){this.C=a;this.depth=b?b.depth+1:0;this.P=Object.create(null);this.F=null}je(){return this.C}Rf(){this.C.P()?this.C.G():this.C.Z(this.depth-1)}};class ll extends olympe.dc.lc.kj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.Z=this.T=this.K=!1;this.G=null}}
877
+ function ml(a,b,c,d,e){const f=Object.create(null),g=a.oa,h=a.K;let k,l,n;a.ea=!0;l=0;for(n=g.length;l<n;l++)f[g[l]]=null;g.length=0;l=c;for(n=Math.min(b.length,d);l<n;l++)k=b[l],c=h[k],void 0!==c&&(delete f[k],g.push(k),c.K||(c.K=!0,e(!0,c.tag,c.index,c)));for(k in f)Object.prototype.hasOwnProperty.call(f,k)&&(c=h[k],c.K&&(c.K=!1,e(!1,c.tag,c.index,c)),c.T&&(c.G=null,delete h[k]),delete f[k]);a.ea=!1;null!==a.F&&a.G()}
878
+ olympe.dc.lc.zl=class{constructor(){this.K={};this.oa=[];this.F=null;this.ea=!1;this.T=[];this.aa=null}P(){return null!==this.F}Z(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.ea){var a=this.oa,b=a.length,c=this.K,d;for(d=this.T.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.T.push(e.index);else{if(!e.Z){var f=e,g=this.F;f.Z=!0;f.G=kl(f,
879
+ g)}null!==e.G&&jl(e.G,this.T)}}this.aa&&this.aa(this.T)}}$f(a){this.aa=a}C(a,b,c){let d=this.K[c];a?void 0===d?(d=new ll(this,c,b),this.K[c]=d):(d.tag=b,d.T=!1):void 0!==d&&(d.T=!0);return d}};olympe.dc.lc.zl.xa=[olympe.dc.lc.Ta];olympe.dc.lc.Ta=class{constructor(){}C(){}P(){}Z(){}G(){}$f(){}};function nl(a,b){olympe.D.Xe(a.value)?(a.node=olympe.D.Um(a.value,b),kb(a.node)||b()):b()}function ol(a,b){if(olympe.D.Xe(a.value)){const c=olympe.D.Wa(),d=a.K;olympe.D.Ic([a.value],e=>{d!==e.valueOf()&&(c.run(()=>nl(a,b)),olympe.D.Wa().destroy())})}}
880
+ class pl extends olympe.dc.lc.kj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.K=this.Ra();this.position=this.node=null;this.T=!1;this.G=null}Ra(){const a=olympe.D.Ra(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.G=this.value=null}eb(){return null===this.value}}
881
+ function ql(a,b){if(!b.eb()){var c=a.F;var d=a.oa,e=b.Ra(),f=0;let g=c.length,h=0,k;for(null!==b.position&&--g;g>f;){h=Math.floor((f+g)/2);k=d(c[h].K,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].K,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.K=b.Ra();if(c!==b.position){d=a.F;e=d.length;f=b.position;null===f&&(f=e);if(c<f)for(e=f;e>c;e--)d[e]=d[e-1],d[e].position=e;else for(e=f;e<c;e++)d[e]=d[e+1],d[e].position=e;d[c]=b;d[c].position=c;b.T&&a.G()}}}
882
882
  function rl(a){const b=a.oa;a.F.sort((c,d)=>b(c.Ra(),d.Ra()))}
883
- olympe.dc.lc.Bq=class{constructor(a){this.oa=a;this.L=null;this.F=[];this.T=[];this.aa=null;this.ea=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new pl(this,c,d),this.ea.set(b,f),this.P()?nl(f,()=>ql(this,f)):(f.position=e.length,e.push(f));else{f=this.ea.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.ea.delete(b);null!==f.position&&(this.P()?this.remove(f):delete e[f.position]);f.destroy()}return f}P(){return null!==this.L}Z(a){if(null!==this.L)throw Error('Manager already activated (depth='+
884
- this.L+')');this.L=a;rl(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;ol(d,()=>ql(this,d))}this.G()}G(){if(null===this.L)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.F.length;this.T.length=0;for(let d=0;d<a;d++){let e=this.F[d];if(!e.T){var b=e,c=this.L;b.T=!0;b.G=kl(b,c)}0>this.L?this.T.push(e.index):e.G&&jl(e.G,this.T)}this.aa&&this.aa(this.T)}$f(a){this.aa=a}remove(a){const b=this.F,c=b.length-1;if(null!==a.position){for(a=
885
- a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.lc.Bq.xa=[olympe.dc.lc.Ta];function Uk(a){if(!a.F){for(let b in a.G)sl(a.G[b]);a.F=!0}a.L=null;a.P=null}function Xk(a,b,c){a.G[c||'root'].T=b}function Yk(a,b,c){a.G[c||'root'].Rf(b)}function tl(a,b,c,d){const e=a.P,f=b+d+c;let g=e[f];void 0===g&&(g=jg(a.db,b,c,d),e[f]=g);return g}function ul(a,b){a.F||a.C.Rf(b)}function vl(a,b,c,d,e){if(!a.F){let f=tl(a,c,d,e||olympe.dc.ua.DESTINATION);e||(f+=tl(a,c,d,olympe.dc.ua.ORIGIN));0===f&&ul(a,b)}}
886
- function wl(a,b){const c=a.G[b];void 0!==c?(a.H&&a.H.debug('Set current block to',b,null!==c.G?'parent = '+c.G.V():''),a.C=c):a.H&&a.H.error('Try to set a block that does not exists:',b)}function xl(a){const b=String(++a.T),c=a.C;a.G[b]=new yl(b,c);zl(c,b);c.L||(c.L=()=>wl(a,c.V()));return b}function Al(a,b){const c=a.C;a.C.L=()=>{wl(a,c.V());b()}}function Bl(a,b){sl(b?a.G[b]:a.C)}
887
- olympe.dc.lc.Dq=class{constructor(a,b){this.db=a;this.H=b||null;this.L=Object.create(null);this.P=Object.create(null);this.F=!1;this.T=0;this.C=new yl('root');this.G=Object.create(null);this.G.root=this.C}register(a,b,c,d,e){this.F||(null!==b&&c&&d&&e?(c=tl(this,c,d,e),d=this.L[b]||0,this.L[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function zl(a,b){null===a.F&&(a.F=Object.create(null));a.F[b]=!1}function sl(a){a.P=!0;null!==a.G&&a.G.notify(a.id)}
888
- class yl{constructor(a,b){this.id=a;this.G=b||null;this.C=this.T=this.L=this.F=null;this.P=!1}V(){return this.id}Rf(a){const b=this.T;if(this.P||this.C===a||null===a)b&&b(),!b&&sl(this)}notify(a){const b=this.L,c=this.F;if(this.P)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.$a={};function Cl(a,b,c,d){const e=olympe.dc.ia(),f=new olympe.dc.lc.aj,g=new olympe.dc.lc.Dq(e);let h=!1;const k=Object.create(null),l=q=>{if(0<q.length)for(const r in k)q[0]===r&&d(k[r])};let n=(q,r,t,u)=>{a.ad()||a.eb()||(h||(Xk(g,()=>{u.Rf();Uk(g)}),u.je().$f(l),h=!0),q?k[t]=r:delete k[t],Yk(g,t))};if(null!==c)for(let q=c.length-1;0<=q;q--)n=c[q].C(a,g,n);const p=olympe.Y.Hc();Ge(e,b,(q,r)=>{g.register(p,null);const t=f.C(q,b,p,null);n(q,r,p,Zk(t,q,b,p))},p);a.onDestroy(()=>{Fe(e,b,p)});e.Ga(b)||Uk(g)}
889
- function Dl(a,b,c){const d=c.getContext(),e=olympe.dc.ia(),f=a.G(),g=Vf(e,b,a.L,d.G(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>Wf(e,b,a.L,g))}
890
- olympe.dc.$a.Ph=class{constructor(a,b,c){this.L=a&&a.X?a.X():a;this.da=b&&b.filter(d=>d instanceof olympe.dc.da.Me||d instanceof olympe.dc.da.ve)||null;this.F=c||null;this.defaultValue=null}la(){}Ob(){}G(){}C(){return(this.da||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}Wg(a){this.defaultValue=a;return this}Pg(){return this.da}Rd(){return this.F}getValue(a,b){const c=a.run(()=>olympe.D.ic(this.Ob()||Object,'AbstractProperty valueType'));null!==this.defaultValue&&Eb(c,this.defaultValue);
891
- b=this.F||b;null!==this.da?Cl(a,b,this.da,d=>{Dl(this,d,c)}):Dl(this,b,c);return c.sb()}ha(a){const b=bl(a,this.L),c=bl(a,this.F);let d='null';this.da&&(d=this.da.map(function(e){return e.ha(a)}).join(','));return`{"c":"${this.la()}","a":["${b}",${d},${c}]}`}toString(){const a=al(this.L),b=this.F?','+al(this.F):'';let c='';this.da&&(c=','+this.da.join(','));return this.la().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.$a.Ph.xa=[olympe.dc.Yj];olympe.dc.$a.rn=class{constructor(a,b){if(olympe.D.Xe(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.X();var d=olympe.dc.ia();const e=d.Nb(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Mg(e,olympe.dc.CloudObject.extendRel,olympe.dm.ue);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.X():d=new olympe.dc.$a.ti(c,b);break;case olympe.dm.Number.O.X():d=new olympe.dc.$a.li(c,
883
+ olympe.dc.lc.Bq=class{constructor(a){this.oa=a;this.K=null;this.F=[];this.T=[];this.aa=null;this.ea=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new pl(this,c,d),this.ea.set(b,f),this.P()?nl(f,()=>ql(this,f)):(f.position=e.length,e.push(f));else{f=this.ea.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.ea.delete(b);null!==f.position&&(this.P()?this.remove(f):delete e[f.position]);f.destroy()}return f}P(){return null!==this.K}Z(a){if(null!==this.K)throw Error('Manager already activated (depth='+
884
+ this.K+')');this.K=a;rl(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;ol(d,()=>ql(this,d))}this.G()}G(){if(null===this.K)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.F.length;this.T.length=0;for(let d=0;d<a;d++){let e=this.F[d];if(!e.T){var b=e,c=this.K;b.T=!0;b.G=kl(b,c)}0>this.K?this.T.push(e.index):e.G&&jl(e.G,this.T)}this.aa&&this.aa(this.T)}$f(a){this.aa=a}remove(a){const b=this.F,c=b.length-1;if(null!==a.position){for(a=
885
+ a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.lc.Bq.xa=[olympe.dc.lc.Ta];function Uk(a){if(!a.F){for(let b in a.G)sl(a.G[b]);a.F=!0}a.K=null;a.P=null}function Xk(a,b,c){a.G[c||'root'].T=b}function Yk(a,b,c){a.G[c||'root'].Rf(b)}function tl(a,b,c,d){const e=a.P,f=b+d+c;let g=e[f];void 0===g&&(g=jg(a.db,b,c,d),e[f]=g);return g}function ul(a,b){a.F||a.C.Rf(b)}function vl(a,b,c,d,e){if(!a.F){let f=tl(a,c,d,e||olympe.dc.ua.DESTINATION);e||(f+=tl(a,c,d,olympe.dc.ua.ORIGIN));0===f&&ul(a,b)}}
886
+ function wl(a,b){const c=a.G[b];void 0!==c?(a.H&&a.H.debug('Set current block to',b,null!==c.G?'parent = '+c.G.V():''),a.C=c):a.H&&a.H.error('Try to set a block that does not exists:',b)}function xl(a){const b=String(++a.T),c=a.C;a.G[b]=new yl(b,c);zl(c,b);c.K||(c.K=()=>wl(a,c.V()));return b}function Al(a,b){const c=a.C;a.C.K=()=>{wl(a,c.V());b()}}function Bl(a,b){sl(b?a.G[b]:a.C)}
887
+ olympe.dc.lc.Dq=class{constructor(a,b){this.db=a;this.H=b||null;this.K=Object.create(null);this.P=Object.create(null);this.F=!1;this.T=0;this.C=new yl('root');this.G=Object.create(null);this.G.root=this.C}register(a,b,c,d,e){this.F||(null!==b&&c&&d&&e?(c=tl(this,c,d,e),d=this.K[b]||0,this.K[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function zl(a,b){null===a.F&&(a.F=Object.create(null));a.F[b]=!1}function sl(a){a.P=!0;null!==a.G&&a.G.notify(a.id)}
888
+ class yl{constructor(a,b){this.id=a;this.G=b||null;this.C=this.T=this.K=this.F=null;this.P=!1}V(){return this.id}Rf(a){const b=this.T;if(this.P||this.C===a||null===a)b&&b(),!b&&sl(this)}notify(a){const b=this.K,c=this.F;if(this.P)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.$a={};function Cl(a,b,c,d){const e=olympe.dc.ia(),f=new olympe.dc.lc.aj,g=new olympe.dc.lc.Dq(e);let h=!1;const k=Object.create(null),l=q=>{if(0<q.length)for(const r in k)q[0]===r&&d(k[r])};let n=(q,r,t,u)=>{a.ad()||a.eb()||(h||(Xk(g,()=>{u.Rf();Uk(g)}),u.je().$f(l),h=!0),q?k[t]=r:delete k[t],Yk(g,t))};if(null!==c)for(let q=c.length-1;0<=q;q--)n=c[q].C(a,g,n);const p=olympe.Y.Hc();Ge(e,b,(q,r)=>{g.register(p,null);const t=f.C(q,b,p,null);n(q,r,p,Zk(t,q,b,p))},p);a.onDestroy(()=>{Fe(e,b,p)});e.Ga(b)||Uk(g)}
889
+ function Dl(a,b,c){const d=c.getContext(),e=olympe.dc.ia(),f=a.G(),g=Vf(e,b,a.K,d.G(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>Wf(e,b,a.K,g))}
890
+ olympe.dc.$a.Ph=class{constructor(a,b,c){this.K=a&&a.X?a.X():a;this.da=b&&b.filter(d=>d instanceof olympe.dc.da.Me||d instanceof olympe.dc.da.ve)||null;this.F=c||null;this.defaultValue=null}la(){}Ob(){}G(){}C(){return(this.da||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}Wg(a){this.defaultValue=a;return this}Pg(){return this.da}Sd(){return this.F}getValue(a,b){const c=a.run(()=>olympe.D.ic(this.Ob()||Object,'AbstractProperty valueType'));null!==this.defaultValue&&Eb(c,this.defaultValue);
891
+ b=this.F||b;null!==this.da?Cl(a,b,this.da,d=>{Dl(this,d,c)}):Dl(this,b,c);return c.sb()}ha(a){const b=bl(a,this.K),c=bl(a,this.F);let d='null';this.da&&(d=this.da.map(function(e){return e.ha(a)}).join(','));return`{"c":"${this.la()}","a":["${b}",${d},${c}]}`}toString(){const a=al(this.K),b=this.F?','+al(this.F):'';let c='';this.da&&(c=','+this.da.join(','));return this.la().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.$a.Ph.xa=[olympe.dc.Yj];olympe.dc.$a.rn=class{constructor(a,b){if(olympe.D.Xe(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.X();var d=olympe.dc.ia();const e=d.Jb(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Mg(e,olympe.dc.CloudObject.extendRel,olympe.dm.ue);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.X():d=new olympe.dc.$a.ti(c,b);break;case olympe.dm.Number.O.X():d=new olympe.dc.$a.li(c,
892
892
  b);break;case olympe.dm.Boolean.O.X():d=new olympe.dc.$a.bj(c,b);break;case olympe.dm.DateTime.O.X():d=new olympe.dc.$a.Uh(c,b)}this.F=d}la(){return this.F.la()}C(){return this.F.C()}getValue(a,b){return this.F.getValue(a,b)}ha(a){return this.F.ha(a)}toString(){return this.F.toString()}};olympe.dc.$a.rn.xa=[olympe.dc.Yj];olympe.dc.$a.bj=class extends olympe.dc.$a.Ph{constructor(a,b,c){super(a,b,c)}la(){return S(olympe.dc.$a.bj)}G(){return olympe.dc.lb.sm}Ob(){return olympe.D.fa}};R('olympe.dc.valuedefs.BooleanProperty',olympe.dc.$a.bj);olympe.dc.$a.Ge=class{constructor(a){this.value=a}la(){return S(olympe.dc.$a.Ge)}C(){return[]}getValue(){return this.value}ha(a){a=bl(a,this.value);return`{"c":"${this.la()}","a":[${a}]}`}toString(){return`Constant(${al(this.value)})`}};R('olympe.dc.valuedefs.Constant',olympe.dc.$a.Ge);olympe.dc.$a.Ge.xa=[olympe.dc.Yj];olympe.dc.$a.Uh=class extends olympe.dc.$a.Ph{constructor(a,b,c){super(a,b,c)}la(){return S(olympe.dc.$a.Uh)}G(){return olympe.dc.lb.tm}Ob(){return olympe.D.gb}};R('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.$a.Uh);olympe.dc.$a.li=class extends olympe.dc.$a.Ph{constructor(a,b,c){super(a,b,c)}la(){return S(olympe.dc.$a.li)}G(){return olympe.dc.lb.um}Ob(){return olympe.D.ba}};R('olympe.dc.valuedefs.NumberProperty',olympe.dc.$a.li);olympe.dc.$a.ti=class extends olympe.dc.$a.Ph{constructor(a,b,c){super(a,b,c)}la(){return S(olympe.dc.$a.ti)}G(){return olympe.dc.lb.vm}Ob(){return olympe.D.Na}};R('olympe.dc.valuedefs.StringProperty',olympe.dc.$a.ti);olympe.dc.$a.wi=class{la(){return S(olympe.dc.$a.wi)}C(){return[]}getValue(a,b){return b}ha(){return'{"c":"'+this.la()+'","a":[]}'}toString(){return'Tag()'}};R('olympe.dc.valuedefs.Tag',olympe.dc.$a.wi);olympe.dc.$a.wi.xa=[olympe.dc.Yj];olympe.dc.da={};olympe.dc.da.Vh=class{Ob(){return null}la(){return S(olympe.dc.da.Vh)}C(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.C.C!==g||b.F||(b.C.C=f),c(!0,f,f,Zk(h,!0,f,f))):(d[f]++,ul(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,Zk(h,!1,f,f)))}}ha(){return'{"c":"'+this.la()+'"}'}toString(){return'Distinct()'}};R('olympe.dc.transformers.Distinct',olympe.dc.da.Vh);olympe.dc.da.Vh.xa=[olympe.dc.nf];olympe.dc.da.df=class{constructor(a){this.F=a}Ob(){return null}la(){return S(olympe.dc.da.df)}G(){return this.F.F()}C(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&ul(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,Zk(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;if(f){let n=this.F.C(a,g);olympe.D.fb(n)&&(n=n.Da);olympe.D.Af(n)?(b.F||void 0!==olympe.D.Ra(n)||ul(b,h),e[l]=n,a.run(()=>{olympe.D.Ic([n],p=>{d(g,h,k,p)},'filterResultHandler')})):d(g,h,k,n)}else void 0!==e[l]&&(e[l].destroy(),delete e[l]),
893
893
  d(g,h,k,!1),delete e[h]}}ha(a){return'{"c":"'+this.la()+'","a":['+this.F.ha(a)+']}'}toString(){return'Filter('+this.F.toString()+')'}};R('olympe.dc.transformers.Filter',olympe.dc.da.df);olympe.dc.da.df.xa=[olympe.dc.nf,olympe.dc.Sp];olympe.dc.da.gl=class{constructor(a,b,c,d){this.F=new olympe.dc.Ma.Relation(olympe.dc.ga(a),c||olympe.dc.ua.DESTINATION);this.G=new olympe.dc.Ma.Relation(olympe.dc.ga(b),d||olympe.dc.ua.DESTINATION)}Ob(){return af(this.F)}la(){return S(olympe.dc.da.gl)}C(a,b,c){const d=olympe.dc.ia(),e={},f=this.F.X(),g=this.F.Ha(),h=this.G.X(),k=this.G.Ha();let l=null,n=null;const p=(r,t,u,w,y,z)=>{if(y){if(y=()=>{const A=olympe.Y.wb(u+g+(f+'_'+r)+z,20),C=Zk(t,!0,z,A);l=r;n=()=>{c(!1,z,A,Zk(t,!1,z,A))};b.register(A,
894
894
  u,w,f,g);c(!0,z,A,C)},y.vr=r,e[w]=y,null===l||r<l)n&&n(),y()}else if(l===r){n();e[w]=!0;y=Infinity;let A=null;for(let C=Object.keys(e),M=C.length,K=0;K<M;K++){let ta=e[C[K]];ta.vr<y&&(y=ta.vr,A=ta)}A&&A()}},q=(r,t,u,w,y)=>{w?e[y]||(e[y]=!0,vl(b,u,y,f,g),vl(b,u,y,h,k),V(d,y,this.F,p.bind(this,r,t,u,y),u+'_val'),V(d,y,this.G,q.bind(this,r+1,t,u),u+'_follow')):(d.F(y,this.G,u+'_follow'),d.F(y,this.F,u+'_val'),delete e[y])};return(r,t,u,w)=>q(0,w,u,r,t)}ha(){return'{"c":"'+this.la()+'","a":["'+this.F.toString()+
@@ -898,15 +898,15 @@ olympe.dc.da.vj=class{constructor(a,b){this.direction=b||olympe.dc.ua.DESTINATIO
898
898
  {d.F(g,l,h)})}}ha(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(El(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Ha()+'['+El(this).join(',')+'])'}};R('olympe.dc.transformers.MultiRelated',olympe.dc.da.vj);olympe.dc.da.vj.xa=[olympe.dc.nf];olympe.dc.da.ve=class extends olympe.dc.Ma.Relation{constructor(a,b=olympe.dc.ua.DESTINATION,c=1,d=-1){super(a,b);this.G=c;this.F=d}Ob(){return af(this)}la(){return S(olympe.dc.da.ve)}C(a,b,c){const d=olympe.dc.ia(),e=Object.create(null),f=olympe.dc.ua.ORIGIN,g=olympe.dc.ua.DESTINATION,h=this.X(),k=this.Ha(),l=(p,q,r)=>{if(!(0<=this.F&&p>=this.F)){var t=d.bb(r,this);p+=1;for(let u=0,w=t.length;u<w;u++){if(void 0!==e[t[u]]||r===t[u])continue;const y=olympe.Y.wb(q+k+(h+'_'+p)+t[u],20);b.register(y,
899
899
  q,r,h,k||g);null===k&&b.register(y,q,r,h,f)}}},n=(p,q,r,t,u,w)=>{u&&!b.F&&l(p,t,w);p>=this.G?c(u,w,t,Zk(r,u,w,t)):vl(b,t,w,h,k);0<=this.F&&p>=this.F||(u?e[w]||(e[w]=!0,V(d,w,this,(y,z)=>{const A=p+1,C=olympe.Y.wb(t+k+(h+'_'+A)+z,20);n(A,w,r,C,y,z)},t)):(d.F(w,this,t),delete e[w]))};return(p,q,r,t)=>n(0,null,t,r,p,q)}ha(){return'{"c":"'+this.la()+'","a":["'+this.X()+'","'+this.Ha()+'",'+this.G+','+this.F+']}'}toString(){return'RecursiveRelated('+this.Ha()+this.X()+'['+this.G+'..'+this.F+'])'}};
900
900
  R('olympe.dc.transformers.RecursiveRelated',olympe.dc.da.ve);olympe.dc.da.ve.xa=[olympe.dc.nf];olympe.dc.da.Me=class extends olympe.dc.Ma.Relation{constructor(a,b){super(a,b||olympe.dc.ua.DESTINATION)}Ob(){return af(this)}la(){return S(olympe.dc.da.Me)}fc(){return new olympe.dc.da.Me(this.tag,this.direction===olympe.dc.ua.DESTINATION?olympe.dc.ua.ORIGIN:olympe.dc.ua.DESTINATION)}C(a,b,c){const d=olympe.dc.ia(),e=this.X(),f=this.Ha();return(g,h,k,l)=>{vl(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.Y.wb(k+f+e+p,20),r=Zk(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.F(h,this,k)}}ha(){return'{"c":"'+
901
- this.la()+'","a":["'+this.X()+'","'+this.Ha()+'"]}'}toString(){return'Related('+this.Ha()+this.X()+')'}};R('olympe.dc.transformers.Related',olympe.dc.da.Me);olympe.dc.da.Me.xa=[olympe.dc.nf];olympe.dc.da.zg=class{constructor(a,b){this.Gb=a;this.F=void 0===b?!0:!!b}Ob(){return null}la(){return S(olympe.dc.da.zg)}Ig(){return this.Gb}G(){return[this.Gb.L()]}C(a,b,c){const d=new olympe.dc.lc.Bq(a.G(this.F?this.Gb.compare.bind(this.Gb):(e,f)=>this.Gb.compare(f,e)));return(e,f,g)=>{var h=e?this.Gb.G(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}ha(a){return'{"c":"'+this.la()+'","a":['+this.Gb.ha(a)+','+JSON.stringify(this.F)+']}'}toString(){return'Sort('+this.Gb.toString()+','+JSON.stringify(this.F)+
901
+ this.la()+'","a":["'+this.X()+'","'+this.Ha()+'"]}'}toString(){return'Related('+this.Ha()+this.X()+')'}};R('olympe.dc.transformers.Related',olympe.dc.da.Me);olympe.dc.da.Me.xa=[olympe.dc.nf];olympe.dc.da.zg=class{constructor(a,b){this.Gb=a;this.F=void 0===b?!0:!!b}Ob(){return null}la(){return S(olympe.dc.da.zg)}Ig(){return this.Gb}G(){return[this.Gb.K()]}C(a,b,c){const d=new olympe.dc.lc.Bq(a.G(this.F?this.Gb.compare.bind(this.Gb):(e,f)=>this.Gb.compare(f,e)));return(e,f,g)=>{var h=e?this.Gb.G(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}ha(a){return'{"c":"'+this.la()+'","a":['+this.Gb.ha(a)+','+JSON.stringify(this.F)+']}'}toString(){return'Sort('+this.Gb.toString()+','+JSON.stringify(this.F)+
902
902
  ')'}};R('olympe.dc.transformers.Sort',olympe.dc.da.zg);olympe.dc.da.zg.xa=[olympe.dc.nf,olympe.dc.Sp];function Fl(a,b,c,d,e,f){function g(n,p){if(l)for(var q=l.length-1;0<=q;q--)f=l[q].C(b,e,f);e.register(h,null);q=d.C(n,p,c,null);f(n,p,h,Zk(q,n,p,h))}const h=olympe.Y.Hc(),k=olympe.dc.ia(),l=a.da;b.run(()=>olympe.D.Ic([a.F],n=>{Gl(k,n,g,h);void 0===k.model(n)&&Uk(e)}))}function Gl(a,b,c,d){const e=b&&b.valueOf();e&&(Ge(a,e,c,d),olympe.D.Wa().Z(()=>Fe(a,e,d)))}
903
- olympe.dc.da.pf=class{constructor(a,b){this.da=this.F=null;a instanceof olympe.dc.ya?(this.F=a.Rd(),this.da=a.ul()):(this.F=a,b&&(this.da=b))}Ob(){return null}la(){return S(olympe.dc.da.pf)||''}Pg(){return this.da}Rd(){return this.F}C(a,b,c){const d=new olympe.dc.lc.zl,e=new olympe.dc.lc.aj;let f=[],g=[],h=!1,k=!1;const l=xl(b),n=xl(b);Al(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):Bl(b);ml(d,p,0,p.length,c)});wl(b,n);Fl(this,a,this.F,e,b,(p,q,r,t)=>{const u=olympe.D.Wa();u.ad()||
903
+ olympe.dc.da.pf=class{constructor(a,b){this.da=this.F=null;a instanceof olympe.dc.ya?(this.F=a.Sd(),this.da=a.ul()):(this.F=a,b&&(this.da=b))}Ob(){return null}la(){return S(olympe.dc.da.pf)||''}Pg(){return this.da}Sd(){return this.F}C(a,b,c){const d=new olympe.dc.lc.zl,e=new olympe.dc.lc.aj;let f=[],g=[],h=!1,k=!1;const l=xl(b),n=xl(b);Al(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):Bl(b);ml(d,p,0,p.length,c)});wl(b,n);Fl(this,a,this.F,e,b,(p,q,r,t)=>{const u=olympe.D.Wa();u.ad()||
904
904
  u.eb()||(k||(t.je().$f(w=>{g=w;Bl(b,n)}),Xk(b,()=>t.Rf(),n),k=!0),d.C(p,q,r),Yk(b,r,n))});wl(b,l);return(p,q,r,t)=>{h||(t.je().$f(u=>{f=u;Bl(b,l)}),Xk(b,()=>t.Rf(),l),h=!0);d.C(p,q,r,l);Yk(b,r,l)}}ha(a){const b=this.da?'['+this.da.map(c=>c.ha(a)).join(',')+']':'null';return'{"c":"'+this.la()+'","a":['+bl(a,this.F)+','+b+']}'}toString(){const a=olympe.D.fb(this.F)?'N:'+this.F.Da.V():this.F.valueOf(),b=this.da?','+this.da.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
905
905
  R('olympe.dc.transformers.Union',olympe.dc.da.pf);olympe.dc.da.pf.xa=[olympe.dc.nf];olympe.dc.da.iq={Bz:1,Ss:-1,Rs:0};olympe.dc.da.ZA={jy:!0,Jy:!1};olympe.dc.xc.R={jp:'dc.legacy.listdefProcessor'};olympe.W.config(a=>{D(a,olympe.dc.xc.R.jp,olympe.dc.xc.Gt,olympe.dc.query.R.Ca,olympe.dc.R.cf,olympe.dc.transaction.R.Fa,olympe.dc.query.R.Gj,new olympe.W.ja(olympe.dc.U.rh))});olympe.W.run([olympe.dc.xc.R.jp],a=>{olympe.dc.xc.sw=()=>a});function Hl(a){const b=olympe.dc.ia(),c=new Map;b.nr(a).forEach(d=>{b.bb(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}
906
906
  olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.ia();this.model=null}static Pc(a,b,c,...d){b=olympe.dc.ga(b);var e=Ie(b);(e=e&&e.C)?e(a,c,...d):(a=a.create(b),void 0!==c&&null!==c&&Y(a,olympe.dc.CloudObject.nameProp,c),a.X())}static get(a){if(a instanceof olympe.dc.CloudObject)var b=a;else{b=olympe.dc.qr();a=olympe.dc.ga(a);var c=b.db.model(a);c=He(b,c);if(null===c)throw new olympe.dc.Gp(a);c=c.instantiate(a,b.F);b.C.C.jb([a]);b.Ma.register(c,a);b=c}return b}static exists(a){return olympe.dc.ia().Ga(olympe.dc.ga(a))}static zv(a,
907
907
  b,c){const d=olympe.dc.ia();let e=null;const f=k=>{null===e&&(e=Hl(b||this));return e.has(k)?e.get(k):null},g=wk(!1),h=g.create(null!=b?b:this);void 0!==c&&h.Lh(c);a.forEach((k,l)=>{d.Ga(olympe.dc.ga(l))?Y(h,l,k):(l=f(l))&&Y(h,l,k)});g.mb((k,l)=>{k||olympe.ma.ab('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${l}`)});return this.get(h)}static pv(){return this.get(this)}static sk(a){return olympe.dc.pa.sk(a)}static Cb(){return olympe.dc.ia().bb(this,olympe.dc.CloudObject.propertyRel).map(a=>
908
908
  new olympe.dc.Ma.Property(a))}static xd(){const a=olympe.dc.ia();return a.bb(this,olympe.dc.CloudObject.Ri).map(b=>new olympe.dc.Ma.Relation(b)).concat(a.bb(this,olympe.dc.CloudObject.gr).map(b=>new olympe.dc.Ma.Relation(b,olympe.dc.ua.ORIGIN)))}static Rc(a){return olympe.dc.CloudObject.get(a)}static ow(a){var b=He(olympe.dc.qr(),olympe.dc.ga(a));b=b&&b.F;return new olympe.dc.ya(olympe.dc.ga(a),olympe.dc.CloudObject.instancesRel,b)}X(){return this.tag}name(){return this.db.name(this)}la(){return this.vb(olympe.dc.CloudObject.nameProp)}Vb(){this.model||
909
- (this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.pa.from(this)}Xf(){return this.db.Xf(this)}yb(){return this.db.source(this)}pw(){return this.db.Ih(this)?olympe.dc.Ud().fromModel(this):null}mr(){return olympe.D.ta([this.la()],a=>olympe.D.zb(a),olympe.D.Na,'getDisplayName',olympe.D.zb('('+this.toString()+')'))}hc(){return this.model?this.model.X():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.F?a.F():a;return new rxjs.Observable(e=>
909
+ (this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.pa.from(this)}Xf(){return this.db.Xf(this)}yb(){return this.db.source(this)}pw(){return this.db.Ih(this)?olympe.dc.Vd().fromModel(this):null}mr(){return olympe.D.ta([this.la()],a=>olympe.D.zb(a),olympe.D.Na,'getDisplayName',olympe.D.zb('('+this.toString()+')'))}hc(){return this.model?this.model.X():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.F?a.F():a;return new rxjs.Observable(e=>
910
910
  {const f=olympe.dc.lb.vc(this.db.Ia(this.tag,b));c||null!==f||e.next(f);const g=Vf(this.db,this.tag,b,h=>{e.next(olympe.dc.lb.vc(h))});d.Z(()=>{e.complete();Wf(this.db,this.tag,b,g)});return()=>Wf(this.db,this.tag,b,g)})}xx(a){const b='function'===typeof a.F?a.F():a;return new rxjs.Observable(c=>{const d=Xf(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.Ma.Property(e),null]):c.next([new olympe.dc.Ma.Property(e),f])});b.Z(()=>{c.complete();Yf(this.db,this.tag,d)});return()=>Yf(this.db,
911
911
  this.tag,d)})}yx(a){return this.observe(olympe.D.Wa(),a)}get(a){return olympe.dc.lb.vc(this.db.Ia(this.tag,a))}Ia(a){return this.get(a)}cb(a){return olympe.dc.pa.from(this).cb(a)}ek(a){return olympe.dc.ed.from(this).cb(a)}vc(){return this}Zv(){return this.qc(olympe.dc.CloudObject.vv,olympe.dc.CloudObject)}Dm(){return this.bb(olympe.dc.CloudObject.containsRel,olympe.dc.CloudObject)}yf(a,b,c){const d=olympe.D.ic(c,'Sync valueType'),e=Vf(this.db,this.tag,a,olympe.D.Wa().G(f=>{b&&null!==f&&void 0!==f&&
912
912
  (f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.getContext().onDestroy(()=>Wf(this.db,this.tag,a,e));return d.getContext()}vb(a){return N(this.yf(a,olympe.dc.lb.vm,olympe.D.Na))}$c(a){return N(this.yf(a,olympe.dc.lb.um,olympe.D.ba))}Lg(a){return N(this.yf(a,olympe.dc.lb.sm,olympe.D.fa))}Mi(a){return N(this.yf(a,olympe.dc.lb.tm,olympe.D.gb))}tr(){return N(this.yf(olympe.dm.Color.valueProp,olympe.dc.lb.$q,olympe.D.Color))}ur(){return N(this.yf(olympe.sc.workflow.Transition.processRefProp,olympe.dc.lb.ar,
@@ -920,51 +920,51 @@ olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.zv;olympe.dc.CloudObject.
920
920
  olympe.dc.CloudObject.UC=olympe.dc.CloudObject.O.ka('ff023000000000000012');olympe.dc.CloudObject.Ri=olympe.dc.CloudObject.O.ra('ff02200000000000000a');olympe.dc.CloudObject.gr=olympe.dc.CloudObject.O.ra('ff02200000000000000b',olympe.dc.ua.ORIGIN);olympe.dc.CloudObject.CC=olympe.dc.CloudObject.O.ra('017e9c4ba4c847d71cbf');olympe.dc.CloudObject.tC=olympe.dc.CloudObject.O.ra('017ea013caf8e89cedb2');olympe.dc.CloudObject.propertyRel=olympe.dc.CloudObject.O.ra('ff02200000000000000c');
921
921
  x('olympe.dc.CloudObject.propertyRel',olympe.dc.CloudObject.propertyRel);olympe.dc.CloudObject.typeRel=olympe.dc.CloudObject.O.ra('ff02200000000000000d',olympe.dc.ua.ORIGIN);olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.O.ra(olympe.dc.nc.Wc);x('olympe.dc.CloudObject.modelRel',olympe.dc.CloudObject.modelRel);olympe.dc.CloudObject.instancesRel=T(olympe.dc.CloudObject.O,olympe.dc.CloudObject.modelRel);x('olympe.dc.CloudObject.instancesRel',olympe.dc.CloudObject.instancesRel);
922
922
  olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.O.ra(olympe.dc.nc.Wh);x('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);olympe.dc.CloudObject.extendedByRel=T(olympe.dc.CloudObject.O,olympe.dc.CloudObject.extendRel);x('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.O.ra(olympe.dc.nc.ej);x('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);
923
- olympe.dc.CloudObject.vv=T(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.Bv=olympe.dc.CloudObject.O.ra('018282d3ac0a474a0bf4');x('olympe.dc.CloudObject.deleteAlsoRel',olympe.dc.CloudObject.Bv);olympe.dc.aB=olympe.dc.CloudObject;olympe.dc.CloudObject.xa=[olympe.dc.Ie];m=olympe.dc.CloudObject.prototype;m.X.K=new olympe.D.J(()=>String,[]);m.name.K=new olympe.D.J(()=>String,[]);m.la.K=olympe.D.J.F;m.Vb.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
924
- m.yb.K=new olympe.D.J(()=>String,[]);m.pw.K=new olympe.D.J(()=>String,[]);m.mr.K=olympe.D.J.F;m.hc.K=new olympe.D.J(()=>String,[]);m.Zv.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Dm.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.yf.K=new olympe.D.J(()=>olympe.D.Node,[]);m.vb.K=olympe.D.J.F;m.$c.K=olympe.D.J.G;m.Lg.K=olympe.D.J.P;m.Mi.K=new olympe.D.J(()=>olympe.D.gb,[]);m.tr.K=new olympe.D.J(()=>olympe.D.Color,[]);m.ur.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
925
- m.bb.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.qc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.jr.K=new olympe.D.J(()=>Function,[]);m.$x.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.transform.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.Kc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.Qa.K=olympe.D.J.C;m.zd.K=olympe.D.J.P;m.Cv.K=new olympe.D.J(()=>{},[]);olympe.dc.R={cf:'dc.DBView',Zo:'dc.InstanceManager',Ca:'dc.Logger',Mu:'dc.TransactionLogger',lj:'dc.FileServiceManager',ug:'dc.Router'};olympe.dc.U={wg:'dc.tag',Hf:'dc.debug',rh:'dc.subscribeAll',$k:'dc.defaultSource',wo:'dc.fileCache',ao:'dc.dataConsumerOnly',so:'dc.errorOnAbstractInstantiation'};
923
+ olympe.dc.CloudObject.vv=T(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.Bv=olympe.dc.CloudObject.O.ra('018282d3ac0a474a0bf4');x('olympe.dc.CloudObject.deleteAlsoRel',olympe.dc.CloudObject.Bv);olympe.dc.aB=olympe.dc.CloudObject;olympe.dc.CloudObject.xa=[olympe.dc.Ie];m=olympe.dc.CloudObject.prototype;m.X.L=new olympe.D.J(()=>String,[]);m.name.L=new olympe.D.J(()=>String,[]);m.la.L=olympe.D.J.F;m.Vb.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
924
+ m.yb.L=new olympe.D.J(()=>String,[]);m.pw.L=new olympe.D.J(()=>String,[]);m.mr.L=olympe.D.J.F;m.hc.L=new olympe.D.J(()=>String,[]);m.Zv.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Dm.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.yf.L=new olympe.D.J(()=>olympe.D.Node,[]);m.vb.L=olympe.D.J.F;m.$c.L=olympe.D.J.G;m.Lg.L=olympe.D.J.P;m.Mi.L=new olympe.D.J(()=>olympe.D.gb,[]);m.tr.L=new olympe.D.J(()=>olympe.D.Color,[]);m.ur.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
925
+ m.bb.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.qc.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.jr.L=new olympe.D.J(()=>Function,[]);m.$x.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.transform.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.Kc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.Qa.L=olympe.D.J.C;m.zd.L=olympe.D.J.P;m.Cv.L=new olympe.D.J(()=>{},[]);olympe.dc.R={cf:'dc.DBView',Zo:'dc.InstanceManager',Ca:'dc.Logger',Mu:'dc.TransactionLogger',lj:'dc.FileServiceManager',ug:'dc.Router'};olympe.dc.U={wg:'dc.tag',Hf:'dc.debug',rh:'dc.subscribeAll',$k:'dc.defaultSource',wo:'dc.fileCache',ao:'dc.dataConsumerOnly',so:'dc.errorOnAbstractInstantiation'};
926
926
  olympe.W.config(function(a){const b='object'===typeof window;F(a,olympe.dc.U.Hf,!1);F(a,olympe.dc.U.rh,!1);F(a,olympe.dc.U.$k,olympe.dc.Pa.SERVER);F(a,olympe.dc.U.ao,b);F(a,olympe.dc.U.wo,b);F(a,olympe.dc.U.so,!0);F(a,olympe.dc.U.wg,olympe.Y.Hc());E(a,olympe.dc.R.Ca,[olympe.ma.R.Fa],c=>c.Qc('dc'));xa(a,olympe.dc.R.Mu,olympe.dc.transaction.R.Ca);xa(a,olympe.dc.R.cf,olympe.dc.db.R.Xk);D(a,olympe.dc.R.lj,olympe.dc.Fs,olympe.dc.R.Ca,olympe.dc.R.cf,olympe.net.R.Fa,olympe.dc.R.ug,olympe.Y.R.dg,new olympe.W.ja(olympe.dc.U.wo));
927
927
  D(a,olympe.dc.R.ug,olympe.dc.pu,olympe.dc.R.Ca,olympe.dc.sources.R.aq,olympe.dc.sources.R.rq,olympe.dc.R.cf,olympe.host.R.Le,new olympe.W.ja(olympe.dc.U.wg),new olympe.W.ja(olympe.dc.U.ao));D(a,olympe.dc.R.Zo,olympe.dc.Ys,olympe.dc.db.R.hl,olympe.dc.db.R.Fa,olympe.W.R.eg)},'olympe.dc');
928
- olympe.W.run([olympe.dc.db.R.Fa,olympe.dc.transaction.R.Fa,olympe.dc.R.Zo,olympe.dc.R.lj,new olympe.W.ja(olympe.dc.U.wg)],(a,b,c,d,e)=>{olympe.dc.Em=()=>a;olympe.dc.Og=()=>b;olympe.dc.qr=()=>c;olympe.dc.PC=()=>d;olympe.dc.Pa.SELF=e},'DC singleton getter initialization');olympe.dm={};olympe.dm.Jd=class extends olympe.dc.CloudObject{la(){return this.vb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Na.EMPTY}F(){return olympe.D.fa.C}};olympe.dm.Jd.O=olympe.dc.na.C('ff021000000000000002',olympe.dm.Jd);olympe.dm.Jd.P=olympe.dm.Jd.O.ka('ff023000000000000035');olympe.dm.Jd.C=olympe.dm.Jd.O.ra('ff022000000000000005');olympe.dm.Jd.G=Ye('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.Jd.L=Ye('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
929
- olympe.dm.Jd.F=Ye('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.Jd.prototype.la.K=olympe.D.J.F;olympe.dm.Jd.prototype.C.K=olympe.D.J.F;olympe.dm.Jd.prototype.F.K=olympe.D.J.P;olympe.dm.Fk={NONE:0,Ny:1,ss:2,Oy:4,Ky:8,My:16,Ly:31,hA:32,eA:64,iA:128,fA:256,Ut:512,gA:992,Cz:1023};olympe.dm.User=class extends olympe.dc.CloudObject{lw(){return this.Hm()}la(){return this.Hm()}Hm(){return this.vb(olympe.dm.User.loginProp)}kt(){return this.vb(olympe.dm.User.F)}jt(){return olympe.D.Na.EMPTY}Hw(){return this.vb(olympe.dm.User.saltProp)}Qw(){return this.vb(olympe.dm.User.verifierProp)}Fw(){return this.bb(olympe.dm.User.G,olympe.dm.Jd)}};olympe.dm.User.O=olympe.dc.na.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.ka('ff023000000000000001');
928
+ olympe.W.run([olympe.dc.db.R.Fa,olympe.dc.transaction.R.Fa,olympe.dc.R.Zo,olympe.dc.R.lj,new olympe.W.ja(olympe.dc.U.wg)],(a,b,c,d,e)=>{olympe.dc.Em=()=>a;olympe.dc.Og=()=>b;olympe.dc.qr=()=>c;olympe.dc.PC=()=>d;olympe.dc.Pa.SELF=e},'DC singleton getter initialization');olympe.dm={};olympe.dm.Kd=class extends olympe.dc.CloudObject{la(){return this.vb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Na.EMPTY}F(){return olympe.D.fa.C}};olympe.dm.Kd.O=olympe.dc.na.C('ff021000000000000002',olympe.dm.Kd);olympe.dm.Kd.P=olympe.dm.Kd.O.ka('ff023000000000000035');olympe.dm.Kd.C=olympe.dm.Kd.O.ra('ff022000000000000005');olympe.dm.Kd.G=Ye('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.Kd.K=Ye('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
929
+ olympe.dm.Kd.F=Ye('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.Kd.prototype.la.L=olympe.D.J.F;olympe.dm.Kd.prototype.C.L=olympe.D.J.F;olympe.dm.Kd.prototype.F.L=olympe.D.J.P;olympe.dm.Fk={NONE:0,Ny:1,ss:2,Oy:4,Ky:8,My:16,Ly:31,hA:32,eA:64,iA:128,fA:256,Ut:512,gA:992,Cz:1023};olympe.dm.User=class extends olympe.dc.CloudObject{lw(){return this.Hm()}la(){return this.Hm()}Hm(){return this.vb(olympe.dm.User.loginProp)}kt(){return this.vb(olympe.dm.User.F)}jt(){return olympe.D.Na.EMPTY}Hw(){return this.vb(olympe.dm.User.saltProp)}Qw(){return this.vb(olympe.dm.User.verifierProp)}Fw(){return this.bb(olympe.dm.User.G,olympe.dm.Kd)}};olympe.dm.User.O=olympe.dc.na.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.ka('ff023000000000000001');
930
930
  x('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.F=olympe.dm.User.O.ka('ff023000000000000002');olympe.dm.User.T=olympe.dm.User.O.ka('ff023000000000000003');olympe.dm.User.saltProp=olympe.dm.User.O.ka('ff023000000000000004');x('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.O.ka('ff023000000000000005');x('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.P=olympe.dm.User.O.ka('ff023000000000000020');
931
- olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.ka('ff023000000000000036');x('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.G=T(olympe.dm.User.O,olympe.dm.Jd.C);olympe.dm.User.Z=olympe.dm.User.O.ra('ff022000000000000002');olympe.dm.User.C=Ye('014831d95fd7d12b8568','ADMIN_USER');olympe.dm.User.L=Ye('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.lw.K=olympe.D.J.F;m.la.K=olympe.D.J.F;m.Hm.K=olympe.D.J.F;m.kt.K=olympe.D.J.F;m.jt.K=olympe.D.J.F;m.Hw.K=olympe.D.J.F;
932
- m.Qw.K=olympe.D.J.F;m.Fw.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Kf=class extends olympe.dc.CloudObject{Z(){return this.Dm()}jb(){return this.vb(olympe.dm.Kf.jb)}};olympe.dm.Kf.O=olympe.dc.na.C('01621fb84e3300000000',olympe.dm.Kf);olympe.dm.Kf.jb=olympe.dm.Kf.O.ka('01609de3f292e3c2c6ff');olympe.dm.Kf.prototype.Z.K=new olympe.D.J(()=>olympe.D.jd,[]);olympe.dm.Kf.prototype.jb.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.Kf{Rw(){return this.vb(olympe.dm.BrickMetadata.cc)}Dc(){return this.vb(olympe.dm.BrickMetadata.za)}getType(){return this.vb(olympe.dm.BrickMetadata.T)}ax(){return this.Lg(olympe.dm.BrickMetadata.Lb)}ne(){return null}Wv(){return this.bb(olympe.sc.Mb.Comment.C.fc(),olympe.sc.Mb.Comment)}kk(){return this.ek(olympe.dm.BrickMetadata.oa).ld().kk()}};olympe.dm.BrickMetadata.O=cf(olympe.dc.na.C('01621fb84e3500000000',olympe.dm.BrickMetadata));
933
- olympe.dm.BrickMetadata.cc=olympe.dm.BrickMetadata.O.ka('01621fb84e320000f001');olympe.dm.BrickMetadata.za=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.T=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0e9d00');olympe.dm.BrickMetadata.Lb=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0eaea5');olympe.dm.BrickMetadata.oa=olympe.dm.BrickMetadata.O.ra('0161ae97622bb21f335b');olympe.dm.BrickMetadata.ud={qA:'private',sA:'public'};
934
- olympe.dm.BrickMetadata.ac={Vy:'experimental',GA:'stable',Iy:'deprecated'};olympe.dm.BrickMetadata.sd={wy:'business',bB:'technical'};m=olympe.dm.BrickMetadata.prototype;m.Rw.K=olympe.D.J.F;m.Dc.K=olympe.D.J.F;m.getType.K=olympe.D.J.F;m.ax.K=olympe.D.J.P;m.ne.K=new olympe.D.J(()=>String,[]);m.Wv.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.kk.K=olympe.D.J.T;function fi(a,b){b=b.startsWith('data.')?b.split('.')[1]:b;let c;return null!=(c=olympe.W.getParameter(`${'data.'}${a}.${b}`))?c:olympe.W.getParameter(`${'data.'}${b}`)}
931
+ olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.ka('ff023000000000000036');x('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.G=T(olympe.dm.User.O,olympe.dm.Kd.C);olympe.dm.User.Z=olympe.dm.User.O.ra('ff022000000000000002');olympe.dm.User.C=Ye('014831d95fd7d12b8568','ADMIN_USER');olympe.dm.User.K=Ye('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.lw.L=olympe.D.J.F;m.la.L=olympe.D.J.F;m.Hm.L=olympe.D.J.F;m.kt.L=olympe.D.J.F;m.jt.L=olympe.D.J.F;m.Hw.L=olympe.D.J.F;
932
+ m.Qw.L=olympe.D.J.F;m.Fw.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Kf=class extends olympe.dc.CloudObject{Z(){return this.Dm()}jb(){return this.vb(olympe.dm.Kf.jb)}};olympe.dm.Kf.O=olympe.dc.na.C('01621fb84e3300000000',olympe.dm.Kf);olympe.dm.Kf.jb=olympe.dm.Kf.O.ka('01609de3f292e3c2c6ff');olympe.dm.Kf.prototype.Z.L=new olympe.D.J(()=>olympe.D.jd,[]);olympe.dm.Kf.prototype.jb.L=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.Kf{Rw(){return this.vb(olympe.dm.BrickMetadata.cc)}Dc(){return this.vb(olympe.dm.BrickMetadata.za)}getType(){return this.vb(olympe.dm.BrickMetadata.T)}ax(){return this.Lg(olympe.dm.BrickMetadata.Mb)}ne(){return null}Wv(){return this.bb(olympe.sc.Nb.Comment.C.fc(),olympe.sc.Nb.Comment)}kk(){return this.ek(olympe.dm.BrickMetadata.oa).ld().kk()}};olympe.dm.BrickMetadata.O=cf(olympe.dc.na.C('01621fb84e3500000000',olympe.dm.BrickMetadata));
933
+ olympe.dm.BrickMetadata.cc=olympe.dm.BrickMetadata.O.ka('01621fb84e320000f001');olympe.dm.BrickMetadata.za=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.T=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0e9d00');olympe.dm.BrickMetadata.Mb=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0eaea5');olympe.dm.BrickMetadata.oa=olympe.dm.BrickMetadata.O.ra('0161ae97622bb21f335b');olympe.dm.BrickMetadata.ud={qA:'private',sA:'public'};
934
+ olympe.dm.BrickMetadata.ac={Vy:'experimental',GA:'stable',Iy:'deprecated'};olympe.dm.BrickMetadata.sd={wy:'business',bB:'technical'};m=olympe.dm.BrickMetadata.prototype;m.Rw.L=olympe.D.J.F;m.Dc.L=olympe.D.J.F;m.getType.L=olympe.D.J.F;m.ax.L=olympe.D.J.P;m.ne.L=new olympe.D.J(()=>String,[]);m.Wv.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.kk.L=olympe.D.J.T;function fi(a,b){b=b.startsWith('data.')?b.split('.')[1]:b;let c;return null!=(c=olympe.W.getParameter(`${'data.'}${a}.${b}`))?c:olympe.W.getParameter(`${'data.'}${b}`)}
935
935
  function xi(a,b){const c=a.query().cb(olympe.dm.pd.C.fc()).cb(olympe.dm.pd.F);a=a.query().cb(olympe.dm.hb.F.fc()).Uf(olympe.dm.hb.G,!0).cb(olympe.sc.zc.C.fc());const d=e=>e.ee().Uf(olympe.dc.CloudObject.extendRel,!0).cb(olympe.dc.CloudObject.Ri,!0).cb(olympe.dm.Relation.destinationModelRel).back(2).cb(olympe.dc.CloudObject.propertyRel,!0).cb(olympe.dm.Property.typeRel).observe(b);return rxjs.combineLatest([d(c),d(a)]).pipe(rxjs.operators.map(([e,...f])=>e.concat(...f)))}
936
936
  function Ui(a,b){return a.observe(b,olympe.dm.DataSource.br).pipe(rxjs.operators.map(()=>a.Ae(olympe.dc.sources.U.Fe)),rxjs.operators.distinctUntilChanged())}
937
937
  olympe.dm.DataSource=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.Yb=c;this.dr=new Map([[olympe.dc.sources.U.Ll,olympe.dm.DataSource.Jx],[olympe.dc.sources.U.Fe,olympe.dm.DataSource.br],[olympe.dc.sources.U.Sl,olympe.dm.DataSource.Nx]])}V(){return this.tag===olympe.dm.DataSource.SERVER?olympe.dc.Pa.SERVER:this.tag}Ae(a){const b=a.startsWith('data.')?a.split('.')[1]:a,c=`${'data.'}${b}`;let d,e;return null!=(e=null!=(d=olympe.W.getParameter(`${'data.'}${this.name().toLowerCase().replace(/\W/g,
938
- '_')}.${b}`))?d:fi(this.X(),a))?e:this.dr.has(c)?this.get(this.dr.get(c)):null}Dc(){const a=this;return v(function*(){const b=olympe.dm.DataSource.Kb.ws,c=olympe.dm.DataSource.Kb.Fb,d=new olympe.dc.Request(olympe.dc.Request.C.Kb,a.V());return a.Yb.request(d).then(e=>{let f;const g=null!=(f=null==e?void 0:e.s)?f:c;(e=null==e?void 0:e.r)&&olympe.ma.ab('dc').warn(`Source ${a.name()} (${a.V()}) has encountered issues: ${e}`);return g}).catch(e=>{const f=olympe.N.errors.Bp;return e instanceof olympe.N.errors.Wj||
938
+ '_')}.${b}`))?d:fi(this.X(),a))?e:this.dr.has(c)?this.get(this.dr.get(c)):null}Dc(){const a=this;return v(function*(){const b=olympe.dm.DataSource.Lb.ws,c=olympe.dm.DataSource.Lb.Fb,d=new olympe.dc.Request(olympe.dc.Request.C.Lb,a.V());return a.Yb.request(d).then(e=>{let f;const g=null!=(f=null==e?void 0:e.s)?f:c;(e=null==e?void 0:e.r)&&olympe.ma.ab('dc').warn(`Source ${a.name()} (${a.V()}) has encountered issues: ${e}`);return g}).catch(e=>{const f=olympe.N.errors.Bp;return e instanceof olympe.N.errors.Wj||
939
939
  e instanceof f?b:c})})}init(){const a=this;return v(function*(){if(a.constructor===olympe.dm.DataSource)throw Error(`Data source ${a.name()} (${a.tag}) has no implementation (is the file missing ?)`);})}destroy(){return v(function*(){})}healthCheck(){return v(function*(){})}executeQuery(a){return v(function*(){return olympe.dc.query.od.Ii(a)})}applyTransaction(){return v(function*(){})}uploadFileContent(){return v(function*(){throw Error('Should not try to upload files with SELF source');})}downloadFileContent(){return v(function*(){throw Error('Should not try to download files with SELF source');
940
940
  })}deleteFileContent(){return v(function*(){})}};olympe.dm.DataSource.prototype.deleteFileContent=olympe.dm.DataSource.prototype.deleteFileContent;olympe.dm.DataSource.prototype.downloadFileContent=olympe.dm.DataSource.prototype.downloadFileContent;olympe.dm.DataSource.prototype.uploadFileContent=olympe.dm.DataSource.prototype.uploadFileContent;olympe.dm.DataSource.prototype.applyTransaction=olympe.dm.DataSource.prototype.applyTransaction;olympe.dm.DataSource.prototype.executeQuery=olympe.dm.DataSource.prototype.executeQuery;
941
941
  olympe.dm.DataSource.prototype.healthCheck=olympe.dm.DataSource.prototype.healthCheck;olympe.dm.DataSource.prototype.destroy=olympe.dm.DataSource.prototype.destroy;olympe.dm.DataSource.prototype.init=olympe.dm.DataSource.prototype.init;olympe.dm.DataSource.prototype.getConfig=olympe.dm.DataSource.prototype.Ae;olympe.dm.DataSource.prototype.getId=olympe.dm.DataSource.prototype.V;olympe.dm.DataSource.O=olympe.dc.na.C('ff021000000000000060',olympe.dm.DataSource,olympe.dc.R.ug);
942
942
  olympe.dm.DataSource.xh=olympe.dm.DataSource.O.ka('ff023000000000000060');x('olympe.dm.DataSource.activatedProp',olympe.dm.DataSource.xh);olympe.dm.DataSource.yC=olympe.dm.DataSource.O.ka('ff023000000000000061');olympe.dm.DataSource.Jx=olympe.dm.DataSource.O.ka('ff023000000000000062');olympe.dm.DataSource.br=olympe.dm.DataSource.O.ka('ff023000000000000063');olympe.dm.DataSource.hr=olympe.dm.DataSource.O.ka('ff023000000000000064');olympe.dm.DataSource.Nx=olympe.dm.DataSource.O.ka('ff023000000000000065');
943
- olympe.dm.DataSource.Si=olympe.dm.DataSource.O.ra('ff022000000000000060');olympe.dm.DataSource.SERVER=Ye('00000000000000000060','Server source');olympe.dm.DataSource.Fe={Gz:'hybrid',zn:'bus',Oo:'http'};olympe.dm.DataSource.Kb={nh:'ready',Fb:'error',ws:'down',ae:'offline'};olympe.dm.pd=class extends olympe.dc.CloudObject{};olympe.dm.pd.O=olympe.dc.na.C('ff021000000000000070',olympe.dm.pd);olympe.dm.pd.C=olympe.dm.pd.O.ra('ff023000000000000071');olympe.dm.pd.F=olympe.dm.pd.O.ra('ff023000000000000072');olympe.dm.pd.G=olympe.dm.pd.O.ra('ff023000000000000073');olympe.dm.Jb=class extends olympe.dm.BrickMetadata{L(){return new olympe.dc.ya(this.X(),[new olympe.dc.da.ve(olympe.dm.Jb.C.X(),olympe.dc.ua.DESTINATION,olympe.dc.da.iq.Rs,olympe.dc.da.iq.Ss),olympe.dm.Jb.L])}ne(){return olympe.sc.yd.we.Es}C(){return this.bb(olympe.dm.Jb.C,olympe.dm.Jb)}P(){return this.bb(olympe.dm.Jb.L)}};olympe.dm.Jb.O=olympe.dc.na.C('01612df1db9749227626',olympe.dm.Jb);olympe.dm.Jb.C=olympe.dm.Jb.O.ra('016a697ef00ce7554691');olympe.dm.Jb.Ja=T(olympe.dm.Jb.O,olympe.dm.Jb.C);
944
- olympe.dm.Jb.L=olympe.dm.Jb.O.ra('016a697ef00ce7554692');T(olympe.dc.CloudObject.O,olympe.dm.Jb.L);olympe.dm.Jb.prototype.L.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Jb.prototype.C.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Jb.prototype.P.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Fc=class extends olympe.dm.Jb{C(){return this.X()===olympe.dm.Fc.ea?this.bb(olympe.dm.Fc.P,olympe.dm.Jb):this.bb(olympe.dm.Fc.Z,olympe.dm.Jb)}};olympe.dm.Fc.O=olympe.dc.na.C('ff021000000000000020',olympe.dm.Fc);olympe.dm.Fc.Z=olympe.dm.Fc.O.ra('017e9c34cf48bd6965c1');olympe.dm.Fc.P=olympe.dm.Fc.O.ra('017e9c2e013e06bfffd9');olympe.dm.Fc.pk=olympe.dm.Fc.O.ra('01811f12ad77673770d4');olympe.dm.Fc.ea=Ye('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Fc.jc=Ye('10000000000000000001','OLYMPE_FOLDER');
945
- olympe.dm.Fc.Tb=Ye('10000000000000000002','INTERNAL_FOLDER');olympe.dm.Fc.prototype.C.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{kw(){return this.vb(olympe.dm.Module.P)}ww(){return this.$c(olympe.dm.Module.T)}lt(){return this.vb(olympe.dm.Module.F)}Aw(){return this.vb(olympe.dm.Module.Z)}Xv(){return this.vb(olympe.dm.Module.G)}xw(){return this.bb(olympe.dm.Module.L,olympe.dm.Module)}Iw(){return this.bb(olympe.dm.Module.C,olympe.dm.Fd)}};olympe.dm.Module.O=olympe.dc.na.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.P=olympe.dm.Module.O.ka('ff023000000000000042');
946
- olympe.dm.Module.T=olympe.dm.Module.O.ka('ff023000000000000043');olympe.dm.Module.F=olympe.dm.Module.O.ka('ff023000000000000044');olympe.dm.Module.Z=olympe.dm.Module.O.ka('ff023000000000000045');olympe.dm.Module.G=olympe.dm.Module.O.ka('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.O.ka('ff023000000000000049');olympe.dm.Module.C=olympe.dm.Module.O.ra('ff022000000000000013');olympe.dm.Module.L=olympe.dm.Module.O.ra('ff022000000000000014');
947
- olympe.dm.Module.aa=Ye('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.kw.K=olympe.D.J.F;m.ww.K=olympe.D.J.G;m.lt.K=olympe.D.J.F;m.Aw.K=olympe.D.J.F;m.Xv.K=olympe.D.J.F;m.xw.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.Iw.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.File=class extends olympe.dc.CloudObject{static F(a,b,c,d,e,f,g){e=e||'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));g=null!=g?g:olympe.dc.Ud().fromModel(a);a=b.create(a,f).Lh(g);b=olympe.D.gb.now();Y(Y(Y(Y(Y(Y(a,olympe.dm.File.fileNameProp,null!=c?c:'file'),olympe.dm.File.urlProp,d),olympe.dm.File.creationDateProp,b),olympe.dm.File.modificationDateProp,b),olympe.dm.File.mimeTypeProp,e||'application/data'),olympe.dm.File.C,!1);return a.X()}constructor(a,b,c,d,e){super(a,
943
+ olympe.dm.DataSource.Si=olympe.dm.DataSource.O.ra('ff022000000000000060');olympe.dm.DataSource.SERVER=Ye('00000000000000000060','Server source');olympe.dm.DataSource.Fe={Gz:'hybrid',zn:'bus',Oo:'http'};olympe.dm.DataSource.Lb={nh:'ready',Fb:'error',ws:'down',be:'offline'};olympe.dm.pd=class extends olympe.dc.CloudObject{};olympe.dm.pd.O=olympe.dc.na.C('ff021000000000000070',olympe.dm.pd);olympe.dm.pd.C=olympe.dm.pd.O.ra('ff023000000000000071');olympe.dm.pd.F=olympe.dm.pd.O.ra('ff023000000000000072');olympe.dm.pd.G=olympe.dm.pd.O.ra('ff023000000000000073');olympe.dm.Kb=class extends olympe.dm.BrickMetadata{K(){return new olympe.dc.ya(this.X(),[new olympe.dc.da.ve(olympe.dm.Kb.C.X(),olympe.dc.ua.DESTINATION,olympe.dc.da.iq.Rs,olympe.dc.da.iq.Ss),olympe.dm.Kb.K])}ne(){return olympe.sc.yd.we.Es}C(){return this.bb(olympe.dm.Kb.C,olympe.dm.Kb)}P(){return this.bb(olympe.dm.Kb.K)}};olympe.dm.Kb.O=olympe.dc.na.C('01612df1db9749227626',olympe.dm.Kb);olympe.dm.Kb.C=olympe.dm.Kb.O.ra('016a697ef00ce7554691');olympe.dm.Kb.Ja=T(olympe.dm.Kb.O,olympe.dm.Kb.C);
944
+ olympe.dm.Kb.K=olympe.dm.Kb.O.ra('016a697ef00ce7554692');T(olympe.dc.CloudObject.O,olympe.dm.Kb.K);olympe.dm.Kb.prototype.K.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Kb.prototype.C.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Kb.prototype.P.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Fc=class extends olympe.dm.Kb{C(){return this.X()===olympe.dm.Fc.ea?this.bb(olympe.dm.Fc.P,olympe.dm.Kb):this.bb(olympe.dm.Fc.Z,olympe.dm.Kb)}};olympe.dm.Fc.O=olympe.dc.na.C('ff021000000000000020',olympe.dm.Fc);olympe.dm.Fc.Z=olympe.dm.Fc.O.ra('017e9c34cf48bd6965c1');olympe.dm.Fc.P=olympe.dm.Fc.O.ra('017e9c2e013e06bfffd9');olympe.dm.Fc.pk=olympe.dm.Fc.O.ra('01811f12ad77673770d4');olympe.dm.Fc.ea=Ye('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Fc.jc=Ye('10000000000000000001','OLYMPE_FOLDER');
945
+ olympe.dm.Fc.Tb=Ye('10000000000000000002','INTERNAL_FOLDER');olympe.dm.Fc.prototype.C.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{kw(){return this.vb(olympe.dm.Module.P)}ww(){return this.$c(olympe.dm.Module.T)}lt(){return this.vb(olympe.dm.Module.F)}Aw(){return this.vb(olympe.dm.Module.Z)}Xv(){return this.vb(olympe.dm.Module.G)}xw(){return this.bb(olympe.dm.Module.K,olympe.dm.Module)}Iw(){return this.bb(olympe.dm.Module.C,olympe.dm.Fd)}};olympe.dm.Module.O=olympe.dc.na.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.P=olympe.dm.Module.O.ka('ff023000000000000042');
946
+ olympe.dm.Module.T=olympe.dm.Module.O.ka('ff023000000000000043');olympe.dm.Module.F=olympe.dm.Module.O.ka('ff023000000000000044');olympe.dm.Module.Z=olympe.dm.Module.O.ka('ff023000000000000045');olympe.dm.Module.G=olympe.dm.Module.O.ka('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.O.ka('ff023000000000000049');olympe.dm.Module.C=olympe.dm.Module.O.ra('ff022000000000000013');olympe.dm.Module.K=olympe.dm.Module.O.ra('ff022000000000000014');
947
+ olympe.dm.Module.aa=Ye('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.kw.L=olympe.D.J.F;m.ww.L=olympe.D.J.G;m.lt.L=olympe.D.J.F;m.Aw.L=olympe.D.J.F;m.Xv.L=olympe.D.J.F;m.xw.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.Iw.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.File=class extends olympe.dc.CloudObject{static F(a,b,c,d,e,f,g){e=e||'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));g=null!=g?g:olympe.dc.Vd().fromModel(a);a=b.create(a,f).Lh(g);b=olympe.D.gb.now();Y(Y(Y(Y(Y(Y(a,olympe.dm.File.fileNameProp,null!=c?c:'file'),olympe.dm.File.urlProp,d),olympe.dm.File.creationDateProp,b),olympe.dm.File.modificationDateProp,b),olympe.dm.File.mimeTypeProp,e||'application/data'),olympe.dm.File.C,!1);return a.X()}constructor(a,b,c,d,e){super(a,
948
948
  b);this.F=c;this.G=d;this.C=e}Im(){return this.vb(olympe.dm.File.mimeTypeProp)}hk(a,b){const c=olympe.D.Wa().G(a),d=olympe.D.Wa().G(e=>null==b?void 0:b(`${e}`));(a=this.db.Ia(this,olympe.dm.File.urlProp,!0))&&a.startsWith('blob:')?this.C.F(a,e=>{e.arrayBuffer().then(c).catch(d)},d):this.F.F(this,e=>{e.arrayBuffer().then(c).catch(d)},e=>{null==d||d(e)})}Cm(a,b){this.hk(c=>{a(Ha(c))},b)}ik(a,b){const c=olympe.D.Wa().G(a),d=olympe.D.Wa().G(h=>null==b?void 0:b(`${h}`)),e=this.db.Ia(this,olympe.dm.File.C),
949
949
  f=this.db.Ia(this,olympe.dm.File.urlProp),g=h=>{const k=this.db.Ia(this,olympe.dm.File.mimeTypeProp);h.arrayBuffer().then(l=>{c(`data:${k};base64,${this.C.C(l)}`)}).catch(d)};e&&e.valueOf()?this.F.F(this,g.bind(this),d):f&&f.startsWith('blob:')?this.C.F(f,g.bind(this),d):'string'===typeof f?a(f):b(`No content nor URL associated to the file ${this.X()}`)}rename(a,b){const c=b&&olympe.D.Wa().G(b);olympe.D.Vm([a],d=>{const e=new olympe.dc.Xa;e.update(this,olympe.dc.CloudObject.nameProp,d);e.update(this,
950
950
  olympe.dm.File.fileNameProp,d);e.mb(f=>{c&&c(f)})})}Qx(){this.G.P(this.get(olympe.dm.File.mimeTypeProp))}tl(){return this.vb(olympe.dm.File.urlProp)}ep(){return this.vb(olympe.dm.File.fileNameProp)}aw(){return this.Mi(olympe.dm.File.creationDateProp)}vw(){return this.Mi(olympe.dm.File.modificationDateProp)}wr(){return this.Lg(olympe.dm.File.C)}};olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.Qx;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.ik;
951
951
  olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.Cm;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.hk;olympe.dm.File.O=olympe.dc.na.C('ff021000000000000030',olympe.dm.File,olympe.dc.R.lj,olympe.net.R.Fa,olympe.Y.R.dg);olympe.dm.File.nameProp=olympe.dm.File.O.ka('ff023000000000000050');x('olympe.dm.File.nameProp',olympe.dm.File.nameProp);olympe.dm.File.fileNameProp=olympe.dm.File.O.ka('ff023000000000000050');x('olympe.dm.File.fileNameProp',olympe.dm.File.fileNameProp);
952
952
  olympe.dm.File.creationDateProp=olympe.dm.File.O.ka('ff023000000000000051');x('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.O.ka('ff023000000000000055');x('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.O.ka('ff023000000000000052');x('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);olympe.dm.File.urlProp=olympe.dm.File.O.ka('ff023000000000000053');
953
- x('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.ka('ff023000000000000054');olympe.dm.File.O.C=olympe.dm.File.F.bind(null,olympe.dm.File);olympe.dm.File.P='application/data';olympe.dm.File.xa=[olympe.D.File];m=olympe.dm.File.prototype;m.Im.K=olympe.D.J.F;m.hk.K=new olympe.D.J(()=>{},[]);m.Cm.K=new olympe.D.J(()=>{},[]);m.ik.K=new olympe.D.J(()=>{},[]);m.rename.K=olympe.D.J.C;m.tl.K=olympe.D.J.F;m.ep.K=olympe.D.J.F;m.aw.K=new olympe.D.J(()=>olympe.D.gb,[]);
954
- m.vw.K=new olympe.D.J(()=>olympe.D.gb,[]);m.wr.K=olympe.D.J.P;olympe.dm.Fd=class extends olympe.dc.CloudObject{C(){return this.vb(olympe.dm.Fd.F)}G(){return this.$c(olympe.dm.Fd.G)}F(){return this.bb(olympe.dm.Fd.C,olympe.dm.Module)}};olympe.dm.Fd.O=olympe.dc.na.C('ff021000000000000041',olympe.dm.Fd);olympe.dm.Fd.F=olympe.dm.Fd.O.ka('ff023000000000000047');olympe.dm.Fd.G=olympe.dm.Fd.O.ka('ff023000000000000048');olympe.dm.Fd.C=olympe.dm.Module.C.fc();olympe.dm.Fd.prototype.C.K=olympe.D.J.F;olympe.dm.Fd.prototype.G.K=olympe.D.J.G;
955
- olympe.dm.Fd.prototype.F.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.hb=class extends olympe.dm.Fc{C(){return this.bb(olympe.dm.Jb.C,olympe.dm.Jb)}G(){return this.vb(olympe.dm.hb.aa)}T(){return this.vb(olympe.dm.hb.ub)}F(){return this.bb(olympe.dm.hb.G,olympe.dm.hb)}};olympe.dm.hb.O=olympe.dc.na.C('0163d9594700fcf61e54',olympe.dm.hb);olympe.dm.hb.aa=olympe.dm.hb.O.ka('017869c7d2833c9492c1');olympe.dm.hb.WC=olympe.dm.hb.O.ka('017869c7d2833c9492c2');olympe.dm.hb.ye=olympe.dm.hb.O.ka('017869c7d2833c9492c3');olympe.dm.hb.ub=olympe.dm.hb.O.ka('017869c80bb9929c76d0');
953
+ x('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.ka('ff023000000000000054');olympe.dm.File.O.C=olympe.dm.File.F.bind(null,olympe.dm.File);olympe.dm.File.P='application/data';olympe.dm.File.xa=[olympe.D.File];m=olympe.dm.File.prototype;m.Im.L=olympe.D.J.F;m.hk.L=new olympe.D.J(()=>{},[]);m.Cm.L=new olympe.D.J(()=>{},[]);m.ik.L=new olympe.D.J(()=>{},[]);m.rename.L=olympe.D.J.C;m.tl.L=olympe.D.J.F;m.ep.L=olympe.D.J.F;m.aw.L=new olympe.D.J(()=>olympe.D.gb,[]);
954
+ m.vw.L=new olympe.D.J(()=>olympe.D.gb,[]);m.wr.L=olympe.D.J.P;olympe.dm.Fd=class extends olympe.dc.CloudObject{C(){return this.vb(olympe.dm.Fd.F)}G(){return this.$c(olympe.dm.Fd.G)}F(){return this.bb(olympe.dm.Fd.C,olympe.dm.Module)}};olympe.dm.Fd.O=olympe.dc.na.C('ff021000000000000041',olympe.dm.Fd);olympe.dm.Fd.F=olympe.dm.Fd.O.ka('ff023000000000000047');olympe.dm.Fd.G=olympe.dm.Fd.O.ka('ff023000000000000048');olympe.dm.Fd.C=olympe.dm.Module.C.fc();olympe.dm.Fd.prototype.C.L=olympe.D.J.F;olympe.dm.Fd.prototype.G.L=olympe.D.J.G;
955
+ olympe.dm.Fd.prototype.F.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.hb=class extends olympe.dm.Fc{C(){return this.bb(olympe.dm.Kb.C,olympe.dm.Kb)}G(){return this.vb(olympe.dm.hb.aa)}T(){return this.vb(olympe.dm.hb.ub)}F(){return this.bb(olympe.dm.hb.G,olympe.dm.hb)}};olympe.dm.hb.O=olympe.dc.na.C('0163d9594700fcf61e54',olympe.dm.hb);olympe.dm.hb.aa=olympe.dm.hb.O.ka('017869c7d2833c9492c1');olympe.dm.hb.WC=olympe.dm.hb.O.ka('017869c7d2833c9492c2');olympe.dm.hb.ye=olympe.dm.hb.O.ka('017869c7d2833c9492c3');olympe.dm.hb.ub=olympe.dm.hb.O.ka('017869c80bb9929c76d0');
956
956
  olympe.dm.hb.pb=olympe.dm.hb.O.ra('ff02200000000000002a');olympe.dm.hb.G=olympe.dm.hb.O.ra('ff02200000000000002b');olympe.dm.hb.tf=T(olympe.dm.hb.O,olympe.dm.hb.G);olympe.dm.hb.F=olympe.dm.hb.O.ra('ff02200000000000002c');olympe.dm.hb.gk=olympe.dm.hb.O.ra('017e9c412e2b944bc48f');olympe.dm.hb.Qe=olympe.dm.hb.O.ra('017e9c412e2b944bd590');olympe.dm.hb.VC=olympe.dm.hb.O.ra('017e9c416872a89d3415');olympe.dm.hb.rk=olympe.dm.hb.O.ra('017ebf8fe5c506662098');T(olympe.dc.CloudObject.O,olympe.dm.hb.pb);
957
- olympe.dm.hb.Mc=Ye('100000000000000000dd','PRIMORDIAL');olympe.dm.hb.prototype.C.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.hb.prototype.G.K=olympe.D.J.F;olympe.dm.hb.prototype.T.K=olympe.D.J.F;olympe.dm.hb.prototype.F.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{C(){return this.qc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}getType(){return this.qc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}F(){return this.ek(olympe.dm.Property.typeRel).ld()}Kc(){return this.C().la().cr(this.la())}};olympe.dm.Property.O=olympe.dc.na.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=T(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);
958
- x('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);olympe.dm.Property.typeRel=T(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);x('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.getType.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.F.K=olympe.D.J.C;olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}rw(){return olympe.D.Na.EMPTY}Tv(){return this.$c(olympe.dm.Relation.F)}Bw(){return this.$c(olympe.dm.Relation.G)}lr(){return this.bb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Cc()}sr(){return this.bb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Cc()}Kc(){return this.sr().la().concat(['-',this.la(),'->',this.lr().la()])}};olympe.dm.Relation.O=olympe.dc.na.C('ff021000000000000006',olympe.dm.Relation);
957
+ olympe.dm.hb.Mc=Ye('100000000000000000dd','PRIMORDIAL');olympe.dm.hb.prototype.C.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.hb.prototype.G.L=olympe.D.J.F;olympe.dm.hb.prototype.T.L=olympe.D.J.F;olympe.dm.hb.prototype.F.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{C(){return this.qc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}getType(){return this.qc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}F(){return this.ek(olympe.dm.Property.typeRel).ld()}Kc(){return this.C().la().cr(this.la())}};olympe.dm.Property.O=olympe.dc.na.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=T(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);
958
+ x('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);olympe.dm.Property.typeRel=T(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);x('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.getType.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.F.L=olympe.D.J.C;olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}rw(){return olympe.D.Na.EMPTY}Tv(){return this.$c(olympe.dm.Relation.F)}Bw(){return this.$c(olympe.dm.Relation.G)}lr(){return this.bb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Cc()}sr(){return this.bb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Cc()}Kc(){return this.sr().la().concat(['-',this.la(),'->',this.lr().la()])}};olympe.dm.Relation.O=olympe.dc.na.C('ff021000000000000006',olympe.dm.Relation);
959
959
  olympe.dm.Relation.G=olympe.dm.Relation.O.ka('ff023000000000000030');olympe.dm.Relation.F=olympe.dm.Relation.O.ka('ff023000000000000034');olympe.dm.Relation.aa=olympe.dm.Relation.O.ka(olympe.dc.Zb.ko);olympe.dm.Relation.Z=olympe.dm.Relation.O.ka(olympe.dc.Zb.yc);olympe.dm.Relation.ea=olympe.dm.Relation.O.ka(olympe.dc.Zb.Of);olympe.dm.Relation.oa=olympe.dm.Relation.O.ka(olympe.dc.Zb.yu);olympe.dm.Relation.T=olympe.dm.Relation.O.ka('ff023000000000000031');
960
- olympe.dm.Relation.originModelRel=T(olympe.dm.Relation.O,olympe.dc.CloudObject.Ri);x('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=T(olympe.dm.Relation.O,olympe.dc.CloudObject.gr);x('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dm.Relation.C={Qs:0,Wr:5,Yp:1,mu:4,em:2,Tl:8,Uy:10,yA:6,zA:9,He:6,AA:9};olympe.dm.Relation.L={dA:3,St:4,Rz:5,Qz:6};olympe.dm.Relation.P=olympe.dm.Fk.Ut+olympe.dm.Fk.ss;
961
- m=olympe.dm.Relation.prototype;m.rw.K=olympe.D.J.F;m.Tv.K=olympe.D.J.G;m.Bw.K=olympe.D.J.G;m.lr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.sr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);function Il(a){a=olympe.dc.ga(a);if(olympe.dc.ia().zf(a,olympe.dm.String))return olympe.dm.String.valueProp;switch(a){case olympe.dm.Number.O.X():return olympe.dm.Number.valueProp;case olympe.dm.Boolean.O.X():return olympe.dm.Boolean.valueProp;case olympe.dm.DateTime.O.X():return olympe.dm.DateTime.valueProp;case olympe.dm.Color.O.X():return olympe.dm.Color.valueProp;default:throw Error('Unknown primitive model: '+a);}}olympe.dm.ue=class extends olympe.dc.CloudObject{getValue(){}};
962
- olympe.dm.ue.O=olympe.dc.na.C('ff021000000000000019',olympe.dm.ue);olympe.dm.String=class extends olympe.dm.ue{getValue(){return this.vb(olympe.dm.String.valueProp)}vc(){return this.get(olympe.dm.String.valueProp)}toString(){let a;return null!=(a=this.get(olympe.dm.String.valueProp))?a:''}};olympe.dm.String.O=olympe.dc.na.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.ka('ff023000000000000026');x('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.D.J.F;
963
- olympe.dm.String.prototype.toString.K=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.ue{getValue(){return this.Lg(olympe.dm.Boolean.valueProp)}vc(){return this.get(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.na.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.ka('ff023000000000000027');x('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.D.J.P;olympe.dm.Color=class extends olympe.dm.ue{getValue(){return this.tr()}vc(){return this.get(olympe.dm.Color.valueProp)}};olympe.dm.Color.O=olympe.dc.na.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.ka('ff023000000000000032');x('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.ue{getValue(){return this.Mi(olympe.dm.DateTime.valueProp)}vc(){return this.get(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.na.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.ka('ff023000000000000029');x('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.D.J(()=>olympe.D.gb,[]);olympe.dm.Enum=class extends olympe.dm.String{la(){return olympe.D.ta([super.la(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.Na)}Td(){return this.$c(olympe.dm.Enum.rankProp)}};olympe.dm.Enum.O=olympe.dc.na.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.ka('017a7690c915975ea995');olympe.dm.Enum.prototype.Td.K=olympe.D.J.G;olympe.dm.Lf=class extends olympe.dm.BrickMetadata{Pw(){return this.cb(olympe.dc.CloudObject.instancesRel).Ak(olympe.dm.Enum.rankProp,olympe.dc.query.Dj.ASC).ld()}static create(a,b){b=a.create(olympe.dm.Lf,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Ea(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.Lf.create=olympe.dm.Lf.create;olympe.dm.Lf.prototype.getValues=olympe.dm.Lf.prototype.Pw;olympe.dm.Lf.O=olympe.dc.na.C('017a768f966fc08ebb98',olympe.dm.Lf);olympe.dm.Number=class extends olympe.dm.ue{getValue(){return this.$c(olympe.dm.Number.valueProp)}vc(){return this.get(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.na.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.ka('ff023000000000000028');x('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.D.J.G;olympe.sc={};olympe.sc.R={Ca:'sc.Logger',Kj:'sc.RootContext',ce:'sc.Serializer'};olympe.sc.U={Ee:'sc.app',Hf:'sc.debug',kn:'sc.autostartProfiler',fo:'sc.debugger',us:'sc.disableTheme',PRODUCTION:'sc.production',Tt:'sc.onstartTimeout',$p:'sc.remoteActionTimeout'};
960
+ olympe.dm.Relation.originModelRel=T(olympe.dm.Relation.O,olympe.dc.CloudObject.Ri);x('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=T(olympe.dm.Relation.O,olympe.dc.CloudObject.gr);x('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dm.Relation.C={Qs:0,Wr:5,Yp:1,mu:4,em:2,Tl:8,Uy:10,yA:6,zA:9,He:6,AA:9};olympe.dm.Relation.K={dA:3,St:4,Rz:5,Qz:6};olympe.dm.Relation.P=olympe.dm.Fk.Ut+olympe.dm.Fk.ss;
961
+ m=olympe.dm.Relation.prototype;m.rw.L=olympe.D.J.F;m.Tv.L=olympe.D.J.G;m.Bw.L=olympe.D.J.G;m.lr.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.sr.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);function Il(a){a=olympe.dc.ga(a);if(olympe.dc.ia().zf(a,olympe.dm.String))return olympe.dm.String.valueProp;switch(a){case olympe.dm.Number.O.X():return olympe.dm.Number.valueProp;case olympe.dm.Boolean.O.X():return olympe.dm.Boolean.valueProp;case olympe.dm.DateTime.O.X():return olympe.dm.DateTime.valueProp;case olympe.dm.Color.O.X():return olympe.dm.Color.valueProp;default:throw Error('Unknown primitive model: '+a);}}olympe.dm.ue=class extends olympe.dc.CloudObject{getValue(){}};
962
+ olympe.dm.ue.O=olympe.dc.na.C('ff021000000000000019',olympe.dm.ue);olympe.dm.String=class extends olympe.dm.ue{getValue(){return this.vb(olympe.dm.String.valueProp)}vc(){return this.get(olympe.dm.String.valueProp)}toString(){let a;return null!=(a=this.get(olympe.dm.String.valueProp))?a:''}};olympe.dm.String.O=olympe.dc.na.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.ka('ff023000000000000026');x('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.L=olympe.D.J.F;
963
+ olympe.dm.String.prototype.toString.L=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.ue{getValue(){return this.Lg(olympe.dm.Boolean.valueProp)}vc(){return this.get(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.na.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.ka('ff023000000000000027');x('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.L=olympe.D.J.P;olympe.dm.Color=class extends olympe.dm.ue{getValue(){return this.tr()}vc(){return this.get(olympe.dm.Color.valueProp)}};olympe.dm.Color.O=olympe.dc.na.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.ka('ff023000000000000032');x('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.L=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.ue{getValue(){return this.Mi(olympe.dm.DateTime.valueProp)}vc(){return this.get(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.na.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.ka('ff023000000000000029');x('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.L=new olympe.D.J(()=>olympe.D.gb,[]);olympe.dm.Enum=class extends olympe.dm.String{la(){return olympe.D.ta([super.la(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.Na)}Ud(){return this.$c(olympe.dm.Enum.rankProp)}};olympe.dm.Enum.O=olympe.dc.na.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.ka('017a7690c915975ea995');olympe.dm.Enum.prototype.Ud.L=olympe.D.J.G;olympe.dm.Lf=class extends olympe.dm.BrickMetadata{Pw(){return this.cb(olympe.dc.CloudObject.instancesRel).Ak(olympe.dm.Enum.rankProp,olympe.dc.query.Dj.ASC).ld()}static create(a,b){b=a.create(olympe.dm.Lf,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Ea(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.Lf.create=olympe.dm.Lf.create;olympe.dm.Lf.prototype.getValues=olympe.dm.Lf.prototype.Pw;olympe.dm.Lf.O=olympe.dc.na.C('017a768f966fc08ebb98',olympe.dm.Lf);olympe.dm.Number=class extends olympe.dm.ue{getValue(){return this.$c(olympe.dm.Number.valueProp)}vc(){return this.get(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.na.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.ka('ff023000000000000028');x('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.L=olympe.D.J.G;olympe.sc={};olympe.sc.R={Ca:'sc.Logger',Kj:'sc.RootContext',ce:'sc.Serializer'};olympe.sc.U={Ee:'sc.app',Hf:'sc.debug',kn:'sc.autostartProfiler',fo:'sc.debugger',us:'sc.disableTheme',PRODUCTION:'sc.production',Tt:'sc.onstartTimeout',$p:'sc.remoteActionTimeout'};
964
964
  olympe.W.config(a=>{F(a,olympe.sc.U.Ee,'');F(a,olympe.sc.U.Hf,!1);F(a,olympe.sc.U.us,!0);F(a,olympe.sc.U.PRODUCTION,!1);F(a,olympe.sc.U.Tt,2E4);F(a,olympe.sc.U.$p,3E4);F(a,olympe.sc.U.kn,!1);E(a,olympe.sc.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('sc'));D(a,olympe.sc.R.ce,olympe.sc.yg,olympe.dc.R.cf);xa(a,olympe.dc.sources.R.ce,olympe.sc.R.ce);E(a,olympe.sc.R.Kj,[new olympe.W.ja(olympe.sc.U.PRODUCTION)],b=>{const c=new olympe.sc.gg('root','root',null);olympe.sc.Xm=c;c.set(olympe.sc.wa.C.PRODUCTION,b);return new olympe.sc.wa(c)})},
965
- 'olympe.sc');olympe.W.run([olympe.sc.R.Kj,new olympe.W.ja(olympe.N.U.Rk)],(a,b)=>{olympe.ie().ctx=a;olympe.ie().oVersion=()=>b});olympe.sc.Om=()=>null!==olympe.dc.ia().Nb(void 0,olympe.sc.Runnable.C.fc());olympe.sc.wC=(a,b,c,d)=>{c=Y(Y(a.create(olympe.sc.Uc),olympe.sc.Uc.C,c||null),olympe.sc.Uc.G,d||null);a.Ea(olympe.sc.Uc.F,c,b);a.Ea(olympe.dc.CloudObject.containsRel,b,c);return c.X()};olympe.sc.Fi=(a,b)=>{a=olympe.dc.lb.Uv(b)(a);return a instanceof olympe.sc.be?a.C():a};
966
- olympe.sc.OC=function(a){const b=olympe.dc.CloudObject.containsRel.fc();var c=olympe.dc.ga(a);if(void 0===c)return[];a=olympe.dc.ia();const d=[];let e=[];const f=new Set;for(;!a.Qb(c,olympe.dm.Jb);){f.add(c);const g=a.Nb(c,b);if(null===g)return olympe.ma.ab('sc').warn(`Object ${c} has no container`),[];a.Qb(c,olympe.sc.logic.ob)||g===a.Nb(c,olympe.sc.Runnable.C.fc())||d.push(c);c=g;if(f.has(c))throw Error(`Instance ${c} (${a.name(c)}) is part of a cyclic contain pattern`);}e.push(c);e=e.concat(a.Mg(e[0],
967
- olympe.dm.Jb.Ja));e=e.concat(a.Mg(e[e.length-1],olympe.dm.Fc.Z.fc()));e=e.concat(a.Mg(e[e.length-1],olympe.dm.Fc.P.fc()));return[...d,...e].reverse()};olympe.sc.QC=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.kg:a.startsWith('video/')?olympe.sc.th:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.Ec:olympe.dm.File};
965
+ 'olympe.sc');olympe.W.run([olympe.sc.R.Kj,new olympe.W.ja(olympe.N.U.Rk)],(a,b)=>{olympe.ie().ctx=a;olympe.ie().oVersion=()=>b});olympe.sc.Om=()=>null!==olympe.dc.ia().Jb(void 0,olympe.sc.Runnable.C.fc());olympe.sc.wC=(a,b,c,d)=>{c=Y(Y(a.create(olympe.sc.Uc),olympe.sc.Uc.C,c||null),olympe.sc.Uc.G,d||null);a.Ea(olympe.sc.Uc.F,c,b);a.Ea(olympe.dc.CloudObject.containsRel,b,c);return c.X()};olympe.sc.Fi=(a,b)=>{a=olympe.dc.lb.Uv(b)(a);return a instanceof olympe.sc.Id?a.C():a};
966
+ olympe.sc.OC=function(a){const b=olympe.dc.CloudObject.containsRel.fc();var c=olympe.dc.ga(a);if(void 0===c)return[];a=olympe.dc.ia();const d=[];let e=[];const f=new Set;for(;!a.Qb(c,olympe.dm.Kb);){f.add(c);const g=a.Jb(c,b);if(null===g)return olympe.ma.ab('sc').warn(`Object ${c} has no container`),[];a.Qb(c,olympe.sc.logic.ob)||g===a.Jb(c,olympe.sc.Runnable.C.fc())||d.push(c);c=g;if(f.has(c))throw Error(`Instance ${c} (${a.name(c)}) is part of a cyclic contain pattern`);}e.push(c);e=e.concat(a.Mg(e[0],
967
+ olympe.dm.Kb.Ja));e=e.concat(a.Mg(e[e.length-1],olympe.dm.Fc.Z.fc()));e=e.concat(a.Mg(e[e.length-1],olympe.dm.Fc.P.fc()));return[...d,...e].reverse()};olympe.sc.QC=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.kg:a.startsWith('video/')?olympe.sc.th:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.Ec:olympe.dm.File};
968
968
  olympe.sc.NC=a=>a instanceof olympe.sc.kg?'image/*':a instanceof olympe.sc.th?'video/*':a instanceof olympe.sc.Ec?'font/*,application/font-woff':null;olympe.sc.Za={};function Jl(a,b){var c=olympe.sc.wa,d=a.C;a=a.F();b=olympe.dc.ga(b);let e,f=null==(e=d.F)?void 0:e.get(b);if(!f){f=d.Ah(a,void 0,b);for(d=f.getParent();d&&d.oa&&!d.id.startsWith('_');)d=d.getParent();let g;null==(g=d)||Kl(g,b,f)}return new c(f)}function Ll(a){let b;return null!=(b=a.Ra(olympe.sc.wa.C.PRODUCTION))?b:!1}
969
969
  olympe.sc.wa=class{constructor(a=olympe.sc.Xm){this.C=a;this.H=olympe.ma.ab('sc');this.G=null}V(){return this.C.V()}getParent(){if(null===this.G){const a=this.C.getParent();this.G=null===a?null:new olympe.sc.wa(a)}return this.G}Vv(a){const b=olympe.dc.ia();let c=this.getParent();const d=e=>{if(e.he()){const f=b.model(e.he());if(f&&b.Ia(f,olympe.sc.Ua.ea)||a.modelTag&&!b.Qb(e.he(),a.modelTag))return!1}return!0};for(;c&&!d(c);)c=c.getParent();return c}he(){return this.C.he()}F(){return this.C.C}set(a,
970
970
  b){this.C.set(a,b);return this}dn(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}sb(a,b,c=!1){const d=olympe.dc.ga(a),e=olympe.D.ic(null!=b?b:Object,`Get context value flow source of ${d}`);e.getContext().onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.C.V():void 0));return e.sb()}get(a,b=!1){a=this.Ra(a,b);return void 0!==a?a:null}has(a,b=!1){return this.C.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,
@@ -975,90 +975,90 @@ Ql(this.C,a);return null!==a?new olympe.sc.ui.By(a,this):null}jw(a){a=Ql(this.C,
975
975
  f?(e=a.model(f),`${a.name(f)||e&&a.name(e)||f} (${e})`):e.V()}).join('\n> ')}catch(c){b=`No stack available for context ${this.V()}: ${c}`,this.H.warn(b)}return b}};olympe.sc.wa.prototype.observeMany=olympe.sc.wa.prototype.wx;olympe.sc.wa.prototype.getEvent=olympe.sc.wa.prototype.jw;olympe.sc.wa.prototype.getProperty=olympe.sc.wa.prototype.Ia;olympe.sc.wa.prototype.isDestroyed=olympe.sc.wa.prototype.eb;olympe.sc.wa.prototype.clear=olympe.sc.wa.prototype.clear;olympe.sc.wa.prototype.offDestroy=olympe.sc.wa.prototype.Bf;
976
976
  olympe.sc.wa.prototype.onDestroy=olympe.sc.wa.prototype.onDestroy;olympe.sc.wa.prototype.offClear=olympe.sc.wa.prototype.vk;olympe.sc.wa.prototype.onClear=olympe.sc.wa.prototype.Vg;olympe.sc.wa.prototype.destroy=olympe.sc.wa.prototype.destroy;olympe.sc.wa.prototype.getOtherContext=olympe.sc.wa.prototype.zw;olympe.sc.wa.prototype.onContext=olympe.sc.wa.prototype.xk;olympe.sc.wa.prototype.createChild=olympe.sc.wa.prototype.Ah;olympe.sc.wa.prototype.setParentElement=olympe.sc.wa.prototype.Rx;
977
977
  olympe.sc.wa.prototype['throw']=olympe.sc.wa.prototype.throw;olympe.sc.wa.prototype.waitFor=olympe.sc.wa.prototype.Jr;olympe.sc.wa.prototype.runner=olympe.sc.wa.prototype.Px;olympe.sc.wa.prototype.repeat=olympe.sc.wa.prototype.repeat;olympe.sc.wa.prototype.observe=olympe.sc.wa.prototype.observe;olympe.sc.wa.prototype.has=olympe.sc.wa.prototype.has;olympe.sc.wa.prototype.get=olympe.sc.wa.prototype.get;olympe.sc.wa.prototype.remove=olympe.sc.wa.prototype.remove;olympe.sc.wa.prototype.trigger=olympe.sc.wa.prototype.dn;
978
- olympe.sc.wa.prototype.set=olympe.sc.wa.prototype.set;olympe.sc.wa.prototype.getClosest=olympe.sc.wa.prototype.Vv;olympe.sc.wa.prototype.getParent=olympe.sc.wa.prototype.getParent;olympe.sc.wa.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',eg:'__htmlContainer',Py:'__dockableElement',hn:'__appHasStarted'};olympe.sc.Oq=class extends olympe.sc.wa{constructor(a){super(a);this.L=new olympe.D.$b('SC Update Context',super.F());const b=a.Vg(()=>{b&&a.vk(b);this.L.destroy()})}F(){return this.L}Vg(a,b){return this.F().onDestroy(a,null!=b?b:olympe.Y.Hc())}};let Rl=0;function Ml(a,b){b=olympe.dc.ga(b);let c,d,e,f;return null!=(f=null!=(e=null==(c=a.aa)?void 0:c.get('I#'+b))?e:null==(d=a.aa)?void 0:d.get('IO#'+b))?f:b}
979
- function Ol(a,b){if(null===a.L)a.H.error(`An error occurred in a brick: ${b.message}\nError found in:\n${b.ke()}\n\n${b.stack}`);else if(a.ea){var c=Sl(olympe.dc.CloudObject.get(a.ea));null!==c&&Tl(a,c).some(d=>{let e,f;return 0<(null==(e=a.G)?void 0:null==(f=e.get(d))?void 0:f.size)})&&!a.P.has('$'+c)?a.set(c,b):Ol(a.L,b)}else Ol(a.L,b)}
980
- function Pl(a,b){if(b===a.id||a.T.has(b)||!b)return a;for(a=a.L;a;){if(b===a.V()||a.T.has(b))return a;const c=Ul(a.F,b);if(c)return c;a=a.getParent()}return null}function Vl(a,b,c=0){null===a.Za&&(a.Za=new Map);a.Za.has(b.V())||(a.Za.set(b.V(),{yk:b,depth:c}),Wl(a,d=>{(-1===b.G||c<b.G)&&Vl(d,b,c+1)}),a.onDestroy(()=>{Xl(a,b.V())}));return b.V()}
978
+ olympe.sc.wa.prototype.set=olympe.sc.wa.prototype.set;olympe.sc.wa.prototype.getClosest=olympe.sc.wa.prototype.Vv;olympe.sc.wa.prototype.getParent=olympe.sc.wa.prototype.getParent;olympe.sc.wa.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',eg:'__htmlContainer',Py:'__dockableElement',hn:'__appHasStarted'};olympe.sc.Oq=class extends olympe.sc.wa{constructor(a){super(a);this.K=new olympe.D.$b('SC Update Context',super.F());const b=a.Vg(()=>{b&&a.vk(b);this.K.destroy()})}F(){return this.K}Vg(a,b){return this.F().onDestroy(a,null!=b?b:olympe.Y.Hc())}};let Rl=0;function Ml(a,b){b=olympe.dc.ga(b);let c,d,e,f;return null!=(f=null!=(e=null==(c=a.aa)?void 0:c.get('I#'+b))?e:null==(d=a.aa)?void 0:d.get('IO#'+b))?f:b}
979
+ function Ol(a,b){if(null===a.K)a.H.error(`An error occurred in a brick: ${b.message}\nError found in:\n${b.ke()}\n\n${b.stack}`);else if(a.ea){var c=Sl(olympe.dc.CloudObject.get(a.ea));null!==c&&Tl(a,c).some(d=>{let e,f;return 0<(null==(e=a.G)?void 0:null==(f=e.get(d))?void 0:f.size)})&&!a.P.has('$'+c)?a.set(c,b):Ol(a.K,b)}else Ol(a.K,b)}
980
+ function Pl(a,b){if(b===a.id||a.T.has(b)||!b)return a;for(a=a.K;a;){if(b===a.V()||a.T.has(b))return a;const c=Ul(a.F,b);if(c)return c;a=a.getParent()}return null}function Vl(a,b,c=0){null===a.Za&&(a.Za=new Map);a.Za.has(b.V())||(a.Za.set(b.V(),{yk:b,depth:c}),Wl(a,d=>{(-1===b.G||c<b.G)&&Vl(d,b,c+1)}),a.onDestroy(()=>{Xl(a,b.V())}));return b.V()}
981
981
  function Xl(a,b){if(null===a.Za||!a.Za.has(b))return!1;const {yk:c,depth:d}=a.Za.get(b);Wl(a,f=>{Xl(f,b)});0===d&&c.F();const e=a.Za.delete(b);0===a.Za.size&&(a.Za=null);return e}function Ql(a,b){let c;return(null==(c=a.aa)?void 0:c.get('IO#'+b))||null}
982
- function Yl(a){a.C.Z(()=>{Wl(a,c=>c.destroy())});a.C.onDestroy(()=>{void 0!==a.Ra(olympe.sc.wa.C.TRANSACTION,!1)&&a.H.warn(`The context ${a.V()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`);let c;if(null!=(c=a.L)){let d;null==(d=c.F)||d.delete(a.V());let e;0===(null==(e=c.F)?void 0:e.size)&&(c.F=null)}a.T.clear()});let b;null==(b=a.L)||Zl(b,a)}
982
+ function Yl(a){a.C.Z(()=>{Wl(a,c=>c.destroy())});a.C.onDestroy(()=>{void 0!==a.Ra(olympe.sc.wa.C.TRANSACTION,!1)&&a.H.warn(`The context ${a.V()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`);let c;if(null!=(c=a.K)){let d;null==(d=c.F)||d.delete(a.V());let e;0===(null==(e=c.F)?void 0:e.size)&&(c.F=null)}a.T.clear()});let b;null==(b=a.K)||Zl(b,a)}
983
983
  function Ul(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.oa&&!c.id.startsWith('_')&&(a=Ul(c.F,b)))return a;return null}function $l(a,b,...c){if(null!==a.Za)for(const {yk:d,depth:e}of a.Za.values())d.process(a,b,e,...c)}function am(a,b){a.ea=olympe.dc.ga(b);a.oa=b.vd().Om();b.G().forEach(c=>{a.id===c||a.T.has(c)||(a.T.add(c),Kl(a,c,a))});a.aa=b.T();$l(a,olympe.sc.Za.oc.C.INIT)}function bm(a){a.za=!0;let b;null==(b=a.F)||b.forEach(c=>{bm(c)})}
984
984
  function cm(a){a.za=!1;let b;null==(b=a.F)||b.forEach(c=>{cm(c)})}function Tl(a,b){return['*',a.id,...a.T].map(c=>`${'@'}${c}.${b}`)}function dm(a,b,c,d){c.forEach(f=>{let g,h;null==(g=a.G)||null==(h=g.get(f))||h.forEach(k=>{k(d)})});let e;null==(e=a.F)||e.forEach(f=>{!f.za&&f.data.has(b)||dm(f,b,c,d)})}function em(a,b,c){a.G||(a.G=new Map);let d=a.G.get(b);void 0===d&&(d=new Map,a.G.set(b,d));Rl++;const e=Rl;d.set(e,c);return()=>{const f=a.G.get(b);f&&(f.delete(e),0===f.size&&a.G.delete(b))}}
985
985
  function Kl(a,b,c){a.P.add(b);let d,e;null==(d=a.G)||null==(e=d.get('&'+b))||e.forEach(f=>{f(c)});Wl(a,f=>{f.P.has(b)||Kl(f,b,c)});a.P.delete(b)}function Wl(a,b){let c;null==(c=a.F)||c.forEach(b)}function fm(a,b){a.data.forEach((c,d)=>b(c,d.slice(1)))}function gm(a){var b=olympe.sc.Za.oc.F.kf;const c=[];if(null!==a.Za)for(const {yk:d}of a.Za.values())d.getType()===b&&(c.push(d.V()),d.F(),Xl(a,d.V()))}function Zl(a,b){null===a.F&&(a.F=new Map);a.F.set(b.id,b)}
986
- olympe.sc.gg=class{constructor(a,b='no name',c=olympe.sc.Xm){this.id=a;this.kd=b;this.T=new Set;this.L=c;this.C=new olympe.D.$b('SC Context');this.data=new Map;this.ea=this.Z=this.F=this.G=null;this.oa=!1;this.P=new Set;this.za=!1;this.aa=null;this.H=olympe.ma.ab('sc');this.Za=null;Yl(this)}V(){return this.id}getParent(){return this.L}he(){return this.ea}set(a,b){if(!this.C.ad()&&!this.C.eb()){const g=olympe.dc.ga(a);var c,d;let h,k;a=null!=(k=null!=(h=null==(c=this.aa)?void 0:c.get('O#'+g))?h:null==
986
+ olympe.sc.gg=class{constructor(a,b='no name',c=olympe.sc.Xm){this.id=a;this.kd=b;this.T=new Set;this.K=c;this.C=new olympe.D.$b('SC Context');this.data=new Map;this.ea=this.Z=this.F=this.G=null;this.oa=!1;this.P=new Set;this.za=!1;this.aa=null;this.H=olympe.ma.ab('sc');this.Za=null;Yl(this)}V(){return this.id}getParent(){return this.K}he(){return this.ea}set(a,b){if(!this.C.ad()&&!this.C.eb()){const g=olympe.dc.ga(a);var c,d;let h,k;a=null!=(k=null!=(h=null==(c=this.aa)?void 0:c.get('O#'+g))?h:null==
987
987
  (d=this.aa)?void 0:d.get('IO#'+g))?k:g;c='$'+a;var e;d=null!=(e=this.data.get(c))?e:null;b=null!=b?b:null;if(e=!this.P.has(c)){a:{if('function'===typeof(null==b?void 0:b.Qa))try{var f=b.Qa(d);break a}catch(l){f=!1;break a}f=b===d}e=!f}e&&(null===b?this.data.delete(c):this.data.set(c,b),null!==this.Za&&0<this.Za.size&&$l(this,olympe.sc.Za.oc.C.Pj,a,b),f=Tl(this,a),this.P.add(c),dm(this,c,f,b),this.P.delete(c))}}on(a,b,c,d=!0){if(this.C.eb()||this.C.ad())return()=>{};const e=Ml(this,a),f=c?olympe.dc.ga(c):
988
988
  '*';a=em(this,'@'+f+'.'+e,b);c=c?(c=Pl(this,f))?c.Ra(e,!1):void 0:this.Ra(e);void 0!==c&&b(c);if(d)olympe.D.Wa().onDestroy(a);return a}has(a,b=!1){a='$'+Ml(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}Ah(a,b,c){const d=null!=c?c:'_'+olympe.Y.Hc();if(a.eb()||a.ad())throw Error(`Try to create new child context in a destroyed context ${a.V()}, probably because \`runner()\` is called on a destroyed context`);const e=a.run(()=>new olympe.sc.gg(d,
989
- b,this));null!==this.Za&&0<this.Za.size&&this.Za.forEach(({yk:f,depth:g})=>{(-1===f.G||g<f.G)&&Vl(e,f,g+1)});return e}xk(a,b){const c=Pl(this,a);if(c)return b(c),()=>{};const d=em(this,'&'+a,e=>{let f;null==(f=d)||f();b(e)});return d}Ra(a,b=!0){a='$'+Ml(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.C.ad()||this.C.eb()||($l(this,olympe.sc.Za.oc.C.hj),this.C.destroy(),$l(this,olympe.sc.Za.oc.C.Od))}Vg(a,b){if(this.C.eb())a();
990
- else return Rl++,b=null!=b?b:String(Rl),null===this.Z&&(this.Z=new Map),this.Z.set(b,a),b;return b||'noId'}vk(a){null!==this.Z&&this.Z.delete(a)}onDestroy(a){return this.eb()?(a(),'noId'):this.C.onDestroy(a)}clear(){if(!this.C.ad()&&!this.C.eb()){$l(this,olympe.sc.Za.oc.C.cj);let a;null==(a=this.Z)||a.forEach(b=>b());$l(this,olympe.sc.Za.oc.C.dj)}}eb(){return this.C.eb()}};olympe.sc.gg.prototype.getParent=olympe.sc.gg.prototype.getParent;olympe.sc.gg.C={ql:'I#',Hl:'O#',Jz:'IO#'};function hm(a,b,c){return(c=c.he())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.Za.oc=class{constructor(a=-1){this.id=olympe.Y.uf();this.active=!0;this.G=a}F(){this.active=!1}V(){return this.id}getType(){}process(){}};olympe.sc.Za.oc.C={INIT:'INIT',Pj:'SET',cj:'CLEAR',dj:'CLEARED',hj:'DESTROY',Od:'DESTROYED'};olympe.sc.Za.oc.F={kf:'REMOTE',At:'LOCAL',Nf:'PROFILER'};olympe.sc.Pd=class a{constructor(){this.F=this.L=this.P=null;this.T=new Map;this.G=new Map;this.C=new olympe.Y.cm(1E4);La(this.C,b=>{gm(b)})}aa(b,c,d){const e=b.body(),f=e.c,g=this.T.get(f);switch(e.t){case olympe.sc.Pd.C.Yt:c=this.G.get(e.f);b.nd(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.Pd.C.Zt:const h=f+c,k=(l,n,p=0)=>{fm(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.G(q):t=q;let u;q=null!=(u=l.he())?u:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
991
- t])})};b.Tm(h).then(()=>{const l=[];k(g,l,0);Wl(g,p=>{k(p,l,1)});olympe.N.xb.publish(h,{t:olympe.sc.Pd.C.Vs,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.Za.ou(h);Vl(g,n);this.C.has(g)?Ja(this.C,g):this.C.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.Pd.C.$t:void 0!==g&&this.C.has(g)&&Ja(this.C,g);break;case olympe.sc.Pd.C.cl:void 0!==g&&(this.C.delete(g),gm(g))}}ea(b,c,d){this.P=new olympe.N.xb('discovery_debug_id',
992
- c);this.P.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.Pd.C.vs){e=f.i;f=f.f;if(!this.G.has(f)){const g=this.Z(f,c,b);if(0!==g.length)this.G.set(f,g);else return}null===this.F&&(this.F=olympe.Y.uf(),f=new olympe.D.$b(this.F,c.F()),this.L=new olympe.N.xb(this.F,f),this.L.listen().subscribe(g=>{this.aa(g,b,d)}));olympe.N.xb.publish(e,{t:olympe.sc.Pd.C.Kr,n:olympe.W.getParameter(olympe.sc.U.fo)||'no name',a:b,s:this.F}).catch(g=>{d.error('Error publishing on draw service : '+g)})}})}Z(b,c,
993
- d){const e=[],f=olympe.dc.ia(),g=(h,k)=>{Wl(h,l=>{if(null!==l.he()){const n=olympe.dc.CloudObject.get(l.he()).ek(olympe.sc.Runnable.L).ld();if(null!==n){const p=k+'/'+f.name(n);n.X()===b&&(e.push([p,l.V()]),this.T.set(l.V(),l));g(l,p)}}})};g(c.C,f.name(d));return e}static F(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.G(d));olympe.N.xb.publish(b,{t:olympe.sc.Pd.C.Xj,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.ma.ab('Debugger').error('Error publishing on service : ',f)})}static G(b){if(null===
989
+ b,this));null!==this.Za&&0<this.Za.size&&this.Za.forEach(({yk:f,depth:g})=>{(-1===f.G||g<f.G)&&Vl(e,f,g+1)});return e}xk(a,b){const c=Pl(this,a);if(c)return b(c),()=>{};const d=em(this,'&'+a,e=>{let f;null==(f=d)||f();b(e)});return d}Ra(a,b=!0){a='$'+Ml(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.C.ad()||this.C.eb()||($l(this,olympe.sc.Za.oc.C.hj),this.C.destroy(),$l(this,olympe.sc.Za.oc.C.Pd))}Vg(a,b){if(this.C.eb())a();
990
+ else return Rl++,b=null!=b?b:String(Rl),null===this.Z&&(this.Z=new Map),this.Z.set(b,a),b;return b||'noId'}vk(a){null!==this.Z&&this.Z.delete(a)}onDestroy(a){return this.eb()?(a(),'noId'):this.C.onDestroy(a)}clear(){if(!this.C.ad()&&!this.C.eb()){$l(this,olympe.sc.Za.oc.C.cj);let a;null==(a=this.Z)||a.forEach(b=>b());$l(this,olympe.sc.Za.oc.C.dj)}}eb(){return this.C.eb()}};olympe.sc.gg.prototype.getParent=olympe.sc.gg.prototype.getParent;olympe.sc.gg.C={ql:'I#',Hl:'O#',Jz:'IO#'};function hm(a,b,c){return(c=c.he())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.Za.oc=class{constructor(a=-1){this.id=olympe.Y.uf();this.active=!0;this.G=a}F(){this.active=!1}V(){return this.id}getType(){}process(){}};olympe.sc.Za.oc.C={INIT:'INIT',Pj:'SET',cj:'CLEAR',dj:'CLEARED',hj:'DESTROY',Pd:'DESTROYED'};olympe.sc.Za.oc.F={kf:'REMOTE',At:'LOCAL',Nf:'PROFILER'};olympe.sc.Qd=class a{constructor(){this.F=this.K=this.P=null;this.T=new Map;this.G=new Map;this.C=new olympe.Y.cm(1E4);La(this.C,b=>{gm(b)})}aa(b,c,d){const e=b.body(),f=e.c,g=this.T.get(f);switch(e.t){case olympe.sc.Qd.C.Yt:c=this.G.get(e.f);b.nd(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.Qd.C.Zt:const h=f+c,k=(l,n,p=0)=>{fm(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.G(q):t=q;let u;q=null!=(u=l.he())?u:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
991
+ t])})};b.Tm(h).then(()=>{const l=[];k(g,l,0);Wl(g,p=>{k(p,l,1)});olympe.N.xb.publish(h,{t:olympe.sc.Qd.C.Vs,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.Za.ou(h);Vl(g,n);this.C.has(g)?Ja(this.C,g):this.C.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.Qd.C.$t:void 0!==g&&this.C.has(g)&&Ja(this.C,g);break;case olympe.sc.Qd.C.cl:void 0!==g&&(this.C.delete(g),gm(g))}}ea(b,c,d){this.P=new olympe.N.xb('discovery_debug_id',
992
+ c);this.P.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.Qd.C.vs){e=f.i;f=f.f;if(!this.G.has(f)){const g=this.Z(f,c,b);if(0!==g.length)this.G.set(f,g);else return}null===this.F&&(this.F=olympe.Y.uf(),f=new olympe.D.$b(this.F,c.F()),this.K=new olympe.N.xb(this.F,f),this.K.listen().subscribe(g=>{this.aa(g,b,d)}));olympe.N.xb.publish(e,{t:olympe.sc.Qd.C.Kr,n:olympe.W.getParameter(olympe.sc.U.fo)||'no name',a:b,s:this.F}).catch(g=>{d.error('Error publishing on draw service : '+g)})}})}Z(b,c,
993
+ d){const e=[],f=olympe.dc.ia(),g=(h,k)=>{Wl(h,l=>{if(null!==l.he()){const n=olympe.dc.CloudObject.get(l.he()).ek(olympe.sc.Runnable.K).ld();if(null!==n){const p=k+'/'+f.name(n);n.X()===b&&(e.push([p,l.V()]),this.T.set(l.V(),l));g(l,p)}}})};g(c.C,f.name(d));return e}static F(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.G(d));olympe.N.xb.publish(b,{t:olympe.sc.Qd.C.Xj,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.ma.ab('Debugger').error('Error publishing on service : ',f)})}static G(b){if(null===
994
994
  b||void 0===b)return'<null>';const c=olympe.dc.ia();if(b instanceof olympe.dc.CloudObject){var d=b.hc();if(!c.Qb(d,olympe.sc.zc))return b.toString();let f=`${b.Vb().name()} (${b.X()})`;var e=olympe.dc.CloudObject.get(d);d=olympe.dc.pa.from(e).Uf(olympe.dc.CloudObject.extendRel,!0).ee().cb(olympe.dc.CloudObject.propertyRel).ee().ld();e=olympe.dc.pa.from(e).Uf(olympe.dc.CloudObject.extendRel,!0).ee().cb(olympe.dc.CloudObject.Ri).ee().ld();d=d.filter(([g])=>g instanceof olympe.sc.zc);0!==d.length&&(f+=
995
- '<br> ',f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.Ia(b.X(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.zc);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.Pd.L='discovery_debug_id';olympe.sc.Pd.C={vs:0,Kr:1,Yt:2,Zt:3,Vs:4,Xj:5,$t:6,cl:7};olympe.sc.Za.Pz=class extends olympe.sc.Za.oc{constructor(a=-1){super(a);this.C=new Map}getType(){return olympe.sc.Za.oc.F.At}process(a,b,c,...d){if(this.active&&b===olympe.sc.Za.oc.C.Pj){a=hm(c,Ml(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};function im(a,b,c,d=new Map){for(var e=[];b;){const n=b.he();if(!n)break;e.push(n);b=b.getParent()}Ra(a.C,c,d.set('context',e));var f;let g;for(const n of[...e,null==(f=d)?void 0:f.get('propId'),null==(g=d)?void 0:g.get('type')])if(c=n,'string'===typeof c&&!a.L.has(c)){e=a;f=c;e.ia||(e.ia=olympe.dc.ia());d=e.ia.name(f);e=(f=e.ia.model(f))?e.ia.name(f):'';var [h,k,l]=[d,f,e];d=a.C;e=(new Map).set(c,h).set(k,l);c=(new Map).set(c,k);for(const [p,q]of e.entries())d.P.set(p,q);for(const [p,q]of c.entries())d.L.set(p,
995
+ '<br> ',f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.Ia(b.X(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.zc);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.Qd.K='discovery_debug_id';olympe.sc.Qd.C={vs:0,Kr:1,Yt:2,Zt:3,Vs:4,Xj:5,$t:6,cl:7};olympe.sc.Za.Pz=class extends olympe.sc.Za.oc{constructor(a=-1){super(a);this.C=new Map}getType(){return olympe.sc.Za.oc.F.At}process(a,b,c,...d){if(this.active&&b===olympe.sc.Za.oc.C.Pj){a=hm(c,Ml(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};function im(a,b,c,d=new Map){for(var e=[];b;){const n=b.he();if(!n)break;e.push(n);b=b.getParent()}Ra(a.C,c,d.set('context',e));var f;let g;for(const n of[...e,null==(f=d)?void 0:f.get('propId'),null==(g=d)?void 0:g.get('type')])if(c=n,'string'===typeof c&&!a.K.has(c)){e=a;f=c;e.ia||(e.ia=olympe.dc.ia());d=e.ia.name(f);e=(f=e.ia.model(f))?e.ia.name(f):'';var [h,k,l]=[d,f,e];d=a.C;e=(new Map).set(c,h).set(k,l);c=(new Map).set(c,k);for(const [p,q]of e.entries())d.P.set(p,q);for(const [p,q]of c.entries())d.K.set(p,
996
996
  q)}}
997
- olympe.sc.Za.gu=class extends olympe.sc.Za.oc{constructor(a){super();this.C=a;this.ia=olympe.dc.ia();this.L=new Set}getType(){return olympe.sc.Za.oc.F.Nf}process(a,b,c,...d){var e=jm.ql,f=jm.Hl,g=jm.au;const h=jm.INIT,k=jm.cj,l=jm.dj,n=jm.hj,p=jm.Od;c=jm.Vt;if(b===olympe.sc.Za.oc.C.Pj){const [q,r]=d;b=(d=a.he())?olympe.dc.ia().Qb(d,olympe.sc.logic.Function):!1;d=d?olympe.dc.ia().Qb(d,olympe.sc.ui.CA):!1;b?(g=this.ia.Nb(q,olympe.dm.Property.typeRel),b=this.ia.Qb(q,olympe.sc.logic.tb),d=this.ia.Qb(q,olympe.sc.logic.Bb),
998
- im(this,a,b?e:d?f:c,new Map([['propId',q],['value',r],['type',g]]))):d&&(e=this.ia.Qb(q,olympe.dm.Property),f=this.ia.Nb(q,olympe.dm.Property.typeRel),im(this,a,e?g:c,new Map([['propId',q],['value',r],['type',f]])))}else b===olympe.sc.Za.oc.C.INIT?im(this,a,h):b===olympe.sc.Za.oc.C.cj?im(this,a,k):b===olympe.sc.Za.oc.C.dj?im(this,a,l):b===olympe.sc.Za.oc.C.hj?im(this,a,n):b===olympe.sc.Za.oc.C.Od&&im(this,a,p)}};
999
- const jm={ql:'input',Hl:'output',au:'prop',INIT:'init',cj:'clear',dj:'cleared',hj:'destroy',Od:'destroyed',Vt:'other'};olympe.sc.Za.ou=class extends olympe.sc.Za.oc{constructor(a){super(1);this.L=a;this.C=new Map;this.db=olympe.dc.ia()}getType(){return olympe.sc.Za.oc.F.kf}F(){super.F();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.Za.oc.C.Pj&&void 0!==d[0]&&null!==d[0]){const e=hm(c,Ml(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Vb()instanceof olympe.sc.zc){const h=Xf(this.db,f,()=>{olympe.sc.Pd.F(this.L,
1000
- e,f)});this.C.set(e,()=>{Yf(this.db,f,h)})}olympe.sc.Pd.F(this.L,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{mt(){return this.$c(this.Km())}nt(){return this.$c(this.Lm())}kk(){return new olympe.D.Sb(this.$c(this.Km()),this.$c(this.Lm()))}Km(){}Lm(){}};olympe.sc.Metadata.O=olympe.dc.na.C('0161ae936c62f9fcd131',olympe.sc.Metadata);m=olympe.sc.Metadata.prototype;m.mt.K=olympe.D.J.G;m.nt.K=olympe.D.J.G;m.kk.K=olympe.D.J.T;m.Km.K=olympe.D.J.C;m.Lm.K=olympe.D.J.C;olympe.sc.Uc=class extends olympe.dc.CloudObject{F(){return this.vb(olympe.sc.Uc.G)}C(){return this.vb(olympe.sc.Uc.C)}};olympe.sc.Uc.O=olympe.dc.na.C('01703376c4a81c0e9d90',olympe.sc.Uc);olympe.sc.Uc.G=olympe.sc.Uc.O.ka('01703376c4a81c0e9d91');olympe.sc.Uc.C=olympe.sc.Uc.O.ka('01703376c4a81c0e9d92');olympe.sc.Uc.F=olympe.sc.Uc.O.ra('01703376c4a81c0e9d93');T(olympe.dc.CloudObject.O,olympe.sc.Uc.F);olympe.sc.Uc.prototype.F.K=olympe.D.J.F;olympe.sc.Uc.prototype.C.K=olympe.D.J.F;olympe.sc.yd={};olympe.sc.yd.we={Es:'folders',su:'screenflow',Pu:'ui-design',uq:'software-intelligence',ah:'data-management',rA:'projects'};olympe.sc.gd=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.uq}C(){return this.bb(olympe.sc.gd.C,olympe.sc.logic.mh)}F(){return this.bb(olympe.sc.gd.F,olympe.sc.logic.rg)}};olympe.sc.gd.O=olympe.dc.na.C('011100000000000adef0',olympe.sc.gd);olympe.sc.gd.C=olympe.sc.gd.O.ra('016ac4f59a2917fdef01');olympe.sc.gd.F=olympe.sc.gd.O.ra('016ac4f59a2917fdef02');olympe.sc.gd.O.C=(a,b)=>yk(a,b||'New function signature',olympe.sc.gd,olympe.sc.logic.qd).X();
1001
- olympe.sc.gd.prototype.C.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.sc.gd.prototype.F.K=new olympe.D.J(()=>olympe.dc.ya,[]);function km(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function lm(a,b){b=b.filter(c=>'string'===typeof c&&a.db.Qb(c,olympe.sc.logic.Rb));b.sort((c,d)=>{let e;c=null!=(e=a.db.Ia(c,olympe.sc.logic.Rb.C,!0))?e:0;let f;d=null!=(f=a.db.Ia(d,olympe.sc.logic.Rb.C,!0))?f:0;return c-d});return b}
1002
- olympe.sc.Ua=class extends olympe.dm.BrickMetadata{pt(a,b,c,d,e=!0){e||olympe.ma.ab('sc').error('parameter own= false ignored, investigate');return olympe.D.Wg(N(this.yf(a,olympe.dc.lb.Fi,c)),d)}Gw(){return this.bb(olympe.sc.Ua.P,olympe.sc.Runnable)}Yv(){return this.bb(olympe.sc.Ua.Z,olympe.sc.Runnable)}Rm(){return this.db.Ia(this,olympe.sc.Ua.ea)}Om(){return null!==this.db.Nb(this.tag,olympe.sc.Runnable.C.fc())}ot(){return this.bb(olympe.sc.Ua.G,olympe.sc.logic.tb)}hp(){return this.bb(olympe.sc.Ua.F,
997
+ olympe.sc.Za.gu=class extends olympe.sc.Za.oc{constructor(a){super();this.C=a;this.ia=olympe.dc.ia();this.K=new Set}getType(){return olympe.sc.Za.oc.F.Nf}process(a,b,c,...d){var e=jm.ql,f=jm.Hl,g=jm.au;const h=jm.INIT,k=jm.cj,l=jm.dj,n=jm.hj,p=jm.Pd;c=jm.Vt;if(b===olympe.sc.Za.oc.C.Pj){const [q,r]=d;b=(d=a.he())?olympe.dc.ia().Qb(d,olympe.sc.logic.Function):!1;d=d?olympe.dc.ia().Qb(d,olympe.sc.ui.CA):!1;b?(g=this.ia.Jb(q,olympe.dm.Property.typeRel),b=this.ia.Qb(q,olympe.sc.logic.tb),d=this.ia.Qb(q,olympe.sc.logic.Bb),
998
+ im(this,a,b?e:d?f:c,new Map([['propId',q],['value',r],['type',g]]))):d&&(e=this.ia.Qb(q,olympe.dm.Property),f=this.ia.Jb(q,olympe.dm.Property.typeRel),im(this,a,e?g:c,new Map([['propId',q],['value',r],['type',f]])))}else b===olympe.sc.Za.oc.C.INIT?im(this,a,h):b===olympe.sc.Za.oc.C.cj?im(this,a,k):b===olympe.sc.Za.oc.C.dj?im(this,a,l):b===olympe.sc.Za.oc.C.hj?im(this,a,n):b===olympe.sc.Za.oc.C.Pd&&im(this,a,p)}};
999
+ const jm={ql:'input',Hl:'output',au:'prop',INIT:'init',cj:'clear',dj:'cleared',hj:'destroy',Pd:'destroyed',Vt:'other'};olympe.sc.Za.ou=class extends olympe.sc.Za.oc{constructor(a){super(1);this.K=a;this.C=new Map;this.db=olympe.dc.ia()}getType(){return olympe.sc.Za.oc.F.kf}F(){super.F();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.Za.oc.C.Pj&&void 0!==d[0]&&null!==d[0]){const e=hm(c,Ml(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Vb()instanceof olympe.sc.zc){const h=Xf(this.db,f,()=>{olympe.sc.Qd.F(this.K,
1000
+ e,f)});this.C.set(e,()=>{Yf(this.db,f,h)})}olympe.sc.Qd.F(this.K,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{mt(){return this.$c(this.Km())}nt(){return this.$c(this.Lm())}kk(){return new olympe.D.Sb(this.$c(this.Km()),this.$c(this.Lm()))}Km(){}Lm(){}};olympe.sc.Metadata.O=olympe.dc.na.C('0161ae936c62f9fcd131',olympe.sc.Metadata);m=olympe.sc.Metadata.prototype;m.mt.L=olympe.D.J.G;m.nt.L=olympe.D.J.G;m.kk.L=olympe.D.J.T;m.Km.L=olympe.D.J.C;m.Lm.L=olympe.D.J.C;olympe.sc.Uc=class extends olympe.dc.CloudObject{F(){return this.vb(olympe.sc.Uc.G)}C(){return this.vb(olympe.sc.Uc.C)}};olympe.sc.Uc.O=olympe.dc.na.C('01703376c4a81c0e9d90',olympe.sc.Uc);olympe.sc.Uc.G=olympe.sc.Uc.O.ka('01703376c4a81c0e9d91');olympe.sc.Uc.C=olympe.sc.Uc.O.ka('01703376c4a81c0e9d92');olympe.sc.Uc.F=olympe.sc.Uc.O.ra('01703376c4a81c0e9d93');T(olympe.dc.CloudObject.O,olympe.sc.Uc.F);olympe.sc.Uc.prototype.F.L=olympe.D.J.F;olympe.sc.Uc.prototype.C.L=olympe.D.J.F;olympe.sc.yd={};olympe.sc.yd.we={Es:'folders',su:'screenflow',Pu:'ui-design',uq:'software-intelligence',ah:'data-management',rA:'projects'};olympe.sc.gd=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.uq}C(){return this.bb(olympe.sc.gd.C,olympe.sc.logic.mh)}F(){return this.bb(olympe.sc.gd.F,olympe.sc.logic.rg)}};olympe.sc.gd.O=olympe.dc.na.C('011100000000000adef0',olympe.sc.gd);olympe.sc.gd.C=olympe.sc.gd.O.ra('016ac4f59a2917fdef01');olympe.sc.gd.F=olympe.sc.gd.O.ra('016ac4f59a2917fdef02');olympe.sc.gd.O.C=(a,b)=>yk(a,b||'New function signature',olympe.sc.gd,olympe.sc.logic.qd).X();
1001
+ olympe.sc.gd.prototype.C.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.sc.gd.prototype.F.L=new olympe.D.J(()=>olympe.dc.ya,[]);function km(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function lm(a,b){b=b.filter(c=>'string'===typeof c&&a.db.Qb(c,olympe.sc.logic.Rb));b.sort((c,d)=>{let e;c=null!=(e=a.db.Ia(c,olympe.sc.logic.Rb.C,!0))?e:0;let f;d=null!=(f=a.db.Ia(d,olympe.sc.logic.Rb.C,!0))?f:0;return c-d});return b}
1002
+ olympe.sc.Ua=class extends olympe.dm.BrickMetadata{pt(a,b,c,d,e=!0){e||olympe.ma.ab('sc').error('parameter own= false ignored, investigate');return olympe.D.Wg(N(this.yf(a,olympe.dc.lb.Fi,c)),d)}Gw(){return this.bb(olympe.sc.Ua.P,olympe.sc.Runnable)}Yv(){return this.bb(olympe.sc.Ua.Z,olympe.sc.Runnable)}Rm(){return this.db.Ia(this,olympe.sc.Ua.ea)}Om(){return null!==this.db.Jb(this.tag,olympe.sc.Runnable.C.fc())}ot(){return this.bb(olympe.sc.Ua.G,olympe.sc.logic.tb)}hp(){return this.bb(olympe.sc.Ua.F,
1003
1003
  olympe.sc.logic.Bb)}G(){return[olympe.sc.Ua.pb]}};olympe.sc.Ua.O=olympe.dc.na.C('0112000000000000def0',olympe.sc.Ua);olympe.sc.Ua.ea=olympe.sc.Ua.O.ka('01692aa71f3108454479');olympe.sc.Ua.ub=olympe.sc.Ua.O.ka('0166446c1f128ebc903a');olympe.sc.Ua.pb=olympe.sc.Ua.O.ka('0166446c1f128ebc904e');olympe.sc.Ua.P=olympe.sc.Ua.O.ra('01692a4af82e8984742c');olympe.sc.Ua.Z=olympe.sc.Ua.O.ra('01692a4af82e8984742d');olympe.sc.Ua.aa=olympe.sc.Ua.O.ra('01692a4af82e8984742e');olympe.sc.Ua.G=olympe.sc.Ua.O.ra('01621fb84e320000f00a');
1004
- olympe.sc.Ua.F=olympe.sc.Ua.O.ra('01621fb84e320000f00b');olympe.sc.Ua.Mc=olympe.sc.Ua.O.ra('0171838bcfed0000e00e');olympe.sc.Ua.jc=olympe.sc.Ua.O.ra('0171838bcfed0000a00a');m=olympe.sc.Ua.prototype;m.pt.K=olympe.D.J.C;m.Gw.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.Yv.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.Rm.K=olympe.D.J.C;m.Om.K=olympe.D.J.C;m.ot.K=new olympe.D.J(()=>olympe.dc.ya,[]);m.hp.K=new olympe.D.J(()=>olympe.dc.ya,[]);function Sl(a){let b;return null!=(b=a.vd().G().map(olympe.dc.ga)[0])?b:null}function mm(a){const b=new olympe.dc.Xa;a=b.create(a);b.persist(a,!1);b.mb((d,e)=>{d||olympe.ma.ab('sc').error(`Error occurred for transaction executed by createLocalRunnable: ${e}`)});const c=olympe.dc.CloudObject.get(a);olympe.D.Wa().onDestroy(()=>{const d=new olympe.dc.Xa;d.delete(c);d.mb()});return c}
1004
+ olympe.sc.Ua.F=olympe.sc.Ua.O.ra('01621fb84e320000f00b');olympe.sc.Ua.Mc=olympe.sc.Ua.O.ra('0171838bcfed0000e00e');olympe.sc.Ua.jc=olympe.sc.Ua.O.ra('0171838bcfed0000a00a');m=olympe.sc.Ua.prototype;m.pt.L=olympe.D.J.C;m.Gw.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.Yv.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.Rm.L=olympe.D.J.C;m.Om.L=olympe.D.J.C;m.ot.L=new olympe.D.J(()=>olympe.dc.ya,[]);m.hp.L=new olympe.D.J(()=>olympe.dc.ya,[]);function Sl(a){let b;return null!=(b=a.vd().G().map(olympe.dc.ga)[0])?b:null}function mm(a){const b=new olympe.dc.Xa;a=b.create(a);b.persist(a,!1);b.mb((d,e)=>{d||olympe.ma.ab('sc').error(`Error occurred for transaction executed by createLocalRunnable: ${e}`)});const c=olympe.dc.CloudObject.get(a);olympe.D.Wa().onDestroy(()=>{const d=new olympe.dc.Xa;d.delete(c);d.mb()});return c}
1005
1005
  function nm(a,b){am(b.C,a);km(a.vd(),b);const c=a.P(),d=om(b,c),e=[];c.forEach((f,g)=>{f===a.ea?e[0]=g:f===a.aa&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(pm(a,b,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
1006
1006
  function qm(a,b){var c=a.hc();const d=a.db.name(c),e=`Brick ${d} successfully run`,f=`Brick ${d} successfully cleared`,g=a.C(b);c=a.setupExecution(b).pipe(rxjs.operators.map(h=>{if(!b.eb()&&(b.clear(),null!==h)){const k=Array.isArray(h)?h:[h],l=new olympe.sc.Oq(b.C);l.F().run(()=>v(function*(){try{yield a.update(l,k,g)}catch(n){l.throw(n)}}));return!0}return!1})).subscribe(rxjs.Subscriber.create(h=>h?a.H.debug(e):a.H.debug(f),h=>b.throw(h),()=>a.H.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
1007
1007
  function rm(a,b,c,d){const e=V(a.db,b,c,(f,g)=>{const h=Jl(d,g);f?olympe.dc.CloudObject.get(g).run(h):h.destroy()});d.F().onDestroy(a.db.F.bind(a.db,b,c,e,!0))}function om(a,b){if(1===b.length)return[(d,e)=>{null!==e?a.set(d,e):a.remove(d)}];const c=b.map(()=>new Map);return c.map(d=>(e,f)=>{null!==f?d.set(e,f):d.delete(e);a:{for(const g of c)if(f=g.get(e),void 0!==f){a.set(e,f);break a}a.remove(e)}})}
1008
1008
  function pm(a,b,c,d){b=b.F();const e=Xf(a.db,a.tag,b.G((f,g,h)=>{const k=h?d:c;null!==k&&(k(f,olympe.dc.lb.vc(g)),h&&c!==k&&(null==c||c(f,null)))}));b.onDestroy(()=>{Yf(a.db,a.tag,e)})}
1009
1009
  olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.H=c}run(a){a.F().run(()=>{nm(this,a);this.init(a);a.Vg(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a));if(this.vd().Rm())qm(this,a);else{const b=new olympe.sc.Oq(a.C);this.update(b,[],[])}this.F(a)})}vd(){return this.Vb()}init(a){this.onInit(a)}update(a,b,c){const d=this.vd();if(d.Rm())this.onUpdate(a,b,c);else this.H.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.V()}`),
1010
1010
  rm(this,d,olympe.sc.Ua.P,a),this.oa()&&rm(this,d,olympe.sc.Ua.aa,a)}F(a){a.dn(olympe.sc.Ua.ub)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}C(){return[]}onInit(){}onUpdate(){const a=this.hc(),b=this.db.name(a),c=this.db.name(this.db.model(a));this.H.error(`No code was found for ${b} (${c}: ${a})\n\n`+'This is probably because the code has not yet been deployed to the environment, or because the package.json does not import the required dependencies.')}onDestroy(){}getInputs(){var a=
1011
- this.vd();return lm(a,a.db.bb(a.tag,olympe.sc.Ua.G))}getOutputs(){var a=this.vd();return lm(a,a.db.bb(a.tag,olympe.sc.Ua.F))}G(){return[]}T(){return new Map}oa(){return!1}L(a,b,c,d){a=b.sb(a,c,!0);void 0!==d&&olympe.D.Wg(a,d);return a}pb(a,b,c,d,e){olympe.D.Wm([d],f=>{b.set(a,olympe.D.xr(f)?f.valueOf():f)});return this.L(a,b,c,e)}P(){return[this.ea,this.aa]}ea(a,b){pm(this,a,b,null)}aa(a,b){pm(this,a,null,b)}ub(a,b){const c=this.db,d=olympe.sc.logic.ob.G.fc(),e=olympe.sc.logic.ob.F,f=olympe.sc.logic.ob.C;
1012
- this.jr(d,g=>{var h=g.X();if(h=c.Nb(h,e)||c.Nb(h,f))return sm(g,a,b.bind(null,h))})}};olympe.sc.Runnable.O=cf(olympe.dc.na.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.L=olympe.sc.Runnable.O.ra('01692a4af82e8984742b');olympe.sc.Runnable.C=olympe.sc.Runnable.O.ra('01756a18d4921c103111');olympe.sc.Runnable.P=T(olympe.sc.Runnable.O,olympe.sc.Ua.P);olympe.sc.Runnable.T=T(olympe.sc.Runnable.O,olympe.sc.Ua.Z);olympe.sc.Runnable.Z=T(olympe.sc.Runnable.O,olympe.sc.Ua.aa);
1013
- T(olympe.sc.Ua.O,olympe.sc.Runnable.L);T(olympe.sc.Ua.O,olympe.sc.Runnable.C);olympe.sc.Runnable.prototype.vd.K=new olympe.D.J(()=>olympe.sc.Ua,[]);olympe.sc.Runnable.prototype.L.K=new olympe.D.J(()=>Object,[]);olympe.sc.Runnable.prototype.pb.K=olympe.D.J.C;function tm(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.be)return(a=a.F())?a.valueOf():null;if('function'===typeof a.X)return a.X()}return null}olympe.sc.be=class extends olympe.dc.CloudObject{F(){return this.db.bb(this,olympe.sc.be.C)[0]}C(){const a=tm(this);return olympe.dc.CloudObject.get(a)}vc(){return this.C().vc()}toString(){const a=tm(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.be.O=olympe.dc.na.C('0163c9ae01f2d6e9ca49',olympe.sc.be);
1014
- olympe.sc.be.C=olympe.sc.be.O.ra('0169b5a8a33144fb0b49');T(olympe.dc.CloudObject.O,olympe.sc.be.C);olympe.sc.be.prototype.F.K=new olympe.D.J(()=>String,[]);olympe.sc.be.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.lo=class extends olympe.dm.Jb{ne(){return olympe.sc.yd.we.ah}};olympe.sc.lo.O=olympe.dc.na.C('0163a68ce44f3d1fa84c',olympe.sc.lo);olympe.sc.zc=class extends olympe.dm.BrickMetadata{};olympe.sc.zc.O=olympe.dc.na.C('016324fde11a836f76c2',olympe.sc.zc);olympe.sc.zc.C=olympe.sc.zc.O.ra('016324fde11a836087c2');olympe.sc.zc.O.C=function(a,b){return yk(a,null!=b?b:'New type',olympe.sc.zc).X()};let um=null,vm=null;
1015
- function wm(a,b,c){um=a;const d=olympe.D.Wa(),e=d.G(c);olympe.dc.ed.from(a).cb(olympe.sc.qa.Nc.C).cb(olympe.sc.Tc.C.fc()).mb({zh:'__code-as-data__'}).then(f=>{vm=f;if(null!==f)if(b){var g=olympe.dc.ia();kh(d,f,h=>{h=g.Ih(h)?h:g.model(h);return null!==h&&g.Qb(h,olympe.sc.zc)},{an:!0}).subscribe(rxjs.Subscriber.create(()=>{e(olympe.sc.Tc.Kb.kp)},()=>{olympe.ma.ab('sc').error('Impossible to load the business container for the application',a,'maybe are you offline?');e(olympe.sc.Tc.Kb.ji)}))}else olympe.ma.ab('sc').info("Found business container but won't load it's content according to configuration."),e(olympe.sc.Tc.Kb.ji);
1016
- else olympe.ma.ab('sc').info(`No business container for application ${a}. You probably miss permissions.`),e(olympe.sc.Tc.Kb.ji)}).catch(f=>{olympe.ma.ab('sc').error('Error while loading business container:',f.message);e(olympe.sc.Tc.Kb.Fb)})}olympe.sc.Tc=class extends olympe.dc.CloudObject{};olympe.sc.Tc.Kb={kp:0,ji:1,Fb:2};olympe.sc.Tc.O=olympe.dc.na.C('017b3aa8fae1e3d044dc',olympe.sc.Tc);olympe.sc.Tc.C=olympe.sc.Tc.O.ra('017b3aa8fd1659291b92');olympe.sc.Tc.F=olympe.sc.Tc.O.ra('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.na.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.og=class extends olympe.sc.Map{};olympe.sc.og.O=olympe.dc.na.C('01631aacd8276ea98490',olympe.sc.og);olympe.sc.File=class extends olympe.dm.File{static wv(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.Dr(a,e,b,c,d);return e}static xv(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.$m(a,e,b,c,d);return e}static Dr(a,b,c,d,e){e=null!=e?e:'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));olympe.sc.File.$m(a,b,c,d,e)}static $m(a,b,c,d,e){const f=olympe.dc.ia(),g=f.Ga(b);var h;const k=null!=(h=a.model(b))?h:olympe.sc.File;if(null===k||!f.zf(k,olympe.dm.File))throw Error(`Try to set the content of an object which is not a file: ${b}`);
1011
+ this.vd();return lm(a,a.db.bb(a.tag,olympe.sc.Ua.G))}getOutputs(){var a=this.vd();return lm(a,a.db.bb(a.tag,olympe.sc.Ua.F))}G(){return[]}T(){return new Map}oa(){return!1}K(a,b,c,d){a=b.sb(a,c,!0);void 0!==d&&olympe.D.Wg(a,d);return a}pb(a,b,c,d,e){olympe.D.Wm([d],f=>{b.set(a,olympe.D.xr(f)?f.valueOf():f)});return this.K(a,b,c,e)}P(){return[this.ea,this.aa]}ea(a,b){pm(this,a,b,null)}aa(a,b){pm(this,a,null,b)}ub(a,b){const c=this.db,d=olympe.sc.logic.ob.G.fc(),e=olympe.sc.logic.ob.F,f=olympe.sc.logic.ob.C;
1012
+ this.jr(d,g=>{var h=g.X();if(h=c.Jb(h,e)||c.Jb(h,f))return sm(g,a,b.bind(null,h))})}};olympe.sc.Runnable.O=cf(olympe.dc.na.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.K=olympe.sc.Runnable.O.ra('01692a4af82e8984742b');olympe.sc.Runnable.C=olympe.sc.Runnable.O.ra('01756a18d4921c103111');olympe.sc.Runnable.P=T(olympe.sc.Runnable.O,olympe.sc.Ua.P);olympe.sc.Runnable.T=T(olympe.sc.Runnable.O,olympe.sc.Ua.Z);olympe.sc.Runnable.Z=T(olympe.sc.Runnable.O,olympe.sc.Ua.aa);
1013
+ T(olympe.sc.Ua.O,olympe.sc.Runnable.K);T(olympe.sc.Ua.O,olympe.sc.Runnable.C);olympe.sc.Runnable.prototype.vd.L=new olympe.D.J(()=>olympe.sc.Ua,[]);olympe.sc.Runnable.prototype.K.L=new olympe.D.J(()=>Object,[]);olympe.sc.Runnable.prototype.pb.L=olympe.D.J.C;function tm(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.Id)return(a=a.F())?a.valueOf():null;if('function'===typeof a.X)return a.X()}return null}olympe.sc.Id=class extends olympe.dc.CloudObject{F(){return this.db.bb(this,olympe.sc.Id.C)[0]}C(){const a=tm(this);return olympe.dc.CloudObject.get(a)}vc(){return this.C().vc()}toString(){const a=tm(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Id.O=olympe.dc.na.C('0163c9ae01f2d6e9ca49',olympe.sc.Id);
1014
+ olympe.sc.Id.C=olympe.sc.Id.O.ra('0169b5a8a33144fb0b49');T(olympe.dc.CloudObject.O,olympe.sc.Id.C);olympe.sc.Id.prototype.F.L=new olympe.D.J(()=>String,[]);olympe.sc.Id.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.lo=class extends olympe.dm.Kb{ne(){return olympe.sc.yd.we.ah}};olympe.sc.lo.O=olympe.dc.na.C('0163a68ce44f3d1fa84c',olympe.sc.lo);olympe.sc.zc=class extends olympe.dm.BrickMetadata{};olympe.sc.zc.O=olympe.dc.na.C('016324fde11a836f76c2',olympe.sc.zc);olympe.sc.zc.C=olympe.sc.zc.O.ra('016324fde11a836087c2');olympe.sc.zc.O.C=function(a,b){return yk(a,null!=b?b:'New type',olympe.sc.zc).X()};let um=null,vm=null;
1015
+ function wm(a,b,c){um=a;const d=olympe.D.Wa(),e=d.G(c);olympe.dc.ed.from(a).cb(olympe.sc.qa.Nc.C).cb(olympe.sc.Tc.C.fc()).mb({zh:'__code-as-data__'}).then(f=>{vm=f;if(null!==f)if(b){var g=olympe.dc.ia();kh(d,f,h=>{h=g.Ih(h)?h:g.model(h);return null!==h&&g.Qb(h,olympe.sc.zc)},{an:!0}).subscribe(rxjs.Subscriber.create(()=>{e(olympe.sc.Tc.Lb.kp)},()=>{olympe.ma.ab('sc').error('Impossible to load the business container for the application',a,'maybe are you offline?');e(olympe.sc.Tc.Lb.ji)}))}else olympe.ma.ab('sc').info("Found business container but won't load it's content according to configuration."),e(olympe.sc.Tc.Lb.ji);
1016
+ else olympe.ma.ab('sc').info(`No business container for application ${a}. You probably miss permissions.`),e(olympe.sc.Tc.Lb.ji)}).catch(f=>{olympe.ma.ab('sc').error('Error while loading business container:',f.message);e(olympe.sc.Tc.Lb.Fb)})}olympe.sc.Tc=class extends olympe.dc.CloudObject{};olympe.sc.Tc.Lb={kp:0,ji:1,Fb:2};olympe.sc.Tc.O=olympe.dc.na.C('017b3aa8fae1e3d044dc',olympe.sc.Tc);olympe.sc.Tc.C=olympe.sc.Tc.O.ra('017b3aa8fd1659291b92');olympe.sc.Tc.F=olympe.sc.Tc.O.ra('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.na.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.og=class extends olympe.sc.Map{};olympe.sc.og.O=olympe.dc.na.C('01631aacd8276ea98490',olympe.sc.og);olympe.sc.File=class extends olympe.dm.File{static wv(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.Dr(a,e,b,c,d);return e}static xv(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.$m(a,e,b,c,d);return e}static Dr(a,b,c,d,e){e=null!=e?e:'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));olympe.sc.File.$m(a,b,c,d,e)}static $m(a,b,c,d,e){const f=olympe.dc.ia(),g=f.Ga(b);var h;const k=null!=(h=a.model(b))?h:olympe.sc.File;if(null===k||!f.zf(k,olympe.dm.File))throw Error(`Try to set the content of an object which is not a file: ${b}`);
1017
1017
  h=new Date;c=(new Map).set(olympe.dm.File.fileNameProp,null!=c?c:'file').set(olympe.dm.File.urlProp,d).set(olympe.dm.File.modificationDateProp,h).set(olympe.dm.File.mimeTypeProp,null!=e?e:'application/data');g&&null!==f.Ia(b,olympe.dm.File.urlProp)||c.set(olympe.dm.File.creationDateProp,h).set(olympe.dm.File.C,!1);a.Ar(b,c)}};olympe.sc.File.setURLContent=olympe.sc.File.$m;olympe.sc.File.setContent=olympe.sc.File.Dr;olympe.sc.File.createFromURL=olympe.sc.File.xv;olympe.sc.File.createFromContent=olympe.sc.File.wv;
1018
- olympe.sc.File.O=Xe(olympe.dm.File,'ff021000000000000031',olympe.sc.File);olympe.sc.kg=class extends olympe.sc.File{L(){const a=olympe.D.ic(olympe.D.Na);this.ik(b=>{a.update(olympe.D.zb(b))});return a.sb()}};olympe.sc.kg.O=Xe(olympe.sc.File,'01644b6297305d62fca2',olympe.sc.kg);olympe.sc.kg.O.C=olympe.sc.File.F.bind(null,olympe.sc.kg);olympe.sc.kg.prototype.L.K=olympe.D.J.F;olympe.sc.Ec=class extends olympe.sc.File{L(){return this.vb(olympe.sc.Ec.fontFamilyProp)}P(){return this.vb(olympe.sc.Ec.G)}T(){return this.$c(olympe.sc.Ec.L)}};olympe.sc.Ec.O=Xe(olympe.sc.File,'01647e113043c637b541',olympe.sc.Ec);olympe.sc.Ec.fontFamilyProp=olympe.sc.Ec.O.ka('01647e35ecd24ef0b88d');olympe.sc.Ec.G=olympe.sc.Ec.O.ka('01647e677f5d1cfbdf42');olympe.sc.Ec.L=olympe.sc.Ec.O.ka('01647e6780999bf8bd25');
1019
- olympe.sc.Ec.O.C=(a,b,c,d)=>{c=olympe.sc.File.F(olympe.sc.Ec,a,b,c,d);a.update(c,olympe.sc.Ec.fontFamilyProp,b.split('.')[0]);return c};olympe.sc.Ec.prototype.L.K=olympe.D.J.F;olympe.sc.Ec.prototype.P.K=olympe.D.J.F;olympe.sc.Ec.prototype.T.K=olympe.D.J.G;olympe.sc.th=class extends olympe.sc.File{};olympe.sc.th.O=Xe(olympe.sc.File,'0164643c432146a71d5c',olympe.sc.th);olympe.sc.th.O.C=olympe.sc.File.F.bind(null,olympe.sc.th);olympe.sc.Qq=class extends olympe.dc.CloudObject{};olympe.sc.Qq.O=olympe.dc.na.C('016421bb3797e22d1c4e',olympe.sc.Qq);olympe.sc.logic={};olympe.sc.logic.Mo=(a,b)=>a===b?0:a>b?1:-1;
1018
+ olympe.sc.File.O=Xe(olympe.dm.File,'ff021000000000000031',olympe.sc.File);olympe.sc.kg=class extends olympe.sc.File{K(){const a=olympe.D.ic(olympe.D.Na);this.ik(b=>{a.update(olympe.D.zb(b))});return a.sb()}};olympe.sc.kg.O=Xe(olympe.sc.File,'01644b6297305d62fca2',olympe.sc.kg);olympe.sc.kg.O.C=olympe.sc.File.F.bind(null,olympe.sc.kg);olympe.sc.kg.prototype.K.L=olympe.D.J.F;olympe.sc.Ec=class extends olympe.sc.File{K(){return this.vb(olympe.sc.Ec.fontFamilyProp)}P(){return this.vb(olympe.sc.Ec.G)}T(){return this.$c(olympe.sc.Ec.K)}};olympe.sc.Ec.O=Xe(olympe.sc.File,'01647e113043c637b541',olympe.sc.Ec);olympe.sc.Ec.fontFamilyProp=olympe.sc.Ec.O.ka('01647e35ecd24ef0b88d');olympe.sc.Ec.G=olympe.sc.Ec.O.ka('01647e677f5d1cfbdf42');olympe.sc.Ec.K=olympe.sc.Ec.O.ka('01647e6780999bf8bd25');
1019
+ olympe.sc.Ec.O.C=(a,b,c,d)=>{c=olympe.sc.File.F(olympe.sc.Ec,a,b,c,d);a.update(c,olympe.sc.Ec.fontFamilyProp,b.split('.')[0]);return c};olympe.sc.Ec.prototype.K.L=olympe.D.J.F;olympe.sc.Ec.prototype.P.L=olympe.D.J.F;olympe.sc.Ec.prototype.T.L=olympe.D.J.G;olympe.sc.th=class extends olympe.sc.File{};olympe.sc.th.O=Xe(olympe.sc.File,'0164643c432146a71d5c',olympe.sc.th);olympe.sc.th.O.C=olympe.sc.File.F.bind(null,olympe.sc.th);olympe.sc.Qq=class extends olympe.dc.CloudObject{};olympe.sc.Qq.O=olympe.dc.na.C('016421bb3797e22d1c4e',olympe.sc.Qq);olympe.sc.logic={};olympe.sc.logic.Mo=(a,b)=>a===b?0:a>b?1:-1;
1020
1020
  olympe.sc.logic.Oz=(a,b,c,d,e,f,g)=>{const h=b.X();b=olympe.D.Ra(b.getType().X());let k,l;if(b===olympe.dc.ga(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.vb(h).toLowerCase();else if(b===olympe.dc.ga(olympe.dm.Number))k=c.valueOf(),l=p=>p.$c(h);else if(b===olympe.dc.ga(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.ta([p.Mi(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.ia().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
1021
1021
  return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.Mo(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.Mo(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.ak().filter(p=>olympe.D.ta([l(p)],q=>{q=n(q.valueOf(),k);return olympe.D.Xb(d.valueOf()?1===q:0<=q)},olympe.D.fa,'FilterList ListDefBuilder Filter TransformFlows')).hi())};
1022
1022
  olympe.sc.logic.vC=(a,b)=>{if(a instanceof olympe.D.ba)return a;if(a instanceof olympe.D.Na)return a.Gr();if(a instanceof olympe.D.fa)return a.rr();if('string'===typeof a||'number'===typeof a)return olympe.D.sa(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ba.sp};olympe.sc.logic.Ma={};function xm(a){bf(a.O,(b,c)=>{b=b.create(a.O.F);Y(b,olympe.dc.CloudObject.nameProp,c);return b.X()})}olympe.sc.logic.Ma.Do=class{constructor(a,b,c){this.O=olympe.dc.na.C(a,b,...c);xm(this)}X(){return this.O.X()}};olympe.sc.logic.Ma.Do.xa=[olympe.dc.Ie];const ym=Object.create(null),zm=new Map;function Am(a){if(void 0===ym[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Ze(a)}function Bm(a,b,c=olympe.sc.logic.Function){if(zm.has(a))throw c=Am(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.na.C(a,b,...[]);zm.set(a,{O:d,LC:b,sC:c});return d}
1023
1023
  olympe.sc.logic.na=class{constructor(){}static C(a,b,...c){if(ym[a])throw c=Am(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.Ma.Do(a,b,[olympe.sc.R.Ca].concat(c));return ym[a]=b}};olympe.sc.logic.Ey=class{};olympe.sc.logic.fj=class extends olympe.dc.CloudObject{};olympe.sc.logic.fj.O=olympe.dc.na.C('01621fb84e320000cf00',olympe.sc.logic.fj);function Nl(a,b,c){return new olympe.sc.logic.Error(a,b,c)}olympe.sc.logic.Error=class extends Error{constructor(a,b,c){super(a);this.code=b;this.C=null!=c?c:null}static create(a,b){return new olympe.sc.logic.Error(a,b)}uw(){return this.message}kr(){return this.code}ke(){let a;return null!=(a=this.C)?a:''}};olympe.sc.logic.Error.prototype.getStack=olympe.sc.logic.Error.prototype.ke;olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.kr;
1024
- olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.uw;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;olympe.sc.logic.Yh=class extends olympe.sc.logic.fj{};olympe.sc.logic.Yh.O=olympe.dc.na.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Yh);olympe.sc.logic.dd=class extends olympe.dc.CloudObject{C(){return this.qc(olympe.sc.logic.dd.C,olympe.dc.CloudObject)}};olympe.sc.logic.dd.O=olympe.dc.na.C('016ac4f59ee8ea2081ba',olympe.sc.logic.dd);olympe.sc.logic.dd.F=olympe.sc.logic.dd.O.ka('017bc044aeacce7ffc8f');olympe.sc.logic.dd.C=olympe.sc.logic.dd.O.ra('016ac4f5a0091c4790e2');T(olympe.dc.CloudObject.O,olympe.sc.logic.dd.C);olympe.sc.logic.dd.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.mh=class extends olympe.sc.logic.dd{};olympe.sc.logic.mh.O=olympe.dc.na.C('016ac4f59c592b862457',olympe.sc.logic.mh);olympe.sc.logic.mh.G=olympe.sc.gd.C.fc();olympe.sc.logic.mh.O.C=(a,b,c,d,e)=>{b=yk(a,b||'New Predefined Input',olympe.sc.logic.mh,olympe.sc.logic.tb);Y(b,olympe.sc.logic.dd.F,e);a.Ea(olympe.sc.logic.dd.C,b,c);a.Ea(olympe.sc.gd.C,d,b);return b.X()};olympe.sc.logic.rg=class extends olympe.sc.logic.dd{};olympe.sc.logic.rg.O=olympe.dc.na.C('016ac4f59dd99f5df3e1',olympe.sc.logic.rg);olympe.sc.logic.rg.G=T(olympe.sc.logic.rg.O,olympe.sc.gd.F);olympe.sc.logic.rg.O.C=(a,b,c,d,e)=>{b=yk(a,b||'New Predefined Output',olympe.sc.logic.rg,olympe.sc.logic.Bb);Y(b,olympe.sc.logic.dd.F,e);a.Ea(olympe.sc.logic.dd.C,b,c);a.Ea(olympe.sc.gd.F,d,b);return b.X()};olympe.sc.logic.qd=class extends olympe.sc.Ua{ne(){return olympe.sc.yd.we.uq}Z(){return this.Dm().ak().Qb([olympe.sc.logic.Function]).and().md().Qb([olympe.sc.logic.bd,olympe.sc.logic.cd]).hi()}G(){const a=olympe.dc.ga(olympe.sc.logic.Yh);return this.db.bb(this,olympe.sc.logic.qd.F).filter(b=>this.db.Nb(b,olympe.sc.logic.Rb.typeRel)===a)}C(a){const b=this.db.Am(this,[olympe.sc.Ua.G],c=>this.db.model(c)===olympe.dc.ga(a));return b?olympe.dc.CloudObject.get(b):null}F(a){const b=this.db.Am(this,[olympe.sc.Ua.F],
1025
- c=>this.db.model(c)===olympe.dc.ga(a));return b?olympe.dc.CloudObject.get(b):null}};olympe.sc.logic.qd.O=Bm('01621fb84e320000f000',olympe.sc.logic.qd,olympe.sc.logic.Function);olympe.sc.logic.qd.prototype.C.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.qd.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Ff=class extends olympe.sc.logic.qd{L(){return this.C('016ac63229782039429f')}P(){return this.F('016ac6322acf67eebfe7')}T(){return this.hp().ak().cb(olympe.sc.logic.Rb.typeRel).qk(olympe.sc.logic.Yh).hi().ff().Pm(olympe.D.ba.ZERO)}};olympe.sc.logic.Ff.C='016ac63229782039429f';olympe.sc.logic.Ff.L='016ac6322acf67eebfe7';olympe.sc.logic.Ff.O=Bm('01621fb84e320000a000',olympe.sc.logic.Ff,olympe.sc.logic.Action);olympe.sc.logic.Ff.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);
1026
- olympe.sc.logic.Ff.prototype.P.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Ff.prototype.T.K=olympe.D.J.P;olympe.sc.logic.Tn=class extends olympe.sc.logic.qd{};olympe.sc.logic.Tn.O=Bm('01621fb84e320000f011',olympe.sc.logic.Tn);olympe.sc.logic.Sn=class extends olympe.sc.logic.Ff{};olympe.sc.logic.Sn.O=Bm('01621fb84e320000f012',olympe.sc.logic.Sn);olympe.sc.logic.Function=class extends olympe.sc.Runnable{P(){return[this.ub]}T(){const a=olympe.sc.gg.C.ql,b=olympe.sc.gg.C.Hl,c=this.db,d=new Map,e=this.hc();c.bb(e,olympe.sc.Ua.G).forEach(f=>{d.set(a+c.name(f),f)});c.bb(e,olympe.sc.Ua.F).forEach(f=>{d.set(b+c.name(f),f)});return d}C(a){const b=olympe.dc.ga(olympe.sc.logic.fj),c=olympe.dc.ga(olympe.sc.logic.Yh);return this.getOutputs().map(d=>{switch(this.db.Nb(d,olympe.sc.logic.Rb.typeRel)){case b:return a.dn.bind(a,d);case c:return a.throw.bind(a);
1024
+ olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.uw;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;olympe.sc.logic.Yh=class extends olympe.sc.logic.fj{};olympe.sc.logic.Yh.O=olympe.dc.na.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Yh);olympe.sc.logic.dd=class extends olympe.dc.CloudObject{C(){return this.qc(olympe.sc.logic.dd.C,olympe.dc.CloudObject)}};olympe.sc.logic.dd.O=olympe.dc.na.C('016ac4f59ee8ea2081ba',olympe.sc.logic.dd);olympe.sc.logic.dd.F=olympe.sc.logic.dd.O.ka('017bc044aeacce7ffc8f');olympe.sc.logic.dd.C=olympe.sc.logic.dd.O.ra('016ac4f5a0091c4790e2');T(olympe.dc.CloudObject.O,olympe.sc.logic.dd.C);olympe.sc.logic.dd.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.mh=class extends olympe.sc.logic.dd{};olympe.sc.logic.mh.O=olympe.dc.na.C('016ac4f59c592b862457',olympe.sc.logic.mh);olympe.sc.logic.mh.G=olympe.sc.gd.C.fc();olympe.sc.logic.mh.O.C=(a,b,c,d,e)=>{b=yk(a,b||'New Predefined Input',olympe.sc.logic.mh,olympe.sc.logic.tb);Y(b,olympe.sc.logic.dd.F,e);a.Ea(olympe.sc.logic.dd.C,b,c);a.Ea(olympe.sc.gd.C,d,b);return b.X()};olympe.sc.logic.rg=class extends olympe.sc.logic.dd{};olympe.sc.logic.rg.O=olympe.dc.na.C('016ac4f59dd99f5df3e1',olympe.sc.logic.rg);olympe.sc.logic.rg.G=T(olympe.sc.logic.rg.O,olympe.sc.gd.F);olympe.sc.logic.rg.O.C=(a,b,c,d,e)=>{b=yk(a,b||'New Predefined Output',olympe.sc.logic.rg,olympe.sc.logic.Bb);Y(b,olympe.sc.logic.dd.F,e);a.Ea(olympe.sc.logic.dd.C,b,c);a.Ea(olympe.sc.gd.F,d,b);return b.X()};olympe.sc.logic.qd=class extends olympe.sc.Ua{ne(){return olympe.sc.yd.we.uq}Z(){return this.Dm().ak().Qb([olympe.sc.logic.Function]).and().md().Qb([olympe.sc.logic.bd,olympe.sc.logic.cd]).hi()}G(){const a=olympe.dc.ga(olympe.sc.logic.Yh);return this.db.bb(this,olympe.sc.logic.qd.F).filter(b=>this.db.Jb(b,olympe.sc.logic.Rb.typeRel)===a)}C(a){const b=this.db.Am(this,[olympe.sc.Ua.G],c=>this.db.model(c)===olympe.dc.ga(a));return b?olympe.dc.CloudObject.get(b):null}F(a){const b=this.db.Am(this,[olympe.sc.Ua.F],
1025
+ c=>this.db.model(c)===olympe.dc.ga(a));return b?olympe.dc.CloudObject.get(b):null}};olympe.sc.logic.qd.O=Bm('01621fb84e320000f000',olympe.sc.logic.qd,olympe.sc.logic.Function);olympe.sc.logic.qd.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.qd.prototype.F.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Ff=class extends olympe.sc.logic.qd{K(){return this.C('016ac63229782039429f')}P(){return this.F('016ac6322acf67eebfe7')}T(){return this.hp().ak().cb(olympe.sc.logic.Rb.typeRel).qk(olympe.sc.logic.Yh).hi().ff().Pm(olympe.D.ba.ZERO)}};olympe.sc.logic.Ff.C='016ac63229782039429f';olympe.sc.logic.Ff.K='016ac6322acf67eebfe7';olympe.sc.logic.Ff.O=Bm('01621fb84e320000a000',olympe.sc.logic.Ff,olympe.sc.logic.Action);olympe.sc.logic.Ff.prototype.K.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);
1026
+ olympe.sc.logic.Ff.prototype.P.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Ff.prototype.T.L=olympe.D.J.P;olympe.sc.logic.Tn=class extends olympe.sc.logic.qd{};olympe.sc.logic.Tn.O=Bm('01621fb84e320000f011',olympe.sc.logic.Tn);olympe.sc.logic.Sn=class extends olympe.sc.logic.Ff{};olympe.sc.logic.Sn.O=Bm('01621fb84e320000f012',olympe.sc.logic.Sn);olympe.sc.logic.Function=class extends olympe.sc.Runnable{P(){return[this.ub]}T(){const a=olympe.sc.gg.C.ql,b=olympe.sc.gg.C.Hl,c=this.db,d=new Map,e=this.hc();c.bb(e,olympe.sc.Ua.G).forEach(f=>{d.set(a+c.name(f),f)});c.bb(e,olympe.sc.Ua.F).forEach(f=>{d.set(b+c.name(f),f)});return d}C(a){const b=olympe.dc.ga(olympe.sc.logic.fj),c=olympe.dc.ga(olympe.sc.logic.Yh);return this.getOutputs().map(d=>{switch(this.db.Jb(d,olympe.sc.logic.Rb.typeRel)){case b:return a.dn.bind(a,d);case c:return a.throw.bind(a);
1027
1027
  default:return a.set.bind(a,d)}})}setupExecution(a){const b=this.getInputs();return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Function.O=olympe.dc.na.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.R.Ca);olympe.sc.logic.Rb=class extends olympe.dc.CloudObject{getType(){return this.qc(olympe.sc.logic.Rb.typeRel,olympe.dc.CloudObject)}C(){return this.$c(olympe.sc.logic.Rb.C)}};olympe.sc.logic.Rb.O=olympe.dc.na.C('0168a431d25001540000',olympe.sc.logic.Rb);olympe.sc.logic.Rb.C=olympe.sc.logic.Rb.O.ka('01740c5d4ae4b520dd01');olympe.sc.logic.Rb.typeRel=olympe.sc.logic.Rb.O.ra('0168a431d3b9b7438424');T(olympe.dc.CloudObject.O,olympe.sc.logic.Rb.typeRel);
1028
- olympe.sc.logic.Rb.prototype.getType.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Rb.prototype.C.K=olympe.D.J.G;olympe.sc.logic.tb=class extends olympe.sc.logic.Rb{};olympe.sc.logic.tb.O=olympe.dc.na.C('0168a431d25001540001',olympe.sc.logic.tb);olympe.sc.logic.tb.T=olympe.sc.logic.Rb.O.ka('01740c5d4ae4b520dd02');olympe.sc.logic.tb.P=T(olympe.sc.logic.tb.O,olympe.sc.Ua.G);olympe.sc.logic.tb.F=olympe.sc.logic.tb.O.ra('0168a431d91f2578000b',olympe.dc.ua.ORIGIN);olympe.sc.logic.tb.G=olympe.sc.logic.tb.O.ra('01621fb84e32000000a1',olympe.dc.ua.ORIGIN);
1029
- olympe.sc.logic.tb.L=olympe.sc.logic.tb.O.ra('01621fb84e32000000d1',olympe.dc.ua.ORIGIN);olympe.sc.logic.tb.O.C=function(a,b,c,d,e,f=olympe.sc.logic.tb){f=a.create(f);Y(f,olympe.dc.CloudObject.nameProp,b||'New input');a.Ea(olympe.sc.logic.Rb.typeRel,f,c);void 0!==e&&Y(f,olympe.sc.logic.Rb.C,e);d&&a.Ea(olympe.sc.Ua.G,d,f);return f.X()};olympe.sc.logic.Bb=class extends olympe.sc.logic.Rb{};olympe.sc.logic.Bb.O=olympe.dc.na.C('0168a431d25001540002',olympe.sc.logic.Bb);olympe.sc.logic.Bb.P=T(olympe.sc.logic.Bb.O,olympe.sc.Ua.F);olympe.sc.logic.Bb.F=olympe.sc.logic.Bb.O.ra('0168a431d91f25780003',olympe.dc.ua.ORIGIN);olympe.sc.logic.Bb.L=olympe.sc.logic.Bb.O.ra('01621fb84e32000000a2',olympe.dc.ua.ORIGIN);olympe.sc.logic.Bb.G=olympe.sc.logic.Bb.O.ra('01621fb84e32000000d2',olympe.dc.ua.ORIGIN);
1030
- olympe.sc.logic.Bb.O.C=function(a,b,c,d,e,f=olympe.sc.logic.Bb){f=a.create(f);Y(f,olympe.dc.CloudObject.nameProp,b||'New output');a.Ea(olympe.sc.logic.Rb.typeRel,f,c);void 0!==e&&Y(f,olympe.sc.logic.Rb.C,e);d&&a.Ea(olympe.sc.Ua.F,d,f);return f.X()};olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.vd().L().X();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:this.getInputs().filter(d=>d!==b).map(d=>a.get(d))))}};olympe.sc.logic.Action.O=olympe.dc.na.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.R.Ca);olympe.sc.logic.bd=class extends olympe.sc.logic.Function{run(a){nm(this,a);const b=a.getParent(),c=this.db.Nb(this,olympe.sc.logic.bd.G),d=this.db.Nb(this,olympe.sc.logic.bd.F);a.on(c,e=>b.set(d,e),this.tag)}za(){return this.qc(olympe.sc.logic.bd.G,olympe.sc.logic.tb)}Ja(){return this.qc(olympe.sc.logic.bd.F,olympe.sc.logic.Bb)}};olympe.sc.logic.bd.O=olympe.dc.na.C('01621fb84e32000000a0',olympe.sc.logic.bd,olympe.sc.R.Ca);olympe.sc.logic.bd.G=T(olympe.sc.logic.bd.O,olympe.sc.logic.tb.G);
1031
- olympe.sc.logic.bd.F=T(olympe.sc.logic.bd.O,olympe.sc.logic.Bb.L);olympe.sc.logic.bd.O.C=function(a,b,c){b=a.create(olympe.sc.logic.bd);a.Ea(olympe.sc.logic.bd.F,b,c);return b.X()};olympe.sc.logic.bd.prototype.za.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.bd.prototype.Ja.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.cd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.Nb(this,olympe.sc.logic.cd.F),d=this.db.Nb(this,olympe.sc.logic.cd.G);b.on(c,e=>a.set(d,e),b.V())}Ja(){return this.qc(olympe.sc.logic.cd.F,olympe.sc.logic.tb)}za(){return this.qc(olympe.sc.logic.cd.G,olympe.sc.logic.Bb)}};olympe.sc.logic.cd.O=olympe.dc.na.C('01621fb84e32000000d0',olympe.sc.logic.cd,olympe.sc.R.Ca);olympe.sc.logic.cd.F=T(olympe.sc.logic.cd.O,olympe.sc.logic.tb.L);
1032
- olympe.sc.logic.cd.G=T(olympe.sc.logic.cd.O,olympe.sc.logic.Bb.G);olympe.sc.logic.cd.O.C=function(a,b,c){b=a.create(olympe.sc.logic.cd);a.Ea(olympe.sc.logic.cd.F,b,c);return b.X()};olympe.sc.logic.cd.prototype.Ja.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.cd.prototype.za.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);function sm(a,b,c){var d;const e=null!=(d=a.db.Nb(a,olympe.sc.logic.ob.T))?d:a.db.Nb(a,olympe.sc.logic.ob.L),f=a.db.Nb(a,olympe.sc.logic.ob.P);if(null!==e&&null!==f){d=a.db.zf(Cm(a),olympe.dm.ue)?new olympe.D.$b('Pipe Context'):null;const k=a.C.bind(a,c,d);let l;const n=b.xk(f,p=>{let q;null==(q=l)||q();l=p.on(e,k,f)});return()=>{k(null);n();let p;null==(p=l)||p()}}const g=k=>c(olympe.dc.lb.vc(k)),h=Vf(a.db,a,olympe.sc.logic.ob.valueProp,g);return()=>{g(null);Wf(a.db,a,olympe.sc.logic.ob.valueProp,
1033
- h)}}function Cm(a){let b=null,c=a.db.Nb(a,olympe.sc.logic.ob.F);c?b=a.db.Nb(c,olympe.dm.Property.typeRel):(c=a.db.Nb(a,olympe.sc.logic.ob.C))&&(b=a.db.Nb(c,olympe.sc.logic.Rb.typeRel));return b||olympe.dc.ga(olympe.dc.CloudObject)}
1028
+ olympe.sc.logic.Rb.prototype.getType.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Rb.prototype.C.L=olympe.D.J.G;olympe.sc.logic.tb=class extends olympe.sc.logic.Rb{};olympe.sc.logic.tb.O=olympe.dc.na.C('0168a431d25001540001',olympe.sc.logic.tb);olympe.sc.logic.tb.T=olympe.sc.logic.Rb.O.ka('01740c5d4ae4b520dd02');olympe.sc.logic.tb.P=T(olympe.sc.logic.tb.O,olympe.sc.Ua.G);olympe.sc.logic.tb.F=olympe.sc.logic.tb.O.ra('0168a431d91f2578000b',olympe.dc.ua.ORIGIN);olympe.sc.logic.tb.G=olympe.sc.logic.tb.O.ra('01621fb84e32000000a1',olympe.dc.ua.ORIGIN);
1029
+ olympe.sc.logic.tb.K=olympe.sc.logic.tb.O.ra('01621fb84e32000000d1',olympe.dc.ua.ORIGIN);olympe.sc.logic.tb.O.C=function(a,b,c,d,e,f=olympe.sc.logic.tb){f=a.create(f);Y(f,olympe.dc.CloudObject.nameProp,b||'New input');a.Ea(olympe.sc.logic.Rb.typeRel,f,c);void 0!==e&&Y(f,olympe.sc.logic.Rb.C,e);d&&a.Ea(olympe.sc.Ua.G,d,f);return f.X()};olympe.sc.logic.Bb=class extends olympe.sc.logic.Rb{};olympe.sc.logic.Bb.O=olympe.dc.na.C('0168a431d25001540002',olympe.sc.logic.Bb);olympe.sc.logic.Bb.P=T(olympe.sc.logic.Bb.O,olympe.sc.Ua.F);olympe.sc.logic.Bb.F=olympe.sc.logic.Bb.O.ra('0168a431d91f25780003',olympe.dc.ua.ORIGIN);olympe.sc.logic.Bb.K=olympe.sc.logic.Bb.O.ra('01621fb84e32000000a2',olympe.dc.ua.ORIGIN);olympe.sc.logic.Bb.G=olympe.sc.logic.Bb.O.ra('01621fb84e32000000d2',olympe.dc.ua.ORIGIN);
1030
+ olympe.sc.logic.Bb.O.C=function(a,b,c,d,e,f=olympe.sc.logic.Bb){f=a.create(f);Y(f,olympe.dc.CloudObject.nameProp,b||'New output');a.Ea(olympe.sc.logic.Rb.typeRel,f,c);void 0!==e&&Y(f,olympe.sc.logic.Rb.C,e);d&&a.Ea(olympe.sc.Ua.F,d,f);return f.X()};olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.vd().K().X();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:this.getInputs().filter(d=>d!==b).map(d=>a.get(d))))}};olympe.sc.logic.Action.O=olympe.dc.na.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.R.Ca);olympe.sc.logic.bd=class extends olympe.sc.logic.Function{run(a){nm(this,a);const b=a.getParent(),c=this.db.Jb(this,olympe.sc.logic.bd.G),d=this.db.Jb(this,olympe.sc.logic.bd.F);a.on(c,e=>b.set(d,e),this.tag)}za(){return this.qc(olympe.sc.logic.bd.G,olympe.sc.logic.tb)}Ja(){return this.qc(olympe.sc.logic.bd.F,olympe.sc.logic.Bb)}};olympe.sc.logic.bd.O=olympe.dc.na.C('01621fb84e32000000a0',olympe.sc.logic.bd,olympe.sc.R.Ca);olympe.sc.logic.bd.G=T(olympe.sc.logic.bd.O,olympe.sc.logic.tb.G);
1031
+ olympe.sc.logic.bd.F=T(olympe.sc.logic.bd.O,olympe.sc.logic.Bb.K);olympe.sc.logic.bd.O.C=function(a,b,c){b=a.create(olympe.sc.logic.bd);a.Ea(olympe.sc.logic.bd.F,b,c);return b.X()};olympe.sc.logic.bd.prototype.za.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.bd.prototype.Ja.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.cd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.Jb(this,olympe.sc.logic.cd.F),d=this.db.Jb(this,olympe.sc.logic.cd.G);b.on(c,e=>a.set(d,e),b.V())}Ja(){return this.qc(olympe.sc.logic.cd.F,olympe.sc.logic.tb)}za(){return this.qc(olympe.sc.logic.cd.G,olympe.sc.logic.Bb)}};olympe.sc.logic.cd.O=olympe.dc.na.C('01621fb84e32000000d0',olympe.sc.logic.cd,olympe.sc.R.Ca);olympe.sc.logic.cd.F=T(olympe.sc.logic.cd.O,olympe.sc.logic.tb.K);
1032
+ olympe.sc.logic.cd.G=T(olympe.sc.logic.cd.O,olympe.sc.logic.Bb.G);olympe.sc.logic.cd.O.C=function(a,b,c){b=a.create(olympe.sc.logic.cd);a.Ea(olympe.sc.logic.cd.F,b,c);return b.X()};olympe.sc.logic.cd.prototype.Ja.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.cd.prototype.za.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);function sm(a,b,c){var d;const e=null!=(d=a.db.Jb(a,olympe.sc.logic.ob.T))?d:a.db.Jb(a,olympe.sc.logic.ob.K),f=a.db.Jb(a,olympe.sc.logic.ob.P);if(null!==e&&null!==f){d=a.db.zf(Cm(a),olympe.dm.ue)?new olympe.D.$b('Pipe Context'):null;const k=a.C.bind(a,c,d);let l;const n=b.xk(f,p=>{let q;null==(q=l)||q();l=p.on(e,k,f)});return()=>{k(null);n();let p;null==(p=l)||p()}}const g=k=>c(olympe.dc.lb.vc(k)),h=Vf(a.db,a,olympe.sc.logic.ob.valueProp,g);return()=>{g(null);Wf(a.db,a,olympe.sc.logic.ob.valueProp,
1033
+ h)}}function Cm(a){let b=null,c=a.db.Jb(a,olympe.sc.logic.ob.F);c?b=a.db.Jb(c,olympe.dm.Property.typeRel):(c=a.db.Jb(a,olympe.sc.logic.ob.C))&&(b=a.db.Jb(c,olympe.sc.logic.Rb.typeRel));return b||olympe.dc.ga(olympe.dc.CloudObject)}
1034
1034
  olympe.sc.logic.ob=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.H=c}C(a,b,c){const d=olympe.sc.Fi(c);null==b||b.oa();b&&d instanceof olympe.dm.ue?null==b||b.run(()=>{olympe.D.Ic([d.getValue()],e=>{a(e.valueOf())})}):a(d)}getValue(a){return this.yf(olympe.sc.logic.ob.valueProp,a||olympe.dc.lb.Fi,Object)}getType(){const a=this.transform(olympe.sc.logic.ob.C,olympe.sc.logic.Rb.typeRel);a.Gd(olympe.dc.CloudObject);return a.Cc()}Mw(){return this.qc(olympe.sc.logic.ob.P,olympe.dc.CloudObject)}Kw(){return this.qc(olympe.sc.logic.ob.T,
1035
- olympe.sc.logic.Bb)}Lw(){return this.qc(olympe.sc.logic.ob.L,olympe.dm.Property)}gw(){return this.qc(olympe.sc.logic.ob.G,olympe.dc.CloudObject)}ew(){return this.qc(olympe.sc.logic.ob.C,olympe.sc.logic.tb)}fw(){return this.qc(olympe.sc.logic.ob.F,olympe.dm.Property)}};olympe.sc.logic.ob.O=olympe.dc.na.C('0168a431d91f25780000',olympe.sc.logic.ob,olympe.sc.R.Ca);olympe.sc.logic.ob.valueProp=olympe.sc.logic.ob.O.ka('0168a431d91f25780001');olympe.sc.logic.ob.P=olympe.sc.logic.ob.O.ra('0168a431d91f25780002');
1036
- olympe.sc.logic.ob.T=T(olympe.sc.logic.ob.O,olympe.sc.logic.Bb.F);olympe.sc.logic.ob.L=olympe.sc.logic.ob.O.ra('0168a431d91f25780004');olympe.sc.logic.ob.G=olympe.sc.logic.ob.O.ra('0168a431d91f2578000a');olympe.sc.logic.ob.C=T(olympe.sc.logic.ob.O,olympe.sc.logic.tb.F);olympe.sc.logic.ob.F=olympe.sc.logic.ob.O.ra('0168a431d91f2578000c');T(olympe.dc.CloudObject.O,olympe.sc.logic.ob.P);T(olympe.dm.Property.O,olympe.sc.logic.ob.L);T(olympe.dc.CloudObject.O,olympe.sc.logic.ob.G);
1037
- T(olympe.dm.Property.O,olympe.sc.logic.ob.F);m=olympe.sc.logic.ob.prototype;m.getType.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Mw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Kw.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.Lw.K=new olympe.D.J(()=>olympe.dm.Property,[]);m.gw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.ew.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.fw.K=new olympe.D.J(()=>olympe.dm.Property,[]);function Dm(a,b){const c=a.vd(),d=c.vl().X(),e=c.wl().X(),f=c.xl().X();b.on(d,g=>{if(g){g=new Map(a.getInputs().map(k=>[k,b.get(k)]));const h={timeout:a.timeout};olympe.N.xb.get(a.hc(),g,h).then(k=>{for(const [l,n]of k)l!==e&&l!==f&&b.set(l,n);b.set(e,k.get(e));k=k.get(f);k instanceof olympe.sc.logic.Error&&(k=Nl(k.message,k.code,k.ke()+'\n===== Remote Call =====\n'+b.ke()),b.throw(k))}).catch(k=>{k=`RemoteAction "${a.Vb().name()}" (${a.tag}) encountered an error:\n${k}`;a.H.error(k);b.throw(olympe.sc.logic.Error.create(k,
1035
+ olympe.sc.logic.Bb)}Lw(){return this.qc(olympe.sc.logic.ob.K,olympe.dm.Property)}gw(){return this.qc(olympe.sc.logic.ob.G,olympe.dc.CloudObject)}ew(){return this.qc(olympe.sc.logic.ob.C,olympe.sc.logic.tb)}fw(){return this.qc(olympe.sc.logic.ob.F,olympe.dm.Property)}};olympe.sc.logic.ob.O=olympe.dc.na.C('0168a431d91f25780000',olympe.sc.logic.ob,olympe.sc.R.Ca);olympe.sc.logic.ob.valueProp=olympe.sc.logic.ob.O.ka('0168a431d91f25780001');olympe.sc.logic.ob.P=olympe.sc.logic.ob.O.ra('0168a431d91f25780002');
1036
+ olympe.sc.logic.ob.T=T(olympe.sc.logic.ob.O,olympe.sc.logic.Bb.F);olympe.sc.logic.ob.K=olympe.sc.logic.ob.O.ra('0168a431d91f25780004');olympe.sc.logic.ob.G=olympe.sc.logic.ob.O.ra('0168a431d91f2578000a');olympe.sc.logic.ob.C=T(olympe.sc.logic.ob.O,olympe.sc.logic.tb.F);olympe.sc.logic.ob.F=olympe.sc.logic.ob.O.ra('0168a431d91f2578000c');T(olympe.dc.CloudObject.O,olympe.sc.logic.ob.P);T(olympe.dm.Property.O,olympe.sc.logic.ob.K);T(olympe.dc.CloudObject.O,olympe.sc.logic.ob.G);
1037
+ T(olympe.dm.Property.O,olympe.sc.logic.ob.F);m=olympe.sc.logic.ob.prototype;m.getType.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Mw.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Kw.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.Lw.L=new olympe.D.J(()=>olympe.dm.Property,[]);m.gw.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.ew.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.fw.L=new olympe.D.J(()=>olympe.dm.Property,[]);function Dm(a,b){const c=a.vd(),d=c.vl().X(),e=c.wl().X(),f=c.xl().X();b.on(d,g=>{if(g){g=new Map(a.getInputs().map(k=>[k,b.get(k)]));const h={timeout:a.timeout};olympe.N.xb.get(a.hc(),g,h).then(k=>{for(const [l,n]of k)l!==e&&l!==f&&b.set(l,n);b.set(e,k.get(e));k=k.get(f);k instanceof olympe.sc.logic.Error&&(k=Nl(k.message,k.code,k.ke()+'\n===== Remote Call =====\n'+b.ke()),b.throw(k))}).catch(k=>{k=`RemoteAction "${a.Vb().name()}" (${a.tag}) encountered an error:\n${k}`;a.H.error(k);b.throw(olympe.sc.logic.Error.create(k,
1038
1038
  400))})}},b.V())}
1039
1039
  function Em(a,b,c,d,e,f){const g=n=>v(function*(){if(null!==n){e.cancel();let p;null==(p=k)||p();let q;null==(q=l)||q();try{const r=new Map(a.getOutputs().map(t=>[t,b.get(t)]));yield f.nd(r)}catch(r){const t=Error(`Error while trying to send the response of remote action ${a.Vb().name()} (${a.hc()}): ${r}`);f.Ch(t).catch(u=>{a.H.error(`Cannot reply with an error to a remote action call ${a.Vb().name()} (${a.hc()}): ${u}`)})}finally{b.destroy()}}}),h=b.V(),k=b.on(c,g,h),l=b.on(d,g,h)}
1040
1040
  olympe.sc.logic.ph=class extends olympe.sc.logic.Function{constructor(a,b,c,d){super(a,b,c);this.timeout=d}run(a){let b;null!=(b=a.Ra(olympe.sc.wa.C.EDITION))&&b||(this.db.Ia(this,olympe.sc.logic.ph.F)?this.za(a):(nm(this,a),Dm(this,a)))}za(a){const b=this.hc(),c=this.vd(),d=c.ip().X(),e=c.vl().X(),f=c.wl().X(),g=c.xl().X();(new olympe.N.xb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.Ah('remote call'),l=h.body(),n=Ub(()=>{h.Ch(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
1041
1041
  k.destroy()},this.timeout);Em(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.Nh().then(p=>{var q=k.get(d);null!==q&&olympe.dc.ga(q)!==p&&(q=this.hc(),this.H.warn(`Remote action ${this.db.name(q)} ${q}: try to run it with an input user that is not the real authenticated user.`));k.set(d,p);k.set(e,l.get(e))}).catch(p=>{const q=this.hc();this.H.warn(`Remote action ${this.db.name(q)} ${q} Triggered by unrecognized user: ${p}.`);k.set(g,olympe.sc.logic.Error.create('Unrecognized User',
1042
1042
  1))})},h=>{const k=this.hc();this.H.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}};olympe.sc.logic.ph.O=olympe.dc.na.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.ph,olympe.sc.R.Ca,new olympe.W.ja(olympe.sc.U.$p));olympe.sc.logic.ph.F=olympe.sc.logic.ph.O.ka('017a7b0c62a02a89444f');olympe.sc.logic.controllers={};olympe.sc.logic.controllers.rl=class{constructor(a){this.db=olympe.dc.ia();this.typeRel=a}};olympe.sc.logic.controllers.rl.C={Hy:-1,Iz:1};olympe.sc.logic.controllers.wA=class extends olympe.sc.logic.controllers.rl{constructor(){super(olympe.sc.logic.dd.C)}};olympe.sc.logic.controllers.DA=class extends olympe.sc.logic.controllers.rl{constructor(){super(olympe.sc.logic.Rb.typeRel)}};olympe.sc.logic.fk={};olympe.sc.logic.fk.Gu=class extends olympe.sc.logic.Function{update(a,[b],[c]){const d=olympe.dc.ga(b);d?olympe.dc.pa.ec(a,d,olympe.dc.Zb.Of).subscribe(()=>{c(olympe.dc.CloudObject.get(d))}):this.H.warn('Cannot subscribe to an instance with no tag: '+d)}};olympe.sc.logic.na.C('0174bf4b7e006e4b788a',olympe.sc.logic.fk.Gu);olympe.sc.logic.actions={};olympe.sc.logic.fk.Ht=class extends olympe.sc.logic.Function{run(a){nm(this,a);const [b,c,d]=this.C(a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.H.warn('No list to iter upon'),this.H.info(a.V())):f<e?(b(g.Ue(f)),f++,c(Date.now())):(cm(h.C),d(Date.now()))};this.getInputs().forEach((l,n)=>a.on(l,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.Vf();f=0;bm(h.C);k();break;case 2:k();break;default:this.H.error('Unhandled input')}},this.tag))}};
1043
- olympe.sc.logic.na.C('0171889b060b6cd54300',olympe.sc.logic.fk.Ht);olympe.sc.logic.Pb={};olympe.sc.logic.Pb.el=class extends olympe.sc.logic.qd{L(){return this.C('016ac638085357047a2d')}};olympe.sc.logic.Pb.el.O=Bm('0169b6876a03f14ae61b',olympe.sc.logic.Pb.el);olympe.sc.logic.Pb.el.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.sl=class extends olympe.sc.logic.qd{L(){return this.C('016ac63808535703691c')}};olympe.sc.logic.Pb.sl.O=Bm('0169b6876a03f139d50a',olympe.sc.logic.Pb.sl);olympe.sc.logic.Pb.sl.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.Il=class extends olympe.sc.logic.qd{L(){return this.C('016ac63809a9a8e6db96')}P(){return this.F('016ac6380ab003363b3e')}};Bm('01646ad602f933b8caaf',olympe.sc.logic.Pb.Il);olympe.sc.logic.Pb.Il.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.Il.prototype.P.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Pb.zj=class extends olympe.sc.logic.qd{L(){return this.C('016ac6380bd98f1d91a0')}T(){return this.F('016ac63c589ae38ca3ae')}P(){return this.F('016ac63c5a377fceabaa')}};Bm('0168ec42fc01747a98b6',olympe.sc.logic.Pb.zj);olympe.sc.logic.Pb.zj.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.zj.prototype.T.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Pb.zj.prototype.P.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Pb.vg=class extends olympe.sc.logic.qd{vl(){return this.C('017a7b07b09e3b22c8b4')}ip(){return this.C('017a7b07ba05807a74b0')}wl(){return this.F('017a7b0818c12388d731')}xl(){return this.F('017a7b085146d5e69aec')}qt(){return olympe.D.fa.F}};olympe.sc.logic.Pb.vg.L='017a7b07b09e3b22c8b4';olympe.sc.logic.Pb.vg.Tb='017a7b07ba05807a74b0';olympe.sc.logic.Pb.vg.Ja='017a7b0818c12388d731';olympe.sc.logic.Pb.vg.C='017a7b085146d5e69aec';
1044
- olympe.sc.logic.Pb.vg.O=Bm('017a7b07a948e30508fa',olympe.sc.logic.Pb.vg,olympe.sc.logic.ph);m=olympe.sc.logic.Pb.vg.prototype;m.vl.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.ip.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.wl.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.xl.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.qt.K=olympe.D.J.P;olympe.sc.logic.Pb.zq=class extends olympe.sc.logic.qd{L(){return this.C('016ac63c5b3ed0562740')}};Bm('016a9766c230916ea5ec',olympe.sc.logic.Pb.zq);olympe.sc.logic.Pb.zq.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.query={};olympe.sc.query.tn=class extends olympe.sc.og{};olympe.sc.query.tn.O=olympe.dc.na.C('01631aacd8276ea98491',olympe.sc.query.tn);olympe.sc.query.Kp=class extends olympe.dm.Enum{};olympe.sc.query.Kp.O=olympe.dc.na.C('01631aacd8276ea98495',olympe.sc.query.Kp);olympe.sc.query.Up=class extends olympe.dm.Enum{};olympe.sc.query.Up.O=olympe.dc.na.C('01631aacd8276ea98494',olympe.sc.query.Up);olympe.sc.query.Vp=class extends olympe.sc.og{};olympe.sc.query.Vp.O=olympe.dc.na.C('01631aacd8276ea98492',olympe.sc.query.Vp);olympe.sc.query.Xc=class extends olympe.dc.CloudObject{};olympe.sc.query.Xc.O=olympe.dc.na.C('01631aacd8276ea98493',olympe.sc.query.Xc);olympe.sc.Xn=class extends olympe.dc.CloudObject{};olympe.sc.Xn.O=olympe.dc.na.C('018312ceeb3e93618a85',olympe.sc.Xn);olympe.sc.Mb={};olympe.sc.Mb.Comment=class extends olympe.dm.BrickMetadata{getType(){return this.vb(olympe.sc.Mb.Comment.T)}F(){return this.vb(olympe.sc.Mb.Comment.G)}C(){return new olympe.D.Sb(this.$c(olympe.sc.Mb.Comment.L),this.$c(olympe.sc.Mb.Comment.F))}static Pc(a,b,c,...d){c=d[0];d=d[1];b=a.create(b);b.X();a.Ea(olympe.dc.CloudObject.containsRel,c,b);a.Ea(olympe.sc.Mb.Comment.C,b,c);c=a.create(olympe.sc.ui.yd.Tp);Y(c,olympe.sc.ui.yd.Tp.lD,d.fp());Y(c,olympe.sc.ui.yd.Tp.mD,d.gp());a.Ea(olympe.dm.BrickMetadata.oa,
1045
- b,c);a.Ea(olympe.dc.CloudObject.containsRel,b,c)}};olympe.sc.Mb.Comment.Z=100;olympe.sc.Mb.Comment.P=66;olympe.sc.Mb.Comment.O=olympe.dc.na.C('0184bd886ee1c7adfe09',olympe.sc.Mb.Comment);olympe.sc.Mb.Comment.T=olympe.sc.Mb.Comment.O.ka('0184c80e29ed08a16c5e');olympe.sc.Mb.Comment.G=olympe.sc.Mb.Comment.O.ka('0184bd889f33359cfe75');olympe.sc.Mb.Comment.L=olympe.sc.Mb.Comment.O.ka('0184c3f9406e25a41512');olympe.sc.Mb.Comment.F=olympe.sc.Mb.Comment.O.ka('0184c3f942e4cc136ce8');
1046
- olympe.sc.Mb.Comment.C=olympe.sc.Mb.Comment.O.ra('0184be3f135a83fd6cc3');olympe.sc.Mb.Comment.prototype.getType.K=olympe.D.J.F;olympe.sc.Mb.Comment.prototype.F.K=olympe.D.J.F;olympe.sc.Mb.Comment.prototype.C.K=olympe.D.J.T;olympe.sc.Mb.Uk=class extends olympe.dm.Enum{};olympe.sc.Mb.Uk.C={xy:'Comment',KB:'Todo'};olympe.sc.Mb.Uk.O=olympe.dc.na.C('0184cc42e06205501bc7',olympe.sc.Mb.Uk);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.na.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13a');
1043
+ olympe.sc.logic.na.C('0171889b060b6cd54300',olympe.sc.logic.fk.Ht);olympe.sc.logic.Pb={};olympe.sc.logic.Pb.el=class extends olympe.sc.logic.qd{K(){return this.C('016ac638085357047a2d')}};olympe.sc.logic.Pb.el.O=Bm('0169b6876a03f14ae61b',olympe.sc.logic.Pb.el);olympe.sc.logic.Pb.el.prototype.K.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.sl=class extends olympe.sc.logic.qd{K(){return this.C('016ac63808535703691c')}};olympe.sc.logic.Pb.sl.O=Bm('0169b6876a03f139d50a',olympe.sc.logic.Pb.sl);olympe.sc.logic.Pb.sl.prototype.K.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.Il=class extends olympe.sc.logic.qd{K(){return this.C('016ac63809a9a8e6db96')}P(){return this.F('016ac6380ab003363b3e')}};Bm('01646ad602f933b8caaf',olympe.sc.logic.Pb.Il);olympe.sc.logic.Pb.Il.prototype.K.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.Il.prototype.P.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Pb.zj=class extends olympe.sc.logic.qd{K(){return this.C('016ac6380bd98f1d91a0')}T(){return this.F('016ac63c589ae38ca3ae')}P(){return this.F('016ac63c5a377fceabaa')}};Bm('0168ec42fc01747a98b6',olympe.sc.logic.Pb.zj);olympe.sc.logic.Pb.zj.prototype.K.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.logic.Pb.zj.prototype.T.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Pb.zj.prototype.P.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.logic.Pb.vg=class extends olympe.sc.logic.qd{vl(){return this.C('017a7b07b09e3b22c8b4')}ip(){return this.C('017a7b07ba05807a74b0')}wl(){return this.F('017a7b0818c12388d731')}xl(){return this.F('017a7b085146d5e69aec')}qt(){return olympe.D.fa.F}};olympe.sc.logic.Pb.vg.K='017a7b07b09e3b22c8b4';olympe.sc.logic.Pb.vg.Tb='017a7b07ba05807a74b0';olympe.sc.logic.Pb.vg.Ja='017a7b0818c12388d731';olympe.sc.logic.Pb.vg.C='017a7b085146d5e69aec';
1044
+ olympe.sc.logic.Pb.vg.O=Bm('017a7b07a948e30508fa',olympe.sc.logic.Pb.vg,olympe.sc.logic.ph);m=olympe.sc.logic.Pb.vg.prototype;m.vl.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.ip.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.wl.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.xl.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.qt.L=olympe.D.J.P;olympe.sc.logic.Pb.zq=class extends olympe.sc.logic.qd{K(){return this.C('016ac63c5b3ed0562740')}};Bm('016a9766c230916ea5ec',olympe.sc.logic.Pb.zq);olympe.sc.logic.Pb.zq.prototype.K.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);olympe.sc.query={};olympe.sc.query.tn=class extends olympe.sc.og{};olympe.sc.query.tn.O=olympe.dc.na.C('01631aacd8276ea98491',olympe.sc.query.tn);olympe.sc.query.Kp=class extends olympe.dm.Enum{};olympe.sc.query.Kp.O=olympe.dc.na.C('01631aacd8276ea98495',olympe.sc.query.Kp);olympe.sc.query.Up=class extends olympe.dm.Enum{};olympe.sc.query.Up.O=olympe.dc.na.C('01631aacd8276ea98494',olympe.sc.query.Up);olympe.sc.query.Vp=class extends olympe.sc.og{};olympe.sc.query.Vp.O=olympe.dc.na.C('01631aacd8276ea98492',olympe.sc.query.Vp);olympe.sc.query.Xc=class extends olympe.dc.CloudObject{};olympe.sc.query.Xc.O=olympe.dc.na.C('01631aacd8276ea98493',olympe.sc.query.Xc);olympe.sc.Xn=class extends olympe.dc.CloudObject{};olympe.sc.Xn.O=olympe.dc.na.C('018312ceeb3e93618a85',olympe.sc.Xn);olympe.sc.Nb={};olympe.sc.Nb.Comment=class extends olympe.dm.BrickMetadata{getType(){return this.vb(olympe.sc.Nb.Comment.T)}F(){return this.vb(olympe.sc.Nb.Comment.G)}C(){return new olympe.D.Sb(this.$c(olympe.sc.Nb.Comment.K),this.$c(olympe.sc.Nb.Comment.F))}static Pc(a,b,c,...d){c=d[0];d=d[1];b=a.create(b);b.X();a.Ea(olympe.dc.CloudObject.containsRel,c,b);a.Ea(olympe.sc.Nb.Comment.C,b,c);c=a.create(olympe.sc.ui.yd.Tp);Y(c,olympe.sc.ui.yd.Tp.lD,d.fp());Y(c,olympe.sc.ui.yd.Tp.mD,d.gp());a.Ea(olympe.dm.BrickMetadata.oa,
1045
+ b,c);a.Ea(olympe.dc.CloudObject.containsRel,b,c)}};olympe.sc.Nb.Comment.Z=100;olympe.sc.Nb.Comment.P=66;olympe.sc.Nb.Comment.O=olympe.dc.na.C('0184bd886ee1c7adfe09',olympe.sc.Nb.Comment);olympe.sc.Nb.Comment.T=olympe.sc.Nb.Comment.O.ka('0184c80e29ed08a16c5e');olympe.sc.Nb.Comment.G=olympe.sc.Nb.Comment.O.ka('0184bd889f33359cfe75');olympe.sc.Nb.Comment.K=olympe.sc.Nb.Comment.O.ka('0184c3f9406e25a41512');olympe.sc.Nb.Comment.F=olympe.sc.Nb.Comment.O.ka('0184c3f942e4cc136ce8');
1046
+ olympe.sc.Nb.Comment.C=olympe.sc.Nb.Comment.O.ra('0184be3f135a83fd6cc3');olympe.sc.Nb.Comment.prototype.getType.L=olympe.D.J.F;olympe.sc.Nb.Comment.prototype.F.L=olympe.D.J.F;olympe.sc.Nb.Comment.prototype.C.L=olympe.D.J.T;olympe.sc.Nb.Uk=class extends olympe.dm.Enum{};olympe.sc.Nb.Uk.C={xy:'Comment',KB:'Todo'};olympe.sc.Nb.Uk.O=olympe.dc.na.C('0184cc42e06205501bc7',olympe.sc.Nb.Uk);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.na.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13a');
1047
1047
  olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.ra('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.ra('017ffdd8f0b1e31fe13f');olympe.sc.workflow.jf=class extends olympe.sc.logic.qd{rt(){return this.C('017ffe02381f9fac5060')}ut(){return this.C('017ffe02381f9fac5061')}vt(){return this.C('017ffe02381f9fac5062')}cw(){return this.C('017ffe02381f9fac5065')}st(){return this.F('017ffe02381f9fac5063')}tt(){return this.F('017ffe02381f9fac5064')}};olympe.sc.workflow.jf.O=Bm('017ffde21f5fe0f704ce',olympe.sc.workflow.jf);olympe.sc.workflow.jf.C='017ffe02381f9fac5060';olympe.sc.workflow.jf.ye='017ffe02381f9fac5061';
1048
- olympe.sc.workflow.jf.Qe='017ffe02381f9fac5062';olympe.sc.workflow.jf.Ja='017ffe02381f9fac5065';olympe.sc.workflow.jf.L='017ffe02381f9fac5063';olympe.sc.workflow.jf.Tb='017ffe02381f9fac5064';m=olympe.sc.workflow.jf.prototype;m.rt.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.ut.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.vt.K=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.cw.K=new olympe.D.J(()=>Map,[]);m.st.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.tt.K=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.workflow.Pe=class extends olympe.dm.BrickMetadata{Kc(){return this.qc(olympe.sc.workflow.Workflow.statesRel.fc(),olympe.sc.workflow.Workflow).la().concat(['.',this.la()])}};olympe.sc.workflow.Pe.O=olympe.dc.na.C('017ffdc2dda51d46b430',olympe.sc.workflow.Pe);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.ur()}C(){return this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Pe)}G(){return this.qc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Pe)}Kc(){const a=this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Pe);return a.qc(olympe.sc.workflow.Workflow.statesRel.fc(),olympe.sc.workflow.Workflow).la().concat(['.',a.la(),'->',this.la()])}};
1049
- olympe.sc.workflow.Transition.O=olympe.dc.na.C('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.O.ka('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.O.ra('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.O.ra('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.F.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
1050
- olympe.sc.workflow.Transition.prototype.C.K=new olympe.D.J(()=>olympe.sc.workflow.Pe,[]);olympe.sc.workflow.Transition.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Pe,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.ah}G(){return this.Lg(olympe.sc.workflow.Workflow.serializationEnabledProp)}C(){return this.qc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.zc)}F(){return this.qc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.Pe)}};olympe.sc.workflow.Workflow.O=olympe.dc.na.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.ka('017ffdc010e5bcc9c972');
1051
- olympe.sc.workflow.Workflow.dataTypeRel=olympe.sc.workflow.Workflow.O.ra('017ffdc010e5bcc9c973');olympe.sc.workflow.Workflow.statesRel=olympe.sc.workflow.Workflow.O.ra('017ffdc010e5bcc9c974');olympe.sc.workflow.Workflow.initialStateRel=olympe.sc.workflow.Workflow.O.ra('017ffdc010e5bcc9c975');olympe.sc.workflow.Workflow.prototype.G.K=olympe.D.J.P;olympe.sc.workflow.Workflow.prototype.C.K=new olympe.D.J(()=>olympe.sc.zc,[]);
1052
- olympe.sc.workflow.Workflow.prototype.F.K=new olympe.D.J(()=>olympe.sc.workflow.Pe,[]);olympe.sc.qa={};olympe.sc.qa.Nc=class extends olympe.sc.Ua{ne(){return olympe.sc.yd.we.su}};olympe.sc.qa.Nc.O=olympe.dc.na.C('01120300000000adef00',olympe.sc.qa.Nc);olympe.sc.qa.Nc.C=olympe.sc.qa.Nc.O.ra('0171bc1f15da96dfdb89');olympe.sc.qa.Nc.Ja=olympe.sc.qa.Nc.O.ra('0171bc1f15da96dfdb90');T(olympe.dm.Fc.O,olympe.sc.qa.Nc.C);olympe.sc.qa.Qh=class extends olympe.sc.Runnable{G(){return[this.hc()]}za(){return olympe.dc.ed.from(this.hc()).cb(olympe.sc.qa.Nc.C).ld()}};olympe.sc.qa.Qh.O=cf(olympe.dc.na.C('0113030000000aca1100',olympe.sc.qa.Qh));olympe.sc.qa.Qh.prototype.za.K=new olympe.D.J(()=>olympe.dm.hb,[]);olympe.sc.qa.kb=class extends olympe.dc.CloudObject{xt(){return this.Lg(olympe.sc.qa.kb.xh)}px(){return this.Lg(olympe.sc.qa.kb.oa)}Dc(){return this.$c(olympe.sc.qa.kb.C)}iw(){return this.vb(olympe.sc.qa.kb.L)}Ew(){return this.vb(olympe.sc.qa.kb.ea)}Dw(){return this.vb(olympe.sc.qa.kb.Z)}Ae(){return this.vb(olympe.sc.qa.kb.aa)}tw(){return this.vb(olympe.sc.qa.kb.P)}Sv(){return this.vb(olympe.sc.qa.kb.F)}Cw(){return this.vb(olympe.sc.qa.kb.T)}wt(){return this.vb(olympe.sc.qa.kb.G)}};
1053
- olympe.sc.qa.kb.O=olympe.dc.na.C('011203300000000adef5',olympe.sc.qa.kb);olympe.sc.qa.kb.xh=olympe.sc.qa.kb.O.ka('011203300000000adef6');olympe.sc.qa.kb.oa=olympe.sc.qa.kb.O.ka('011203300000000adef7');olympe.sc.qa.kb.C=olympe.sc.qa.kb.O.ka('011203300000000adef8');olympe.sc.qa.kb.L=olympe.sc.qa.kb.O.ka('011203300000000adef9');olympe.sc.qa.kb.ea=olympe.sc.qa.kb.O.ka('011203300000000adefa');olympe.sc.qa.kb.Z=olympe.sc.qa.kb.O.ka('011203300000000adefb');olympe.sc.qa.kb.F=olympe.sc.qa.kb.O.ka('011203300000000adefc');
1054
- olympe.sc.qa.kb.aa=olympe.sc.qa.kb.O.ka('011203300000000adefd');olympe.sc.qa.kb.P=olympe.sc.qa.kb.O.ka('011203300000000adefe');olympe.sc.qa.kb.T=olympe.sc.qa.kb.O.ka('011203300000000adeff');olympe.sc.qa.kb.G=olympe.sc.qa.kb.O.ka('011203300000000adee0');olympe.sc.qa.kb.Kb={INIT:0,vy:1,Rj:2,Qj:3,Vl:4,XA:5,Fb:9};m=olympe.sc.qa.kb.prototype;m.xt.K=olympe.D.J.P;m.px.K=olympe.D.J.P;m.Dc.K=olympe.D.J.G;m.iw.K=olympe.D.J.F;m.Ew.K=olympe.D.J.F;m.Dw.K=olympe.D.J.F;m.Ae.K=olympe.D.J.F;m.tw.K=olympe.D.J.F;
1055
- m.Sv.K=olympe.D.J.F;m.Cw.K=olympe.D.J.F;m.wt.K=olympe.D.J.F;olympe.sc.qa.ol=class extends olympe.sc.qa.Qh{F(a){a.set(olympe.sc.wa.C.hn,!0);super.F(a)}oa(){return!0}};olympe.sc.qa.ol.O=olympe.dc.na.C('0113032000000aca1102',olympe.sc.qa.ol,olympe.sc.R.Ca);olympe.sc.qa.Oe=class extends olympe.sc.qa.Nc{C(){return(new olympe.dc.uj(this.X(),olympe.sc.qa.kb)).cb(olympe.sc.qa.Oe.L).hi().Cc()}};olympe.sc.qa.Oe.O=olympe.dc.na.C('011203300000000adef3',olympe.sc.qa.Oe);olympe.sc.qa.Oe.L=olympe.sc.qa.Oe.O.ra('011203300000000adef4');T(olympe.sc.qa.kb.O,olympe.sc.qa.Oe.L);
1056
- olympe.sc.qa.Oe.O.C=(a,b,c)=>{b=yk(a,b||'New Service Application model',olympe.sc.qa.Oe,olympe.sc.qa.ol);a.Ea(olympe.sc.qa.Nc.C,b,c);c=a.create(olympe.sc.qa.kb).X();a.Ea(olympe.sc.qa.Oe.L,b,c);return b.X()};olympe.sc.qa.Oe.prototype.C.K=new olympe.D.J(()=>olympe.sc.qa.kb,[]);olympe.sc.Ag=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.Ag.O=olympe.dc.na.C('011203300000000adf00',olympe.sc.Ag);olympe.sc.Ag.F=olympe.sc.Ag.O.ka('011203300000000adf01');olympe.sc.Ag.C=olympe.sc.Ag.O.ka('011203300000000adf02');olympe.sc.Ag.G='011203300000000adf0f';olympe.sc.ag={};olympe.sc.ag.ex=a=>{var b=a.C;const c=olympe.dc.ia();var d=null;for(const e of b.Zc())if((b=e.Vb())&&e.G()&&e.yb()===olympe.dc.Pa.SERVER&&Z(a,e.tag())&&c.Qb(b,olympe.sc.zc)){let f;null==d&&(d=null,null!==vm?d=vm:'string'===typeof um&&(d=olympe.dc.ed.from(um).cb(olympe.sc.qa.Nc.C).cb(olympe.sc.Tc.C.fc()).ld()),d=null==(f=d)?void 0:f.X());if(null===d)throw Error(`No business container for new instance of ${olympe.dc.ga(b)}`);a.Ea(olympe.sc.Tc.F.X(),d,e.tag())}};
1057
- olympe.sc.ag.sx=a=>{const b=a.C,c=olympe.dc.ia();for(const d of b.Zc()){const e=d.Vb();e&&!d.Ld()&&c.Qb(e,olympe.sc.zc)&&d.Cb().forEach((f,g)=>{if(f instanceof olympe.dc.Bc){const l=b.Rc(f.X());if(null===l)throw Error(`Try to assign an instance as complex property which is not created within the same transaction: ${f.X()}`);var h;f=null!=(h=null==l?void 0:l.Vb())?h:null;h=l.tag();let n;if(f===olympe.dc.ga(olympe.sc.be)){h=l.Nb(olympe.sc.be.C);if(!h)throw Error('No object reference found for new ObjectRef');
1048
+ olympe.sc.workflow.jf.Qe='017ffe02381f9fac5062';olympe.sc.workflow.jf.Ja='017ffe02381f9fac5065';olympe.sc.workflow.jf.K='017ffe02381f9fac5063';olympe.sc.workflow.jf.Tb='017ffe02381f9fac5064';m=olympe.sc.workflow.jf.prototype;m.rt.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.ut.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.vt.L=new olympe.D.J(()=>olympe.sc.logic.tb,[]);m.cw.L=new olympe.D.J(()=>Map,[]);m.st.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);m.tt.L=new olympe.D.J(()=>olympe.sc.logic.Bb,[]);olympe.sc.workflow.Pe=class extends olympe.dm.BrickMetadata{Kc(){return this.qc(olympe.sc.workflow.Workflow.statesRel.fc(),olympe.sc.workflow.Workflow).la().concat(['.',this.la()])}};olympe.sc.workflow.Pe.O=olympe.dc.na.C('017ffdc2dda51d46b430',olympe.sc.workflow.Pe);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.ur()}C(){return this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Pe)}G(){return this.qc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Pe)}Kc(){const a=this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Pe);return a.qc(olympe.sc.workflow.Workflow.statesRel.fc(),olympe.sc.workflow.Workflow).la().concat(['.',a.la(),'->',this.la()])}};
1049
+ olympe.sc.workflow.Transition.O=olympe.dc.na.C('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.O.ka('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.O.ra('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.O.ra('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.F.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
1050
+ olympe.sc.workflow.Transition.prototype.C.L=new olympe.D.J(()=>olympe.sc.workflow.Pe,[]);olympe.sc.workflow.Transition.prototype.G.L=new olympe.D.J(()=>olympe.sc.workflow.Pe,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.ah}G(){return this.Lg(olympe.sc.workflow.Workflow.serializationEnabledProp)}C(){return this.qc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.zc)}F(){return this.qc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.Pe)}};olympe.sc.workflow.Workflow.O=olympe.dc.na.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.ka('017ffdc010e5bcc9c972');
1051
+ olympe.sc.workflow.Workflow.dataTypeRel=olympe.sc.workflow.Workflow.O.ra('017ffdc010e5bcc9c973');olympe.sc.workflow.Workflow.statesRel=olympe.sc.workflow.Workflow.O.ra('017ffdc010e5bcc9c974');olympe.sc.workflow.Workflow.initialStateRel=olympe.sc.workflow.Workflow.O.ra('017ffdc010e5bcc9c975');olympe.sc.workflow.Workflow.prototype.G.L=olympe.D.J.P;olympe.sc.workflow.Workflow.prototype.C.L=new olympe.D.J(()=>olympe.sc.zc,[]);
1052
+ olympe.sc.workflow.Workflow.prototype.F.L=new olympe.D.J(()=>olympe.sc.workflow.Pe,[]);olympe.sc.qa={};olympe.sc.qa.Nc=class extends olympe.sc.Ua{ne(){return olympe.sc.yd.we.su}};olympe.sc.qa.Nc.O=olympe.dc.na.C('01120300000000adef00',olympe.sc.qa.Nc);olympe.sc.qa.Nc.C=olympe.sc.qa.Nc.O.ra('0171bc1f15da96dfdb89');olympe.sc.qa.Nc.Ja=olympe.sc.qa.Nc.O.ra('0171bc1f15da96dfdb90');T(olympe.dm.Fc.O,olympe.sc.qa.Nc.C);olympe.sc.qa.Qh=class extends olympe.sc.Runnable{G(){return[this.hc()]}za(){return olympe.dc.ed.from(this.hc()).cb(olympe.sc.qa.Nc.C).ld()}};olympe.sc.qa.Qh.O=cf(olympe.dc.na.C('0113030000000aca1100',olympe.sc.qa.Qh));olympe.sc.qa.Qh.prototype.za.L=new olympe.D.J(()=>olympe.dm.hb,[]);olympe.sc.qa.kb=class extends olympe.dc.CloudObject{xt(){return this.Lg(olympe.sc.qa.kb.xh)}px(){return this.Lg(olympe.sc.qa.kb.oa)}Dc(){return this.$c(olympe.sc.qa.kb.C)}iw(){return this.vb(olympe.sc.qa.kb.K)}Ew(){return this.vb(olympe.sc.qa.kb.ea)}Dw(){return this.vb(olympe.sc.qa.kb.Z)}Ae(){return this.vb(olympe.sc.qa.kb.aa)}tw(){return this.vb(olympe.sc.qa.kb.P)}Sv(){return this.vb(olympe.sc.qa.kb.F)}Cw(){return this.vb(olympe.sc.qa.kb.T)}wt(){return this.vb(olympe.sc.qa.kb.G)}};
1053
+ olympe.sc.qa.kb.O=olympe.dc.na.C('011203300000000adef5',olympe.sc.qa.kb);olympe.sc.qa.kb.xh=olympe.sc.qa.kb.O.ka('011203300000000adef6');olympe.sc.qa.kb.oa=olympe.sc.qa.kb.O.ka('011203300000000adef7');olympe.sc.qa.kb.C=olympe.sc.qa.kb.O.ka('011203300000000adef8');olympe.sc.qa.kb.K=olympe.sc.qa.kb.O.ka('011203300000000adef9');olympe.sc.qa.kb.ea=olympe.sc.qa.kb.O.ka('011203300000000adefa');olympe.sc.qa.kb.Z=olympe.sc.qa.kb.O.ka('011203300000000adefb');olympe.sc.qa.kb.F=olympe.sc.qa.kb.O.ka('011203300000000adefc');
1054
+ olympe.sc.qa.kb.aa=olympe.sc.qa.kb.O.ka('011203300000000adefd');olympe.sc.qa.kb.P=olympe.sc.qa.kb.O.ka('011203300000000adefe');olympe.sc.qa.kb.T=olympe.sc.qa.kb.O.ka('011203300000000adeff');olympe.sc.qa.kb.G=olympe.sc.qa.kb.O.ka('011203300000000adee0');olympe.sc.qa.kb.Lb={INIT:0,vy:1,Rj:2,Qj:3,Vl:4,XA:5,Fb:9};m=olympe.sc.qa.kb.prototype;m.xt.L=olympe.D.J.P;m.px.L=olympe.D.J.P;m.Dc.L=olympe.D.J.G;m.iw.L=olympe.D.J.F;m.Ew.L=olympe.D.J.F;m.Dw.L=olympe.D.J.F;m.Ae.L=olympe.D.J.F;m.tw.L=olympe.D.J.F;
1055
+ m.Sv.L=olympe.D.J.F;m.Cw.L=olympe.D.J.F;m.wt.L=olympe.D.J.F;olympe.sc.qa.ol=class extends olympe.sc.qa.Qh{F(a){a.set(olympe.sc.wa.C.hn,!0);super.F(a)}oa(){return!0}};olympe.sc.qa.ol.O=olympe.dc.na.C('0113032000000aca1102',olympe.sc.qa.ol,olympe.sc.R.Ca);olympe.sc.qa.Oe=class extends olympe.sc.qa.Nc{C(){return(new olympe.dc.uj(this.X(),olympe.sc.qa.kb)).cb(olympe.sc.qa.Oe.K).hi().Cc()}};olympe.sc.qa.Oe.O=olympe.dc.na.C('011203300000000adef3',olympe.sc.qa.Oe);olympe.sc.qa.Oe.K=olympe.sc.qa.Oe.O.ra('011203300000000adef4');T(olympe.sc.qa.kb.O,olympe.sc.qa.Oe.K);
1056
+ olympe.sc.qa.Oe.O.C=(a,b,c)=>{b=yk(a,b||'New Service Application model',olympe.sc.qa.Oe,olympe.sc.qa.ol);a.Ea(olympe.sc.qa.Nc.C,b,c);c=a.create(olympe.sc.qa.kb).X();a.Ea(olympe.sc.qa.Oe.K,b,c);return b.X()};olympe.sc.qa.Oe.prototype.C.L=new olympe.D.J(()=>olympe.sc.qa.kb,[]);olympe.sc.Ag=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.Ag.O=olympe.dc.na.C('011203300000000adf00',olympe.sc.Ag);olympe.sc.Ag.F=olympe.sc.Ag.O.ka('011203300000000adf01');olympe.sc.Ag.C=olympe.sc.Ag.O.ka('011203300000000adf02');olympe.sc.Ag.G='011203300000000adf0f';olympe.sc.ag={};olympe.sc.ag.ex=a=>{var b=a.C;const c=olympe.dc.ia();var d=null;for(const e of b.Zc())if((b=e.Vb())&&e.G()&&e.yb()===olympe.dc.Pa.SERVER&&Z(a,e.tag())&&c.Qb(b,olympe.sc.zc)){let f;null==d&&(d=null,null!==vm?d=vm:'string'===typeof um&&(d=olympe.dc.ed.from(um).cb(olympe.sc.qa.Nc.C).cb(olympe.sc.Tc.C.fc()).ld()),d=null==(f=d)?void 0:f.X());if(null===d)throw Error(`No business container for new instance of ${olympe.dc.ga(b)}`);a.Ea(olympe.sc.Tc.F.X(),d,e.tag())}};
1057
+ olympe.sc.ag.sx=a=>{const b=a.C,c=olympe.dc.ia();for(const d of b.Zc()){const e=d.Vb();e&&!d.Md()&&c.Qb(e,olympe.sc.zc)&&d.Cb().forEach((f,g)=>{if(f instanceof olympe.dc.Bc){const l=b.Rc(f.X());if(null===l)throw Error(`Try to assign an instance as complex property which is not created within the same transaction: ${f.X()}`);var h;f=null!=(h=null==l?void 0:l.Vb())?h:null;h=l.tag();let n;if(f===olympe.dc.ga(olympe.sc.Id)){h=l.Jb(olympe.sc.Id.C);if(!h)throw Error('No object reference found for new ObjectRef');
1058
1058
  var k;let p;f=null!=(p=null==(k=b.Rc(h))?void 0:k.Vb())?p:c.model(h)}if(c.zf(f,olympe.dm.ue)){k=Il(f);let p;n=null!=(p=l.Ia(k.X()))?p:c.Ia(h,k)}if(void 0===n)throw Error(`Try to set a complex property to an instance of a DataType: ${c.name(e)} (${e})`);a.Sc(d.tag(),new Map([[g,n]]));sk(a,l.tag(),olympe.dc.Zb.yc)}})}};
1059
1059
  olympe.sc.ag.tv=a=>{const b=a.C,c=olympe.dc.ia(),d=new Set;for(var e of b.Ab.values()){a=e.tag();let f;const g=null!=(f=e.Vb())?f:c.model(a);if(null!==g&&e.sd()&&(d.has(g)||c.Qb(g,olympe.sc.zc))){d.add(g);const h=Array.from(e.oa()).flatMap(([k,,l,n])=>n&&k!==olympe.dc.nc.Wc?[l]:[]).find(k=>{let l,n;const p=null!=(n=null==(l=b.Rc(k))?void 0:l.Vb())?n:c.model(k);return!p||!(d.has(p)||c.Qb(p,olympe.sc.zc))});if(void 0!==h){let k,l,n;e=null!=(n=null!=(l=null==(k=b.Rc(h))?void 0:k.Vb())?l:c.model(h))?
1060
1060
  n:'unknown';throw Error(`Try to link an instance (${a}) of DataType ${c.name(g)} (${g}) to an instance which is not (${h}) a DataType: ${c.name(e)} (${e})`);}}}};olympe.sc.ag.Hx=a=>{var b=a.C;const c=olympe.dc.ia();for(const d of b.Zc()){b=d.tag();const e=d.Vb();if(e&&c.Qb(e,olympe.sc.fg)&&Z(a,b))throw Error(`Config DataType instances cannot be persisted or updated if already persisted: ${c.name(e)} (${e})`);}};
1061
- olympe.W.run([olympe.dc.transaction.R.Fa],a=>{Ek(Ek(Ek(a,olympe.sc.ag.tv,'businessDataRelations'),olympe.sc.ag.ex),olympe.sc.ag.sx)});olympe.sc.Zg=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.ah}};olympe.sc.Zg.O=olympe.dc.na.C('01645fe6873aeea59e64',olympe.sc.Zg);olympe.sc.Zg.C=olympe.sc.Zg.O.ra('017ed8ac775f48d4d589');olympe.sc.Zg.F=olympe.sc.Zg.O.ra('017ed8ac775f48d4d590');olympe.sc.Un=class extends olympe.dm.Jb{ne(){return olympe.sc.yd.we.ah}};olympe.sc.Un.O=olympe.dc.na.C('0163a68ce44f3d1fa95d',olympe.sc.Un);olympe.sc.fg=class extends olympe.dm.BrickMetadata{};olympe.sc.fg.O=olympe.dc.na.C('016324fde11a836f77d3',olympe.sc.fg);olympe.sc.fg.C=olympe.sc.zc.O.ra('016324fde11a836088d3');olympe.sc.fg.O.C=(a,b)=>yk(a,null!=b?b:'New config type',olympe.sc.fg).X();olympe.sc.Dy=class{};olympe.sc.ij=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.ah}};olympe.sc.ij.O=olympe.dc.na.C('017dc8d6c8fd8c8bd2ff',olympe.sc.ij);olympe.sc.ij.O.C=(a,b)=>yk(a,null!=b?b:'New data connector',olympe.sc.ij,olympe.dm.DataSource).X();olympe.sc.qe=class extends olympe.sc.Runnable{Ja(){return this.bb(olympe.sc.qe.G,olympe.sc.Runnable)}za(){return this.bb(olympe.sc.qe.F,olympe.dm.Property)}};olympe.sc.qe.O=cf(olympe.dc.na.C('016c2d996d9ca27fa9d8',olympe.sc.qe));olympe.sc.qe.G=olympe.sc.qe.O.ra('016c3cb7742ec9309e0b');olympe.sc.qe.F=olympe.sc.qe.O.ra('016c42d3454636f90533');olympe.sc.qe.prototype.Ja.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.sc.qe.prototype.za.K=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.sc.uo=class extends olympe.dm.Jb{ne(){return olympe.sc.yd.we.ah}};olympe.sc.uo.O=olympe.dc.na.C('017a7a9ff057958e5678',olympe.sc.uo);olympe.sc.Xh=class extends olympe.dm.Enum{static create(a,b,c,d,e){const f=olympe.dc.ia();e=void 0!==e?e:f.Ga(b)&&f.Zc(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.sc.Xh.create=olympe.sc.Xh.create;olympe.sc.Xh.O=olympe.dc.na.C('016cdd861b32d56c8208',olympe.sc.Xh);olympe.sc.qp=class extends olympe.dm.Jb{ne(){return olympe.sc.yd.we.Pu}};olympe.sc.qp.O=olympe.dc.na.C('01644b6d4543b344b857',olympe.sc.qp);olympe.sc.rp=class extends olympe.dc.CloudObject{};olympe.sc.rp.O=olympe.dc.na.C('0162f672366be5ca7a86',olympe.sc.rp);olympe.sc.yg=class extends olympe.dc.sources.yg{C(a){return a instanceof olympe.sc.logic.Error?{t:20,c:a.code,m:a.message,s:a.ke()}:super.C(a)}G(a){return 20===(null==a?void 0:a.t)?Nl(a.m,a.c,a.s):super.G(a)}};olympe.sc.Aq=class extends olympe.sc.qe{};olympe.sc.Aq.O=olympe.dc.na.C('016d3f37610ae4fc3962',olympe.sc.Aq);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.na.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Xa=class{constructor(a=!0){a=wk(a);a.T.push(olympe.sc.ag.Hx);this.C=a;this.F=[];this.source=null}static from(a){const b=olympe.sc.wa.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Xa}static process(a,b){return a.has(olympe.sc.wa.C.TRANSACTION,!0)?Promise.resolve(!1):b.mb().then(()=>!0)}V(){return this.C.V()}create(a,b=new Map,c=this.source,d){c='string'===typeof c?c:olympe.dc.Ud().fromModel(a);a=this.C.create(a,d).Lh(c);for(const [e,f]of b)Y(a,e,f);b=a.X();this.F.push(b);return b}update(a,
1061
+ olympe.W.run([olympe.dc.transaction.R.Fa],a=>{Ek(Ek(Ek(a,olympe.sc.ag.tv,'businessDataRelations'),olympe.sc.ag.ex),olympe.sc.ag.sx)});olympe.sc.Zg=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.ah}};olympe.sc.Zg.O=olympe.dc.na.C('01645fe6873aeea59e64',olympe.sc.Zg);olympe.sc.Zg.C=olympe.sc.Zg.O.ra('017ed8ac775f48d4d589');olympe.sc.Zg.F=olympe.sc.Zg.O.ra('017ed8ac775f48d4d590');olympe.sc.Un=class extends olympe.dm.Kb{ne(){return olympe.sc.yd.we.ah}};olympe.sc.Un.O=olympe.dc.na.C('0163a68ce44f3d1fa95d',olympe.sc.Un);olympe.sc.fg=class extends olympe.dm.BrickMetadata{};olympe.sc.fg.O=olympe.dc.na.C('016324fde11a836f77d3',olympe.sc.fg);olympe.sc.fg.C=olympe.sc.zc.O.ra('016324fde11a836088d3');olympe.sc.fg.O.C=(a,b)=>yk(a,null!=b?b:'New config type',olympe.sc.fg).X();olympe.sc.Dy=class{};olympe.sc.ij=class extends olympe.dm.BrickMetadata{ne(){return olympe.sc.yd.we.ah}};olympe.sc.ij.O=olympe.dc.na.C('017dc8d6c8fd8c8bd2ff',olympe.sc.ij);olympe.sc.ij.O.C=(a,b)=>yk(a,null!=b?b:'New data connector',olympe.sc.ij,olympe.dm.DataSource).X();olympe.sc.qe=class extends olympe.sc.Runnable{Ja(){return this.bb(olympe.sc.qe.G,olympe.sc.Runnable)}za(){return this.bb(olympe.sc.qe.F,olympe.dm.Property)}};olympe.sc.qe.O=cf(olympe.dc.na.C('016c2d996d9ca27fa9d8',olympe.sc.qe));olympe.sc.qe.G=olympe.sc.qe.O.ra('016c3cb7742ec9309e0b');olympe.sc.qe.F=olympe.sc.qe.O.ra('016c42d3454636f90533');olympe.sc.qe.prototype.Ja.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.sc.qe.prototype.za.L=new olympe.D.J(()=>olympe.dc.ya,[]);olympe.sc.uo=class extends olympe.dm.Kb{ne(){return olympe.sc.yd.we.ah}};olympe.sc.uo.O=olympe.dc.na.C('017a7a9ff057958e5678',olympe.sc.uo);olympe.sc.Xh=class extends olympe.dm.Enum{static create(a,b,c,d,e){const f=olympe.dc.ia();e=void 0!==e?e:f.Ga(b)&&f.Zc(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.sc.Xh.create=olympe.sc.Xh.create;olympe.sc.Xh.O=olympe.dc.na.C('016cdd861b32d56c8208',olympe.sc.Xh);olympe.sc.qp=class extends olympe.dm.Kb{ne(){return olympe.sc.yd.we.Pu}};olympe.sc.qp.O=olympe.dc.na.C('01644b6d4543b344b857',olympe.sc.qp);olympe.sc.rp=class extends olympe.dc.CloudObject{};olympe.sc.rp.O=olympe.dc.na.C('0162f672366be5ca7a86',olympe.sc.rp);olympe.sc.yg=class extends olympe.dc.sources.yg{C(a){return a instanceof olympe.sc.logic.Error?{t:20,c:a.code,m:a.message,s:a.ke()}:super.C(a)}G(a){return 20===(null==a?void 0:a.t)?Nl(a.m,a.c,a.s):super.G(a)}P(a){super.P(a);if(this.db.model(a)===olympe.sc.Id.O.X()){const b=olympe.sc.Id.C;this.K.get(a).r.push({r:b.X(),d:this.db.Jb(a,b)})}return a}};olympe.sc.Aq=class extends olympe.sc.qe{};olympe.sc.Aq.O=olympe.dc.na.C('016d3f37610ae4fc3962',olympe.sc.Aq);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.na.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Xa=class{constructor(a=!0){a=wk(a);a.T.push(olympe.sc.ag.Hx);this.C=a;this.F=[];this.source=null}static from(a){const b=olympe.sc.wa.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Xa}static process(a,b){return a.has(olympe.sc.wa.C.TRANSACTION,!0)?Promise.resolve(!1):b.mb().then(()=>!0)}V(){return this.C.V()}create(a,b=new Map,c=this.source,d){c='string'===typeof c?c:olympe.dc.Vd().fromModel(a);a=this.C.create(a,d).Lh(c);for(const [e,f]of b)Y(a,e,f);b=a.X();this.F.push(b);return b}update(a,
1062
1062
  b,c){this.C.update(a,b,c);return this}Ar(a,b){a=this.C.update(a);for(const [c,d]of b)b=d,a.Cd.set(olympe.dc.ga(c),b);return this}delete(a){this.C.delete(a);return this}Ea(a,b,c){this.C.Ea(a,b,c);return this}kc(a,b,c){this.C.kc(a,b,c);return this}xm(a,b){this.C.xm(a,b);return this}persist(a,b=!0){this.C.persist(a,b);return this}Gx(a,b=!0){olympe.ma.ab('dc').warn('Transaction#persistInstance() has been deprecated. Please use Transaction#persist() instead.');return this.persist(a,b)}Lh(a){this.source=
1063
1063
  a;return this}model(a){return this.C.model(a)}merge(a){xk(this.C,a.C);return this}pm(a){this.C.pm(a);return this}mb(){return new Promise((a,b)=>{this.C.mb((c,d)=>{c?a(new olympe.sc.yi(this.F)):b(d)})})}ym(){return new Promise((a,b)=>{this.C.ym((c,d)=>{c?a(new olympe.sc.yi(this.F)):b(d)})})}};olympe.sc.Xa.prototype.executeAsLarge=olympe.sc.Xa.prototype.ym;olympe.sc.Xa.prototype.execute=olympe.sc.Xa.prototype.mb;olympe.sc.Xa.prototype.afterExecution=olympe.sc.Xa.prototype.pm;
1064
1064
  olympe.sc.Xa.prototype.merge=olympe.sc.Xa.prototype.merge;olympe.sc.Xa.prototype.model=olympe.sc.Xa.prototype.model;olympe.sc.Xa.prototype.setSource=olympe.sc.Xa.prototype.Lh;olympe.sc.Xa.prototype.persistInstance=olympe.sc.Xa.prototype.Gx;olympe.sc.Xa.prototype.persist=olympe.sc.Xa.prototype.persist;olympe.sc.Xa.prototype.deleteAllRelations=olympe.sc.Xa.prototype.xm;olympe.sc.Xa.prototype.deleteRelation=olympe.sc.Xa.prototype.kc;olympe.sc.Xa.prototype.createRelation=olympe.sc.Xa.prototype.Ea;
@@ -1066,18 +1066,18 @@ olympe.sc.Xa.prototype['delete']=olympe.sc.Xa.prototype.delete;olympe.sc.Xa.prot
1066
1066
  olympe.uc.Ta=class{constructor(a,b){this.C=a;this.H=b;this.F=null;this.G='';this.H.info('HC Manager will execute application registered as:',this.C)}Ti(a,b,c=''){b||(b='default');b===this.C?(null===this.F?this.H.log('Application',c,'designated to be launched'):this.H.log('OVERRIDE: Application',c,'designated to be launched'),this.F=a,this.G=c):this.H.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.C)}run(){null!==this.F?(this.H.info('Running application:',this.G),
1067
1067
  this.F.run()):this.H.error('No app registered under name: '+this.C)}};olympe.uc.Ti=function(a,b,c='default'){const d=a.ab();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.uc.U.Ee+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.vd(olympe.uc.R.Fa).config(c,[b],(e,f)=>f.Ti(e,c,b),e=>Fm(e,c),'olympe.hc.registerApp')};olympe.uc.R={Fa:'hc.Manager',Ca:'hc.Logger'};olympe.uc.U={Ee:'hc.app',Jo:'hc.globalToken'};olympe.W.config(function(a){F(a,olympe.uc.U.Ee,'default');F(a,olympe.uc.U.Jo,!1);E(a,olympe.uc.R.Ca,[olympe.ma.R.Fa],b=>b.Qc('hc'));E(a,olympe.Db.R.xg,[new olympe.W.ja(olympe.uc.U.Ee)],b=>b);E(a,olympe.auth.R.Ek,[olympe.Db.R.xg,new olympe.W.ja(olympe.uc.U.Jo)],(b,c)=>new olympe.auth.sn(c?'':b));D(a,olympe.uc.R.Fa,olympe.uc.Ta,new olympe.W.ja(olympe.uc.U.Ee),olympe.uc.R.Ca)},'olympe.hc');
1068
1068
  olympe.W.run([olympe.uc.R.Fa],a=>a.run(),'olympe.hc');olympe.sc.Hb={};function Gm(a,b){if(a.ea)a.H.debug('Sending getContext request'),th(a.oa).then(()=>{a.H.debug('synchronisation request successful');um=a.C;b()}).catch(c=>{a.H.error('failed to synchronise (authenticated) with server: '+c.message)});else{const c=Ll(a.F);!c&&Ij();a.H.debug((c?'PULLING':'SUBSCRIBING')+' application '+a.C);const d=a.F.F(),e=new olympe.async.xq(d);e.add((f,g)=>{const h=olympe.dc.ia(),k=new olympe.D.$b('Primordial Subscription Context',d);kh(k,a.C,l=>{l=h.Ih(l)?l:h.model(l);return null!==
1069
- l&&h.Qb(l,olympe.sc.fg)},{Nd:Hm(c),an:!0}).subscribe(rxjs.Subscriber.create(d.G(()=>{h.Qb(a.C,olympe.sc.qa.Nc)?(a.za.Z(a.C,c),f()):Jc(a.P)?g(`The specified application tag (${a.C}) is not an application or does not exist`):(k.destroy(),a.P.connect().catch(l=>{g(`Failed to load the app while offline, you might want to try again when online: ${l}`)}))}),l=>g(String(l))))});e.add(f=>{olympe.D.Ic([a.aa.me()],g=>{const h=Hm(c,!1);olympe.dc.pa.ze(g,olympe.dm.User).observe(olympe.D.Wa(),{Nd:h,bk:'__code-as-data__'}).subscribe(()=>
1070
- d.run(f))})});e.add((f,g)=>{if(Im(a.C)){const h=olympe.sc.Tc.Kb.kp,k=olympe.sc.Tc.Kb.ji;wm(a.C,a.pb,l=>{l===h||l===k?d.run(f):d.run(()=>g('Error while loading the business container'))})}else f()});zc(e,(f,g)=>{if(g)throw Error(g);b()});e.start()}}
1071
- function Jm(a){a.H.info('Starting application '+a.C);const b=olympe.D.ic(olympe.D.fa).update(olympe.D.fa.C),c=olympe.dc.ia();if(0<a.C.length){const d=Ge(c,a.C,a.F.F().G((g,h)=>{if(g)if(g=mm(h),g instanceof olympe.sc.qa.Qh){a.H.debug('application retrieved: running');h=Jl(a.F,g);const k=new olympe.sc.Za.gu(a.L);Oa(a.L,()=>Vl(a.F.C,k));Pa(a.L,()=>{var l=k.V();return Xl(a.F.C,l)});a.Ja&&a.L.start();g.run(h);'string'===typeof a.jb&&(new olympe.sc.Pd).ea(g.X(),h,a.H);h.Jr(olympe.sc.wa.C.hn).then(()=>{let l;
1069
+ l&&h.Qb(l,olympe.sc.fg)},{Od:Hm(c),an:!0}).subscribe(rxjs.Subscriber.create(d.G(()=>{h.Qb(a.C,olympe.sc.qa.Nc)?(a.za.Z(a.C,c),f()):Jc(a.P)?g(`The specified application tag (${a.C}) is not an application or does not exist`):(k.destroy(),a.P.connect().catch(l=>{g(`Failed to load the app while offline, you might want to try again when online: ${l}`)}))}),l=>g(String(l))))});e.add(f=>{olympe.D.Ic([a.aa.me()],g=>{const h=Hm(c,!1);olympe.dc.pa.ze(g,olympe.dm.User).observe(olympe.D.Wa(),{Od:h,bk:'__code-as-data__'}).subscribe(()=>
1070
+ d.run(f))})});e.add((f,g)=>{if(Im(a.C)){const h=olympe.sc.Tc.Lb.kp,k=olympe.sc.Tc.Lb.ji;wm(a.C,a.pb,l=>{l===h||l===k?d.run(f):d.run(()=>g('Error while loading the business container'))})}else f()});zc(e,(f,g)=>{if(g)throw Error(g);b()});e.start()}}
1071
+ function Jm(a){a.H.info('Starting application '+a.C);const b=olympe.D.ic(olympe.D.fa).update(olympe.D.fa.C),c=olympe.dc.ia();if(0<a.C.length){const d=Ge(c,a.C,a.F.F().G((g,h)=>{if(g)if(g=mm(h),g instanceof olympe.sc.qa.Qh){a.H.debug('application retrieved: running');h=Jl(a.F,g);const k=new olympe.sc.Za.gu(a.K);Oa(a.K,()=>Vl(a.F.C,k));Pa(a.K,()=>{var l=k.V();return Xl(a.F.C,l)});a.Ja&&a.K.start();g.run(h);'string'===typeof a.jb&&(new olympe.sc.Qd).ea(g.X(),h,a.H);h.Jr(olympe.sc.wa.C.hn).then(()=>{let l;
1072
1072
  null==(l=e)||l.cancel();b.update(olympe.D.fa.F);Km(a)})}else a.H.error('application retrieved: not an Application with a run() method');else Lm(a)}));olympe.D.Wa().onDestroy(()=>{Fe(c,a.C,d)});const e=Ub(()=>{a.H.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},3E4);let f;null==(f=a.ub)||f.start()}Mm(a);Nm(a,b)}
1073
- function Km(a){a.H.info(`Application ${olympe.dc.ia().name(a.C)} (${a.C}) started`);a=olympe.dc.sources.Sd();a.Lb=!0;a.Z+=0;a.ud.next(0<a.Z);0===a.Z&&a.aa&&a.Lb&&(a.H.debug(`Cache: set code-as-data version in local storage: ${a.version}`),a.jb.set('__code-as-data-version__',a.version),a.ub||(a.aa=!1))}function Hm(a,b=!0){return a?olympe.dc.pa.Xc.Ol:b?olympe.dc.pa.Xc.Gf:olympe.dc.pa.Xc.Nl}function Lm(a){a.H.info('Stop the application');Km(a);a.F.F().oa();a.G.G(a.T);a.G.P(a.Z)}
1073
+ function Km(a){a.H.info(`Application ${olympe.dc.ia().name(a.C)} (${a.C}) started`);a=olympe.dc.sources.Td();a.Mb=!0;a.Z+=0;a.ud.next(0<a.Z);0===a.Z&&a.aa&&a.Mb&&(a.H.debug(`Cache: set code-as-data version in local storage: ${a.version}`),a.jb.set('__code-as-data-version__',a.version),a.ub||(a.aa=!1))}function Hm(a,b=!0){return a?olympe.dc.pa.Xc.Ol:b?olympe.dc.pa.Xc.Gf:olympe.dc.pa.Xc.Nl}function Lm(a){a.H.info('Stop the application');Km(a);a.F.F().oa();a.G.G(a.T);a.G.P(a.Z)}
1074
1074
  function Mm(a){a.Z=a.G.F(()=>v(function*(){return Lm(a)}),'Stop application')}function Nm(a,b){a.T=a.G.C(()=>olympe.D.Ra(b)===olympe.D.fa.F?Promise.resolve('The application is started'):Promise.reject('The application is not started'))}
1075
- olympe.sc.Hb.Ul=class{constructor(a,b,c,d,e,f,g,h,k,l){this.H=a;this.aa=b;this.P=c;this.oa=d;this.G=e;this.Z=this.T='';this.F=f;this.za=g;this.L=h;this.ub=l;this.C=k.get('appTag');this.ea=k.get('getContextMode');let n;this.jb=null!=(n=k.get('debuggerName'))?n:null;this.Ja=k.get('autostartProfiler');this.pb=k.get('loadBusinessContainer')}run(){this.H.debug('runtime starting for app #'+this.C);let a=!1;const b=olympe.N.rc.C.ni,c=olympe.N.rc.C.ae,d=olympe.N.rc.C.Xd;olympe.D.Ic([this.P.getState()],e=>
1076
- {switch(e){case b:case c:this.H.debug('Server session opened or working offline, start the application');a||(a=!0,Gm(this,()=>Jm(this)));break;case d:this.H.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}})}};olympe.sc.Hb.Ul.C='app_instance';olympe.sc.Hb.Ul.xa=[olympe.uc.Sr];olympe.sc.Hb.qu=class{constructor(a,b,c,d){this.H=a;this.G=b;this.F=c;this.L=d.get('httpManifestPath');this.C=d.get('manifestCommon');if(!this.C)this.C={};else if('string'===typeof this.C)try{this.C=JSON.parse(this.C)}catch(e){this.H.warn('Invalid manifest common config'),this.C={}}}start(){const a=b=>{const c=(new URL(b.C())).searchParams.get('origin');if(c)return c;b=b.Li();this.H.debug('Request headers',JSON.stringify(b,null,2));return b.origin?b.origin:b.Lx?(new URL(b.Lx)).origin:b[olympe.net.Ba.Headers.Bo]&&
1077
- b[olympe.net.Ba.Headers.Co]?b[olympe.net.Ba.Headers.Co]+'://'+b[olympe.net.Ba.Headers.Bo]:null};this.G.L('manifest',`${this.L}/:${'appTag'}`,[olympe.net.Ba.Qd.GET],(b,c)=>{const d=this;return v(function*(){var e=c.get('appTag');d.H.debug('Processing request to serve manifest for app',e);if(20!==e.length)return new olympe.net.Zd('Invalid appTag',olympe.net.Ba.ac.Ik);try{var f=yield olympe.dc.pa.ze(e,olympe.sc.qa.Nc).mb(d.F)}catch(h){return new olympe.net.Zd(`Something went wrong: ${'string'===typeof h?
1078
- h:h.message}`,olympe.net.Ba.ac.Ik)}if(0===f.size())return new olympe.net.Zd('App not found',olympe.net.Ba.ac.Cl);var g=a(b);f=f.Cc();g={name:f.name(),short_name:f.name(),id:e,start_url:g?`${g}?hc.app=sc.runtime&sc.app=${e}`:void 0,display:'standalone',backgroundColor:'#fff',icons:g?[{src:`${g}/images/logo.svg`,sizes:'150x150',type:'image/png'},{src:`${g}/images/logo.png`,sizes:'1024x1024',type:'image/png',purpose:'maskable any'}]:void 0};f=olympe.W.getParameter(`app.manifest.${e}`);if(!f)f={};else if('string'===
1079
- typeof f)try{f=JSON.parse(f)}catch(h){d.H.warn(`Invalid manifest app config for app: ${e}`),f={}}e=Object.assign({},g,d.C,f);return new olympe.net.Zd(JSON.stringify(e),olympe.net.Ba.ac.jh,void 0,{'content-type':'application/json'})})}).catch(()=>this.H.error('Error while starting the RuntimeHTTPService'));this.H.debug('Started RuntimeHTTPService')}};function Im(a){var b=olympe.dm.DataSource.SERVER;const c=olympe.dc.pa.from(a).cb(olympe.sc.qa.Nc.C).cb(olympe.dm.pd.G.fc()).cb(olympe.dm.pd.C).ld();a=olympe.dc.pa.from(a).cb(olympe.sc.qa.Nc.C).cb(olympe.dm.hb.F).ld();return c.concat(a).has(b)}
1080
- olympe.sc.Hb.Uj=class extends olympe.dc.sources.Uj{T(a){return this.db.Qb(a,olympe.sc.zc)}Z(a,b){if(!this.L){super.init();var c=olympe.dc.ed.from(a).cb(olympe.sc.qa.Nc.C).ld();if(!(c instanceof olympe.dm.hb))throw Error(`Impossible to initialize the source solver for the application ${a}: no project is linked to it`);b=b?olympe.dc.pa.Xc.Ol:olympe.dc.pa.Xc.Gf;Aj(this,c,b);c=new olympe.D.$b('deployed data sources');olympe.dc.pa.from(a).cb(olympe.sc.qa.Nc.Ja).observe(c,{Nd:b}).subscribe(d=>{const e=
1075
+ olympe.sc.Hb.Ul=class{constructor(a,b,c,d,e,f,g,h,k,l){this.H=a;this.aa=b;this.P=c;this.oa=d;this.G=e;this.Z=this.T='';this.F=f;this.za=g;this.K=h;this.ub=l;this.C=k.get('appTag');this.ea=k.get('getContextMode');let n;this.jb=null!=(n=k.get('debuggerName'))?n:null;this.Ja=k.get('autostartProfiler');this.pb=k.get('loadBusinessContainer')}run(){this.H.debug('runtime starting for app #'+this.C);let a=!1;const b=olympe.N.rc.C.ni,c=olympe.N.rc.C.be,d=olympe.N.rc.C.Yd;olympe.D.Ic([this.P.getState()],e=>
1076
+ {switch(e){case b:case c:this.H.debug('Server session opened or working offline, start the application');a||(a=!0,Gm(this,()=>Jm(this)));break;case d:this.H.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}})}};olympe.sc.Hb.Ul.C='app_instance';olympe.sc.Hb.Ul.xa=[olympe.uc.Sr];olympe.sc.Hb.qu=class{constructor(a,b,c,d){this.H=a;this.G=b;this.F=c;this.K=d.get('httpManifestPath');this.C=d.get('manifestCommon');if(!this.C)this.C={};else if('string'===typeof this.C)try{this.C=JSON.parse(this.C)}catch(e){this.H.warn('Invalid manifest common config'),this.C={}}}start(){const a=b=>{const c=(new URL(b.C())).searchParams.get('origin');if(c)return c;b=b.Li();this.H.debug('Request headers',JSON.stringify(b,null,2));return b.origin?b.origin:b.Lx?(new URL(b.Lx)).origin:b[olympe.net.Ba.Headers.Bo]&&
1077
+ b[olympe.net.Ba.Headers.Co]?b[olympe.net.Ba.Headers.Co]+'://'+b[olympe.net.Ba.Headers.Bo]:null};this.G.K('manifest',`${this.K}/:${'appTag'}`,[olympe.net.Ba.Rd.GET],(b,c)=>{const d=this;return v(function*(){var e=c.get('appTag');d.H.debug('Processing request to serve manifest for app',e);if(20!==e.length)return new olympe.net.$d('Invalid appTag',olympe.net.Ba.ac.Ik);try{var f=yield olympe.dc.pa.ze(e,olympe.sc.qa.Nc).mb(d.F)}catch(h){return new olympe.net.$d(`Something went wrong: ${'string'===typeof h?
1078
+ h:h.message}`,olympe.net.Ba.ac.Ik)}if(0===f.size())return new olympe.net.$d('App not found',olympe.net.Ba.ac.Cl);var g=a(b);f=f.Cc();g={name:f.name(),short_name:f.name(),id:e,start_url:g?`${g}?hc.app=sc.runtime&sc.app=${e}`:void 0,display:'standalone',backgroundColor:'#fff',icons:g?[{src:`${g}/images/logo.svg`,sizes:'150x150',type:'image/png'},{src:`${g}/images/logo.png`,sizes:'1024x1024',type:'image/png',purpose:'maskable any'}]:void 0};f=olympe.W.getParameter(`app.manifest.${e}`);if(!f)f={};else if('string'===
1079
+ typeof f)try{f=JSON.parse(f)}catch(h){d.H.warn(`Invalid manifest app config for app: ${e}`),f={}}e=Object.assign({},g,d.C,f);return new olympe.net.$d(JSON.stringify(e),olympe.net.Ba.ac.jh,void 0,{'content-type':'application/json'})})}).catch(()=>this.H.error('Error while starting the RuntimeHTTPService'));this.H.debug('Started RuntimeHTTPService')}};function Im(a){var b=olympe.dm.DataSource.SERVER;const c=olympe.dc.pa.from(a).cb(olympe.sc.qa.Nc.C).cb(olympe.dm.pd.G.fc()).cb(olympe.dm.pd.C).ld();a=olympe.dc.pa.from(a).cb(olympe.sc.qa.Nc.C).cb(olympe.dm.hb.F).ld();return c.concat(a).has(b)}
1080
+ olympe.sc.Hb.Uj=class extends olympe.dc.sources.Uj{T(a){return this.db.Qb(a,olympe.sc.zc)}Z(a,b){if(!this.K){super.init();var c=olympe.dc.ed.from(a).cb(olympe.sc.qa.Nc.C).ld();if(!(c instanceof olympe.dm.hb))throw Error(`Impossible to initialize the source solver for the application ${a}: no project is linked to it`);b=b?olympe.dc.pa.Xc.Ol:olympe.dc.pa.Xc.Gf;Aj(this,c,b);c=new olympe.D.$b('deployed data sources');olympe.dc.pa.from(a).cb(olympe.sc.qa.Nc.Ja).observe(c,{Od:b}).subscribe(d=>{const e=
1081
1081
  new olympe.dc.Xa;Oe(d).forEach(f=>{e.Ea(olympe.dm.DataSource.Si,this.C,f)});Ne(d).forEach(f=>{e.kc(olympe.dm.DataSource.Si,this.C,f)});e.mb()})}}};olympe.sc.Hb.R={Of:'sc.runtime.Main',Ne:'sc.runtime.SourceSolver',fq:'sc.runtime.appConfig',hq:'sc.runtime.runtimeHTTPServiceConfig',gq:'sc.runtime.RuntimeHTTPService',Cp:'sc.runtime.OfflineAppConfig'};olympe.sc.Hb.U={Ro:'app.httpManifestPath',pp:'app.manifest.common',lp:'sc.loadBusinessContainer'};
1082
1082
  olympe.W.config(function(a){F(a,olympe.sc.Hb.U.Ro,'/runtime/manifest');F(a,olympe.sc.Hb.U.pp,null);F(a,olympe.sc.Hb.U.lp,!0);E(a,olympe.Db.R.xg,[new olympe.W.ja(olympe.uc.U.Ee),new olympe.W.ja(olympe.sc.U.Ee)],(b,c)=>`${b}${c?'-'+c:''}`);E(a,olympe.sc.Hb.R.Cp,[new olympe.W.ja(olympe.sc.U.Ee),new olympe.W.ja(olympe.net.U.mi),new olympe.W.ja(olympe.net.U.El)],(b,c,d)=>{let e;const f=null!=(e=a.getParameter(`offline.${b}.enabled`))?e:c;let g;b=null!=(g=a.getParameter(`offline.${b}.autoBackOnline`))?
1083
1083
  g:d;return new Map([['offlineEnabled',f],['offlineAutoBackOnline',!f||b]])});xa(a,olympe.net.R.Fl,olympe.sc.Hb.R.Cp);D(a,olympe.sc.Hb.R.Ne,olympe.sc.Hb.Uj,olympe.dc.R.cf,new olympe.W.ja(olympe.dc.U.wg),new olympe.W.ja(olympe.dc.U.$k));xa(a,olympe.dc.sources.R.Ne,olympe.sc.Hb.R.Ne);E(a,olympe.sc.Hb.R.fq,[new olympe.W.ja(olympe.sc.U.Ee),new olympe.W.ja(olympe.dc.U.rh),new olympe.W.ja(olympe.sc.U.fo),new olympe.W.ja(olympe.sc.U.kn),new olympe.W.ja(olympe.sc.Hb.U.lp)],(b,c,d,e,f)=>new Map([['appTag',
@@ -1091,10 +1091,10 @@ olympe.public.Ka.getToken=olympe.public.Ka.le;olympe.public.Ka.observeUser=olymp
1091
1091
  olympe.public.af=class{static create(a){return new class extends olympe.dc.tc.bg{G(b,c){return olympe.dc.CloudObject.get(c)}compare(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.D.ic(olympe.D.ba),e=b.subscribe(f=>d.update(olympe.D.sa(f)));olympe.D.Wa().Z(()=>e.unsubscribe());return d.sb()}}}};olympe.public.Process=class{static Cx(a,b){const c=olympe.host.lk(),d=c.C(a,b);return()=>c.G(d)}static Dx(a,b){const c=olympe.host.lk(),d=c.F(a,b);return()=>c.P(d)}static connect(){return olympe.N.Bm().connect()}static disconnect(){return olympe.N.Bm().disconnect()}static Wf(a){a='function'===typeof a.F?a.F():a;return olympe.N.Bm().Wf().asObservable(a).pipe(rxjs.operators.map(b=>b.valueOf()))}};olympe.public.Process.isOnline=olympe.public.Process.Wf;olympe.public.Process.disconnect=olympe.public.Process.disconnect;
1092
1092
  olympe.public.Process.connect=olympe.public.Process.connect;olympe.public.Process.onShutdown=olympe.public.Process.Dx;olympe.public.Process.onHealthCheck=olympe.public.Process.Cx;'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.Ma.Relation,Direction:olympe.dc.ua,generateTag:olympe.Y.uf,tagToString:olympe.dc.ga,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.er,defineInverseRelation:olympe.dc.Av,BrickContext:olympe.sc.wa,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.wa.C,registerBrick:olympe.sc.logic.na.C,FunctionBrick:olympe.sc.logic.Function,
1093
1093
  Context:olympe.sc.wa,Entry:olympe.dc.Ma.Entry,PropertyModel:olympe.dm.Property,RelationModel:olympe.dm.Relation,StringModel:olympe.dm.String,NumberModel:olympe.dm.Number,BooleanModel:olympe.dm.Boolean,DatetimeModel:olympe.dm.DateTime,ColorModel:olympe.dm.Color,File:olympe.sc.File,User:olympe.dm.User,Enum:olympe.dm.Lf,EnumValue:olympe.sc.Xh,DataSource:olympe.dm.DataSource,DataResult:olympe.dc.query.od,Workflow:olympe.sc.workflow.Workflow,WorkflowState:olympe.sc.workflow.Pe,WorkflowTransition:olympe.sc.workflow.Transition,
1094
- WorkflowObjectState:olympe.sc.workflow.ObjectState,Transaction:olympe.sc.Xa,BurstTransaction:olympe.dc.Sh,TransactionResult:olympe.sc.yi,PredefinedDataSource:olympe.dc.Pa,QueryResult:olympe.dc.Oa,Query:olympe.dc.pa,QuerySingle:olympe.dc.ed,Predicate:olympe.dc.query.Aa,Order:olympe.dc.query.Dj,Config:class{static getParameter(a){return olympe.W.getParameter(a)}},Process:olympe.public.Process,Cache:{getCacheEntries:()=>olympe.dc.sources.Sd().P,clearCache:a=>Pj(olympe.dc.sources.Sd(),a),getProcessingStatus:()=>
1095
- olympe.dc.sources.Sd().Dc(),getProcessingErrors:()=>olympe.dc.sources.Sd().jc.asObservable(),hasPendingChanges:()=>olympe.dc.sources.Sd().ea.asObservable(),synchroniseChanges:()=>Vj(),getPendingChanges:()=>Yj(),clearPendingChanges:()=>ck(),loadPendingChanges:a=>ak(a)},Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequestType:olympe.N.Request.qb,ServiceRequest:olympe.N.Oc,Service:olympe.N.xb,Auth:olympe.public.Ka,AuthState:{INIT:olympe.auth.Ta.C.INIT,AUTHENTICATING:olympe.auth.Ta.C.Zi,
1094
+ WorkflowObjectState:olympe.sc.workflow.ObjectState,Transaction:olympe.sc.Xa,BurstTransaction:olympe.dc.Sh,TransactionResult:olympe.sc.yi,PredefinedDataSource:olympe.dc.Pa,QueryResult:olympe.dc.Oa,Query:olympe.dc.pa,QuerySingle:olympe.dc.ed,Predicate:olympe.dc.query.Aa,Order:olympe.dc.query.Dj,Config:class{static getParameter(a){return olympe.W.getParameter(a)}},Process:olympe.public.Process,Cache:{getCacheEntries:()=>olympe.dc.sources.Td().P,clearCache:a=>Pj(olympe.dc.sources.Td(),a),getProcessingStatus:()=>
1095
+ olympe.dc.sources.Td().Dc(),getProcessingErrors:()=>olympe.dc.sources.Td().jc.asObservable(),hasPendingChanges:()=>olympe.dc.sources.Td().ea.asObservable(),synchroniseChanges:()=>Vj(),getPendingChanges:()=>Yj(),clearPendingChanges:()=>ck(),loadPendingChanges:a=>ak(a)},Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequestType:olympe.N.Request.qb,ServiceRequest:olympe.N.Oc,Service:olympe.N.xb,Auth:olympe.public.Ka,AuthState:{INIT:olympe.auth.Ta.C.INIT,AUTHENTICATING:olympe.auth.Ta.C.Zi,
1096
1096
  GUEST:olympe.auth.Ta.C.$h,AUTHENTICATED:olympe.auth.Ta.C.Ef,ERROR:olympe.auth.Ta.C.Fb},AuthProtocol:olympe.auth.Ac.C,Sync:olympe.dc.CloudObject,BusinessObject:olympe.dc.CloudObject,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,DBView:class extends olympe.dc.ib{static get(){return olympe.dc.ia()}},ListDef:olympe.dc.ya,
1097
- instanceToTag:olympe.dc.ga,registerSync:olympe.dc.na.C,getUniqueTag:olympe.Y.uf,onDestroy:a=>olympe.D.Wa().onDestroy(a),offDestroy:a=>olympe.D.Wa().Bf(a),FollowRules:olympe.dc.Zb,transformers:{Related:olympe.dc.da.Me,RecursiveRelated:olympe.dc.da.ve,Distinct:olympe.dc.da.Vh,Filter:olympe.dc.da.df,Limit:olympe.dc.da.gh,Sort:olympe.dc.da.zg,Union:olympe.dc.da.pf},ListDefPredicate:olympe.public.Aa,predicates:{And:olympe.dc.$.Ed,Or:olympe.dc.$.te,Not:olympe.dc.$.$d,Equals:olympe.dc.$.re,Contains:olympe.dc.$.bf,
1097
+ instanceToTag:olympe.dc.ga,registerSync:olympe.dc.na.C,getUniqueTag:olympe.Y.uf,onDestroy:a=>olympe.D.Wa().onDestroy(a),offDestroy:a=>olympe.D.Wa().Bf(a),FollowRules:olympe.dc.Zb,transformers:{Related:olympe.dc.da.Me,RecursiveRelated:olympe.dc.da.ve,Distinct:olympe.dc.da.Vh,Filter:olympe.dc.da.df,Limit:olympe.dc.da.gh,Sort:olympe.dc.da.zg,Union:olympe.dc.da.pf},ListDefPredicate:olympe.public.Aa,predicates:{And:olympe.dc.$.Ed,Or:olympe.dc.$.te,Not:olympe.dc.$.ae,Equals:olympe.dc.$.re,Contains:olympe.dc.$.bf,
1098
1098
  Greater:olympe.dc.$.pj,Smaller:olympe.dc.$.Tj,HasRelated:olympe.dc.$.bi,InstanceOf:olympe.dc.$.ei,Regex:olympe.dc.$.lf},Comparator:olympe.public.af,comparators:{Number:olympe.dc.tc.Number,String:olympe.dc.tc.String,DateTime:olympe.dc.tc.DateTime},valuedefs:{BooleanProperty:olympe.dc.$a.bj,StringProperty:olympe.dc.$a.ti,NumberProperty:olympe.dc.$a.li,DateTimeProperty:olympe.dc.$a.Uh,Constant:olympe.dc.$a.Ge,Tag:olympe.dc.$a.wi}});
1099
1099
 
1100
1100