@olympeio/runtime-node 8.6.3 → 8.6.4
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/import/olympe.dm/datamodel/05_permission_schema.updateInst.json +1 -1
- package/import/olympe.dm/datamodel/06_structure.newInst.json +1 -1
- package/import/olympe.sc/datamodel/01_language.newInst.json +1 -1
- package/import/olympe.sc/datamodel/01_language.newRel.json +1 -1
- package/index.d.ts +10 -3
- package/index.js +171 -171
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -382,8 +382,8 @@ function da(a,b){if(b)a:{var c=ca;a=a.split('.');for(var d=0;d<a.length-1;d++){v
|
|
|
382
382
|
da('Array.prototype.values',function(a){return a?a:function(){return ea(this,function(b,c){return c})}});da('Array.prototype.includes',function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function fa(a){if(null==a)throw new TypeError("The 'this' value for String.prototype.padStart must not be null or undefined");return a+''}
|
|
383
383
|
function ha(a,b){a=void 0!==a?String(a):' ';return 0<b&&a?a.repeat(Math.ceil(b/a.length)).substring(0,b):''}da('String.prototype.padStart',function(a){return a?a:function(b,c){var d=fa(this);return ha(c,b-d.length)+d}});da('String.prototype.padEnd',function(a){return a?a:function(b,c){var d=fa(this);return d+ha(c,b-d.length)}});da('Object.entries',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push([d,b[d]]);return c}});
|
|
384
384
|
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('Promise.prototype.finally',function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});var ia=this||self;
|
|
385
|
-
function w(a,b){a=a.split('.');let c=ia;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={};'object'===typeof window&&(window.olympe=olympe);'object'===typeof global&&(global.olympe=olympe);olympe.
|
|
386
|
-
exists:c.exists,existsSync:c.existsSync,mkdir:c.mkdir,mkdirSync:c.mkdirSync,readFile:c.readFile,readFileSync:c.readFileSync,rmdir:c.rmdir,rmdirSync:c.rmdirSync,writeFile:c.writeFile,writeFileSync:c.writeFileSync,
|
|
385
|
+
function w(a,b){a=a.split('.');let c=ia;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={};'object'===typeof window&&(window.olympe=olympe);'object'===typeof global&&(global.olympe=olympe);olympe.DB=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};olympe.bb={};olympe.bb.node={};if('function'===typeof require){const a=require('buffer'),b=require('child_process'),c=require('fs'),d=require('http'),e=require('https'),f=require('lowdb'),g=require('os'),h=require('string_decoder'),k=require('url'),m=require('util'),n=require('ws'),p=require('xmlhttprequest'),q=require('zlib'),r=require('lowdb/adapters/FileAsync'),t=require('lowdb/adapters/Memory'),v={Dq:process.argv,gC:process.on.bind(process),buffer:a.Buffer,Blob:global.Blob,exec:b.exec,spawn:b.spawn,createWriteStream:c.createWriteStream,
|
|
386
|
+
exists:c.exists,existsSync:c.existsSync,mkdir:c.mkdir,mkdirSync:c.mkdirSync,readFile:c.readFile,readFileSync:c.readFileSync,rmdir:c.rmdir,rmdirSync:c.rmdirSync,writeFile:c.writeFile,writeFileSync:c.writeFileSync,Ew:f,WB:r,Dw:t,gunzipSync:q.gunzipSync,NB:d.createServer,Ge:d.request,OB:e.createServer,lw:e.request,ZB:g.platform,$B:g.release,mm:k.parse,StringDecoder:h.StringDecoder,WebSocket:n,XMLHttpRequest:p.XMLHttpRequest},u=/%c\[/g,x=/]\s([A-Za-z]+):\scolor:\s#[0-9a-f]+/g;class G{C(C,z){z=m.format.apply(null,
|
|
387
387
|
z)+'\n';const T=x.exec(z);null!==T&&(z=z.replace(T[0],T[1]),z=z.substring(0,T.index)+' '+C+' '+z.substring(T.index,z.length),z=z.replace(u,''));u.lastIndex=0;x.lastIndex=0;process.stdout.write(z)}log(...C){this.C('LOG',C)}error(...C){this.C('ERROR',C)}warn(...C){this.C('WARN',C)}info(...C){this.C('INFO',C)}trace(...C){this.C('INFO',C)}}global.Blob=require('cross-blob');global.window=global;global.require=require;global.OlympeNodeAPI=v;global.console=new G}else'undefined'!==typeof window&&(window.OlympeNodeAPI=
|
|
388
388
|
{},window.console=console);olympe.U={};olympe.U.bf={};olympe.U.bf.Um=class{C(a){const b=Object.keys(a.ae);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Bd(b[c]).Ci())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.U.bf.Um.ka=[olympe.U.bf.Oo];olympe.U.bf.Vm=class{C(a){function b(g,h){if(0<=h.indexOf(g))throw Error('Circular dependency detected: '+h.join(' > ')+' > '+g);h=h.concat(g);if(f[g]&&(delete f[g],g=a.Bd(g),c(g.wi(),h),g=g.Th,null!==g))for(let k=0,m=g.length;k<m;k++)c(g[k].wi(),h)}function c(g,h){for(let k=0,m=g.length,n;k<m;k++)n=g[k],n instanceof olympe.U.uc&&b(n.da(),h)}function d(){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g))return g}var e=Object.keys(a.ae);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
|
|
389
389
|
!0;for(;void 0!==(e=d());)b(e,[])}};olympe.U.bf.Vm.ka=[olympe.U.bf.Oo];olympe.U.bf.Oo=class{C(){}};const ja=[],ka=[];olympe.U.Wm=class{constructor(){}static C(a,b){ja.push(new olympe.U.uk(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');});a.push(olympe.U.T.vf);ka.push(new olympe.U.uk(b,c,a))}};olympe.U.Ib=olympe.U.Wm.C;olympe.U.run=olympe.U.Wm.F;olympe.U.kk=class{constructor(){}C(){}};olympe.U.uk=class{constructor(a,b,c){this.F=a;this.G=[];this.C=b;if(void 0!==c){this.G=c;for(let d=0,e=c.length;d<e;d++)'string'===typeof c[d]&&(c[d]=new olympe.U.uc(c[d]))}}wi(){return this.G}};function la(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.U.Me.C.kh)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.N.error('Error during instantiation of service '+b),f;}!e.F&&(a.C[b]=d)}return d}function ma(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.N.C++,f=b[e],d[e]=f instanceof olympe.U.kk?f.C(a):f,na(a.N);return d}
|
|
@@ -392,9 +392,9 @@ function B(a,b,c,d,e=!1){A(a.N,'Defining service (as a factory) '+b);a.C(b,d,c,!
|
|
|
392
392
|
olympe.U.mr=class{constructor(a){var b=ta,c=ua;this.ae=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.U.bf.Um,new olympe.U.bf.Vm];this.F=[];b&&oa(this,b);c&&oa(this,c,'version');a&&oa(this,a);a=this.getParameter(olympe.U.Z.As);this.G=void 0!==a?a:3;this.N=new olympe.U.qo(this.G)}rb(){return this.N}C(a,b,c,d,e){const f=a instanceof olympe.U.uc?a.da():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.ae[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
|
|
393
393
|
var g=this.ae[f];g.id=g.id+'!!'+ ++olympe.U.Dk.C;g.F=!0;g=g.id;c[h]=g;this.ae[g]=this.ae[f]}}this.ae[f]=new olympe.U.Dk(b,c,d||!1,f);return this.ae[f]}Bd(a){a=this.ae[a];if(void 0===a)throw Error();return a}getParameter(a){return this.parameters[a.toLowerCase()]}compile(){var a=this.F;this.N.debug('Calling '+a.length+' configure callbacks');this.N.C++;for(let b=0,c=a.length;b<c;b++)A(this.N,'Calling callback'),this.N.C++,a[b].call(null,this),na(this.N);na(this.N);this.N.debug('Configuration summary: '+
|
|
394
394
|
Object.keys(this.ae).length+' definitions');this.N.debug('Compiling...');this.N.C++;a=this.L;for(let b=0,c=a.length;b<c;b++)this.N.debug('running compilation pass '+(b+1)+': '+a[b].constructor.name),a[b].C(this);na(this.N);this.N.debug('Compilation done, returning container');return new olympe.U.Me(this.ae,this.parameters,this.G)}};olympe.U.Dk=class{constructor(a,b,c,d){this.L=a||null;this.G=!!c;this.C=[];this.li=!1;this.Th=null;if(b){this.C=b;for(let e=0,f=b.length;e<f;e++)'string'===typeof b[e]&&(b[e]=new olympe.U.uc(b[e]))}this.id=d||'';this.F=!1}da(){return this.id}instantiate(a){const b=a.rb();b.debug('Resolving arguments for '+this.id);const c=this.L;let d=ma(a,this.C);const e=()=>{if(this.G)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};A(b,'Instantiating '+this.id);const f=olympe.D?olympe.D.Vf().run(()=>
|
|
395
|
-
e()):e(),g=this.Th;let h,k,m;if(null!==g&&0<g.length){b.C++;A(b,'Calling configuration callbacks:');k=0;for(m=g.length;k<m;k++)b.C++,h=g[k],A(b,'Calling additional configuration callback '+h.C),d=ma(a,h.wi()),d.push(f),h.F.apply(null,d),na(b);na(b)}A(b,'Done instantiating '+this.id);return f}wi(){return this.C}Ci(){return this.li}Ib(a,b,c){null===this.Th&&(this.Th=[]);this.Th.push(new olympe.U.uk(b,c,a))}};olympe.U.Dk.C=0;function na(a){0<a.C&&a.C--}function A(a,b){1>=a.F&&va(a,'log','DI: '+b)}function va(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.U.qo=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&va(this,'log','DI: '+a)}info(a){3>=this.F&&va(this,'info','DI: '+a)}warn(a){4>=this.F&&va(this,'warn','DI: '+a)}error(a){5>=this.F&&va(this,'error','DI: '+a)}};olympe.U.ha=class extends olympe.U.kk{constructor(a){super();this.id=a}da(){return this.id}C(a){return a.getParameter(this.id)}};olympe.U.uc=class extends olympe.U.kk{constructor(a,b){super();this.id=a;this.F=b||olympe.U.Me.C.tr}da(){return this.id}C(a){return la(a,this.id,this.F)}};olympe.U.T={vf:'di.Container',
|
|
396
|
-
olympe.$.Sv=function(a){return wa(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let za=0,Aa=0;olympe.$.Qu=function(){var a=(new Date).getTime();a<=za?4294967295===Aa?(Aa=Math.floor(Math.random()/4*ya),za+=1):Aa=Math.floor(Aa+(4294967295-Aa)/2):(Aa=Math.floor(Math.random()/4*ya),za=a);a='00000000'+Aa.toString(16);return wa(za)+a.substr(a.length-8,8)};olympe.$.
|
|
397
|
-
olympe.$.Sf=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.$.
|
|
395
|
+
e()):e(),g=this.Th;let h,k,m;if(null!==g&&0<g.length){b.C++;A(b,'Calling configuration callbacks:');k=0;for(m=g.length;k<m;k++)b.C++,h=g[k],A(b,'Calling additional configuration callback '+h.C),d=ma(a,h.wi()),d.push(f),h.F.apply(null,d),na(b);na(b)}A(b,'Done instantiating '+this.id);return f}wi(){return this.C}Ci(){return this.li}Ib(a,b,c){null===this.Th&&(this.Th=[]);this.Th.push(new olympe.U.uk(b,c,a))}};olympe.U.Dk.C=0;function na(a){0<a.C&&a.C--}function A(a,b){1>=a.F&&va(a,'log','DI: '+b)}function va(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.U.qo=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&va(this,'log','DI: '+a)}info(a){3>=this.F&&va(this,'info','DI: '+a)}warn(a){4>=this.F&&va(this,'warn','DI: '+a)}error(a){5>=this.F&&va(this,'error','DI: '+a)}};olympe.U.ha=class extends olympe.U.kk{constructor(a){super();this.id=a}da(){return this.id}C(a){return a.getParameter(this.id)}};olympe.U.uc=class extends olympe.U.kk{constructor(a,b){super();this.id=a;this.F=b||olympe.U.Me.C.tr}da(){return this.id}C(a){return la(a,this.id,this.F)}};olympe.U.T={vf:'di.Container',yz:'di.PublicContainer'};olympe.U.Z={As:'logging.di'};olympe.U.run([olympe.U.T.vf],a=>{olympe.U.getParameter=b=>a.getParameter(b)});olympe.$={};function wa(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function xa(){var a=Math.random();return wa((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let ya=Math.pow(2,32)-1;olympe.$.Rb=function(){return xa()};olympe.$.Tl=function(){return xa()};olympe.$.fm=function(a,b=1){const c=a.substr(12,a.length-12);return wa(parseInt(a.substr(0,12),16)+b)+c};
|
|
396
|
+
olympe.$.Sv=function(a){return wa(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let za=0,Aa=0;olympe.$.Qu=function(){var a=(new Date).getTime();a<=za?4294967295===Aa?(Aa=Math.floor(Math.random()/4*ya),za+=1):Aa=Math.floor(Aa+(4294967295-Aa)/2):(Aa=Math.floor(Math.random()/4*ya),za=a);a='00000000'+Aa.toString(16);return wa(za)+a.substr(a.length-8,8)};olympe.$.kC=function(){for(let a=0;1E4>a;a++)console.log(olympe.$.Qu())};
|
|
397
|
+
olympe.$.Sf=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.$.HB=function(a){let b='';for(let c=0;5>c;c++)b+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return(a?a:'UI')+'-'+b};olympe.$.FB=function(a,b){return(b?b:'UI')+'-'+a};olympe.$.bo=class{constructor(a){this.id=a||olympe.$.bo.C++}Jb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.$.bo.C=0;olympe.$.lz=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.$.ih=function(a,b,c,d,e,f,g,h,k,m,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,m,n,p,q,0]};olympe.$.ih.F=function(a){return new olympe.$.ih(.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.$.ih.C=function(){return new olympe.$.ih(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.$.ih.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.$.ih.prototype.get=function(a,b){return this.values[5*a+b]};function Ba(a){return(new TextEncoder).encode(a).buffer}function Ca(a){return(new TextDecoder('utf8')).decode(a)}olympe.$.rk=class{O(){}C(){}G(){}L(){}F(){}V(){}};olympe.$.Qp=a=>a.replace('+','-').replace('/','_');olympe.$.ju=a=>a.replace('-','+').replace('_','/');function Da(a,b){return a+b&4294967295}
|
|
398
398
|
function Ea(a,b){let c=a[0],d=a[1],e=a[2],f=a[3];c=E(c,d,e,f,b[0],7,-680876936);f=E(f,c,d,e,b[1],12,-389564586);e=E(e,f,c,d,b[2],17,606105819);d=E(d,e,f,c,b[3],22,-1044525330);c=E(c,d,e,f,b[4],7,-176418897);f=E(f,c,d,e,b[5],12,1200080426);e=E(e,f,c,d,b[6],17,-1473231341);d=E(d,e,f,c,b[7],22,-45705983);c=E(c,d,e,f,b[8],7,1770035416);f=E(f,c,d,e,b[9],12,-1958414417);e=E(e,f,c,d,b[10],17,-42063);d=E(d,e,f,c,b[11],22,-1990404162);c=E(c,d,e,f,b[12],7,1804603682);f=E(f,c,d,e,b[13],12,-40341101);e=E(e,f,
|
|
399
399
|
c,d,b[14],17,-1502002290);d=E(d,e,f,c,b[15],22,1236535329);c=F(c,d,e,f,b[1],5,-165796510);f=F(f,c,d,e,b[6],9,-1069501632);e=F(e,f,c,d,b[11],14,643717713);d=F(d,e,f,c,b[0],20,-373897302);c=F(c,d,e,f,b[5],5,-701558691);f=F(f,c,d,e,b[10],9,38016083);e=F(e,f,c,d,b[15],14,-660478335);d=F(d,e,f,c,b[4],20,-405537848);c=F(c,d,e,f,b[9],5,568446438);f=F(f,c,d,e,b[14],9,-1019803690);e=F(e,f,c,d,b[3],14,-187363961);d=F(d,e,f,c,b[8],20,1163531501);c=F(c,d,e,f,b[13],5,-1444681467);f=F(f,c,d,e,b[2],9,-51403784);
|
|
400
400
|
e=F(e,f,c,d,b[7],14,1735328473);d=F(d,e,f,c,b[12],20,-1926607734);c=H(d^e^f,c,d,b[5],4,-378558);f=H(c^d^e,f,c,b[8],11,-2022574463);e=H(f^c^d,e,f,b[11],16,1839030562);d=H(e^f^c,d,e,b[14],23,-35309556);c=H(d^e^f,c,d,b[1],4,-1530992060);f=H(c^d^e,f,c,b[4],11,1272893353);e=H(f^c^d,e,f,b[7],16,-155497632);d=H(e^f^c,d,e,b[10],23,-1094730640);c=H(d^e^f,c,d,b[13],4,681279174);f=H(c^d^e,f,c,b[0],11,-358537222);e=H(f^c^d,e,f,b[3],16,-722521979);d=H(e^f^c,d,e,b[6],23,76029189);c=H(d^e^f,c,d,b[9],4,-640364487);
|
|
@@ -402,17 +402,17 @@ f=H(c^d^e,f,c,b[12],11,-421815835);e=H(f^c^d,e,f,b[15],16,530742520);d=H(e^f^c,d
|
|
|
402
402
|
b[4],6,-145523070);f=I(f,c,d,e,b[11],10,-1120210379);e=I(e,f,c,d,b[2],15,718787259);d=I(d,e,f,c,b[9],21,-343485551);a[0]=Da(c,a[0]);a[1]=Da(d,a[1]);a[2]=Da(e,a[2]);a[3]=Da(f,a[3])}function H(a,b,c,d,e,f){b=Da(Da(b,a),Da(d,f));return Da(b<<e|b>>>32-e,c)}function E(a,b,c,d,e,f,g){return H(b&c|~b&d,a,b,e,f,g)}function F(a,b,c,d,e,f,g){return H(b&d|c&~d,a,b,e,f,g)}function I(a,b,c,d,e,f,g){return H(c^(b|~d),a,b,e,f,g)}
|
|
403
403
|
function Fa(a,b=32){const c='0123456789abcdef'.split('');var d=a,e=d.length;a=[1732584193,-271733879,-1732584194,271733878];var f;for(f=64;f<=d.length;f+=64){var g=d.substring(f-64,f),h=[];for(let k=0;64>k;k+=4)h[k>>2]=g.charCodeAt(k)+(g.charCodeAt(k+1)<<8)+(g.charCodeAt(k+2)<<16)+(g.charCodeAt(k+3)<<24);Ea(a,h)}d=d.substring(f-64);g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(f=0;f<d.length;f++)g[f>>2]|=d.charCodeAt(f)<<(f%4<<3);g[f>>2]|=128<<(f%4<<3);if(55<f)for(Ea(a,g),f=0;16>f;f++)g[f]=0;g[14]=8*e;
|
|
404
404
|
Ea(a,g);d='';e=0;b=0<=b?b:32;for(f=0;4>f;f++)for(h=a[f],g=0;4>g;g++){if(++e>b)return d;d+=c[h>>8*g+4&15];if(++e>b)return d;d+=c[h>>8*g&15]}return d}'5d41402abc4b2a76b9719d911017c592'!==Fa('hello')&&(Da=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.$.Ac=Fa;olympe.$.mm=function(a){var b=/^(?:(\S*)@)?([^:]+)(?::(\d{2,5}))?$/;const c=/([^&=]+)=([^&=]+)/g,d=/^true|false$/i,e=/^\d+(\.\d+)?$/;var f=a.match(/^(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?\/?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/);a=f[1];const g=f[2],h=f[3],k=f[4];f=f[5];let m=null,n=null;var p=null;g&&(p=g.match(b),m=p[1],n=p[2],p=p[3]);b={};let q;for(;q=c.exec(k);){let r=q[2];void 0===r?r=!0:d.test(r)?r='true'===r.toLowerCase():e.test(r)?r=parseFloat(r):r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||
|
|
405
|
-
null,
|
|
406
|
-
olympe.$.lm=(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.$.lm(a[c],d):a[c]=d}};olympe.$.Ul=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.$.lm(d,e);b(`conf.d/${a}`,f=>{olympe.$.lm(d,f);c(d)})})};olympe.$.
|
|
405
|
+
null,wB:g||null,Oq:m||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,GB:f||null,parameters:b}};olympe.$.eC=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.$.iC=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};olympe.$.jq=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};
|
|
406
|
+
olympe.$.lm=(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.$.lm(a[c],d):a[c]=d}};olympe.$.Ul=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.$.lm(d,e);b(`conf.d/${a}`,f=>{olympe.$.lm(d,f);c(d)})})};olympe.$.uB=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}clone(){return new a(this.x,this.y)}Zl(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.$.Zx=class{constructor(a,b,c,d){this.from=a;this.target=b;this.C=c;this.F=d}toString(){return`(${this.from.toString()}, ${this.target.toString()}, ${this.C.toString()}, ${this.F.toString()})`}};olympe.$.Ds=class{constructor(a,b){this.start=a;this.end=b}};olympe.$.Ds.C={gh:'left',mh:'right',Xx:'bottom',QA:'top'};function Ga(a){return`${a.C}.${a.F}.${a.G}`}
|
|
407
407
|
olympe.$.$e=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.$.$e.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.$.$e.C:new olympe.$.$e(b,c,d,a[4])}Jb(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}`:'')}};
|
|
408
408
|
olympe.$.$e.C=new olympe.$.$e(Number.NaN,Number.NaN,Number.NaN);olympe.$.T={Tg:'utils.binaryConverter',Uq:'utils.base64Converter'};olympe.U.Ib(a=>{ra(a,olympe.$.T.Tg);qa(a,olympe.$.T.Uq,olympe.$.T.Tg,!0)},'Utils services');olympe.U.run([olympe.$.T.Tg],a=>{olympe.$.xh=()=>a});olympe.bb.node.$={};const Ha=new Map;olympe.bb.node.$.rk=class extends olympe.$.rk{O(a){return(new Uint8Array(OlympeNodeAPI.buffer.from(a,'base64'))).buffer}C(a){return OlympeNodeAPI.buffer.from(a).toString('base64')}G(a,b){a.arrayBuffer().then(olympe.D.Ja().vb(b))}L(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;Ha.set(b,a);return b}F(a,b,c){Ha.has(a)?b(Ha.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}V(a){Ha.delete(a)}};olympe.U.Ib(function(a){pa(a,olympe.$.T.Tg,olympe.bb.node.$.rk)},'olympe.native.node.utils');olympe.ua={};olympe.ua.Cb=class{L(){}na(){}G(){}ca(){}ja(){}ya(){}O(){}V(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ua.Cb.prototype.fatal=olympe.ua.Cb.prototype.fatal;olympe.ua.Cb.prototype.error=olympe.ua.Cb.prototype.error;olympe.ua.Cb.prototype.warn=olympe.ua.Cb.prototype.warn;olympe.ua.Cb.prototype.info=olympe.ua.Cb.prototype.info;olympe.ua.Cb.prototype.log=olympe.ua.Cb.prototype.log;olympe.ua.Cb.prototype.debug=olympe.ua.Cb.prototype.debug;olympe.ua.Cb.prototype.trace=olympe.ua.Cb.prototype.trace;
|
|
409
|
-
olympe.ua.Cb.C={Gt:0,wf:1,zs:2,Xn:3,Nt:4,wc:5,wr:6,dl:7};olympe.ua.Cb.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ua.qa=class{Gc(){}};olympe.ua.Hc={};function Ia(a,b,c,d,e,f){var g=new Date;g=('00'+g.getHours()).substr(-2)+':'+('00'+g.getMinutes()).substr(-2)+':'+('00'+g.getSeconds()).substr(-2)+'.'+('00'+g.getMilliseconds()).substr(-3);f=a.
|
|
410
|
-
olympe.ua.Hc.Cb=class{constructor(a,b,c){this.name=a;this.C=b;this.
|
|
409
|
+
olympe.ua.Cb.C={Gt:0,wf:1,zs:2,Xn:3,Nt:4,wc:5,wr:6,dl:7};olympe.ua.Cb.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ua.qa=class{Gc(){}};olympe.ua.Hc={};function Ia(a,b,c,d,e,f){var g=new Date;g=('00'+g.getHours()).substr(-2)+':'+('00'+g.getMinutes()).substr(-2)+':'+('00'+g.getSeconds()).substr(-2)+'.'+('00'+g.getMilliseconds()).substr(-3);f=a.Qa?`%c[${g}] [${f.toUpperCase()}] ${c}:%c`:`%c[${g}] ${c}:%c`;for(const h of d)f+=' '+h;a.console[b](f,'color: '+e,'color: #444');for(const h of a.Ea.values())h(g,c,b,...d)}
|
|
410
|
+
olympe.ua.Hc.Cb=class{constructor(a,b,c){this.name=a;this.C=b;this.Qa=c;this.F=a.toUpperCase();this.Ea=new Map;this.console=console}L(){return this.C}na(){return this.C<=olympe.ua.Cb.C.Gt}G(){return this.C<=olympe.ua.Cb.C.wf}ja(){return this.C<=olympe.ua.Cb.C.zs}ca(){return this.C<=olympe.ua.Cb.C.Xn}ya(){return this.C<=olympe.ua.Cb.C.Nt}O(){return this.C<=olympe.ua.Cb.C.wc}V(){return this.C<=olympe.ua.Cb.C.wr}trace(...a){this.na()&&Ia(this,'log',this.F,a,'#99b','trace')}debug(...a){this.G()&&Ia(this,
|
|
411
411
|
'log',this.F,a,'#888','debug')}log(...a){this.ja()&&Ia(this,'log',this.F,a,'#000','log')}info(...a){this.ca()&&Ia(this,'info',this.F,a,'#00f','info')}warn(...a){this.ya()&&Ia(this,'warn',this.F,a,'#684911','warn')}error(...a){this.O()&&Ia(this,'error',this.F,a,'#f00','error')}fatal(...a){this.V()&&Ia(this,'error',this.F,a,'#f00','fatal')}};olympe.ua.Hc.Cb.ka=[olympe.ua.Cb];olympe.ua.Hc.qa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Gc('logging');this.N.info('Logging initialized, global log level is '+olympe.ua.Cb.F[b])}Gc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ua.Z.ar}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ua.Z.tt}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&
|
|
412
412
|
(d=!0===this.C.getParameter(c));b=new olympe.ua.Hc.Cb(a,b,d);this.channels.set(a,b)}return b}};olympe.ua.Hc.qa.ka=[olympe.ua.qa];olympe.ua.T={ta:'logging.Manager'};olympe.ua.Z={En:'logging',Fn:'logging.showLogLevel',ar:'logging',tt:'showLogLevel'};olympe.U.Ib(function(a){D(a,olympe.ua.Z.En,olympe.ua.Cb.C.Xn);D(a,olympe.ua.Z.Fn,!0);pa(a,olympe.ua.T.ta,olympe.ua.Hc.qa,olympe.U.T.vf,new olympe.U.ha(olympe.ua.Z.En),new olympe.U.ha(olympe.ua.Z.Fn))},'olympe.logging');olympe.U.run([olympe.ua.T.ta],a=>{olympe.ua.rb=b=>a.Gc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Z={wo:'df.nodeCreationThreshold'};const Ja=[];function Ka(){}function La(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Ka:b;this.F=void 0===c?Ja:c;this.ca=d}static L(){var b=[];return void 0===b||0===b.length?olympe.D.J.ja:new a(La,b)}L(){return this.C?this.C():void 0}G(){return this.F?this.F:Ja}O(){return null===this.C&&null===this.F}V(){return this.C===La}};olympe.D.J.ca=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.ja=new olympe.D.J(La);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ea);
|
|
413
413
|
olympe.D.J.F=new olympe.D.J(()=>olympe.D.Oa);olympe.D.J.O=new olympe.D.J(()=>olympe.D.fa);olympe.D.J.V=new olympe.D.J(()=>olympe.D.Zb);olympe.D.$g=class{da(){return''}Qj(){return''}gb(){}Kb(){return!1}Vd(){return!1}run(a,...b){return a(...b)}vb(a){return a}getParent(){return null}Jq(){}Eg(){}Of(){}detach(){}Nj(){}ze(){}onDestroy(){return''}dg(){}Sc(){return''}Bq(){}};olympe.D.$g.prototype.offDestroy=olympe.D.$g.prototype.dg;olympe.D.$g.prototype.onDestroy=olympe.D.$g.prototype.onDestroy;let Ma=0;olympe.U.run([new olympe.U.ha(olympe.D.Z.wo)],()=>{});
|
|
414
|
-
olympe.D.lc=class{constructor(a='SimpleContext',b){++Ma;this.ja=new Map;this.na=new Map;this.ca=new Map;this.fb=0;this.name=a;this.id=String(Ma);this.
|
|
415
|
-
this.na.clear();this.ca.clear();this.L&&(this.L.detach(this,!1),this.L=null);this.ya=!0;this.
|
|
414
|
+
olympe.D.lc=class{constructor(a='SimpleContext',b){++Ma;this.ja=new Map;this.na=new Map;this.ca=new Map;this.fb=0;this.name=a;this.id=String(Ma);this.Qa=this.ya=!1;(this.L=void 0===b?olympe.D.Ja():b)&&this.L.Of(this);this.debug=!1}da(){return this.id}Qj(){return this.name}run(a,...b){if(!this.ya){var c=olympe.D.Iq(this);a=a(...b);c&&olympe.D.Iq(c);return a}}vb(a){return(...b)=>this.run(a,...b)}gb(){if(!this.ya&&!this.Qa){this.Qa=!0;this.ze();for(const a of this.na.keys())this.na.has(a)&&this.na.get(a)();
|
|
415
|
+
this.na.clear();this.ca.clear();this.L&&(this.L.detach(this,!1),this.L=null);this.ya=!0;this.Qa=!1;this.ze()}}Kb(){return this.ya}Vd(){return this.Qa}Of(a){if(!this.ya){var b;olympe.D.Za(a)?b=a.Sa:olympe.D.im(a)&&(b=a);b&&this.ja.set(b.da(),b)}}detach(a,b=!0){let c;olympe.D.Za(a)?c=a.Sa:olympe.D.im(a)&&(c=a);c&&this.ja.has(c.da())&&(b&&c.Nj(this),this.ja.delete(c.da()))}Nj(){this.L=null;this.gb()}ze(){const a=this.ja;for(const b of a.keys())a.has(b)&&a.get(b).Nj(this);this.ja.clear();for(const b of this.ca.keys())this.ca.has(b)&&
|
|
416
416
|
this.ca.get(b)();this.ca.clear()}onDestroy(a,b){void 0===b&&(++this.fb,b=String(this.fb));this.na.set(b,a);return b}dg(a){this.na.delete(a)}Sc(a){if(void 0===b){++this.fb;var b=String(this.fb)}this.ca.set(b,a);return b}Bq(a){this.ca.delete(a)}Jq(a){this.L&&this.L.detach(this,!1);(this.L=a||null)&&this.L.Of(this)}getParent(){return this.L}Eg(){return this.ja}};olympe.D.Zo=class extends olympe.D.lc{constructor(){super('Root',null)}gb(){}onDestroy(){return''}dg(){}};olympe.D.$g.ka=[olympe.D.$g];let Na=0;
|
|
417
417
|
function Oa(a,b){a.O||(a.O=new Map);a.O.set(b.da(),b);switch(b.C){case olympe.D.Node.C.jh:break;case olympe.D.Node.C.qh:break;case olympe.D.Node.C.sj:case olympe.D.Node.C.yf:olympe.D.N.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.ah:Pa(a,olympe.D.Node.C.ah);break;case olympe.D.Node.C.OBSOLETE:a.hb=!0;a.C!==olympe.D.Node.C.ah&&Pa(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.xf:olympe.D.N.warn('Adding a destroyed node as upstream => should never happen!');break;
|
|
418
418
|
default:olympe.D.N.warn('Unknown state, investigate: ',b.C)}Qa(b,a)}
|
|
@@ -425,7 +425,7 @@ c instanceof Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object
|
|
|
425
425
|
function bb(a,b){if(a.C!==olympe.D.Node.C.yf&&a.C!==olympe.D.Node.C.xf&&(a.C!==olympe.D.Node.C.jh||a.nd)){var c=void 0!==a.defaultValue;a.nd&&b!==a.F&&a.ze();if(c)J(a,a.defaultValue,!0);else if(a.Jc=void 0,Pa(a,olympe.D.Node.C.jh),b=a.G)for(const d of b.values())bb(d,a)}}function Ua(a){if(a.C!==olympe.D.Node.C.ah){Pa(a,olympe.D.Node.C.ah);var b=a.G;if(b)for(const c of b.values())Ua(c);a.ze();void 0!==a.F&&Wa(a);a.Jc=a.defaultValue}}function Sa(a){return a.C===olympe.D.Node.C.qh}
|
|
426
426
|
function Ta(a,b){b===a?olympe.D.N.error('Setting a node as provider of itself. Ignoring'):(a.F&&a.F!==b&&Wa(a),Qa(b,a),Sa(b)?J(a,b.Jc,!0):void 0!==a.defaultValue?J(a,a.defaultValue,!0):bb(a),a.F=b)}function cb(a,b){a.nd&&(a.nd=void 0);a.hd='Repeater';Ta(a,b)}function Za(a){a.F?Ya(a):null!==a.O&&0===Array.from(a.O.values()).filter(b=>!Sa(b)).length&&(a.hb&&(a.hb=!1,Ra(a)),Ya(a))}
|
|
427
427
|
function Qa(a,b){a.G||(a.G=new Map);a.G.set(b.da(),b);a.C===olympe.D.Node.C.xf&&olympe.D.N.warn('adding a downstream node on a deleted one (#'+a.da()+') !')}function Xa(a,b){a.G&&(b=b.da(),a.G.has(b)&&(a.G.delete(b),eb(a)))}function eb(a){if(null===a.getParent()){var b=a.G;b&&0<b.size||a.gb()}}
|
|
428
|
-
olympe.D.Node=class extends olympe.D.lc{constructor({valueType:a,nd:b,
|
|
428
|
+
olympe.D.Node=class extends olympe.D.lc{constructor({valueType:a,nd:b,dx:c=!0,qf:d,gm:e,debug:f=!1,Nf:g=null,hd:h='Node',ni:k}={}){++Na;super(String(Na));this.debug=!!f;this.hd=h;h&&'string'===typeof h||(b?this.hd=b.name?b.name:'anon()':this.hd='Node');this.V=e&&0<e.length?e:null;this.Nf=g&&0<g.length?g:null;this.valueType=a;this.Jc=void 0;this.Ea=!1;this.C=olympe.D.Node.C.jh;this.hb=!1;this.G=this.O=null;this.nd=b;this.qf=d||null;this.defaultValue=this.Xa=this.F=void 0;this.ni=k;d&&d instanceof olympe.D.Node&&
|
|
429
429
|
Oa(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Oa(this,a);c&&Ra(this)}Je(a){this.defaultValue=a;this.C===olympe.D.Node.C.jh&&J(this,a,!0);return this}Mb(){return this.valueType||Object}Kb(){return this.C===olympe.D.Node.C.xf}Vd(){return this.C===olympe.D.Node.C.yf}xb(...a){if(this.ni instanceof Function)return this.ni(...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.C;a!==olympe.D.Node.C.yf&&a!==olympe.D.Node.C.xf||olympe.D.N.warn('Calling a function on a destroyed node!!!',
|
|
430
430
|
this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.D.Za(g)&&b.push(g.Sa);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.he&&(e[g]=f.Sa,b.push(g));return K(new olympe.D.Node({valueType:d.L(),nd:c,qf:this,gm:e,debug:!1,Nf:b,hd:'Proxy.'+c+'()'}))}Nj(a){if(null===this.getParent())olympe.D.N.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.N.warn('Investigate a potential issue in creator-createe link: create node mismatch',a,this.getParent());
|
|
431
431
|
return}this.Jq(null);eb(this)}gb(){var a=this.C;if(a!==olympe.D.Node.C.yf&&a!==olympe.D.Node.C.xf){Pa(this,olympe.D.Node.C.yf);if(a=this.G){for(const c of a.values())if(a.has(c.da())){var b=c;b.O&&b.O.delete(this.da());b.F&&b.F.da()===this.da()?b.F=void 0:b.gb()}a.clear()}this.G=null;super.gb();if(this.O){for(const c of this.O.values())this.O.has(c.da())&&Xa(c,this);this.O.clear()}this.O=null;this.F&&(Xa(this.F,this),this.F=void 0);this.Jc=void 0;this.V&&(this.V.length=0,this.V=null);this.Nf&&(this.Nf.length=
|
|
@@ -437,8 +437,8 @@ olympe.D.Proxy=class{constructor(a,b){this.Sa=null;this.Jj=a;this.Ep=b}static Za
|
|
|
437
437
|
olympe.D.ea=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.va(b.value)}um(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.qc(!this.um())}Xc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.D.sb(''):olympe.D.sb(this.value.toString())}toString(a,b){return void 0!==
|
|
438
438
|
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.um()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.Ic(olympe.D.ea,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.va(c))};a.forEach((f,g)=>{olympe.D.rc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.Kb()){var g=b.get(f);b.delete(f);g===c&&
|
|
439
439
|
e()}});return d.yb()}Gd(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.va(b.valueOf()+c.valueOf()),olympe.D.ea,'ONumber.plus')}Og(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.va(b.valueOf()-c.valueOf()),olympe.D.ea,'ONumber.minus')}round(){return olympe.D.va(Math.round(this.valueOf()))}Ri(){return olympe.D.va(-this.valueOf())}$j(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.va(b.valueOf()*c.valueOf()),olympe.D.ea,'ONumber.mul')}ri(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.va(b.valueOf()/c.valueOf()),
|
|
440
|
-
olympe.D.ea,'ONumber.div')}
|
|
441
|
-
a],(b,c)=>olympe.D.qc(b.Jb(c)),olympe.D.fa,'ONumber.oEquals')}Jb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Ev(){return this.valueOf()}hm(a){return olympe.D.xa([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa,'ONumber.isBiggerThan')}
|
|
440
|
+
olympe.D.ea,'ONumber.div')}Gw(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.va(b.valueOf()%c.valueOf()),olympe.D.ea,'ONumber.div')}floor(){return olympe.D.va(Math.floor(this.valueOf()))}ceil(){return olympe.D.va(Math.ceil(this.valueOf()))}trunc(){return olympe.D.va(Math.trunc(this.valueOf()))}log(){return olympe.D.va(Math.log(this.valueOf()))}pow(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.va(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ea,'ONumber.pow')}exp(){return olympe.D.va(Math.exp(this.valueOf()))}yd(a){return olympe.D.xa([this,
|
|
441
|
+
a],(b,c)=>olympe.D.qc(b.Jb(c)),olympe.D.fa,'ONumber.oEquals')}Jb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Ev(){return this.valueOf()}hm(a){return olympe.D.xa([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa,'ONumber.isBiggerThan')}ix(a){return olympe.D.xa([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.va(c),olympe.D.ea,'ONumber.returnsBiggest')}Hq(a){return olympe.D.xa([this,
|
|
442
442
|
a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.va(c),olympe.D.ea,'ONumber.returnsSmallest')}sw(a){return olympe.D.xa([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.va(Math.sin(this.valueOf()))}cos(){return olympe.D.va(Math.cos(this.valueOf()))}atan2(a){return olympe.D.Za(a)?olympe.D.Hd([a],b=>olympe.D.va(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ea):olympe.D.va(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.va(Math.abs(this.valueOf()))}Hi(a,
|
|
443
443
|
b){return olympe.D.Za(a)||olympe.D.Za(b)?olympe.D.Hd([a,b],(c,d)=>olympe.D.va(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ea):olympe.D.va(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static Qt(a,b,c,d){'number'===typeof a&&(a=olympe.D.Fd(a));'number'===typeof b&&(b=olympe.D.Fd(b));'number'===typeof c&&(c=olympe.D.Fd(c));let e=0;const f=olympe.D.Fd(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.Uj(b.hm(c),()=>{olympe.ua.rb('df').warn('You have a min bigger than max, cap your inputs')});
|
|
444
444
|
const k=(m,n)=>{n=olympe.D.Fd(n);const p=olympe.D.ea.animate(n,500);mb(f,p);jb(n,olympe.D.va(m));e=m};olympe.D.Hd([a],m=>{e+=m.valueOf();e>h?k(h,e):e<g?k(g,e):mb(f,olympe.D.Fd(e))},olympe.D.ea);void 0!==b&&olympe.D.ck(b.valueOf(),m=>{if(g!==m&&(g=m,g>e)){const n=olympe.D.Fd(e),p=olympe.D.ea.animate(n,400,d);m=olympe.D.va(g);J(n.Sa,m);e=g;mb(f,p)}});void 0!==c&&olympe.D.ck(c.valueOf(),m=>{if(h!==m&&(h=m,h<e)){const n=olympe.D.Fd(e),p=olympe.D.ea.animate(n,400,d);m=olympe.D.va(h);J(n.Sa,m);e=h;mb(f,
|
|
@@ -446,45 +446,45 @@ p)}});return f}static offset(a){let b;return olympe.D.Hd([a],c=>{void 0===b&&(b=
|
|
|
446
446
|
e=window.performance.now();b=b.Gd((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ea,'integrate')}static zu(a){let b;return olympe.D.xa([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.va(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ea,'diff')}static qu(a,b,c){return olympe.D.Hd([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.va(d>=e?d<=f?d:f:e)},olympe.D.ea)}static animate(a,b,c,d){let e;
|
|
447
447
|
return e=olympe.D.xa([a],f=>{const g=olympe.D.Ta(b,1E3),h=olympe.D.Ta(e);return void 0===h?olympe.D.va(f):pb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ea)}static eu(a,b,c){let d,e,f,g,h,k,m=olympe.D.Fd(),n;olympe.D.rc([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);jb(m,olympe.D.va(g));1===h&&(clearTimeout(n),n=void 0)},0))});return m}static Xc(a){return olympe.D.Za(a)?
|
|
448
448
|
olympe.D.xa([a],b=>olympe.D.sb(b.valueOf().toString()),olympe.D.Oa):olympe.D.sb(a)}static Ri(a){return olympe.D.Za(a)?olympe.D.xa([a],b=>olympe.D.va(-b.valueOf()),olympe.D.ea):olympe.D.va(-a.valueOf())}static Gd(a,b){return olympe.D.Za(a)||olympe.D.Za(b)?olympe.D.xa([a,b],(c,d)=>olympe.D.va(c.valueOf()+d.valueOf()),olympe.D.ea,'plus'):olympe.D.va(a.valueOf()+b.valueOf())}static Og(a,b){return olympe.D.Za(a)||olympe.D.Za(b)?olympe.D.Hd([a,b],(c,d)=>olympe.D.va(c.valueOf()-d.valueOf()),olympe.D.ea,
|
|
449
|
-
'minus'):olympe.D.va(a.valueOf()-b.valueOf())}static ri(a,b){return olympe.D.Za(a)||olympe.D.Za(b)?olympe.D.Hd([a,b],(c,d)=>olympe.D.va(c.valueOf()/d.valueOf()),olympe.D.ea,'div'):olympe.D.va(a.valueOf()/b.valueOf())}static
|
|
450
|
-
olympe.D.ea.Nr=new olympe.D.ea(Infinity);olympe.D.ea.Ms=new olympe.D.ea(-Infinity);olympe.D.ea.vo=new olympe.D.ea(NaN);olympe.D.ea.
|
|
451
|
-
olympe.D.ea.
|
|
452
|
-
olympe.D.ea.jn={mo:function(a,b,c,d){return c*a/d+b},
|
|
453
|
-
|
|
454
|
-
10*(a/d-1))+b},
|
|
455
|
-
c*(2*d*d+2*d*a+-3*d)},
|
|
456
|
-
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},
|
|
457
|
-
l.toString.K=new olympe.D.J(()=>String,[]);l.toFixed.K=new olympe.D.J(()=>String,[]);l.Gd.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.Og.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.round.K=olympe.D.J.G;l.Ri.K=olympe.D.J.G;l.$j.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.ri.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.
|
|
458
|
-
l.yd.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.Jb.K=olympe.D.J.C;l.valueOf.K=olympe.D.J.C;l.Ev.K=olympe.D.J.C;l.hm.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.
|
|
449
|
+
'minus'):olympe.D.va(a.valueOf()-b.valueOf())}static ri(a,b){return olympe.D.Za(a)||olympe.D.Za(b)?olympe.D.Hd([a,b],(c,d)=>olympe.D.va(c.valueOf()/d.valueOf()),olympe.D.ea,'div'):olympe.D.va(a.valueOf()/b.valueOf())}static bx(a,b){if(void 0===b)return a;olympe.D.rc([b],c=>{c=olympe.D.va(L(a).valueOf()+c.valueOf());J(a.Sa,c)},'plusEqual');return a}};olympe.D.ea.ZERO=new olympe.D.ea(0);olympe.D.ea.ONE=new olympe.D.ea(1);olympe.D.ea.Jt=new olympe.D.ea(2);olympe.D.ea.PI=new olympe.D.ea(Math.PI);
|
|
450
|
+
olympe.D.ea.Nr=new olympe.D.ea(Infinity);olympe.D.ea.Ms=new olympe.D.ea(-Infinity);olympe.D.ea.vo=new olympe.D.ea(NaN);olympe.D.ea.Az=olympe.D.ea.bx;olympe.D.ea.Nx=olympe.D.ea.Qt;olympe.D.ea.rz=olympe.D.ea.offset;olympe.D.ea.ky=olympe.D.ea.Zp;olympe.D.ea.AB=olympe.D.ea.Zp;olympe.D.ea.bz=olympe.D.ea.mw;olympe.D.ea.ly=olympe.D.ea.zu;olympe.D.ea.by=olympe.D.ea.qu;olympe.D.ea.Ox=olympe.D.ea.animate;olympe.D.ea.Px=olympe.D.ea.eu;olympe.D.ea.RA=olympe.D.ea.Xc;olympe.D.ea.SA=olympe.D.ea.Ri;
|
|
451
|
+
olympe.D.ea.zz=olympe.D.ea.Gd;olympe.D.ea.mz=olympe.D.ea.Og;olympe.D.ea.my=olympe.D.ea.ri;
|
|
452
|
+
olympe.D.ea.jn={mo:function(a,b,c,d){return c*a/d+b},Hy:function(a,b,c,d){a/=d;return c*a*a+b},Ry:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},Dy: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},wy:function(a,b,c,d){a/=d;return c*a*a*a+b},Ny:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},By: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},Iy:function(a,b,c,d){a/=d;return c*a*a*a*a+b},Sy:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
|
|
453
|
+
Ey: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},Jy:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},Ty:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},Fy: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},Ky:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},Uy:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},Gy:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},zy:function(a,b,c,d){return c*Math.pow(2,
|
|
454
|
+
10*(a/d-1))+b},Qy:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},Cy: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},vy:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},My:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},Ay: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},qy:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},ry:function(a,b,c,d){d=(a/=d)*a;return b+
|
|
455
|
+
c*(2*d*d+2*d*a+-3*d)},sy:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},ty:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},Py: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)},Oy: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)},yy:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},xy:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},Ly:function(a,
|
|
456
|
+
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},uy: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}};l=olympe.D.ea.prototype;l.toJSON.K=olympe.D.J.C;l.um.K=olympe.D.J.C;l.isNaN.K=olympe.D.J.O;l.Xc.K=olympe.D.J.F;
|
|
457
|
+
l.toString.K=new olympe.D.J(()=>String,[]);l.toFixed.K=new olympe.D.J(()=>String,[]);l.Gd.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.Og.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.round.K=olympe.D.J.G;l.Ri.K=olympe.D.J.G;l.$j.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.ri.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.Gw.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.floor.K=olympe.D.J.G;l.ceil.K=olympe.D.J.G;l.trunc.K=olympe.D.J.G;l.log.K=olympe.D.J.G;l.pow.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.exp.K=olympe.D.J.G;
|
|
458
|
+
l.yd.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.Jb.K=olympe.D.J.C;l.valueOf.K=olympe.D.J.C;l.Ev.K=olympe.D.J.C;l.hm.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.ix.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.Hq.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.sw.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.sin.K=olympe.D.J.G;l.cos.K=olympe.D.J.G;l.atan2.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.abs.K=olympe.D.J.G;l.Hi.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);olympe.D.Oa=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.sb(b.value)}Up(a){return olympe.D.Oa.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.xa([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.sb(d)},olympe.D.Oa,'OString.concat')}Xc(){return this}Gx(a){return olympe.D.va(parseInt(this.value,
|
|
459
459
|
a))}Mq(){return olympe.D.va(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}Jb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}yd(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.qc(c&&b.valueOf()===c.valueOf()),olympe.D.fa,'OString.oEquals')}kf(){return olympe.D.qc(!this.value||0===this.value.length)}contains(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.qc((c instanceof olympe.D.Oa||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
|
|
460
460
|
olympe.D.fa,'OString.contains')}startsWith(a,b){return olympe.D.xa([this,a,b||0],(c,d,e)=>olympe.D.qc(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.D.fa,'OString.startsWith')}endsWith(a,b){return olympe.D.xa([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Zl().valueOf()+e.valueOf()+1;return olympe.D.qc(c.valueOf().endsWith(d.valueOf(),e))},olympe.D.fa,'OString.endsWith')}indexOf(a,b){return olympe.D.xa([this,a,b||0],(c,d,e)=>olympe.D.va(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
|
|
461
461
|
olympe.D.ea,'OString.indexOf')}lastIndexOf(a,b){return olympe.D.xa([this,a,b||Infinity],(c,d,e)=>olympe.D.va(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.D.ea,'OString.lastIndexOf')}slice(a,b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.D.Oa,'OString.slice')}Zl(){return olympe.D.va(this.value.length)}threshold(a){return olympe.D.xa([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.D.Oa.EMPTY,olympe.D.Oa,'OString.threshold')}toLowerCase(){return olympe.D.sb(this.value.toLowerCase())}toUpperCase(){return olympe.D.sb(this.value.toUpperCase())}trim(){return olympe.D.sb(this.value.trim())}padStart(a,
|
|
462
|
-
b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.Oa,'OString.padStart')}padEnd(a,b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.Oa,'OString.padEnd')}replace(a,b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.Oa,'OString.replace')}
|
|
463
|
-
e.valueOf())),olympe.D.Oa,'OString.subOStr')}static concat(...a){return olympe.D.sb('').concat(...a)}};olympe.D.Oa.EMPTY=new olympe.D.Oa('');olympe.D.Oa.ut=new olympe.D.Oa(' ');l=olympe.D.Oa.prototype;l.toJSON.K=olympe.D.J.C;l.Up.K=new olympe.D.J(()=>olympe.D.Oa,[0,1]);l.concat.K=olympe.D.J.F;l.Xc.K=olympe.D.J.F;l.
|
|
462
|
+
b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.Oa,'OString.padStart')}padEnd(a,b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.Oa,'OString.padEnd')}replace(a,b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.Oa,'OString.replace')}Dx(a,b){return olympe.D.xa([this,a,b],(c,d,e)=>olympe.D.sb(c.valueOf().substr(d.valueOf(),
|
|
463
|
+
e.valueOf())),olympe.D.Oa,'OString.subOStr')}static concat(...a){return olympe.D.sb('').concat(...a)}};olympe.D.Oa.EMPTY=new olympe.D.Oa('');olympe.D.Oa.ut=new olympe.D.Oa(' ');l=olympe.D.Oa.prototype;l.toJSON.K=olympe.D.J.C;l.Up.K=new olympe.D.J(()=>olympe.D.Oa,[0,1]);l.concat.K=olympe.D.J.F;l.Xc.K=olympe.D.J.F;l.Gx.K=olympe.D.J.G;l.Mq.K=olympe.D.J.G;l.toString.K=olympe.D.J.C;l.valueOf.K=olympe.D.J.C;l.Jb.K=olympe.D.J.C;l.yd.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.kf.K=olympe.D.J.O;
|
|
464
464
|
l.contains.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.startsWith.K=new olympe.D.J(()=>olympe.D.fa,[0,1]);l.endsWith.K=new olympe.D.J(()=>olympe.D.fa,[0,1]);l.indexOf.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);l.lastIndexOf.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);l.slice.K=new olympe.D.J(()=>olympe.D.Oa,[0,1]);l.Zl.K=olympe.D.J.G;l.threshold.K=new olympe.D.J(()=>olympe.D.Oa,[0]);l.toLowerCase.K=olympe.D.J.F;l.toUpperCase.K=olympe.D.J.F;l.trim.K=olympe.D.J.F;l.padStart.K=olympe.D.J.F;l.padEnd.K=olympe.D.J.F;
|
|
465
|
-
l.replace.K=olympe.D.J.F;l.
|
|
465
|
+
l.replace.K=olympe.D.J.F;l.Dx.K=olympe.D.J.F;olympe.D.fa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static ac(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.Za(a)?olympe.D.Hd([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}Jb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}yd(a){if(void 0!==a)return olympe.D.Za(a)?
|
|
466
466
|
olympe.D.Hd([a],b=>new olympe.D.fa(this.valueOf()===b.valueOf()),olympe.D.fa,'oEquals'):this.Jb(a)?olympe.D.fa.F:olympe.D.fa.C}Qg(){return this.value?olympe.D.fa.C:olympe.D.fa.F}du(a){if(void 0!==a)return olympe.D.Za(a)?olympe.D.Hd([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.Za(a)?olympe.D.Hd([a],b=>new olympe.D.fa(this.valueOf()||b.valueOf()),olympe.D.fa,'or'):this.value||a.valueOf()?
|
|
467
467
|
olympe.D.fa.F:olympe.D.fa.C}xor(a){return olympe.D.xa([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.qc(b&&!c||!b&&c)},olympe.D.fa,'OBoolean.xor')}Su(){return this.value}kq(){return!0===this.value?olympe.D.ea.ONE:olympe.D.ea.ZERO}Xc(){return olympe.D.sb(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);l=olympe.D.fa.prototype;l.toJSON.K=olympe.D.J.C;
|
|
468
468
|
l.and.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.Jb.K=olympe.D.J.C;l.yd.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.Qg.K=olympe.D.J.O;l.du.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.or.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.xor.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.Su.K=new olympe.D.J(()=>Boolean,[]);l.kq.K=olympe.D.J.G;l.Xc.K=olympe.D.J.F;l.toString.K=olympe.D.J.C;l.valueOf.K=olympe.D.J.C;function qb(a){return new olympe.D.ab(new Date(a))}
|
|
469
|
-
olympe.D.ab=class{constructor(a){this.mb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.mb.toJSON()+'" }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.ab(new Date(b.value.valueOf()))}static now(){return new olympe.D.ab(new Date)}tq(){return this.mb&&!isNaN(this.mb.getTime())?olympe.D.fa.F:olympe.D.fa.C}Vr(){return olympe.D.va(this.mb.getMilliseconds())}Xr(){return olympe.D.va(this.mb.getSeconds())}Wr(){return olympe.D.va(this.mb.getMinutes())}Ur(){return olympe.D.va(this.mb.getHours())}dv(){return olympe.D.va(this.mb.getDate())}getMonth(){return olympe.D.va(this.mb.getMonth()+1)}Yr(){return olympe.D.va(this.mb.getFullYear())}getTime(){return this.mb.getTime()}
|
|
469
|
+
olympe.D.ab=class{constructor(a){this.mb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.mb.toJSON()+'" }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.ab(new Date(b.value.valueOf()))}static now(){return new olympe.D.ab(new Date)}tq(){return this.mb&&!isNaN(this.mb.getTime())?olympe.D.fa.F:olympe.D.fa.C}Vr(){return olympe.D.va(this.mb.getMilliseconds())}Xr(){return olympe.D.va(this.mb.getSeconds())}Wr(){return olympe.D.va(this.mb.getMinutes())}Ur(){return olympe.D.va(this.mb.getHours())}dv(){return olympe.D.va(this.mb.getDate())}getMonth(){return olympe.D.va(this.mb.getMonth()+1)}Yr(){return olympe.D.va(this.mb.getFullYear())}getTime(){return this.mb.getTime()}zx(){var a=
|
|
470
470
|
olympe.D,b=a.sb;var c=this.mb.getDate();c=10>c?'0'+c:c;var d=this.mb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.mb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.D.sb(this.mb.toLocaleString(a)):olympe.D.xa([this,a],(b,c)=>olympe.D.sb(b.mb.toLocaleString(c.valueOf())),olympe.D.Oa)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.D.sb(this.mb.toLocaleDateString(a)):olympe.D.xa([this,a],(b,c)=>olympe.D.sb(b.mb.toLocaleDateString(c.valueOf())),
|
|
471
|
-
olympe.D.Oa)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.sb(this.mb.toLocaleTimeString(a)):olympe.D.xa([this,a],(b,c)=>olympe.D.sb(b.mb.toLocaleTimeString(c.valueOf())),olympe.D.Oa)}Xc(){return olympe.D.sb(this.mb.toISOString())}Lq(){return new Date(this.getTime())}
|
|
472
|
-
a)}$t(a){return this.Cf('Seconds',a)}Vt(a){return this.Cf('Minutes',a)}Tt(a){return this.Cf('Hours',a)}El(a){return this.Cf('Date',a)}au(a){return'number'===typeof a?this.El(7*a):this.El(a.$j(7))}Wt(a){return this.Cf('Month',a)}bu(a){return this.Cf('FullYear',a)}
|
|
471
|
+
olympe.D.Oa)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.sb(this.mb.toLocaleTimeString(a)):olympe.D.xa([this,a],(b,c)=>olympe.D.sb(b.mb.toLocaleTimeString(c.valueOf())),olympe.D.Oa)}Xc(){return olympe.D.sb(this.mb.toISOString())}Lq(){return new Date(this.getTime())}Fx(){return this}Hx(){return this}clone(){return new olympe.D.ab(new Date(this.mb.getTime()))}Cf(a,b){return olympe.D.xa([b],c=>{const d=this.clone();d.mb['set'+a](this.mb['get'+a]()+c.valueOf());return d},olympe.D.ab)}Ut(a){return this.Cf('Milliseconds',
|
|
472
|
+
a)}$t(a){return this.Cf('Seconds',a)}Vt(a){return this.Cf('Minutes',a)}Tt(a){return this.Cf('Hours',a)}El(a){return this.Cf('Date',a)}au(a){return'number'===typeof a?this.El(7*a):this.El(a.$j(7))}Wt(a){return this.Cf('Month',a)}bu(a){return this.Cf('FullYear',a)}Bx(){let a=this.mb.getDay();a=0===a?6:a-1;return new olympe.D.ab(new Date(this.mb.getFullYear(),this.mb.getMonth(),this.mb.getDate()-a))}Cx(){return new olympe.D.ab(new Date(this.mb.getFullYear(),this.mb.getMonth()))}yd(a){return olympe.D.xa([a],
|
|
473
473
|
b=>olympe.D.qc(this.Jb(b)),olympe.D.fa)}Jb(a){return a instanceof olympe.D.ab?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}wv(){let a=this.mb.getDay();0===a&&(a=7);return olympe.D.va(a)}jv(a,b){return olympe.D.xa([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.mb.getFullYear()-c.mb.getFullYear():'months'===d?c=12*(this.mb.getFullYear()-c.mb.getFullYear())+(this.mb.getMonth()-c.mb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
|
|
474
474
|
void 0===d&&(olympe.ua.rb('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.mb.getTime()-c.mb.getTime())/d));return olympe.D.va(c)},olympe.D.ea)}pw(a){return olympe.D.xa([a],b=>olympe.D.qc(this.getTime()<b.getTime()),olympe.D.fa)}nw(a){return olympe.D.xa([a],b=>olympe.D.qc(this.getTime()>b.getTime()),olympe.D.fa)}qw(a,b){return olympe.D.xa([a,b],(c,d)=>olympe.D.qc(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.fa)}valueOf(){return this.tq().valueOf()?
|
|
475
|
-
new Date(this.getTime()):(olympe.ua.rb('df').warn('Invalid datetime, returns Date(0).'),new Date(0))}};olympe.D.ab.C=qb(0);olympe.D.ab.F=qb(Number.NaN);l=olympe.D.ab.prototype;l.tq.K=olympe.D.J.O;l.Vr.K=olympe.D.J.G;l.Xr.K=olympe.D.J.G;l.Wr.K=olympe.D.J.G;l.Ur.K=olympe.D.J.G;l.dv.K=olympe.D.J.G;l.getMonth.K=olympe.D.J.G;l.Yr.K=olympe.D.J.G;l.getTime.K=olympe.D.J.C;l.
|
|
476
|
-
l.toLocaleTimeString.K=olympe.D.J.F;l.Xc.K=olympe.D.J.F;l.Lq.K=olympe.D.J.C;l.
|
|
477
|
-
l.bu.K=new olympe.D.J(()=>olympe.D.ab,[0]);l.
|
|
475
|
+
new Date(this.getTime()):(olympe.ua.rb('df').warn('Invalid datetime, returns Date(0).'),new Date(0))}};olympe.D.ab.C=qb(0);olympe.D.ab.F=qb(Number.NaN);l=olympe.D.ab.prototype;l.tq.K=olympe.D.J.O;l.Vr.K=olympe.D.J.G;l.Xr.K=olympe.D.J.G;l.Wr.K=olympe.D.J.G;l.Ur.K=olympe.D.J.G;l.dv.K=olympe.D.J.G;l.getMonth.K=olympe.D.J.G;l.Yr.K=olympe.D.J.G;l.getTime.K=olympe.D.J.C;l.zx.K=new olympe.D.J(()=>olympe.D.Oa,[0]);l.toLocaleString.K=olympe.D.J.F;l.toLocaleDateString.K=olympe.D.J.F;
|
|
476
|
+
l.toLocaleTimeString.K=olympe.D.J.F;l.Xc.K=olympe.D.J.F;l.Lq.K=olympe.D.J.C;l.Fx.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Hx.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Cf.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Ut.K=new olympe.D.J(()=>olympe.D.ab,[]);l.$t.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Vt.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Tt.K=new olympe.D.J(()=>olympe.D.ab,[]);l.El.K=new olympe.D.J(()=>olympe.D.ab,[0]);l.au.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Wt.K=new olympe.D.J(()=>olympe.D.ab,[]);
|
|
477
|
+
l.bu.K=new olympe.D.J(()=>olympe.D.ab,[0]);l.Bx.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Cx.K=new olympe.D.J(()=>olympe.D.ab,[]);l.yd.K=olympe.D.J.O;l.Jb.K=olympe.D.J.C;l.wv.K=olympe.D.J.G;l.jv.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);l.pw.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.nw.K=new olympe.D.J(()=>olympe.D.fa,[0]);l.qw.K=new olympe.D.J(()=>olympe.D.fa,[0,1]);l.valueOf.K=olympe.D.J.C;const rb=new Map,sb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,tb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function ub(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=tb.exec(c)):(d=1,c=sb.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.mf(a)?olympe.D.Hd([a],b,olympe.D.Color):b(a)}
|
|
478
478
|
olympe.D.Color=class{constructor(a,b,c,d){this.C=olympe.D.va(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.D.va(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.D.va(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.D.va(void 0!==d?Math.min(1,Math.max(0,d)):1)}toJSON(){return`{ "type": "color", "r": ${this.C.valueOf()}, "g": ${this.F.valueOf()}, "b": ${this.b.valueOf()}, "a": ${this.a.valueOf()} }`}static ac(a){let b;'string'===typeof a?b=
|
|
479
479
|
JSON.parse(a):b=a;return olympe.D.Color.create(b.r,b.g,b.b,b.a)}static create(a,b,c,d=1){return olympe.D.xa([a,b,c,d],(e,f,g,h)=>{e=olympe.D.va(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.D.va(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.D.va(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.D.va(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of rb.values())if(k&&k.C.Jb(e)&&k.F.Jb(f)&&k.b.Jb(g)&&k.a.Jb(h))return k;
|
|
480
480
|
return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Jg(){return this.C}Dg(){return this.b}Hg(){return this.F}Cg(){return this.a}ku(a,b){return olympe.D.Color.create(this.C.Hi(a.Jg(),b),this.F.Hi(a.Hg(),b),this.b.Hi(a.Dg(),b),this.a.Hi(a.Cg(),b))}Iu(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}Nq(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}tm(){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);
|
|
481
481
|
return'#'+(a+b).toUpperCase()}toString(){return this.tm()}Jb(a){return a instanceof olympe.D.Color?this.C.valueOf()===a.C.valueOf()&&this.F.valueOf()===a.F.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}};olympe.D.Color.prototype.equals=olympe.D.Color.prototype.Jb;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.tm;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.Nq;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Cg;
|
|
482
482
|
olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Hg;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Dg;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Jg;olympe.D.Color.create=olympe.D.Color.create;l=olympe.D.Color.prototype;l.toJSON.K=olympe.D.J.C;l.Jg.K=olympe.D.J.G;l.Dg.K=olympe.D.J.G;l.Hg.K=olympe.D.J.G;l.Cg.K=olympe.D.J.G;l.ku.K=new olympe.D.J(()=>olympe.D.Color,[]);l.Iu.K=new olympe.D.J(()=>olympe.D.Color,[]);l.Nq.K=new olympe.D.J(()=>String,[]);
|
|
483
|
-
l.tm.K=new olympe.D.J(()=>String,[]);l.Jb.K=olympe.D.J.C;olympe.D.File=class{ia(){}eo(){}Vk(){}am(){}Oj(){}Vl(){}Pj(){}Gq(){}};olympe.D.Zb=class{constructor(a,b){this.x=olympe.D.Fd(a);this.y=olympe.D.Fd(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.Ta(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Ta(this.y).valueOf())+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.Zb(b.x,b.y)}jw(){return this.x}
|
|
484
|
-
olympe.D.Zb,'Vector2.plus')}Og(a){return olympe.D.xa([this,a],(b,c)=>new olympe.D.Zb(b.x.Og(c.x),b.y.Og(c.y)),olympe.D.Zb,'Vector2.minus')}
|
|
483
|
+
l.tm.K=new olympe.D.J(()=>String,[]);l.Jb.K=olympe.D.J.C;olympe.D.File=class{ia(){}eo(){}Vk(){}am(){}Oj(){}Vl(){}Pj(){}Gq(){}};olympe.D.Zb=class{constructor(a,b){this.x=olympe.D.Fd(a);this.y=olympe.D.Fd(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.Ta(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Ta(this.y).valueOf())+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.Zb(b.x,b.y)}jw(){return this.x}xx(a){nb(this.x,a)}kw(){return this.y}yx(a){nb(this.y,a)}Zv(){return this.x.Hq(this.y)}Gd(a){return olympe.D.xa([this,a],(b,c)=>new olympe.D.Zb(b.x.Gd(c.x),b.y.Gd(c.y)),
|
|
484
|
+
olympe.D.Zb,'Vector2.plus')}Og(a){return olympe.D.xa([this,a],(b,c)=>new olympe.D.Zb(b.x.Og(c.x),b.y.Og(c.y)),olympe.D.Zb,'Vector2.minus')}Iw(a){return new olympe.D.Zb(this.x.$j(a),this.y.$j(a))}Cu(a){return new olympe.D.Zb(this.x.ri(a),this.y.ri(a))}Kw(){return new olympe.D.Zb(this.x.Ri(),this.y.Ri())}Du(a){return olympe.D.xa([this,a],(b,c)=>olympe.D.xa([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.va(d*f+e*g),olympe.D.ea),olympe.D.ea)}length(){return olympe.D.xa([this.x,this.y],(a,b)=>olympe.D.va(Math.sqrt(a*
|
|
485
485
|
a+b*b)),olympe.D.ea)}Zr(){return olympe.D.xa([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.Zb(a/c,b/c)},olympe.D.Zb)}floor(){return olympe.D.xa([this.x,this.y],(a,b)=>new olympe.D.Zb(Math.floor(a),Math.floor(b)),olympe.D.Zb)}ceil(){return olympe.D.xa([this.x,this.y],(a,b)=>new olympe.D.Zb(Math.ceil(a),Math.ceil(b)),olympe.D.Zb)}round(){return olympe.D.xa([this.x,this.y],(a,b)=>new olympe.D.Zb(Math.round(a),Math.round(b)),olympe.D.Zb)}Yt(a){return new olympe.D.Zb(this.x.Gd(a),
|
|
486
|
-
this.y.Gd(a))}Zt(a,b){return new olympe.D.Zb(this.x.Gd(a),this.y.Gd(b))}Xc(){return olympe.D.xa([this.x,this.y],(a,b)=>olympe.D.sb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Oa)}toString(){return`Vector2[${L(this.x)}, ${L(this.y)}]`}Jb(a){return this===a?!0:!1}};l=olympe.D.Zb.prototype;l.toJSON.K=olympe.D.J.C;l.jw.K=olympe.D.J.G;l.
|
|
487
|
-
l.Og.K=new olympe.D.J(()=>olympe.D.Zb,[0]);l.
|
|
486
|
+
this.y.Gd(a))}Zt(a,b){return new olympe.D.Zb(this.x.Gd(a),this.y.Gd(b))}Xc(){return olympe.D.xa([this.x,this.y],(a,b)=>olympe.D.sb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Oa)}toString(){return`Vector2[${L(this.x)}, ${L(this.y)}]`}Jb(a){return this===a?!0:!1}};l=olympe.D.Zb.prototype;l.toJSON.K=olympe.D.J.C;l.jw.K=olympe.D.J.G;l.xx.K=olympe.D.J.C;l.kw.K=olympe.D.J.G;l.yx.K=olympe.D.J.C;l.Zv.K=olympe.D.J.G;l.Gd.K=new olympe.D.J(()=>olympe.D.Zb,[0]);
|
|
487
|
+
l.Og.K=new olympe.D.J(()=>olympe.D.Zb,[0]);l.Iw.K=olympe.D.J.V;l.Cu.K=olympe.D.J.V;l.Kw.K=olympe.D.J.V;l.Du.K=new olympe.D.J(()=>olympe.D.ea,[0]);l.length.K=olympe.D.J.G;l.Zr.K=olympe.D.J.V;l.floor.K=olympe.D.J.V;l.ceil.K=olympe.D.J.V;l.round.K=olympe.D.J.V;l.Yt.K=olympe.D.J.V;l.Zt.K=olympe.D.J.V;l.Xc.K=olympe.D.J.F;l.toString.K=olympe.D.J.C;l.Jb.K=olympe.D.J.C;olympe.D.lg=class{constructor(){}Mb(){}cd(){}get(){}Fg(){}has(){}Zf(){}ld(){}gf(){}zc(){}Tf(){}forEach(){}jd(){}};olympe.D.lg.prototype.forEachCurrentValue=olympe.D.lg.prototype.jd;olympe.D.lg.prototype.forEach=olympe.D.lg.prototype.forEach;l=olympe.D.lg.prototype;l.has.K=olympe.D.J.O;l.Zf.K=olympe.D.J.C;l.ld.K=new olympe.D.J(()=>Object,[]);l.gf.K=new olympe.D.J(()=>String,[]);l.zc.K=olympe.D.J.G;l.Tf.K=olympe.D.J.C;l.forEach.K=new olympe.D.J(()=>{},[]);l.jd.K=olympe.D.J.C;olympe.D.ed=class extends olympe.D.lg{constructor(){super()}Dd(){}ff(){}Fe(){}ef(){}df(){}le(){}ui(){}zh(){}};olympe.D.ed.prototype.getCurrentAt=olympe.D.ed.prototype.le;olympe.D.ed.prototype.getAt=olympe.D.ed.prototype.df;olympe.D.ed.prototype.getCurrentKeyAt=olympe.D.ed.prototype.ef;olympe.D.ed.prototype.getKeyAt=olympe.D.ed.prototype.Fe;olympe.D.ed.prototype.getCurrentRank=olympe.D.ed.prototype.ff;olympe.D.ed.prototype.getRank=olympe.D.ed.prototype.Dd;l=olympe.D.ed.prototype;l.Dd.K=olympe.D.J.G;
|
|
488
488
|
l.ff.K=olympe.D.J.C;l.Fe.K=new olympe.D.J(()=>String,[]);l.ef.K=olympe.D.J.C;l.df.K=new olympe.D.J(()=>Object,[]);l.le.K=olympe.D.J.C;l.ui.K=olympe.D.J.C;l.zh.K=new olympe.D.J(()=>Array,[]);olympe.D.Kh=class{constructor(a,b){this.O=b||olympe.D.Ja();this.valueType=a||Object;this.values={};this.Xa=this.Ea=null;this.Rf=0;this.ca=Object.create(null);this.$b=Object.create(null);this.size=0;this.L=null;this.O.onDestroy(()=>{const c=this.ca;if(c){const d=Object.keys(c),e=d.length;for(let f=0;f<e;f++){let g=c[d[f]],h=Object.keys(g);for(let k=h.length,m=0;m<k;m++)g[h[m]].gb()}}})}fh(){return this.O}Mb(){return this.valueType}cd(a){this.valueType=a;let b=this.Ea;if(null!==b)for(let c in b)Object.prototype.hasOwnProperty.call(b,
|
|
489
489
|
c)&&ib(b[c],a)}get(a){let b=c=>{null===this.Ea&&(this.Ea={});return this.xi(this.Ea,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.D.xa([a],c=>b(c),this.valueType)}Fg(a){a=this.values[a];return olympe.D.Za(a)?Sa(a.Sa)?L(a):void 0:a}has(a){let b=c=>{null===this.Xa&&(this.Xa={});return this.xi(this.Xa,c,c in this.values?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa,'Map.has('+c+')')};return olympe.D.xa([a],c=>b(c),olympe.D.fa)}Zf(a){return a in this.values}xi(a,b,c,d,e){let f=a[b];f||this.O.run(()=>
|
|
490
490
|
{f=olympe.D.vd(d,void 0,e);a[b]=f;f.Sa.onDestroy(()=>delete a[b]);olympe.D.Za(c)?mb(f,c):jb(f,c)});return f}ld(){throw Error('Abstract method getFirstKey needs to be overridden');}gf(){throw Error('Abstract method getFirstKey needs to be overridden');}zc(){null===this.L&&this.O.run(()=>{this.L=olympe.D.vd(olympe.D.ea,olympe.D.va(this.size));this.L.Sa.onDestroy(()=>{this.L=null})});return this.L}Tf(){return this.size}forEach(a,b){let c=this.Al();a=this.Fp(c,a,b);this.zl(c,a)}Al(){return String(++this.Rf)}zl(a,
|
|
@@ -492,44 +492,44 @@ b){this.$b[a]=b;olympe.D.Ja().Sc(()=>{let c=this.ca;for(let d in c)Object.protot
|
|
|
492
492
|
c,this))break}Lj(a,b){void 0!==this.values[a]&&this.ki(a,!0);this.values[a]=b;var c=this.Ea;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?mb(c[a],b):jb(c[a],b));c=this.Xa;null!==c&&void 0!==c[a]&&nb(c[a],!0);this.size++;c=this.$b;for(let d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}ki(a,b){let c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.he?L(d):d;var e=this.Ea;null!==e&&void 0!==e[a]&&kb(e[a]);e=this.Xa;null!==e&&void 0!==e[a]&&nb(e[a],
|
|
493
493
|
!1);delete c[a];this.size--;b||this.af()}a=this.ca[a];if(void 0!==a)for(let f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].gb();return d}af(){null!==this.L&&nb(this.L,this.size)}th(){let a,b;var c=this.Ea;if(null!==c)for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&kb(c[a]);c=this.Xa;if(null!==c)for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&nb(c[a],!1);for(a in this.values)Object.prototype.hasOwnProperty.call(this.values,a)&&delete this.values[a];for(a in this.ca)if(Object.prototype.hasOwnProperty.call(this.ca,
|
|
494
494
|
a))for(b in c=this.ca[a],c)Object.prototype.hasOwnProperty.call(c,b)&&c[b].gb();this.size=0;null!==this.L&&nb(this.L,this.size)}pg(){const a=this.values;let b='\n';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=a[c]+'\n');return b}};olympe.D.Kh.ka=[olympe.D.lg];l=olympe.D.Kh.prototype;l.fh.K=olympe.D.J.C;l.Mb.K=olympe.D.J.C;l.cd.K=olympe.D.J.C;l.get.K=new olympe.D.J(()=>Object,[],'valueType');l.Fg.K=olympe.D.J.C;l.has.K=olympe.D.J.O;l.Zf.K=olympe.D.J.C;l.xi.K=olympe.D.J.C;l.zc.K=olympe.D.J.G;
|
|
495
|
-
l.Tf.K=olympe.D.J.C;l.forEach.K=new olympe.D.J(()=>{},[]);l.Al.K=olympe.D.J.C;l.zl.K=olympe.D.J.C;l.Fp.K=olympe.D.J.C;l.Dl.K=olympe.D.J.C;l.jd.K=olympe.D.J.C;l.Lj.K=olympe.D.J.C;l.ki.K=olympe.D.J.C;l.af.K=olympe.D.J.C;l.th.K=olympe.D.J.C;l.pg.K=olympe.D.J.C;olympe.D.Ui=class extends olympe.D.Kh{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.ya=this.
|
|
496
|
-
[a.Sa],[0],'onResolved('+(b.name||'')+')')):b(a)}ff(a){return this.F[a]}Fe(a){const b=c=>{const d=c.valueOf(),e=this.ef(d);null===this.
|
|
495
|
+
l.Tf.K=olympe.D.J.C;l.forEach.K=new olympe.D.J(()=>{},[]);l.Al.K=olympe.D.J.C;l.zl.K=olympe.D.J.C;l.Fp.K=olympe.D.J.C;l.Dl.K=olympe.D.J.C;l.jd.K=olympe.D.J.C;l.Lj.K=olympe.D.J.C;l.ki.K=olympe.D.J.C;l.af.K=olympe.D.J.C;l.th.K=olympe.D.J.C;l.pg.K=olympe.D.J.C;olympe.D.Ui=class extends olympe.D.Kh{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.ya=this.Qa=this.fb=this.na=null}cd(a){super.cd(a);if(null!==this.ya)for(let b of this.ya.values())ib(b,a)}ld(){return this.df(0)}gf(){return this.Fe(0)}Dd(a){const b=c=>{null===this.fb&&(this.fb=Object.create(null));let d=this.ff(a);d=void 0!==d?olympe.D.va(d):void 0;return this.xi(this.fb,c,d,olympe.D.ea,`List.getRank(${c})`)};return olympe.D.Za(a)?K(olympe.D.createNode(olympe.D.ea,b,null,
|
|
496
|
+
[a.Sa],[0],'onResolved('+(b.name||'')+')')):b(a)}ff(a){return this.F[a]}Fe(a){const b=c=>{const d=c.valueOf(),e=this.ef(d);null===this.Qa&&(this.Qa=Object.create(null));return this.xi(this.Qa,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.xa([a],c=>b(c),String)}ef(a){return this.C[a.valueOf()]}df(a){if(olympe.D.Za(a))return this.get(olympe.D.xa([a],c=>{c=this.Fe(c);if(!Sa(c.Sa)){const d=olympe.D.Ja();olympe.D.lf(d)&&bb(d)}return c},String));null===this.ya&&(this.ya=new Map);let b=this.ya.get(a);
|
|
497
497
|
b||this.O.run(()=>{b=this.get(this.Fe(a));this.ya.set(a,b);b.Sa.onDestroy(()=>this.ya.delete(a))});return b}le(a){return this.Fg(this.ef(a))}ui(a,b,c,d){let e=this.Al();a=this.wq(e,a,b,c,d);this.zl(e,a)}wq(a,b,c,d,e){return olympe.D.Ja().vb((f,g)=>{let h=!1,k=olympe.D.ne([b,c,this.Dd(g)],(m,n,p)=>{p>=m&&p<m+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.Dl(a,g,k)})}zh(){null===this.na&&this.O.run(()=>{this.na=olympe.D.vd(Array,this.C.filter(a=>void 0!==a));
|
|
498
|
-
this.na.Sa.onDestroy(()=>{this.L=null})});return this.na}jd(a){if(this.C.length!==this.size)super.jd(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}}Cl(a,b){const c=this.fb,d=this.
|
|
499
|
-
c[a]&&jb(c[a],olympe.D.va(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&kb(d[e]),void 0!==d[b]&&jb(d[b],a))}}Bl(a){var b=this.
|
|
500
|
-
a=this.
|
|
498
|
+
this.na.Sa.onDestroy(()=>{this.L=null})});return this.na}jd(a){if(this.C.length!==this.size)super.jd(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}}Cl(a,b){const c=this.fb,d=this.Qa,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]&&kb(c[g]),void 0!==
|
|
499
|
+
c[a]&&jb(c[a],olympe.D.va(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&kb(d[e]),void 0!==d[b]&&jb(d[b],a))}}Bl(a){var b=this.Qa,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&L(b)===a&&kb(b));delete this.F[a];this.C.splice(c,1);c=this.fb;null!==c&&void 0!==c[a]&&kb(c[a])}Gp(){if(null!==this.na){const a=this.C,b=L(this.na);b&&a.join(',')!==b.join(',')&&jb(this.na,a)}}af(){this.Gp();super.af()}th(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.fb;if(null!==a)for(b in a)kb(a[b]);
|
|
500
|
+
a=this.Qa;if(null!==a)for(b in a)kb(a[parseInt(b,10)]);var b=this.na;null!==b&&($a(b.Sa),jb(b,this.C));return olympe.D.Kh.prototype.th.call(this)}pg(){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.Ui.ka=[olympe.D.ed];l=olympe.D.Ui.prototype;l.cd.K=olympe.D.J.C;l.ld.K=new olympe.D.J(()=>Object,[]);l.gf.K=new olympe.D.J(()=>String,[]);l.Dd.K=olympe.D.J.G;l.ff.K=olympe.D.J.C;
|
|
501
501
|
l.Fe.K=new olympe.D.J(()=>String,[]);l.ef.K=olympe.D.J.C;l.df.K=new olympe.D.J(()=>Object,[]);l.le.K=olympe.D.J.C;l.ui.K=new olympe.D.J(()=>{},[]);l.wq.K=olympe.D.J.C;l.zh.K=new olympe.D.J(()=>Array,[]);l.jd.K=olympe.D.J.C;l.Cl.K=olympe.D.J.C;l.Bl.K=olympe.D.J.C;l.Gp.K=olympe.D.J.C;l.af.K=olympe.D.J.C;l.th.K=olympe.D.J.C;l.pg.K=olympe.D.J.C;olympe.D.Map=class extends olympe.D.Kh{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}cd(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&ib(this.F,a);super.cd(a)}ld(){null===this.F&&this.Ll();return this.F}gf(){null===this.C&&this.Ll();return this.C}Ll(){this.fh().run(()=>{this.F=olympe.D.vd(this.Mb());this.C=olympe.D.vd(String);this.Qi(this.Pl())})}Pl(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}Qi(a){if(void 0!==
|
|
502
502
|
a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?mb(this.F,b):jb(this.F,b);jb(this.C,a)}else void 0!==L(this.F)&&(kb(this.F),kb(this.C))}set(a,b){this.Lj(a,b);1===this.size&&null!==this.C&&this.Qi(a);this.af()}remove(a){const b=this.ki(a);null!==this.C&&L(this.C)===a&&this.Qi(this.Pl());return b}clear(){this.th();null!==this.C&&this.Qi(void 0)}};l=olympe.D.Map.prototype;l.cd.K=olympe.D.J.C;l.ld.K=new olympe.D.J(()=>Object,[]);l.gf.K=new olympe.D.J(()=>String,[]);l.Ll.K=olympe.D.J.C;
|
|
503
|
-
l.Pl.K=olympe.D.J.C;l.Qi.K=olympe.D.J.C;l.set.K=olympe.D.J.C;l.remove.K=new olympe.D.J(()=>Object,[]);l.clear.K=olympe.D.J.C;olympe.D.Vh=class extends olympe.D.Ui{constructor(a){super(a)}set(a,b,c){this.Lj(a,b);void 0!==c&&olympe.D.rc([c],d=>{this.Cl(a,d)});this.af()}remove(a){this.Bl(a);return this.ki(a)}clear(){this.th()}};olympe.D.Vh.prototype.remove.K=olympe.D.J.C;olympe.D.Vh.prototype.clear.K=olympe.D.J.C;olympe.D.Sq=class extends olympe.D.dj{constructor(a,b){super(olympe.D.ea,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ea.jn.mo}yb(){return olympe.D.
|
|
503
|
+
l.Pl.K=olympe.D.J.C;l.Qi.K=olympe.D.J.C;l.set.K=olympe.D.J.C;l.remove.K=new olympe.D.J(()=>Object,[]);l.clear.K=olympe.D.J.C;olympe.D.Vh=class extends olympe.D.Ui{constructor(a){super(a)}set(a,b,c){this.Lj(a,b);void 0!==c&&olympe.D.rc([c],d=>{this.Cl(a,d)});this.af()}remove(a){this.Bl(a);return this.ki(a)}clear(){this.th()}};olympe.D.Vh.prototype.remove.K=olympe.D.J.C;olympe.D.Vh.prototype.clear.K=olympe.D.J.C;olympe.D.Sq=class extends olympe.D.dj{constructor(a,b){super(olympe.D.ea,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ea.jn.mo}yb(){return olympe.D.Pw(this.node,this.duration,this.C,void 0)}};let vb=null;olympe.D.N=void 0;olympe.D.pm=void 0;olympe.D.vh=void 0;olympe.D.sh=new Map;olympe.D.sh.set(0,olympe.D.ea.ZERO);olympe.D.sh.set(1,olympe.D.ea.ONE);olympe.D.sh.set(2,olympe.D.ea.Jt);olympe.D.Kj=new Map;olympe.D.Kj.set('',olympe.D.Oa.EMPTY);olympe.D.Kj.set(' ',olympe.D.Oa.ut);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,nd:b,qf:c,gm:d,debug:g,Nf:e,hd:f,ni:h})};olympe.D.lf=function(a){return!!(a&&a instanceof olympe.D.Node)};
|
|
504
504
|
olympe.D.vd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.lf(b)?cb(a,b):olympe.D.Za(b)?cb(a,b.Sa):J(a,b);return K(a)};olympe.D.Za=function(a){return!(!a||!a.he)};olympe.D.mf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.he))};olympe.D.im=function(a){return olympe.D.lf(a)||a instanceof olympe.D.lc||a instanceof olympe.D.Zo};olympe.D.Dh=function(a){return a instanceof olympe.D.dj};
|
|
505
505
|
olympe.D.ck=function(a,b){if(void 0!==a){olympe.D.Dh(a)&&(a=a.yb().Sa);if(!olympe.D.mf(a))return b(a);var c=[];olympe.D.Za(a)?c.push(a.Sa):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.Ta=function(a,b){let c=a;olympe.D.Za(a)?c=L(a):olympe.D.lf(a)?c=a.Jc:olympe.D.Dh(a)&&(c=L(a.yb()));return void 0===c?b:c};olympe.D.Je=function(a,b){let c;olympe.D.Za(a)?c=a.Sa:olympe.D.lf(a)?c=a:olympe.D.Dh(a)&&(c=a.yb().Sa);c&&olympe.D.rc([b],d=>{c.Je(d)},'setDefaultValue');return a};
|
|
506
506
|
olympe.D.ne=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.Dp?(h=h.Sa,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.Dh(h)&&(h=h.yb().Sa,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};olympe.D.Hd=function(a,b,c,d){return K(olympe.D.ne(a,b,c,d||'syncProxies'))};const wb=a=>{for(const b of a)if(olympe.D.mf(b)||olympe.D.Dh(b))return!1;return!0};
|
|
507
507
|
olympe.D.xa=function(a,b,c,d,e){if(wb(a))return b(...a);const f=olympe.D.ne(a,b,c,d||'TransformFlows');e&&olympe.D.rc([e],g=>{f.Je(g)},'setDefaultValue');return K(f)};olympe.D.rc=function(a,b,c){wb(a)?b(...a):olympe.D.ne(a,b,void 0,c||'processFlows')};olympe.D.Eq=function(a,b){if(wb(a))b(...a);else{const c=olympe.D.Ja();olympe.D.ne(a,(...d)=>{olympe.D.Ja().gb();c.run(b,...d)},void 0,'processFlowsOnce')}};
|
|
508
|
-
olympe.D.om=function(a,b,c){const d=a.length,e=Array(d),f=[];let g;for(let h=0;h<d;h++)g=a[h],void 0!==g&&null!==g&&(olympe.D.Za(g)?(g=g.Sa,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.Dh(g)&&(g=g.yb().Sa,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({nd:b,gm:e,Nf:f,
|
|
509
|
-
olympe.D.Ic=function(a,b='flowSource'){return new olympe.D.dj(a,b)};olympe.D.
|
|
508
|
+
olympe.D.om=function(a,b,c){const d=a.length,e=Array(d),f=[];let g;for(let h=0;h<d;h++)g=a[h],void 0!==g&&null!==g&&(olympe.D.Za(g)?(g=g.Sa,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.Dh(g)&&(g=g.yb().Sa,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({nd:b,gm:e,Nf:f,dx:!1,hd:c})};olympe.D.fC=function(a,b,c){const d=olympe.D.Ja();olympe.D.om(a,(...e)=>{olympe.D.Ja().gb();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.zB=function(a,b,c){a=new olympe.D.dj(a,c);b(a);return a.yb()};
|
|
509
|
+
olympe.D.Ic=function(a,b='flowSource'){return new olympe.D.dj(a,b)};olympe.D.jC=function(a,b,c,d){const e=olympe.D.Ja();olympe.D.ne(a,(...f)=>{olympe.D.Ja().gb();e.run(b,...f)},c,d||'syncProxiesOnce')};olympe.D.Uj=function(a,b,c){olympe.D.xa([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.D.EB=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.qC=function(a){return olympe.D.Ja().vb(a)};olympe.D.CB=function(a,b,c){olympe.D.Eu(a?a.Sa:a,b,c)};
|
|
510
510
|
olympe.D.Eu=function(a,b,c){if(a){var d=a.da();null===vb&&(vb={});if(vb[d])olympe.D.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{vb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.D.N.warn(e):olympe.D.N.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.D.createNode(null,g=>{void 0===g?olympe.D.N.log(f,'undefined'):null===g?olympe.D.N.log(f,'null'):olympe.D.N.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.D.N.log(`Node #${d} destroyed`+(b?`: ${b}`:
|
|
511
|
-
''))});c.onDestroy(()=>{delete vb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.
|
|
511
|
+
''))});c.onDestroy(()=>{delete vb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.BB=function(){let a='',b=olympe.D.Ja();for(;null!==b;)a+=b.Qj()+' --\x3e ',b=b.getParent();olympe.D.N.log(a)};
|
|
512
512
|
olympe.D.va=function(a){if(void 0===a)return olympe.D.ea.ZERO;if(a instanceof olympe.D.ea)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ea.vo;if(a===Math.PI)return olympe.D.ea.PI;if(Infinity===a)return olympe.D.ea.Nr;if(-Infinity===a)return olympe.D.ea.Ms;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.sh.has(a)||olympe.D.sh.set(a,new olympe.D.ea(a)),olympe.D.sh.get(a)):new olympe.D.ea(a)}return null};
|
|
513
|
-
olympe.D.Fd=function(a){return void 0===a?olympe.D.vd(olympe.D.ea):olympe.D.vd(olympe.D.ea,olympe.D.mf(a)?a:olympe.D.va(a))};olympe.D.
|
|
514
|
-
olympe.D.
|
|
515
|
-
olympe.D.
|
|
513
|
+
olympe.D.Fd=function(a){return void 0===a?olympe.D.vd(olympe.D.ea):olympe.D.vd(olympe.D.ea,olympe.D.mf(a)?a:olympe.D.va(a))};olympe.D.Pw=olympe.D.ea.animate;olympe.D.YB=function(a,b){return new olympe.D.Sq(a,b)};olympe.D.sb=function(a){if(a instanceof olympe.D.Oa)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.Kj.has(a)?olympe.D.Kj.get(a):new olympe.D.Oa(a)};
|
|
514
|
+
olympe.D.cC=function(a){return void 0===a?olympe.D.vd(olympe.D.Oa):olympe.D.vd(olympe.D.Oa,olympe.D.mf(a)?a:olympe.D.sb(a))};olympe.D.qc=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.$w=function(a){return void 0===a?olympe.D.vd(olympe.D.fa):olympe.D.vd(olympe.D.fa,olympe.D.mf(a)?a:olympe.D.qc(a))};olympe.D.Qw=function(a){if(a instanceof Date)return new olympe.D.ab(a)};
|
|
515
|
+
olympe.D.bC=function(a){return olympe.D.vd(olympe.D.ab,void 0!==a?new olympe.D.ab(a):null)};olympe.D.sq=a=>a instanceof olympe.D.fa||a instanceof olympe.D.ea||a instanceof olympe.D.Oa||a instanceof olympe.D.ab;olympe.D.dC=function(a,b){return olympe.D.vd(olympe.D.Zb,void 0===a&&void 0===b?void 0:new olympe.D.Zb(a,b))};olympe.D.Zw=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.vd(olympe.D.Color,e)};olympe.D.aC=olympe.D.Zw;
|
|
516
516
|
olympe.D.vu=function(a){olympe.D.N=a;olympe.D.vh=olympe.D.Vf()};olympe.D.Vf=function(){olympe.D.pm||(olympe.D.pm=new olympe.D.Zo);return olympe.D.pm};olympe.D.Ja=function(){olympe.D.vh||(olympe.D.vh=olympe.D.Vf());return olympe.D.vh};olympe.D.Iq=function(a){const b=olympe.D.vh;olympe.D.im(a)&&(olympe.D.vh=a);return b||null};
|
|
517
517
|
olympe.D.ac=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.ab.ac(a);break;case 'number':b=olympe.D.ea.ac(a);break;case 'string':b=olympe.D.Oa.ac(a);break;case 'vector2':b=olympe.D.Zb.ac(a);break;case 'color':b=olympe.D.Color.ac(a);break;case 'boolean':b=olympe.D.fa.ac(a)}return b}return null};function xb(a){a.C.Kb()||(a.G.forEach(b=>{b.gb()}),a.G.clear(),a.F.clear(),a.size.clear(),a.O.clear(),a.V.length=0,a.L.length=0)}
|
|
518
|
-
olympe.D.
|
|
519
|
-
class yb{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.lc('Slot manager entry');this.L=c;this.O=d;this.F.run(()=>{const e=ob(olympe.D.Ic(olympe.D.ea),olympe.D.ea.ZERO);olympe.D.Za(b)?e.repeat(b):e.update(b);this.C=olympe.D.Ic(olympe.D.ea);this.G=this.C.yb().Gd(e.yb())});this.next=null}da(){return this.id}cw(){return this.C.yb()}Xl(){return this.G}Dd(){return this.L}ow(){return this.O}
|
|
520
|
-
this.next=null}gb(){this.F.gb();this.G=this.C=this.next=null}}l=yb.prototype;l.da.K=olympe.D.J.C;l.cw.K=new olympe.D.J(()=>olympe.D.ea);l.Xl.K=new olympe.D.J(()=>olympe.D.ea);l.Dd.K=olympe.D.J.C;l.ow.K=olympe.D.J.C;l.
|
|
518
|
+
olympe.D.gA=class{constructor(){this.C=new olympe.D.lc('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.Ic(yb,'Last slot manager entry');this.size=ob(olympe.D.Ic(olympe.D.ea,'SlotManager size').repeat(this.F.yb().Xl()),olympe.D.ea.ZERO);this.O=ob(olympe.D.Ic(olympe.D.ea,'last valid slots'),olympe.D.va(-1))});this.V=[];this.L=[];this.C.onDestroy(()=>{xb(this)})}zc(){return this.size.yb()}};
|
|
519
|
+
class yb{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.lc('Slot manager entry');this.L=c;this.O=d;this.F.run(()=>{const e=ob(olympe.D.Ic(olympe.D.ea),olympe.D.ea.ZERO);olympe.D.Za(b)?e.repeat(b):e.update(b);this.C=olympe.D.Ic(olympe.D.ea);this.G=this.C.yb().Gd(e.yb())});this.next=null}da(){return this.id}cw(){return this.C.yb()}Xl(){return this.G}Dd(){return this.L}ow(){return this.O}Kx(a){this.L=a}sx(a){null===a?this.C.update(olympe.D.ea.ZERO):(this.C.repeat(a.Xl()),a.next=this)}$r(){this.C.clear();
|
|
520
|
+
this.next=null}gb(){this.F.gb();this.G=this.C=this.next=null}}l=yb.prototype;l.da.K=olympe.D.J.C;l.cw.K=new olympe.D.J(()=>olympe.D.ea);l.Xl.K=new olympe.D.J(()=>olympe.D.ea);l.Dd.K=olympe.D.J.C;l.ow.K=olympe.D.J.C;l.Kx.K=olympe.D.J.C;l.sx.K=olympe.D.J.C;l.$r.K=olympe.D.J.C;l.gb.K=olympe.D.J.C;olympe.D.T={Ha:'df.Logger'};olympe.U.Ib(a=>{D(a,olympe.D.Z.wo,Number.POSITIVE_INFINITY);B(a,olympe.D.T.Ha,[olympe.ua.T.ta],b=>b.Gc('df'))},'olympe.df');olympe.U.run([olympe.D.T.Ha],a=>{olympe.D.vu(a)},'olympe.df');olympe.async={};function zb(a,b){0<=b&&(a.timeout=b)}function Ab(a,b){a.L||a.na.push(a.G.vb(b))}
|
|
521
521
|
olympe.async.sn=class{constructor(a,b=void 0===a){this.C=[];this.na=[];this.G=a||new olympe.D.lc('Async executor context');this.Ea=b;this.F=null;this.O=new Map;this.O.set('Executor',this);this.L=this.V=!1;this.N=null;this.ca=this.timeout=0}rb(){return this.N}add(a){this.L||this.C.push(this.G.vb(a));return this}start(){this.V||(this.N&&this.N.log('Executor started.'),this.V=!0,0<this.timeout&&(this.ca=setTimeout(()=>{this.F='Timeout expired.';this.ca=0;this.complete(!1)},this.timeout)))}clear(){this.C=
|
|
522
522
|
[];this.na=[];this.O.clear();this.Ea&&this.G.gb()}complete(a){if(!this.L){this.L=!0;this.ca&&(clearTimeout(this.ca),this.ca=0);this.N&&this.N.log(a?'Executor completed successfully':`Executor completed with error: ${this.F}`);for(const b of this.na)b(a,a?null:this.F,this.O);this.clear()}}};
|
|
523
523
|
function Bb(a){if(0<a.C.length){const b=a.C.shift();a.N&&a.N.log(`Executing next task. ${a.C.length} tasks left in the pipeline.`);a.G.run(()=>{b(()=>{Promise.resolve().then(()=>{Bb(a)})},c=>{c&&(a.F=c);a.complete(!1)},a.O)})}else a.complete(!0)}olympe.async.di=class extends olympe.async.sn{static create(){return new olympe.async.di(new olympe.D.lc('SequencedExecutor'),!0)}start(){this.V||(super.start(),Bb(this))}};
|
|
524
524
|
olympe.async.Ff=class extends olympe.async.sn{constructor(a,b){super(a,b);this.ja=0;this.ya=!0}static create(){return new olympe.async.Ff(new olympe.D.lc('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.ya=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.O)})}add(a){super.add(a);this.V&&!this.L&&(this.ja++,this.run(a));return this}done(){this.ja--;0>=this.ja&&this.complete(this.ya)}start(){if(!this.V)if(super.start(),0<this.C.length){this.ja=
|
|
525
|
-
this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.Vb={};olympe.Vb.xs=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.Vb.ws=class{constructor(){}C(){}};olympe.Vb.Storage=class{G(){}O(){}write(){}L(){}F(){}C(){}close(){}};function Cb(a,b,c){a.storage.G(c)}function Db(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function Eb(a,b){a.storage.L(b)}function Fb(a,b){a.storage.C(b)}function Gb(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function Hb(a,b){a.storage.O(b)}olympe.Vb.pr=class{constructor(a){this.storage=a}};olympe.Vb.T={lj:'localStorage.KeyValueManager',bi:'localStorage.Storage',Zm:'localStorage.DatacloudStorage',Ha:'localStorage.Logger'};olympe.U.Ib(function(a){ra(a,olympe.Vb.T.lj);B(a,olympe.Vb.T.Ha,[olympe.ua.T.ta],function(b){return b.Gc('localstorage')});y(a,olympe.Vb.T.Zm,olympe.Vb.pr,olympe.Vb.T.bi)},'olympe.localstorage');olympe.aa={};olympe.aa.At=class{O(){}L(){}Ea(){}ca(){}Gh(){}Kg(){}lq(){}};function Ib(a){a.N.info('Initializing AUTH layer');if(a.ya&&a.storage&&a.O){const b=a.O.C(),c=olympe.$.mm(b).parameters;delete c[olympe.aa.Z.gi];Jb(a.storage,a.ya,d=>{d?a.O.redirect(b.replace(/\?[^?#]+/,''),c,olympe.aa.$h.C.Oe):a.N.error('Could not store auth.token')})}else a.N.debug('Asking to be notified when auth connector gets online'),a.F.O(()=>{if(a.
|
|
525
|
+
this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.Vb={};olympe.Vb.xs=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.Vb.ws=class{constructor(){}C(){}};olympe.Vb.Storage=class{G(){}O(){}write(){}L(){}F(){}C(){}close(){}};function Cb(a,b,c){a.storage.G(c)}function Db(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function Eb(a,b){a.storage.L(b)}function Fb(a,b){a.storage.C(b)}function Gb(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function Hb(a,b){a.storage.O(b)}olympe.Vb.pr=class{constructor(a){this.storage=a}};olympe.Vb.T={lj:'localStorage.KeyValueManager',bi:'localStorage.Storage',Zm:'localStorage.DatacloudStorage',Ha:'localStorage.Logger'};olympe.U.Ib(function(a){ra(a,olympe.Vb.T.lj);B(a,olympe.Vb.T.Ha,[olympe.ua.T.ta],function(b){return b.Gc('localstorage')});y(a,olympe.Vb.T.Zm,olympe.Vb.pr,olympe.Vb.T.bi)},'olympe.localstorage');olympe.aa={};olympe.aa.At=class{O(){}L(){}Ea(){}ca(){}Gh(){}Kg(){}lq(){}};function Ib(a){a.N.info('Initializing AUTH layer');if(a.ya&&a.storage&&a.O){const b=a.O.C(),c=olympe.$.mm(b).parameters;delete c[olympe.aa.Z.gi];Jb(a.storage,a.ya,d=>{d?a.O.redirect(b.replace(/\?[^?#]+/,''),c,olympe.aa.$h.C.Oe):a.N.error('Could not store auth.token')})}else a.N.debug('Asking to be notified when auth connector gets online'),a.F.O(()=>{if(a.Qa)if(a.L=olympe.aa.qa.G.Qq,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.ca){const b=new olympe.aa.Request;
|
|
526
526
|
b.set('username',a.ca);b.rm(a.fb);a.N.log('Autologin with user "'+a.ca+'"');Kb(a,b)}else a.N.error('autoLogin: auto user not specified.'),Lb(a);else a.L=olympe.aa.qa.G.gi,a.N.log('Connector online, attempting to log with token'),Mb(a)}),a.F.L(()=>{switch(olympe.D.Ta(a.G)){case olympe.aa.qa.C.hg:a.N.warn('Disconnected from server - session of user '+olympe.D.Ta(a.C.yb()).Rc()+' lost');break;case olympe.aa.qa.C.bh:a.N.warn('Disconnected from server - guest session lost');break;case olympe.aa.qa.C.Jh:a.N.warn('Disconnected from server - authentication aborted');
|
|
527
527
|
break;case olympe.aa.qa.C.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}Nb(a,olympe.aa.qa.C.Ne)});a.F.Ea((b,c)=>{if(b===olympe.aa.qa.F.Si)a.N.info('Authentication revoked'),Lb(a),a.storage&&Ob(a.storage),a.na.forEach(d=>{d(b,c)});else if(b===olympe.aa.qa.F.Rn)a.N.info('Redirection to IDP to invalidate token (SAML)'),a.storage&&Ob(a.storage),a.O.F();else throw Error(`Unknown logout step coming from server : ${b}`);});a.N.log('DONE initializing AUTH layer (waiting for connector to be online)')}
|
|
528
528
|
function Mb(a){null!==a.storage?(a.N.debug('Retrieving token from local storage'),a.storage.Ed(b=>{if(b){const d=new olympe.aa.Request;var c=b.Rc();d.set('username',c);b=b.hf();d.set('nonce',b);a.N.debug('Token found, trying login with',d);Kb(a,d,a.hb)}else a.N.debug('No token found, cannot perform auto login. Falling back in GUEST state'),Lb(a)})):(a.N.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),Lb(a))}
|
|
529
529
|
function Nb(a,b){a.N.log('State change: ',Pb(a),'--\x3e',b);a.G.update(b)}function Lb(a){a.C.update(a.Ea);Nb(a,olympe.aa.qa.C.bh);a.N.info('Authenticated as guest')}function Pb(a){return olympe.D.Ta(a.G.yb())}function Qb(a){const b=olympe.aa.qa.C.hg,c=olympe.aa.qa.C.bh,d=olympe.aa.qa.C.Jh,e=olympe.D.Ic(olympe.D.fa,'auth.isOnline');olympe.D.rc([a.G],f=>{e.update(olympe.D.qc(f===b||f===c||f===d))},'Router is online');return e.yb()}
|
|
530
|
-
function Rb(a){const b=olympe.aa.qa.C.hg,c=olympe.aa.qa.C.bh;a=Pb(a);return a===b||a===c}function Sb(a){var b=olympe.public.
|
|
530
|
+
function Rb(a){const b=olympe.aa.qa.C.hg,c=olympe.aa.qa.C.bh;a=Pb(a);return a===b||a===c}function Sb(a){var b=olympe.public.Pa.get(),c='logoutCallback';void 0===c&&(c=olympe.$.Sf());b.na.set(c,a)}function Tb(a){return a.C.yb().hf()}function Ub(a,b,c,d=!1){b=b+c?':'+c.message:'';a.N.error(b);a.error.update(olympe.D.sb(b));Nb(a,olympe.aa.qa.C.wc);if(d)throw Error(b);}
|
|
531
531
|
function Kb(a,b,c,d){void 0===c&&(c=a.Xa);void 0===c&&Ub(a,'No authentication provider specified',null,!0);const e=a.zb.get(c);e||Ub(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.V.set('login',d);a.N.log('Sending authentication request using "'+c+'" for '+b);e.Ed(b,a.xb.bind(a));Nb(a,olympe.aa.qa.C.Jh)}function Vb(a,b,c){a.V.forEach(d=>{d(b,c)})}
|
|
532
|
-
olympe.aa.qa=class{constructor(a,b,c,d,e,f,g,h,k,m,n){this.N=a;this.F=b;this.storage=c;this.O=d;this.Xa=f;this.hb=g;this.
|
|
532
|
+
olympe.aa.qa=class{constructor(a,b,c,d,e,f,g,h,k,m,n){this.N=a;this.F=b;this.storage=c;this.O=d;this.Xa=f;this.hb=g;this.Qa=void 0===h?!0:h;this.ca=k;this.fb=m;this.ya=n;this.zb=new Map;this.G=olympe.D.Ic(String).update(olympe.aa.qa.C.INIT);this.error=olympe.D.Ic(olympe.D.Oa);this.L=null;this.Ea=new olympe.aa.Xe('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Ic(olympe.aa.Xe).update(this.Ea);this.V=new Map;this.na=new Map;e.forEach(p=>{const q=p.ia();if(this.zb.has(q))throw Error('Provider "'+
|
|
533
533
|
q+'" has already been registered !');this.zb.set(q,p)});Ib(this)}getState(){return this.G.yb()}ja(){return this.error.yb()}Rc(){return this.C.yb().Rc()}Yf(){return this.C.yb().Yf()}yh(){return this.C.yb().yh()}Kg(a,b){this.F.Kg(a,olympe.D.Ta(Tb(this)),b)}km(){this.N.debug('Sending logout');Ob(this.storage);this.F.ca(a=>{a?Ub(this,'Logout request rejected:',a):this.N.debug('Logout request acknowledged')})}Gh(){Pb(this)===olympe.aa.qa.C.hg&&this.F.Gh(a=>{a&&this.N.error('Was not able to send the auth keep alive message:',
|
|
534
534
|
a.message)})}xb(a,b){const c=null===this.L?olympe.aa.qa.G.Hs:this.L;this.L=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),Ob(this.storage),this.error.update(olympe.D.sb(a.message)),Lb(this),Vb(this,a,c)):(this.N.info('User '+b.Rc()+' (#'+b.Yf()+') successfully authenticated'),this.C.update(b),Nb(this,olympe.aa.qa.C.hg),Vb(this,a,c),this.storage&&Jb(this.storage,b));this.V.has('login')&&this.V.delete('login')}};
|
|
535
535
|
olympe.aa.qa.C={INIT:'init',Ne:'disconnected',bh:'guest',Jh:'authenticating',wc:'error',hg:'authenticated'};olympe.aa.qa.G={Hs:'manual',Qq:'auto',gi:'tokenOnFirstConnection'};olympe.aa.qa.F={Si:'accepted',Rn:'redirect'};olympe.aa.Zh=class{ia(){}Ed(){}};olympe.aa.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.rc([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.he&&(a=L(a));return a?a.valueOf():a}Rc(){return this.get('username')}rm(a){this.set('password',a)}hf(){return this.get('nonce')}toString(){return this.Rc()+(this.hf()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.aa.Xe=class{constructor(a,b,c,d={}){this.L=a;this.Ke=b;this.F=c;this.G=d}Rc(){return this.L}Yf(){return this.Ke}hf(){return this.F}ij(){return this.G}yh(){return null}oa(){var a=olympe.$,b=a.Qp;var c=JSON.stringify({user:this.L,userTag:this.Ke,nonce:this.F,payload:this.G});c=olympe.$.xh().C(Ba(c));return b.call(a,c)}};l=olympe.aa.Xe.prototype;l.Rc.K=new olympe.D.J(()=>String,[]);l.Yf.K=new olympe.D.J(()=>String,[]);l.hf.K=new olympe.D.J(()=>String,[]);l.ij.K=new olympe.D.J(()=>Object,[]);
|
|
@@ -542,46 +542,46 @@ olympe.U.Me.C.kh),new olympe.U.ha(olympe.aa.Z.Ak),new olympe.U.ha(olympe.aa.Z.lo
|
|
|
542
542
|
r&&n&&t.push(new olympe.aa.zb.te(r,n));n&&c&&t.push(new olympe.aa.zb.il(n,c.lq()));if(0===t.length)throw Error('At least one provider is needed for auth to start');if(!t.map(v=>v.ia()).includes(e))throw Error('Default provider name'+e+'given by parameter'+olympe.aa.Z.Ak+'cannot be found');return new olympe.aa.qa(b,c,d,n,t,e,f,g,h,k,m)},!0)},'olympe.auth');olympe.U.run([olympe.aa.T.ta],a=>{olympe.aa.mc=()=>a});olympe.bb.node.aa={};olympe.bb.node.aa.Bo=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')}};olympe.bb.node.aa.Bo.ka=[olympe.aa.$h];olympe.U.Ib(a=>{y(a,olympe.aa.T.wj,olympe.bb.node.aa.Bo)},'olympe.native.node.auth');olympe.host={};const Xb=new Map,Yb=new Map;olympe.host.zo=class{static register(a,b,...c){Xb.set(a,b);0<c.length&&Yb.set(a,c)}static create(a,b,c,d){const e=Xb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Yb.get(a);return void 0!==a?new e(b,c,...a.map(f=>la(d,f))):new e(b,c)}};function Zb(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.zo.create(c,b,a.N,a.L))}function $b(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.N.L()<=olympe.ua.Cb.C.wf&&a.N.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.Za(f))b.push(a.C.get(f.Pt)||null);else if('function'===typeof f){const g=f,h=olympe.D.Ja();b.push((...k)=>{h.Kb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
|
|
543
543
|
function ac(a){var b=olympe.host.ie.Oc,c=olympe.host.ie.yo.yp;++a.G;const d=a.G;Zb(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],m=d+'_'+k;this.F.has(m)&&this.F.get(m).gb();for(let n=0;n<f;n++){let p=arguments[n];olympe.D.Za(p)?(h.push(n),p=p.Sa):olympe.D.lf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{$b(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>{$b(this,
|
|
544
544
|
d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(m,f),f.onDestroy(()=>this.F.delete(m)));return null}.bind(a));e.Sc(a.O.bind(a,d));a=K(e);a.Pt=d;J(e,a);return a}olympe.host.qa=class{constructor(a,b){this.N=a;this.L=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}rb(){return this.N}O(a){this.N.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.gb()}};olympe.host.sd=class{constructor(a){this.C=a;this.F=olympe.D.Ja()}G(){return this.C}Vd(){return this.C.Sa.Vd()||this.F.Vd()}Kb(){return this.C.Sa.Kb()}};olympe.host.sd.prototype.G.K=new olympe.D.J(()=>olympe.host.ie.sd,[]);olympe.host.Cj=class{};olympe.host.Ok=class{constructor(){}};olympe.host.Ok.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.C=c}ia(){return this.name}Jb(a){return this.ia()===a.ia()&&this.value===a.value&&this.C===a.C}};olympe.host.Ok.C=class{constructor(a,b,c){this.parameters=c}};function bc(a,b,c){var d=olympe.host.me;const e=c||olympe.$.Rb(),f=new olympe.D.lc('onTimeout context');d.C.ca(b,e,()=>{f.Kb()||f.run(a);d.C.G(e)});return new olympe.host.Oc.G(d.C,e)}function cc(a){var b=olympe.host.me;a=a instanceof olympe.host.Oc.G?a.da():a;b.C.G(a)}function dc(a,b,c){var d=olympe.host.me;const e=c||olympe.$.Rb(),f=new olympe.D.lc('onInterval context');d.C.V(b,e,()=>{f.Kb()?d.C.F(e):f.run(a)});return new olympe.host.Oc.F(d.C,e)}
|
|
545
|
-
function ec(a){var b=olympe.host.me;a=a instanceof olympe.host.Oc.F?a.da():a;b.C.F(a)}olympe.host.Oc=class{constructor(a){this.C=ac(a)}};olympe.host.Oc.C=class{constructor(a,b){this.me=a;this.id=b}da(){return this.id}cancel(){}};olympe.host.Oc.L=class extends olympe.host.Oc.C{cancel(){this.me.O(this.id)}};olympe.host.Oc.G=class extends olympe.host.Oc.C{cancel(){this.me.G(this.id)}};olympe.host.Oc.F=class extends olympe.host.Oc.C{cancel(){this.me.F(this.id)}};olympe.host.ie={};olympe.host.ie.sd=class{gb(){}};olympe.host.ie.sd.prototype.destroy=olympe.host.ie.sd.prototype.gb;olympe.host.ie.yo={
|
|
546
|
-
|
|
547
|
-
olympe.U.run([olympe.host.T.ap],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.T.ta],a=>a,'olympe.host');olympe.bb.node.host={};olympe.bb.node.host.sd=function(a,b){this.N=b};olympe.bb.node.host.sd.prototype.constructor=olympe.bb.node.host.sd;olympe.bb.node.host.sd.prototype.gb=function(){};olympe.bb.node.host.sd.prototype.destroy=olympe.bb.node.host.sd.prototype.gb;olympe.bb.node.host.sd.prototype.rb=function(){return this.N};olympe.bb.node.host.sd.ka=[olympe.host.ie.sd];olympe.bb.node.host.Ao=class{constructor(a){this.N=a}uq(){this.N.error('No history manager implemented in Node')}};olympe.bb.node.host.Ao.ka=[olympe.host.Ok];olympe.bb.node.host.Oc=class{constructor(){this.C={};this.L={}}gb(){}O(a){clearTimeout(this.C[a]);delete this.C[a]}ca(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}V(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.zo.register(olympe.host.ie.yo.yp,olympe.bb.node.host.Oc);olympe.bb.node.host.Oc.ka=[olympe.host.ie.Oc];olympe.bb.node.host.Cj=class{constructor(a){this.N=a}};olympe.bb.node.host.Cj.ka=[olympe.host.Cj];olympe.U.Ib(function(a){pa(a,olympe.host.T.Pn,olympe.bb.node.host.Ao,olympe.host.T.Ha);pa(a,olympe.host.T.kp,olympe.bb.node.host.Cj,olympe.host.T.Ha)},'olympe.native.node.host');olympe.Da={};olympe.Da.Wb={};olympe.Da.Wb.Yh={kl:'POST',Oe:'GET',Jr:'HEAD',Mo:'PUT',DELETE:'DELETE',Ts:'OPTIONS',Xs:'PATCH'};olympe.Da.Wb.ResponseType={Dj:'text',mk:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.Da.Wb.Headers={Xm:'Content-Type',
|
|
545
|
+
function ec(a){var b=olympe.host.me;a=a instanceof olympe.host.Oc.F?a.da():a;b.C.F(a)}olympe.host.Oc=class{constructor(a){this.C=ac(a)}};olympe.host.Oc.C=class{constructor(a,b){this.me=a;this.id=b}da(){return this.id}cancel(){}};olympe.host.Oc.L=class extends olympe.host.Oc.C{cancel(){this.me.O(this.id)}};olympe.host.Oc.G=class extends olympe.host.Oc.C{cancel(){this.me.G(this.id)}};olympe.host.Oc.F=class extends olympe.host.Oc.C{cancel(){this.me.F(this.id)}};olympe.host.ie={};olympe.host.ie.sd=class{gb(){}};olympe.host.ie.sd.prototype.destroy=olympe.host.ie.sd.prototype.gb;olympe.host.ie.yo={Sx:100,Ux:101,Tx:102,Wx:103,Vx:104,Rx:105,Vz:201,Tz:202,Qz:204,Yz:205,Pz:206,Sz:207,Wz:208,Zz:209,$z:210,aA:211,Rz:212,Xz:218,Uz:219,bA:220,Oz:221,Nz:222,iA:300,jA:301,kA:302,oA:303,pA:304,qA:305,lA:310,mA:311,nA:312,sz:400,uz:401,vz:402,oz:450,gz:500,ez:501,jz:502,iz:503,fz:504,hz:505,JA:600,AA:601,EA:602,wA:603,xA:604,uA:605,zA:606,PA:607,HA:608,rA:609,vA:610,yA:611,GA:612,LA:613,sA:614,KA:615,FA:616,OA:617,BA:618,CA:619,DA:620,IA:630,tA:631,MA:632,NA:633,rB:700,VA:701,WA:702,
|
|
546
|
+
XA:703,ZA:704,$A:705,aB:706,YA:707,cB:708,bB:709,dB:710,hB:711,pB:712,eB:713,fB:714,iB:715,jB:716,lB:717,mB:718,oB:719,kB:720,nB:721,qB:722,gB:723,sB:724,tB:725,yp:800};olympe.host.ie.Oc=class{O(){}ca(){}G(){}V(){}F(){}};olympe.host.T={kp:'host.System',Pn:'host.HistoryManager',ap:'host.Scheduler',Ha:'host.platform.Logger',ta:'host.Manager'};olympe.host.me=null;olympe.U.Ib(function(a){ra(a,olympe.host.T.kp);ra(a,olympe.host.T.Pn);B(a,olympe.host.T.Ha,[olympe.ua.T.ta],function(b){return b.Gc('host')});y(a,olympe.host.T.ta,olympe.host.qa,olympe.host.T.Ha,olympe.U.T.vf);B(a,olympe.host.T.ap,[olympe.host.T.ta],b=>{null===olympe.host.me&&(olympe.host.me=new olympe.host.Oc(b));return olympe.host.me},!0)},'olympe.host');
|
|
547
|
+
olympe.U.run([olympe.host.T.ap],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.T.ta],a=>a,'olympe.host');olympe.bb.node.host={};olympe.bb.node.host.sd=function(a,b){this.N=b};olympe.bb.node.host.sd.prototype.constructor=olympe.bb.node.host.sd;olympe.bb.node.host.sd.prototype.gb=function(){};olympe.bb.node.host.sd.prototype.destroy=olympe.bb.node.host.sd.prototype.gb;olympe.bb.node.host.sd.prototype.rb=function(){return this.N};olympe.bb.node.host.sd.ka=[olympe.host.ie.sd];olympe.bb.node.host.Ao=class{constructor(a){this.N=a}uq(){this.N.error('No history manager implemented in Node')}};olympe.bb.node.host.Ao.ka=[olympe.host.Ok];olympe.bb.node.host.Oc=class{constructor(){this.C={};this.L={}}gb(){}O(a){clearTimeout(this.C[a]);delete this.C[a]}ca(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}V(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.zo.register(olympe.host.ie.yo.yp,olympe.bb.node.host.Oc);olympe.bb.node.host.Oc.ka=[olympe.host.ie.Oc];olympe.bb.node.host.Cj=class{constructor(a){this.N=a}};olympe.bb.node.host.Cj.ka=[olympe.host.Cj];olympe.U.Ib(function(a){pa(a,olympe.host.T.Pn,olympe.bb.node.host.Ao,olympe.host.T.Ha);pa(a,olympe.host.T.kp,olympe.bb.node.host.Cj,olympe.host.T.Ha)},'olympe.native.node.host');olympe.Da={};olympe.Da.Wb={};olympe.Da.Wb.Yh={kl:'POST',Oe:'GET',Jr:'HEAD',Mo:'PUT',DELETE:'DELETE',Ts:'OPTIONS',Xs:'PATCH'};olympe.Da.Wb.ResponseType={Dj:'text',mk:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.Da.Wb.Headers={Xm:'Content-Type',cy:'Content-Length'};olympe.Da.Wb.dy={Zy:'text/html',JSON:'application/json',vB:'application/zip'};olympe.Da.Wb.Ve={$q:0,fl:200,Rm:201,Si:202,Qx:400,TA:401,Vy:403,qz:404,kz:405,Hz:500,st:503};function fc(a){return a.host&&encodeURI(a.host)}function gc(a){return encodeURI(a.path).replace(olympe.Da.Ij.C,(b,c)=>'%'+c)}function hc(a){return void 0===a.G?443===a.port:a.G}olympe.Da.Ij=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`${hc(this)?'wss':'ws'}://${fc(this)}:${this.port}/${gc(this)}`}toString(){return`${fc(this)}:${this.port}/${gc(this)}`}};
|
|
548
548
|
olympe.Da.Ij.C=/%25([0-9a-f]{2})/i;olympe.Da.WebSocket=class{constructor(){}send(){}close(){}ya(){}na(){}ja(){}};function ic(a,b,c,d){a=olympe.$.mm(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.Da.Pk(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.Oq&&(c=a.Oq.split(':'),2===c.length&&(c=olympe.$.xh().C(Ba(`${c[0]}:${c[1]}`)),jc(b,{Authorization:`Basic ${c}`})));return b}function kc(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
|
|
549
549
|
function jc(a,b){for(let c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a.headers[c]=b[c])}olympe.Da.Pk=class extends olympe.Da.Ij{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.Da.Wb.Yh.Oe;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.Da.Wb.ResponseType.Dj;this.key=null}C(){let a=kc(this);a=a?`?${a}`:'';return fc(this)?`${hc(this)?'https':'http'}://${fc(this)}:${this.port}/${gc(this)}${a}`:`${gc(this)}${a}`}toString(){return this.C()}};
|
|
550
550
|
olympe.Da.Pk.Yh={kl:'POST',Oe:'GET',Jr:'HEAD',Mo:'PUT',DELETE:'DELETE',Ts:'OPTIONS'};olympe.Da.Kr=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}};function lc(a,b,c){const d=olympe.D.Ja(),e=d.onDestroy(()=>{var f=a.C();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.vb(f=>{d.dg(e);a.C().C.delete(b);c(f)})}olympe.Da.qa=class{constructor(a){this.N=a;this.F=1;a='Initializing NET layer';this.N.G()&&(a+=' (implementation: '+this.O()+')');this.N.info(a);this.N.log('DONE initializing NET layer (ready to receive connection requests)')}C(){}ca(){}Ge(){}G(){}L(){}O(){}};function mc(a){return!(!a.C||!a.C.connected)}function nc(a,b,c,d){a.connect();a.C.publish(b,JSON.stringify(c),void 0,e=>{d&&d(e);e&&a.N.error('Failed to publish a message '+c)})}function oc(a,b,c){a.connect();a.C.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.F.set(b,c)})}function pc(a,b,c){a.connect();a.C.unsubscribe(b,void 0,c);a.F.delete(b)}
|
|
551
551
|
olympe.Da.qj=class{constructor(a,b){this.url=a;this.L=b||null;this.C=null;this.G=[];this.F=new Map;this.N=olympe.ua.rb('MQTT')}connect(a){if(mc(this))return a&&a(),this;a&&this.G.push(a);null===this.C&&(this.C=mqtt.connect(this.url,this.L),this.C.on(olympe.Da.qj.C.Ls,(b,c)=>{this.F.has(b)?this.F.get(b)(JSON.parse(c.toString())):this.N.warn('There is no subscriber for topic '+b)}),this.C.on(olympe.Da.qj.C.er,()=>this.G.forEach(b=>b())));return this}end(a,b){this.C&&this.C.end(a,{},()=>{b&&b();this.C=
|
|
552
|
-
null});return this}};olympe.Da.qj.C={er:'connect',Ls:'message'
|
|
552
|
+
null});return this}};olympe.Da.qj.C={er:'connect',Ls:'message',$x:'close',ny:'end'};olympe.Da.T={ta:'net.Manager',Ha:'net.Logger'};olympe.Da.Z={Ws:'net.P2PServers',Vs:'net.P2POptions.reliable',Us:'net.P2POptions.maxRetransmitTime'};olympe.U.Ib(function(a){D(a,olympe.Da.Z.Ws,'stun:stun.l.google.com:19302');D(a,olympe.Da.Z.Vs,!0);D(a,olympe.Da.Z.Us,3E3);ra(a,olympe.Da.T.ta);B(a,olympe.Da.T.Ha,[olympe.ua.T.ta],function(b){return b.Gc('net')})},'olympe.net');olympe.Da.Hc={};olympe.Da.Hc.Qk=class{constructor(a){this.N=a;this.C=new Map}Ge(){}F(){}};function qc(a,b){const c=a.V(b);c.binaryType='arraybuffer';c.onopen=()=>{a.N.info('Websocket OPENED');a.G=!0;a.O?(a.N.debug('Notifying upper layer for WebSocket#'+a.id),a.O()):a.N.warn('Nothing to notify for WebSocket#'+a.id);a.buffer.forEach(c.send.bind(c));a.buffer.length=0};c.onmessage=d=>{d='string'===typeof d.data?String(d.data):a.ca(d.data);a.N.debug('#'+a.id+' < '+d);a.F&&a.F(d)};c.onclose=()=>{a.G=!1;a.N.debug('WebSocket#'+a.id+' CLOSE');a.L&&a.L()};c.onerror=()=>{a.N.debug('WebSocket#'+a.id+
|
|
553
553
|
' ERROR')};a.C=c}
|
|
554
554
|
olympe.Da.Hc.WebSocket=class{constructor(a,b){this.N=b;this.id=a;this.C=null;this.buffer=[];this.G=!1;this.F=this.L=this.O=null}da(){return this.id}send(a){this.N.debug('#'+this.id+' > '+a);this.G?this.C.send(a):this.buffer.push(a)}close(){const a=this.C.constructor,b=this.C.readyState;b===a.OPEN||b===a.CONNECTING?(this.N.debug('Force closing native websocket'),this.C.close(1E3)):this.N.debug('Try to force close native websocket, but not open nor connecting')}ya(a){this.O=a||null}na(a){this.F=a||
|
|
555
555
|
null}ja(a){this.L=a||null}V(){}ca(){}};olympe.Da.Hc.WebSocket.ka=[olympe.Da.WebSocket];olympe.bb.node.Da={};olympe.bb.node.Da.Qs=class extends olympe.Da.qa{constructor(a,b){super(a,b);this.V=new olympe.bb.node.Da.Qk(a)}O(){return'NodeJS'}L(){return olympe.D.fa.F}ca(a){var b=this.F++;a=a.C();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.bb.node.Da.Rs(b,this.N);qc(b,a);return b}Ge(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.F++;b=lc(this,c,b);this.V.Ge(c,{u:a.C(),s:hc(a),h:fc(a),p:a.port,z:gc(a),q:kc(a),m:a.method,v:a.headers,k:a.key,c:null,a:null,j:!1,b:a.body,r:a.F},
|
|
556
556
|
b)}G(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}C(){return this.V}};olympe.bb.node.Da.Qk=class extends olympe.Da.Hc.Qk{Ge(a,b,c){const d=b.s,e=b.b,f=b.m;var g=b.v;const h=b.k,k=b.c,m=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,v=b.u,u=b.r;b={host:p,port:q,path:t?r+'?'+t:r,method:f};g&&(b.headers=g);g=(x,G,C)=>new Promise((z,T)=>{OlympeNodeAPI.readFile(x,(S,hb)=>{S?T(S):(C[G]=hb,z(C))})});p=x=>{const G=z=>{z.setEncoding(u===olympe.Da.Wb.ResponseType.Dj?'utf-8':'binary');let T='';z.on('data',S=>{T+=S});z.on('end',()=>{if(u!==
|
|
557
557
|
olympe.Da.Wb.ResponseType.Dj){var S=(new Uint8Array(OlympeNodeAPI.buffer.from(T,'binary'))).buffer;S=u===olympe.Da.Wb.ResponseType.mk?new Blob([S]):S}else S=T;c(this.F(z.statusCode,z.statusMessage,S,z.headers))})},C=d?new OlympeNodeAPI.lw(x,G):new OlympeNodeAPI.Ge(x,G);this.C.set(a,()=>{C.abort()});C.on('error',z=>{c(this.F(0,'Conection refused','Error connecting to '+v+' with method '+f+', code = '+z.code+', message = '+z.message,''))});!e||'POST'!==f&&'PUT'!==f?C.end():(e instanceof Blob?e.arrayBuffer():
|
|
558
|
-
Promise.resolve(e)).then(z=>{C.write(z instanceof ArrayBuffer?OlympeNodeAPI.buffer.from(z):z);C.end()})};d&&(h||k||m)?h&&k&&m?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,m,'ca')).then(p).catch(x=>{this.N.log('Error loading self signed files:',x)})):this.N.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.N.debug('Received HTTP response',a,c);return new olympe.Da.Kr(c,a,b,d)}};olympe.bb.node.Da.Rs=class extends olympe.Da.Hc.WebSocket{V(a){return new OlympeNodeAPI.WebSocket(a)}ca(a){a=new Uint8Array(a);return(new OlympeNodeAPI.StringDecoder('utf8')).write(a)}};olympe.bb.node.Da.Z={
|
|
558
|
+
Promise.resolve(e)).then(z=>{C.write(z instanceof ArrayBuffer?OlympeNodeAPI.buffer.from(z):z);C.end()})};d&&(h||k||m)?h&&k&&m?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,m,'ca')).then(p).catch(x=>{this.N.log('Error loading self signed files:',x)})):this.N.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.N.debug('Received HTTP response',a,c);return new olympe.Da.Kr(c,a,b,d)}};olympe.bb.node.Da.Rs=class extends olympe.Da.Hc.WebSocket{V(a){return new OlympeNodeAPI.WebSocket(a)}ca(a){a=new Uint8Array(a);return(new OlympeNodeAPI.StringDecoder('utf8')).write(a)}};olympe.bb.node.Da.Z={UA:'native.html.net.useWorkers'};olympe.U.Ib(function(a){pa(a,olympe.Da.T.ta,olympe.bb.node.Da.Qs,olympe.Da.T.Ha,olympe.host.T.ta)},'olympe.native.node.net');olympe.bb.node.Vb={};olympe.bb.node.Vb.ro=class{constructor(a){this.F={};this.N=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.bb.node.Vb.so(a,this.N));return rc(this.F[a])}};olympe.bb.node.Vb.ro.ka=[olympe.Vb.ws];function rc(a){if(a.C)return a;a.C=!0;a.db=OlympeNodeAPI.Ew(new OlympeNodeAPI.Dw);return a}olympe.bb.node.Vb.so=class{constructor(a,b){this.name=a;this.N=b;this.C=!1;this.db=void 0}close(){}get(a,b){this.C||rc(this);b(this.db.get(a).value(),a)}set(a,b,c){this.C||rc(this);this.db.set(a,b).write();c&&c(!0)}forEach(a,b){this.C||rc(this);const c=this.db.getState();for(let d in c)a(c[d],d);b()}remove(a){this.C||rc(this);this.db.unset(a).write()}clear(){this.C||rc(this);this.db.setState({})}};
|
|
559
559
|
olympe.bb.node.Vb.so.ka=[olympe.Vb.xs];olympe.U.Ib(function(a){y(a,olympe.Vb.T.lj,olympe.bb.node.Vb.ro,olympe.Vb.T.Ha)},'olympe.native.node.localstorage');olympe.bb.node.storage={};olympe.bb.node.storage.Storage=class{constructor(a){this.N=a}G(a){a&&a('Not Implemented.')}O(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}L(a){a&&a('Not Implemented.')}F(a){a&&a('Not Implemented.')}C(a){a&&a('Not Implemented.')}close(a){a(null)}};olympe.bb.node.storage.Storage.ka=[olympe.Vb.Storage];olympe.U.Ib(function(a){pa(a,olympe.Vb.T.bi,olympe.bb.node.storage.Storage,olympe.host.T.Ha)},'olympe.native.html.storage');olympe.ag={};olympe.ag.Z={VERSION:'version.version',Wq:'version.branch',uf:'version.commit',Et:'version.tag',yn:'version.olympe-framework',Xq:'version.build'};olympe.U.Ib(function(a){D(a,olympe.ag.Z.VERSION,'');D(a,olympe.ag.Z.Wq,'');D(a,olympe.ag.Z.uf,'');D(a,olympe.ag.Z.Et,'');D(a,olympe.ag.Z.yn,'');D(a,olympe.ag.Z.Xq,'')},'olympe.main');let ua,ta;function sc(a,b){OlympeNodeAPI.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
|
|
560
560
|
function tc(){if(void 0!==ua&&void 0!==ta){0===Object.keys(ta).length&&console.warn('No configuration found. Check presence of oConfig.json');0===Object.keys(ua).length&&console.warn('No version found. Check presence of version.json');var a=Object.create(null);for(var b=2;b<OlympeNodeAPI.Dq.length;b++){var c=/^true|false$/i,d=/^\d+(\.\d+)?$/,e=void 0;const f=/([^?&=]+)(=?([^?&=]+))?/g.exec(OlympeNodeAPI.Dq[b]);e=f[3];void 0===e?e=!0:c.test(e)?e='true'===e.toLowerCase():d.test(e)&&(e=parseFloat(e));
|
|
561
561
|
a[f[1]]=e}a=new olympe.U.mr(a);d=a.rb();d.debug('Registering configurations...');d.C++;for(let f=0,g=ja.length;f<g;f++)b=a,c=ja[f],A(b.N,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);na(d);d.debug('done registering');a=a.compile();c=a.rb();c.debug('Running run callbacks of container...');for(let f=0,g=ka.length;f<g;f++)c.C++,d=ka[f],b=a,e=ma(b,d.wi()),e.push(b),b.N.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,e),na(c);c.debug('done calling run callbacks. DI process completed!')}}
|
|
562
562
|
olympe.$.Ul('oConfig.json',sc,function(a){ta=a;tc()});sc('version.json',function(a){ua=a;tc()});olympe.dc={};olympe.dc.Ca=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.Ta(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.R?b=a.R():'function'===typeof a&&(b=olympe.dc.wa.Ub(a)));return b||''};w('olympe.dc.instanceToTag',olympe.dc.Ca);olympe.dc.Ua=function(){return olympe.dc.Wc().view};olympe.dc.Ka={ORIGIN:'<',DESTINATION:'>',gh:'<',mh:'>'};w('olympe.dc.RelationDirection',olympe.dc.Ka);olympe.dc.Lf=class{Tb(){}bc(){}oc(){}la(){}nb(){}};olympe.dc.ml=class{gd(){}da(){}zc(){}};function uc(a,b,c,d,e,f,g){d=new olympe.dc.ma(olympe.dc.ma.ra.Hj,{file:b,url:null,content:c,Rg:e?h=>{vc(a,b,c);f(h)}:f,mimeType:d,eg:g||null},[olympe.dc.Ua().source(b)||olympe.dc.La.dd]);a.F.send(d)}function vc(a,b,c){const d=olympe.dc.Ca(b);a.C.set(d,c);const e=olympe.$.Sf();wc(olympe.dc.Ua(),d,f=>{f||(a.C.delete(d),xc(olympe.dc.Ua(),d,e))},e)}
|
|
563
563
|
function yc(a,b,c,d){olympe.D.Eq([b.rq(),b.R(),b.Vk(),b.am()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ma(olympe.dc.ma.ra.aj,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),Rg:a.G?k=>{vc(a,f,k);c(k)}:c,eg:d},[olympe.dc.Ua().source(f)||olympe.dc.La.dd]),a.F.send(e))})}
|
|
564
|
-
olympe.dc.Br=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}ke(a,b,c,d,e,f=!0){b=b instanceof olympe.D.Oa?b.valueOf():b;'string'===typeof b?b=new Blob([Ba(b)],{type:c}):b instanceof ArrayBuffer&&(b=new Blob([b],{type:c}));uc(this,a,b,c,f&&this.G,d,e)}};olympe.dc.Nd=class{R(){}};olympe.dc.Nd.prototype.getTag=olympe.dc.Nd.prototype.R;olympe.dc.Nd.prototype.R.K=new olympe.D.J(()=>String,[]);olympe.dc.Fc={be:'ff022000000000000000',Zg:'ff02200000000000000e',Qm:'ff02200000000000000f'};olympe.dc.Pb={VERSION:'@v',Pd:'@s'};olympe.dc.og={bd:'?'};olympe.dc.qa=class{constructor(a,b,c,d,e,f){this.N=a;this.C=f}ke(a,b,c,d,e,f){f?this.C.ke(a,b,c,g=>{g&&f.update(a,olympe.dm.File.urlProp,g);f.update(a,olympe.dm.File.C,olympe.D.fa.F);d(g)},e):this.C.ke(a,b,c,d,e)}};function zc(a,b){a.F.unshift(b);return a}olympe.dc.ma=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.F=[]}validate(a=null){this.F.forEach(b=>{b(a||null)})}toString(){const a=olympe.$.jq(olympe.dc.ma.ra,this.type);return a?a:'UNKNOWN_MESSAGE'}};olympe.dc.ma.ra={ng:10,
|
|
564
|
+
olympe.dc.Br=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}ke(a,b,c,d,e,f=!0){b=b instanceof olympe.D.Oa?b.valueOf():b;'string'===typeof b?b=new Blob([Ba(b)],{type:c}):b instanceof ArrayBuffer&&(b=new Blob([b],{type:c}));uc(this,a,b,c,f&&this.G,d,e)}};olympe.dc.Nd=class{R(){}};olympe.dc.Nd.prototype.getTag=olympe.dc.Nd.prototype.R;olympe.dc.Nd.prototype.R.K=new olympe.D.J(()=>String,[]);olympe.dc.Fc={be:'ff022000000000000000',Zg:'ff02200000000000000e',Qm:'ff02200000000000000f'};olympe.dc.Pb={VERSION:'@v',Pd:'@s'};olympe.dc.og={bd:'?'};olympe.dc.qa=class{constructor(a,b,c,d,e,f){this.N=a;this.C=f}ke(a,b,c,d,e,f){f?this.C.ke(a,b,c,g=>{g&&f.update(a,olympe.dm.File.urlProp,g);f.update(a,olympe.dm.File.C,olympe.D.fa.F);d(g)},e):this.C.ke(a,b,c,d,e)}};function zc(a,b){a.F.unshift(b);return a}olympe.dc.ma=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.F=[]}validate(a=null){this.F.forEach(b=>{b(a||null)})}toString(){const a=olympe.$.jq(olympe.dc.ma.ra,this.type);return a?a:'UNKNOWN_MESSAGE'}};olympe.dc.ma.ra={ng:10,Xy:11,gp:20,fA:21,xt:22,xl:23,Ph:24,Oh:25,Yy:26,Kk:28,Cz:30,Dz:31,hi:40,yl:41,Ug:45,Hm:46,Gk:47,Hj:50,aj:51,Bk:52,Lt:60,it:61,Dr:62,Er:63,cr:64,Yq:65,Wy:90,zk:91,Lk:92,Gn:93,ho:94,rj:95,wt:96};olympe.dc.Te=class{C(){}};olympe.dc.nl=class{constructor(...a){this.Nb=a}C(a,b,c){const d=this.Nb.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Nb[f].C(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.nl.ka=[olympe.dc.Te];olympe.dc.Ec=class{constructor(a){this.tag='string'===typeof a?a:a.R()}R(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Ec(b.tag)}};olympe.dc.Ec.ka=[olympe.dc.Nd];olympe.dc.Ec.prototype.toJSON.K=olympe.D.J.C;olympe.dc.Hf=class{send(){}C(){}ya(){}O(){}};olympe.dc.ei={Do:'online',el:'offline',$n:'invalidate'};olympe.dc.La={jb:'self',dd:'server',rt:'self.only'};const Ac=olympe.dc.Ka.ORIGIN,Bc=olympe.dc.Ka.DESTINATION,Cc=new Map,Dc=new Map,Ec=new Map,Fc=new Map;function Gc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.sm||[])];return olympe.dc.wa.C(a,b,...c)}function M(a,b){Fc.set(a,b);return a}function Hc(a){return(a=Cc.get(a))&&a.F||olympe.dc.Sync}function Ic(a,b,c){const d=a+'@'+(b===Bc?Ac:Bc);if(Dc.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Dc.set(d,c)}
|
|
565
565
|
function Jc(a){a=a.R()+'@'+a.Na();return Dc.get(a)||olympe.dc.Sync}function N(a,b){b.NAME=a;Ec.set(a,b)}function O(a){return a.NAME||null}
|
|
566
566
|
olympe.dc.wa=class{constructor(){}static C(a,b,...c){if(Cc.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${Cc.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.U.uc(g):g}}b=new olympe.dc.za.Entry(a,b,d);Cc.set(a,b);return b.F.entry=b}static Ub(a){return(a=a.entry)&&a.R()||null}};olympe.dc.za={};function Kc(a,b){a.C=b}function P(a,b){b=b.xd();Ic(b.R(),b.Na(),a.F);return b}function Lc(a){a.G=!0;return a}
|
|
567
567
|
olympe.dc.za.Entry=class{constructor(a,b,c){this.tag=a;this.F=b;this.sm=c||null;this.C=null;this.G=!1}R(){return this.tag}instantiate(a,b){const c=this.F;if(this.Ci()&&b.getParameter(olympe.dc.Z.mn)){var d=olympe.dc.Ua();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.R()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ua.rb('dc').error(d)}return this.sm?(a=[void 0,a].concat(ma(b,this.sm)),new c(...a)):new c(void 0,
|
|
568
568
|
a)}Ba(a){return new olympe.dc.za.Property(a)}Ma(a,b=olympe.dc.Ka.DESTINATION){Ic(a,b,this.F);return new olympe.dc.W.Db(a,b)}Ci(){return this.G}};w('olympe.dc.registry.Entry',olympe.dc.za.Entry);olympe.dc.za.Entry.prototype.addRelation=olympe.dc.za.Entry.prototype.Ma;olympe.dc.za.Entry.prototype.addProperty=olympe.dc.za.Entry.prototype.Ba;olympe.dc.za.Entry.ka=[olympe.dc.Nd];olympe.dc.za.Property=class{constructor(a){this.tag=a}R(){return this.tag}};olympe.dc.za.Property.ka=[olympe.dc.Nd];olympe.dc.za.Relation=class a{constructor(b,c){this.tag=b;this.direction=c||olympe.dc.Ka.DESTINATION}R(){return this.tag}Na(){return this.direction}xd(){const b=olympe.dc.Ka.ORIGIN,c=olympe.dc.Ka.DESTINATION;return new a(this.tag,this.direction===b?c:b)}toString(){return this.direction+this.tag}};olympe.dc.za.Relation.prototype.getInverse=olympe.dc.za.Relation.prototype.xd;olympe.dc.za.Relation.prototype.getDirection=olympe.dc.za.Relation.prototype.Na;olympe.dc.za.Relation.prototype.getTag=olympe.dc.za.Relation.prototype.R;
|
|
569
569
|
olympe.dc.za.Relation.ka=[olympe.dc.Nd];olympe.dc.db={};function Mc(a,b,c,d,e){var f=olympe.dc.La.jb;const g=c.da();Nc(a.F,b,c,d,e,f);return h=>{if(h)a.F.push(g);else{h=a.F;const k=h.G.get(g);if(void 0!==k){const m=h.F.indexOf(g);h.F.splice(m,1);Oc(h,Pc(h,k.C,h.F.length),k.source);h.G.delete(g)}}}}function Qc(a,b,c){b&&a.C.Xa(b);c&&a.C.xb(c)}
|
|
570
|
-
olympe.dc.db.qr=class{constructor(a,b,c,d,e){this.N=a;this.C=b;this.F=new olympe.dc.db.kr(a,b,d);this.view=new olympe.dc.$a(a,b);this.
|
|
571
|
-
olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.$.Rb();this.N=b;this.
|
|
572
|
-
d.Sd(c&&c.get(Sc)||this.je);c&&(c.delete(Rc),c.delete(Sc),this.Qc(d,c));this.C(a.F.Yn,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.Lb(b,!0);var e=c&&parseInt(c.get(Rc),10);0>e||!d&&b.version()>=e||(c.delete(Rc),b.Qc(isNaN(e)?b.version()+1:e),this.Qc(b,c))}}oc(b){const c=this.get(b);void 0!==c&&(this.na(c,!1),this.C(a.F.Zn,b))}zd(b,c,d){c=this.Lb(c,!0);d=this.Lb(d,!0);switch(b){case Tc:c.Be(d);break;case Uc:c.Ae(d);break;default:c.
|
|
570
|
+
olympe.dc.db.qr=class{constructor(a,b,c,d,e){this.N=a;this.C=b;this.F=new olympe.dc.db.kr(a,b,d);this.view=new olympe.dc.$a(a,b);this.Hw=new olympe.dc.db.Os(this.N,this.view,b,e)}rb(){return this.N}persist(a){this.C.ja();this.C.Ea(a,olympe.dc.db.Instance.C.Jo);this.C.ca()}rf(a,b){this.F.rf(a,b)}};const Rc=olympe.dc.Pb.VERSION,Sc=olympe.dc.Pb.Pd,Tc=olympe.dc.Fc.be,Uc=olympe.dc.Fc.Zg;
|
|
571
|
+
olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.$.Rb();this.N=b;this.Qa=olympe.D.Ja();this.je=c.get('defaultSource')||olympe.dc.La.jb;this.L=olympe.dc.db.Database.G.IDLE;this.V=new Map;this.$b=[];this.G=[];this.ya=new Map;b=c.get('garbageCollector')||olympe.dc.db.Qh.C.Ck;new olympe.dc.db.Qh(this,b,this.Qa);c.get('debug')&&this.Ae()}da(){return this.id}getState(){return this.L}rb(){return this.N}create(b,c){const d=this.Lb(b,!0);d.Qc(c&&parseInt(c.get(Rc),10)||1);
|
|
572
|
+
d.Sd(c&&c.get(Sc)||this.je);c&&(c.delete(Rc),c.delete(Sc),this.Qc(d,c));this.C(a.F.Yn,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.Lb(b,!0);var e=c&&parseInt(c.get(Rc),10);0>e||!d&&b.version()>=e||(c.delete(Rc),b.Qc(isNaN(e)?b.version()+1:e),this.Qc(b,c))}}oc(b){const c=this.get(b);void 0!==c&&(this.na(c,!1),this.C(a.F.Zn,b))}zd(b,c,d){c=this.Lb(c,!0);d=this.Lb(d,!0);switch(b){case Tc:c.Be(d);break;case Uc:c.Ae(d);break;default:c.Qa(b,d)}}ud(b,c,d){c=this.get(c);d=this.get(d);if(void 0!==c&&
|
|
573
573
|
void 0!==d)switch(b){case Tc:c.Gi(d);break;case Uc:c.Fi(d);break;default:c.G(b,d)}}Xa(b){for(const c of b)this.Lb(c).Of()}xb(b){for(const c of b)(b=this.get(c))&&b.detach()}Ea(b,c){b.forEach(d=>{this.Lb(d).Ng(c)})}uh(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.F.ln,b))}Lb(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.kn,b),c&&this.C(a.F.Fj,b));return d}Ee(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=
|
|
574
574
|
olympe.dm.Relation.C.Ej,h=olympe.dm.Relation.C.yj,k=olympe.dc.Ka.ORIGIN,m=olympe.dc.Ka.DESTINATION,n=a.C.lh+olympe.dc.ob.hq(c),p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(u,x)=>(u=this.get(u))&&0!==(u.get(n)&x),v=([u,x])=>!r.has(u)&&(e?e(x):!0);for(const u of r.keys())r.get(u)||(r.set(u,!0),yield u),f=this.get(u),void 0!==f&&f.forEach((x,G)=>{(G[0]===k&&t(G.substring(1),q)||G[0]===m&&t(G.substring(1),p))&&Array.from(x.entries()).filter(v).forEach(([C])=>{r.set(C,!1)})})}.bind(this,b)}}hb(b){Vc(this.G[0],
|
|
575
575
|
olympe.$.Sf(),b)}O(b){this.G[0].C.delete(b)}C(b,c,...d){this.V.has(b)&&this.V.get(b).forEach(e=>{e(c,...d)})}na(b,c){this.ya.set(b,c)}Sd(b,c,d,e){0<this.G.length&&this.G[0].Lb(b).Ba(e?Wc+c:c,d)}xe(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===Xc?f?g.Lb(b).ja(c,e):g.Lb(b).na(c,e):f?g.Lb(b).fb(c,e):g.Lb(b).hb(c,e)}}F(b,c){let d=this.V.get(b);void 0===d&&(d=[],this.V.set(b,d));d.push(c)}fb(b){this.$b.push(b)}fd(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}ja(){this.L===a.G.IDLE&&(this.L=a.G.Vq);
|
|
576
|
-
this.G.unshift(new olympe.dc.db.vr(this,this.
|
|
576
|
+
this.G.unshift(new olympe.dc.db.vr(this,this.Qa))}ca(){this.L=a.G.uf;this.Be();Yc(this.G[0]);this.G.shift();0===this.G.length&&(this.$b.forEach(b=>{b()}),this.L=a.G.IDLE)}Qc(b,c){const d=a.C.bd;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.Zj(e.substr(1),f):b.update(e,f))}Be(){const b=a.C.ORIGIN,c=this.ya,d=new Map,e=(g,h)=>{const k=g.get(b+Tc);k&&k.forEach((m,n)=>{g!==m&&(d.set(m,h),c.delete(n),e(m,h))})};c.forEach((g,h)=>{d.set(h,g);e(h,g)});const f=this.G[0];d.forEach((g,h)=>{h.je(g)&&(h=h.tag(),
|
|
577
577
|
g?f.Lb(h).create():f.Lb(h).delete())});this.ya.clear()}Ae(){const b=a.C.DESTINATION,c=a.F.Ek,d=a.F.xj,e=new Set,f=new Map;this.F(a.F.Yn,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===Uc&&h[1]===b){const k=h[2];this.get(k).Fb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.fb(()=>{e.forEach(g=>{const h=this.get(g);h&&null===h.model()&&this.N.error(`\n[DEBUG - DATABASE]\nInstance ${g} created but does not exist !\n${h.toString()}`)});e.clear();f.forEach((g,
|
|
578
578
|
h)=>{const k=this.get(h);k&&this.N.error(`\n[DEBUG - DATABASE]\nThe model ${h} is extended by other models but does not exist !`+`\nExtension models: ${Array.from(g.values()).join(', ')}`+`\n\n ${k.toString()}`)});f.clear()})}};olympe.dc.db.Database.C={lh:'$',Pr:'~',bd:'?',hk:'=',sk:'@',ORIGIN:olympe.dc.Ka.ORIGIN,DESTINATION:olympe.dc.Ka.DESTINATION};olympe.dc.db.Database.F={kn:0,ln:1,up:2,Fj:3,Nm:4,Om:5,Ek:6,DELETE:7,xj:8,sl:9,Yn:10,Zn:11,Uo:12};olympe.dc.db.Database.G={IDLE:0,Vq:1,uf:2};const Q=olympe.dc.db.Database.F,Zc=olympe.dc.db.Database.C.lh,$c=olympe.dc.db.Database.C.Pr,ad=olympe.dc.db.Database.C.bd,bd=olympe.dc.db.Database.C.hk,cd=olympe.dc.db.Database.C.sk,R=olympe.dc.Ka.ORIGIN,U=olympe.dc.Ka.DESTINATION,dd=olympe.dc.Fc.be,ed=olympe.dc.Fc.Zg;
|
|
579
579
|
olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.ud=olympe.dc.La.jb;this.e=!1;this.xb=0;this.F=void 0;this.c=0;this.ya=a.C.Jo;this.db=c}tag(){return this.C}Fb(){return this.e}$b(){return this.db.fd(this.C)}source(){return this.ud}version(){return this.xb}model(){const b=this.get(U+dd);return b&&b.values().next().value||null}cf(){const b=this.get(U+ed);return b&&b.values().next().value||null}persisted(){return this.ya!==a.C.zp}toString(){var b=this.Gb(olympe.dc.Sync.nameProp.R());
|
|
580
580
|
b=`Instance: ${this.C}, Exist: ${this.e}, Name: ${b}`;var c=this.model();if(c){var d=c.Gb(olympe.dc.Sync.nameProp.R())||'No model name';b+=`\nModel: ${c.C}, Exist: ${c.e}, Model name: ${d}`}else b+='\nModel: no model';(c=this.cf())?(d=c.Gb(olympe.dc.Sync.nameProp.R())||'No extension name',b+=`\nExtension: ${c.C}, Exist: ${c.e}, Extension name: ${d}`):b+='\nExtension: no extension';return b}Gb(b,c=!1){const d=this.get(Zc+b);return c||void 0!==d?d:this.get(bd+b)}Ea(b,c=!1){const d=this.get(ad+b);return c||
|
|
581
581
|
void 0!==d?d:this.get($c+b)}update(b,c){const d=Zc+b;var e=this.get(d);e=void 0===e?null:e;if(e!==c){if(e instanceof olympe.dc.Ec){if(c instanceof olympe.dc.Ec&&c.R()===e.R())return;this.db.get(e.R()).zd();this.db.oc(e.R())}c instanceof olympe.dc.Ec&&(e=this.db.Lb(c.R(),!0),e.F&&e.F.tag!==this.C&&this.db.rb().fatal('Instance',c.R(),'referenced multiple times!\nThis instance is currently property of',e.F.tag,'(for the property '+e.F.dk+')','and is assigned as a property of',this.C,'(for the property '+
|
|
582
|
-
b+')'),e.Ei(this.C,b));e=bd+b;null===c?(this.delete(d),c=(c=this.model())&&c.Ea(b),void 0!==c?(this.set(e,c),this.O(b,c,!0)):this.O(b,null,!1)):(this.set(d,c),this.delete(e),this.O(b,c,!1))}}Zj(b,c){const d=ad+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=$c+b,null===c?(this.delete(d),c=(c=this.cf())&&c.Ea(b),c=void 0===c?null:c,null!==c&&this.set(e,c),this.ca((new Map).set(b,c))):(void 0!==this.get(e)&&this.delete(e),this.set(d,c),this.ca((new Map).set(b,c))))}
|
|
583
|
-
b);d=c.hb(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.xj,this.C,b,U,c.C),this.db.C(Q.xj,c.C,b,R,this.C),this.e&&c.e&&(this.L(b,U,c,!0),c.L(b,R,this,!0)))}G(b,c){const d=R+b;void 0!==this.Xa(U+b,c.C)&&(c.Xa(d,this.C),this.db.C(Q.sl,this.C,b,U,c.C),this.db.C(Q.sl,c.C,b,R,this.C),this.e&&c.e&&(this.L(b,U,c,!1),c.L(b,R,this,!1)))}Be(b){const c=this.model();if(null!==c){if(c===b)return;this.G(dd,c)}this.
|
|
584
|
-
this)&&this.db.na(this,!0)}Gi(b){this.G(dd,b);this.forEach((c,d)=>{this.fb(d.substr(1),null)});this.db.na(this,!1)}Ae(b){const c=this.cf();if(null!==c){if(c===b)return;this.G(ed,c)}this.
|
|
582
|
+
b+')'),e.Ei(this.C,b));e=bd+b;null===c?(this.delete(d),c=(c=this.model())&&c.Ea(b),void 0!==c?(this.set(e,c),this.O(b,c,!0)):this.O(b,null,!1)):(this.set(d,c),this.delete(e),this.O(b,c,!1))}}Zj(b,c){const d=ad+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=$c+b,null===c?(this.delete(d),c=(c=this.cf())&&c.Ea(b),c=void 0===c?null:c,null!==c&&this.set(e,c),this.ca((new Map).set(b,c))):(void 0!==this.get(e)&&this.delete(e),this.set(d,c),this.ca((new Map).set(b,c))))}Qa(b,c){var d=R+b;const e=this.hb(U+
|
|
583
|
+
b);d=c.hb(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.xj,this.C,b,U,c.C),this.db.C(Q.xj,c.C,b,R,this.C),this.e&&c.e&&(this.L(b,U,c,!0),c.L(b,R,this,!0)))}G(b,c){const d=R+b;void 0!==this.Xa(U+b,c.C)&&(c.Xa(d,this.C),this.db.C(Q.sl,this.C,b,U,c.C),this.db.C(Q.sl,c.C,b,R,this.C),this.e&&c.e&&(this.L(b,U,c,!1),c.L(b,R,this,!1)))}Be(b){const c=this.model();if(null!==c){if(c===b)return;this.G(dd,c)}this.Qa(dd,b);b.forEach((d,e)=>{e[0]!==ad&&e[0]!==$c||this.fb(e.substr(1),d)});(b.e||b===
|
|
584
|
+
this)&&this.db.na(this,!0)}Gi(b){this.G(dd,b);this.forEach((c,d)=>{this.fb(d.substr(1),null)});this.db.na(this,!1)}Ae(b){const c=this.cf();if(null!==c){if(c===b)return;this.G(ed,c)}this.Qa(ed,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===ad||f[0]===$c)f=f.substr(1),this.has(ad+f)||(this.set($c+f,e),d.set(f,e))});this.ca(d)}Fi(b){this.G(ed,b);const c=new Map;this.forEach((d,e)=>{e[0]===$c&&(this.delete(e),c.set(e.substr(1),null))});this.ca(c)}fd(b,c,d){const e=(...f)=>{var g=f.length;const h=f[g-
|
|
585
585
|
2];(g=this.db.get(f[g-1]))&&(h?g.Of():g.detach());d(...f)};this.ja(b,c,e);return e}ja(b,c,d){const e=this.hb(cd+b);e.has(c)||(e.set(c,d),this.Of(),this.db.C(Q.Nm,this.C,b,c))}V(b,c){const d=this.Xa(cd+b,c);void 0!==d&&(this.detach(),this.db.C(Q.Om,this.C,b,c));return d}Sd(b){this.ud=b}Qc(b){this.xb=b}Ng(b){this.ya=b;this.na()||this.db.C(Q.Fj,this.C)}je(b){const c=this.e!==b;c&&(b?(this.e=b,this.Mg()):(this.Rf(),this.e=b),this.xe(b));return c}Of(){this.c++;1===this.c&&this.db.C(Q.up,this.C)}detach(){0<
|
|
586
586
|
this.c?--this.c:this.db.C(Q.Uo,this.C,`Try to decrease references on instance ${this.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===this.c&&this.db.C(Q.Fj,this.C)}na(){return 0<this.c||this.ya===olympe.dc.db.Instance.C.Ko}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===U){const e=c.substr(1),f=d===R?U:R;b.forEach(g=>{const h=
|
|
587
587
|
g.get(f+e);h.delete(this.C);0===h.size&&g.delete(f+e)})}d===Zc&&b instanceof olympe.dc.Ec&&this.db.get(b.R()).zd()});void 0!==this.F&&this.db.get(this.F.tag).delete(Zc+this.F.dk)}Ei(b,c){void 0===this.F&&this.Of();this.F={tag:b,dk:c}}zd(){void 0!==this.F&&(this.detach(),this.F=void 0)}Mg(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===U){const e=c.substr(1),f=d===R?U:R;b.forEach(g=>{g.e&&(this.L(e,d,g,!0),g.L(e,f,this,!0))})}else d!==Zc&&d!==bd||this.O(c.substr(1),b,d===bd)})}Rf(){this.forEach((b,
|
|
@@ -608,8 +608,8 @@ if(c&&!c.Fb())throw a=`Try to get all extensions of the model ${olympe.dc.Ca(a)}
|
|
|
608
608
|
olympe.dc.$a.prototype.getInstances=olympe.dc.$a.prototype.md;olympe.dc.$a.prototype.isExtending=olympe.dc.$a.prototype.Di;olympe.dc.$a.prototype.getExtendedModels=olympe.dc.$a.prototype.yi;olympe.dc.$a.prototype.findAllRelated=olympe.dc.$a.prototype.Ku;olympe.dc.$a.prototype.findRelated=olympe.dc.$a.prototype.Rl;olympe.dc.$a.prototype.findRecursive=olympe.dc.$a.prototype.Ql;olympe.dc.$a.prototype.getRecursiveRelated=olympe.dc.$a.prototype.Sj;olympe.dc.$a.prototype.getUniqueRelated=olympe.dc.$a.prototype.pc;
|
|
609
609
|
olympe.dc.$a.prototype.getMultiRelated=olympe.dc.$a.prototype.zi;olympe.dc.$a.prototype.isRelated=olympe.dc.$a.prototype.jm;olympe.dc.$a.prototype.getRelated=olympe.dc.$a.prototype.Wa;olympe.dc.$a.prototype.getProperties=olympe.dc.$a.prototype.Cd;olympe.dc.$a.prototype.getProperty=olympe.dc.$a.prototype.Gb;olympe.dc.$a.prototype.isPersisted=olympe.dc.$a.prototype.Wj;olympe.dc.$a.prototype.instanceOf=olympe.dc.$a.prototype.$f;olympe.dc.$a.prototype.isModel=olympe.dc.$a.prototype.Eh;
|
|
610
610
|
olympe.dc.$a.prototype.extension=olympe.dc.$a.prototype.cf;olympe.dc.$a.prototype.model=olympe.dc.$a.prototype.model;olympe.dc.$a.prototype.name=olympe.dc.$a.prototype.name;olympe.dc.$a.prototype.exist=olympe.dc.$a.prototype.Fb;olympe.dc.db.Dc=class a{constructor(b){this.id=b||olympe.$.Tl();this.Va=new Map}toJSON(){let b='{ "id": '+JSON.stringify(this.id)+', "instances": {';for(const c of this.Va.keys()){const d=this.Va.get(c);b+=JSON.stringify(c)+': '+d.toJSON()+', '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));return b+'}}'}static ac(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.Dc(c.id);c=c.instances;for(const d of Object.keys(c)){const e=olympe.dc.db.Bf.ac(c[d]);b.Va.set(d,e)}return b}da(){return this.id}gd(b){const c=
|
|
611
|
-
olympe.dc.db.Bf.C.cl,d=olympe.dc.db.Bf.C.DELETE,e=olympe.dc.db.Bf.C.Gj;this.Va.forEach((f,g)=>{const h=f.getState();switch(h.id){case c:b.Tb(g,f.
|
|
612
|
-
else{this.Lb(b).delete(c);for(const e of this.Ee(b,c))this.Va.get(e).Cd().clear(),this.Tp(e,!0)}}la(b,c,d){this.Lb(c).ja(b,d);this.Lb(d).fb(b,c)}nb(b,c,d){this.Lb(c).na(b,d);this.Lb(d).hb(b,c)}wh(){return this.Va}md(){return function*(b){for(const c of b.values())if(c.He()||c.O()||c.
|
|
611
|
+
olympe.dc.db.Bf.C.cl,d=olympe.dc.db.Bf.C.DELETE,e=olympe.dc.db.Bf.C.Gj;this.Va.forEach((f,g)=>{const h=f.getState();switch(h.id){case c:b.Tb(g,f.Qa()?f.Cd():void 0);break;case e:f.Qa()&&b.bc(g,f.Cd(),h.ti);break;case d:b.oc(g,h.ti)}for(const [k,m,n]of f.Ud())n?b.la(k,g,m):b.nb(k,g,m)})}zc(){let b=0;this.Va.forEach(c=>{b+=c.zc()});return b}Tb(b,c){b=this.Lb(b).create();c&&b.ya(c)}bc(b,c,d){c&&(b=this.Lb(b).ya(c),d&&b.Qc())}oc(b,c=olympe.dc.ob.NONE){const d=this.Va.get(b);if(d&&d.He())this.uh(b,c);
|
|
612
|
+
else{this.Lb(b).delete(c);for(const e of this.Ee(b,c))this.Va.get(e).Cd().clear(),this.Tp(e,!0)}}la(b,c,d){this.Lb(c).ja(b,d);this.Lb(d).fb(b,c)}nb(b,c,d){this.Lb(c).na(b,d);this.Lb(d).hb(b,c)}wh(){return this.Va}md(){return function*(b){for(const c of b.values())if(c.He()||c.O()||c.Qa())yield c}(this.Va)}Qb(b){return this.Va.get(olympe.dc.Ca(b))||null}uh(b,c=olympe.dc.ob.NONE){b=this.Ee(b,c);for(const d of b)this.Tp(d,!1),this.Va.delete(d)}Ud(){return function*(b){for(var c=b.next();!c.done;){c=
|
|
613
613
|
c.value;const d=c.tag();yield*c.Ud((e,f,g)=>[e,d,f,g]);c=b.next()}}(this.Va.values())}Sj(b,c,d=(e,f)=>[e,f]){return this.Fq(b,c,d)}*Fq(b,c,d,e=[]){e.push(b);b=this.Qb(b);for(const [f,g]of b.Wa(c))e.includes(f)||(yield*this.Fq(f,c,d,e),yield d(f,g))}Kl(b,c,d){const e=this.Va.get(c),f=this.Va.get(d);e&&e.V(b,olympe.dc.Ka.DESTINATION,d);f&&f.V(b,olympe.dc.Ka.ORIGIN,c)}clone(){const b=new a(this.id);this.Va.forEach((c,d)=>{b.Va.set(d,c.clone())});return b}Tp(b,c){var d=olympe.dc.Ka.ORIGIN;const e=olympe.dc.Ka.DESTINATION,
|
|
614
614
|
f=this.Va.get(b);for(const [g,h,k]of f.Ud()){if(!k&&c)continue;const m=this.Va.get(h);m&&m.V(g,d,b)}for(const [g,h,k]of f.Ea())(k||!c)&&(d=this.Va.get(h))&&d.V(g,e,b)}Ee(b,c){const d=olympe.dm.Relation.C.yj,e=olympe.dm.Relation.C.Ej,f=olympe.dc.Ka.ORIGIN,g=olympe.dc.Ua();b=new Set([b]);for(const k of b){var h=this.Va.get(k);if(void 0!==h){for(const [m,n]of h.Ud())Cd(g,m,c)&e&&b.add(n);for(const [m,n]of h.Ea())Cd(g,m,c)&d&&b.add(n)}for(const [m,n,p]of Dd(g,k))h=n===f?d:e,Cd(g,m,c)&h&&b.add(p)}return Array.from(b).filter(k=>
|
|
615
615
|
this.Va.has(k))}Lb(b){let c=this.Va.get(b);void 0===c&&(c=new olympe.dc.db.Bf(b),this.Va.set(b,c));return c}};olympe.dc.db.Dc.ka=[olympe.dc.Lf,olympe.dc.ml];const Hd=new Map;
|
|
@@ -617,7 +617,7 @@ olympe.dc.db.Bf=class a{constructor(b){this.ca=b;this.G=a.F(a.C.Gj,!1);this.L=th
|
|
|
617
617
|
for(const e of c.keys())b+=JSON.stringify(e)+': '+JSON.stringify(c.get(e))+', ';b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}, '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}'}return b+'}'}static ac(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.Bf(c.tag);b.G=c.state;const d=c.properties;if(d){b.C=new Map;for(var e of Object.keys(d)){const f=d[e],g=f.type;let h=f;g&&('reference'===g?h=olympe.dc.Ec.ac(f):h=olympe.D.ac(f));null!==h&&void 0!==h&&b.C.set(e,h)}}if(c=c.relations){b.F=
|
|
618
618
|
new Map;for(const f of Object.keys(c)){e=new Map;for(const g of Object.keys(c[f]))e.set(g,c[f][g]);b.F.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Hd.get(d);void 0===e&&(e={id:b,ti:c},Hd.set(d,e));return e}tag(){return this.ca}getState(){return this.G}create(){this.G=a.F(a.C.cl);return this}delete(b=olympe.dc.ob.NONE){this.G=a.F(a.C.DELETE,b);this.C=null;return this}Qc(){this.G.id===a.C.Gj&&(this.G=a.F(a.C.Gj,!0))}Ba(b,c){if(this.G.type===a.C.DELETE)return this;this.C||
|
|
619
619
|
(this.C=new Map);this.C.set(b,c);return this}ya(b){this.C||(this.C=new Map);b.forEach((c,d)=>{this.C.set(d,c)});return this}xb(b){this.C&&this.C.delete(b);0===this.C.size&&(this.C=null)}ja(b,c){null===this.F&&(this.F=new Map);this.Ma(this.F,b,c,!0)}na(b,c){null===this.F&&(this.F=new Map);this.Ma(this.F,b,c,!1)}fb(b,c){this.L||(this.L=new Map);this.Ma(this.L,b,c,!0)}hb(b,c){this.L||(this.L=new Map);this.Ma(this.L,b,c,!1)}fd(b,c,d){if(c=c===olympe.dc.Ka.ORIGIN?this.L:this.F)return(b=c.get(b))&&b.get(d)}V(b,
|
|
620
|
-
c,d){const e=(c=c===olympe.dc.Ka.ORIGIN?this.L:this.F)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}He(){return this.G.id===a.C.cl}O(){return this.G.id===a.C.DELETE}zc(){let b=this.C?this.C.size:0;this.F&&this.F.forEach(c=>{b+=c.size});return b}clone(){const b=new a(this.ca);b.G=this.G;this.C&&b.ya(this.C);for(const [c,d,e]of this.Ud())e?b.ja(c,d):b.na(c,d);for(const [c,d,e]of this.Ea())e?b.fb(c,d):b.hb(c,d);return b}
|
|
620
|
+
c,d){const e=(c=c===olympe.dc.Ka.ORIGIN?this.L:this.F)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}He(){return this.G.id===a.C.cl}O(){return this.G.id===a.C.DELETE}zc(){let b=this.C?this.C.size:0;this.F&&this.F.forEach(c=>{b+=c.size});return b}clone(){const b=new a(this.ca);b.G=this.G;this.C&&b.ya(this.C);for(const [c,d,e]of this.Ud())e?b.ja(c,d):b.na(c,d);for(const [c,d,e]of this.Ea())e?b.fb(c,d):b.hb(c,d);return b}Qa(){return null!==this.C}Cd(){return this.C||new Map}Gb(b){if(this.C)return this.C.get(b)}Wa(b,
|
|
621
621
|
c=(d,e)=>[d,e]){return function*(d){if(d=d&&d.get(b.R()))for(const [e,f]of d)yield c(e,f)}(b.Na()===olympe.dc.Ka.ORIGIN?this.L:this.F)}Ud(b=(c,d,e)=>[c,d,e]){return this.Xa(this.F,b)}Ea(b=(c,d,e)=>[c,d,e]){return this.Xa(this.L,b)}$b(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.Ka.ORIGIN,d=olympe.dc.Ka.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,m)=>b(h,d,k,m));yield*e(g,(h,k,m)=>b(h,c,k,m))}(this.Xa.bind(this),this.F,this.L)}Ma(b,c,d,e){if(this.G.id!==a.C.DELETE||!e){var f=b.get(c);if(void 0===
|
|
622
622
|
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)}}*Xa(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.Bf.C={cl:0,Gj:1,DELETE:2};function Nc(a,b,c,d,e,f=olympe.dc.La.jb){const g=olympe.dc.db.Instance.C.Ko,h=olympe.dc.db.Instance.C.zp,k=c.da();if(a.G.has(k))throw Error(`You try to execute the patch ${k} a second times whereas the first execution has not been validated yet.`);const m=new Id(c,Jd(a,c),f);a.F.push(k);a.G.set(k,m);a.C.ja();a.C.Ea(d,g);a.C.Ea(e,h);Oc(a,c,f);const n=Array.from(c.md()).filter(p=>p.He()).map(p=>p.tag());a.C.Xa(n);a.C.ca();0<n.length&&b.Sc(()=>{a.C.ja();a.C.xb(n);a.C.ca()})}
|
|
623
623
|
function Oc(a,b,c){a.L.C(c,b,d=>{d||a.N.debug('CommitController: Rebase of patch',b.da(),'done')})}function Pc(a,b,c){return a.F.slice(0,c).map(d=>a.G.get(d)).reduce((d,e)=>e?e.rf(d):d,b)}
|
|
@@ -627,7 +627,7 @@ olympe.dc.db.kr=class{constructor(a,b,c){this.N=a;this.C=b;this.L=c;this.F=[];th
|
|
|
627
627
|
function Ld(a,b,c,d){const e=olympe.dc.Ka.DESTINATION,f=c.tag(),g=a.C.Qb(f);b.Cd().forEach((h,k)=>{void 0!==c.Gb(k)&&(g.Ba(k,h),b.xb(k))});for(const [h,k,m]of b.Ud()){const n=c.fd(h,e,k);void 0!==n&&(d.Kl(h,f,k),n===m&&a.C.Kl(h,f,k))}}
|
|
628
628
|
class Id{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.Ua()}da(){return this.F.da()}rf(a){var b=this.F.wh(),c=a.wh();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.O()?c.He()||this.C.uh(b,f.getState().ti):c.O()?(Kd(this,f,c,a),a.uh(b,c.getState().ti)):Ld(this,f,c,a))}return a}};olympe.dc.db.T={Ha:'dc.db.Logger',ta:'dc.db.DatabaseManager',$i:'dc.db.Database',$a:'dc.db.Driver',Jk:'dc.db.Graph',Ym:'dc.db.DataProcessor',an:'dc.db.DebugProcessor',Ys:'dc.db.PermissionProcessor',Xh:'dc.db.GraphMonitor'};olympe.dc.db.Z={Bn:'db.garbageCollector',Xh:'db.monitor',$m:'db.debug'};
|
|
629
629
|
olympe.U.Ib(function(a){D(a,olympe.dc.db.Z.Bn,olympe.dc.db.Qh.C.ip);D(a,olympe.dc.db.Z.Xh,!1);D(a,olympe.dc.db.Z.$m,!1);B(a,olympe.dc.db.T.Ha,[olympe.ua.T.ta],b=>b.Gc('dc.db'));B(a,olympe.dc.db.T.$i,[olympe.dc.db.T.Ha,new olympe.U.ha(olympe.dc.Z.bn),new olympe.U.ha(olympe.dc.db.Z.Bn),new olympe.U.ha(olympe.dc.Z.xg),new olympe.U.ha(olympe.dc.db.Z.$m)],(b,c,d,e,f)=>{d=e?olympe.dc.db.Qh.C.Ck:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',f);return new olympe.dc.db.Database(b,
|
|
630
|
-
c)});B(a,olympe.dc.db.T.$a,[olympe.dc.db.T.ta],b=>b.view);B(a,olympe.dc.db.T.Xh,[olympe.dc.db.T.ta],b=>b.
|
|
630
|
+
c)});B(a,olympe.dc.db.T.$a,[olympe.dc.db.T.ta],b=>b.view);B(a,olympe.dc.db.T.Xh,[olympe.dc.db.T.ta],b=>b.Hw);y(a,olympe.dc.db.T.an,olympe.dc.db.Nb.gn,olympe.dc.T.Ha);B(a,olympe.dc.db.T.Ym,[olympe.dc.db.T.Ha,olympe.dc.db.T.$i,olympe.U.T.vf,new olympe.U.ha(olympe.dc.Z.wf)],(b,c,d,e)=>{b=new olympe.dc.db.Nb.Cp(b,c);e&&(b=new olympe.dc.nl(la(d,olympe.dc.db.T.an),b));return b});y(a,olympe.dc.db.T.Ys,olympe.dc.db.Nb.rg,olympe.dc.T.Ha,olympe.dc.T.Yg,olympe.dc.T.se);y(a,olympe.dc.db.T.ta,olympe.dc.db.qr,
|
|
631
631
|
olympe.dc.db.T.Ha,olympe.dc.db.T.$i,olympe.dc.T.se,olympe.dc.db.T.Ym,new olympe.U.ha(olympe.dc.db.Z.Xh))},'olympe.dc.db');olympe.U.run([olympe.dc.db.T.$i,olympe.dc.db.T.Xh],(a,b)=>{void 0!==window&&(window.db=a,window.dbMonitor=b)},'DC.DB debug service injection');olympe.dc.db.Nb={};olympe.dc.db.Nb.Cp=class{constructor(a,b){this.N=a;this.F=b;this.buffer=[]}C(a,b,c){this.F.ja();b.gd(this);this.F.ca();c(null,b)}Tb(a,b){this.F.create(a,b)}bc(a,b,c){this.F.update(a,b,c)}oc(a,b=olympe.dc.ob.NONE){for(const c of this.F.Ee(a,b))this.F.oc(c)}la(a,b,c){this.F.zd(a,b,c)}nb(a,b,c){this.F.ud(a,b,c)}};olympe.dc.db.Nb.Cp.ka=[olympe.dc.Te,olympe.dc.Lf];function Md(a,b,c){if(!b)return'';let d='';if(c&&1<c)return'...';for(const [e,f]of b)d+=(d?', "':'"')+e+'":',f?f instanceof olympe.dc.Ec||f instanceof olympe.dc.Sync?d+='new olympe.dc.Reference("'+f.R()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Jg()+','+f.Hg()+','+f.Dg()+','+f.Cg()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=Md(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
|
|
632
632
|
(d?d:'')+'}'}function Nd(a){switch(a){case olympe.dc.Fc.be:return'Model';case olympe.dc.Sync.Ea.R():return'Owner';case olympe.dc.Sync.F.R():return'GroupOfObjects';default:return''}}
|
|
633
633
|
olympe.dc.db.Nb.gn=class{constructor(a){this.N=a;this.Fh=''}C(a,b,c){this.Fh='Patch #'+b.da()+' (source: '+a+')';b.gd(this);this.N.info(this.Fh);this.Fh='';c(null,b)}log(a,b){this.Fh+='\ndb.'+a+';'+(b?' // '+b:'')}Tb(a,b){this.log('createInstance("'+a+'", '+Md(this,b)+')')}bc(a,b){this.log('updateInstance("'+a+'", '+Md(this,b)+')')}oc(a,b){var c=olympe.dc.Ua();const d=c.model(a);c=d?c.name(d)+' #'+d:'';this.log('deleteInstance("'+a+'", rule: '+b+')',c)}la(a,b,c){this.log('createRelation("'+a+'", "'+
|
|
@@ -672,7 +672,7 @@ olympe.U.Ib(function(a){D(a,olympe.dc.transaction.Z.TIMEOUT,6E4);D(a,olympe.dc.t
|
|
|
672
672
|
this.R();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');if(this.F.has(olympe.dc.Pb.Pd))this.F.get(olympe.dc.Pb.Pd)===olympe.dc.La.rt&&(this.F.set(olympe.dc.Pb.Pd,olympe.dc.La.jb),this.G=!1);else{var e=b.source(c);this.F.set(olympe.dc.Pb.Pd,null!==e?e:olympe.dc.La.dd)}if(b.Fb(d)&&!b.Wj(d)&&this.G){e=new Map([...b.Cd(d,!0),...oe(this,this.F)]);for(const f of e.values())if(f instanceof olympe.dc.Ec&&!Wd(a,f.R())){const g=new olympe.dc.lb;g.nm(f.R());g.C(a)}a.Tb(d,
|
|
673
673
|
this.G,e);a.la(olympe.dc.Sync.modelRel.R(),d,c);for(const [f,g,h]of Dd(b,d))Wd(a,h)&&(g===olympe.dc.Ka.ORIGIN?a.la(f,h,d):a.la(f,d,h))}else b.Fb(d)||(a.Tb(d,this.G,oe(this,this.F)),a.la(olympe.dc.Sync.modelRel.R(),d,c))}toString(){return`CreateInstance(${this.Ub()}, ${this.R()})`}};olympe.dc.transaction.sa.pd.prototype.setProperty=olympe.dc.transaction.sa.pd.prototype.setProperty;olympe.dc.transaction.sa.pd.prototype.localSource=olympe.dc.transaction.sa.pd.prototype.Ii;
|
|
674
674
|
olympe.dc.transaction.sa.pd.prototype.persist=olympe.dc.transaction.sa.pd.prototype.persist;olympe.dc.transaction.sa.pd.prototype.getModelTag=olympe.dc.transaction.sa.pd.prototype.Ub;olympe.dc.transaction.sa.pd.prototype.getTag=olympe.dc.transaction.sa.pd.prototype.R;olympe.dc.transaction.sa.pd.ka=[olympe.dc.Nd];olympe.dc.transaction.sa.xk=class extends olympe.dc.transaction.sa.jg{constructor(a,b,c){super();this.type=a.Na?a:new olympe.dc.W.Db(X(a));this.F=b;this.G=c}Na(){return this.Ta(this.type).Na()}C(a){const b=X(this.type);if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.Fc.be)throw Error('OperationError: Cannot create the instance -> model relation');const c=X(this.F);if(''===c)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
|
|
675
|
-
const d=X(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Na()===olympe.dc.Ka.DESTINATION?a.la(b,c,d):a.la(b,d,c)}toString(){return`CreateRelation('${this.Na()}${X(this.type)}, ${X(this.F)}, ${X(this.G)})`}};olympe.dc.transaction.sa.
|
|
675
|
+
const d=X(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Na()===olympe.dc.Ka.DESTINATION?a.la(b,c,d):a.la(b,d,c)}toString(){return`CreateRelation('${this.Na()}${X(this.type)}, ${X(this.F)}, ${X(this.G)})`}};olympe.dc.transaction.sa.jy=class extends olympe.dc.transaction.sa.jg{constructor(a,b=olympe.dc.ob.DELETE){super();this.model=a;this.F=b}Ub(){return X(this.model)}C(a){const b=this.Ub();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.Ua();for(const d of c.md(b))d!==b&&(new olympe.dc.transaction.sa.cj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Ub()}, ${this.F})`}};olympe.dc.transaction.sa.hn=class extends olympe.dc.transaction.sa.jg{constructor(a,b,c,d){super();this.type=a.Na?a:new olympe.dc.W.Db(X(a));this.F=b;this.G=c||!1;this.L=d instanceof Array?d.map(e=>X(e)):null}Na(){return this.Ta(this.type).Na()}C(a){const b=X(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.Fc.be)throw Error('OperationError: Cannot delete the instance -> model relation');const c=X(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');
|
|
676
676
|
var d=olympe.dc.Ua();const e=this.Na(),f=this.L;d=d.Wa(c,this.type);for(const g of d)e===olympe.dc.Ka.DESTINATION?a.nb(b,c,g):a.nb(b,g,c),null!==f&&0<=f.indexOf(g)||this.G&&(new olympe.dc.transaction.sa.cj(g,olympe.dc.ob.DELETE)).C(a)}toString(){return`DeleteAllRelations(${this.Na()}${X(this.type)}, ${X(this.F)}, ${this.G})`}};olympe.dc.transaction.sa.cj=class extends olympe.dc.transaction.sa.jg{constructor(a,b=olympe.dc.ob.DELETE){super();this.tag=a;this.F=b}R(){return X(this.tag)}C(a){const b=olympe.dc.Ua(),c=this.R();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.oc(c,this.F)}toString(){return'DeleteInstance('+this.R()+', '+this.F+')'}};olympe.dc.transaction.sa.rr=class extends olympe.dc.transaction.sa.xk{constructor(a,b,c,d=!1){super(a,b,c);this.L=d}C(a){const b=X(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.Fc.be)throw Error('OperationError: Cannot delete the instance -> model relation');const c=X(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=X(this.G);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
|
|
677
677
|
this.Na()===olympe.dc.Ka.DESTINATION?a.nb(b,c,d):a.nb(b,d,c);this.L&&(new olympe.dc.transaction.sa.cj(d,olympe.dc.ob.DELETE)).C(a)}toString(){return'DeleteRelation('+this.Na()+X(this.type)+', '+X(this.F)+', '+X(this.G)+', '+this.L+')'}};olympe.dc.transaction.sa.rh=class extends olympe.dc.transaction.sa.jg{constructor(a,b,c){super();this.tag=a;this.F=new Map;this.F.set(olympe.dc.Pb.VERSION,-1);void 0!==b&&this.setProperty(b,c)}R(){return X(this.tag)}setProperty(a,b){this.F.set(X(a),b);return this}C(a){const b=this.R();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');const c=olympe.dc.Ua();var d=c.version(b),e=a.G.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+b+' not found so it cannot be updated');
|
|
678
678
|
d=oe(this,this.F);0>=d.get(olympe.dc.Pb.VERSION)&&d.set(olympe.dc.Pb.VERSION,e+1);for(const [f,g]of d)e=c.Gb(b,f),e instanceof olympe.dc.Ec&&(e=e.R(),a.ja[e]=!0),g instanceof olympe.dc.Ec&&!Wd(a,g.R())&&(e=new olympe.dc.lb,e.nm(g.R()),e.C(a));a.bc(b,d)}toString(){return'UpdateInstance('+this.R()+', '+oe(this,this.F)+')'}};olympe.dc.transaction.sa.rh.prototype.setProperty=olympe.dc.transaction.sa.rh.prototype.setProperty;olympe.dc.transaction.sa.rh.prototype.getTag=olympe.dc.transaction.sa.rh.prototype.R;olympe.dc.query={};function pe(a,b,c){let d=a.C.get(b);void 0===d&&(d=new Set,a.C.set(b,d));b=olympe.$.Rb();d.add(b);a.F.set(b,c)}function qe(a,b){if(a.C.has(b)){for(const c of a.C.get(b))a.F.delete(c);a.C.delete(b)}}
|
|
@@ -698,24 +698,24 @@ olympe.dc.query.Tk=class extends olympe.dc.query.ej{constructor(a,b){super(a,b);
|
|
|
698
698
|
!this.Va.has(c))return!1;c=olympe.dm.Relation.C.Ej;d=olympe.dm.Relation.C.yj;const f=olympe.dc.Ua();for(const k of e){var g=k.Df,h=g.R();e=g.Na();if(e!==Qe||h!==Ne&&h!==Oe){if(!f.Fb(g))return this.N.info('ImplicitGraphQuery: [Sub. ID:',b,']: checking coverage of graphPath',a.da(),'failed at the relation',h,'which is not in local DB'),!1;g=Cd(f,g,se(this.Lg));h=0===k.Eg().length;if(!(g&(e===Pe?h?12:d:h?3:c)))return!1}}return!0}};function Se(a){let b=null;for(a=[...a.W];null===b&&0<a.length;)b=a.pop().Mb();return b}function Te(a,b){a.V()||(a=`Calling "${b}" on subscription with id ${a.da()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.ua.rb('dc').warn(a))}function Ue(a,b){const c=a.cc().fh();return new rxjs.Observable(d=>{c.run(()=>{olympe.D.rc([b],e=>{d.next(e.valueOf())})});c.Sc(()=>{d.complete()})})}
|
|
699
699
|
olympe.dc.pa=class{constructor(a,b,c){void 0===a||null===a?olympe.ua.rb('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.F=olympe.D.xa([a],olympe.dc.Ca,String),this.W=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Se(this),this.C=null)}mc(){return olympe.dc.mc()}wd(){if(null===this.C){const a=olympe.dc.Ah();this.C=Ve(a,this);null!==this.valueType&&this.C.cd(this.valueType);olympe.D.Ja().Sc(()=>{We(a,this.C.da());this.C=
|
|
700
700
|
null})}return this}cc(){null===this.C&&this.wd();return this.C}cd(a){this.valueType=a;null!==this.C&&this.C.cd(this.valueType)}Mb(){return null!==this.C?this.C.Mb():null===this.valueType?olympe.dc.Sync:this.valueType}kd(){return this.F}Wk(){return this.W}pf(a,b){return this.cc().pf(a,b)}Ki(a){this.cc().Ki(a)}ds(){return this.cc().Ae()}cs(){return this.cc().V()}get(a){return this.cc().get(a)}zh(){return this.cc().zh()}Fg(a){const b=this.cc();Te(b,'getCurrent');return b.Fg(a)}has(a){return this.cc().has(a)}Zf(a){const b=
|
|
701
|
-
this.cc();Te(b,'hasCurrent');return b.Zf(a)}df(a){return this.cc().df(a)}
|
|
701
|
+
this.cc();Te(b,'hasCurrent');return b.Zf(a)}df(a){return this.cc().df(a)}Rw(a){return Ue(this,this.df(a))}le(a){const b=this.cc();Te(b,'getCurrentAt');return b.le(a)}Fe(a){return this.cc().Fe(a)}ef(a){const b=this.cc();Te(b,'getCurrentKeyAt');return b.ef(a)}Dd(a){return this.cc().Dd(a)}Uw(a){return Ue(this,this.Dd(a))}ff(a){const b=this.cc();Te(b,'getCurrentRank');return b.ff(a)}ld(){return this.cc().ld()}Sw(){return Ue(this,this.ld())}gf(){return this.cc().gf()}zc(){return this.cc().zc()}Vw(){return Ue(this,
|
|
702
702
|
this.zc())}Tf(){const a=this.cc();Te(a,'getCurrentSize');return a.Tf()}forEach(a,b){this.cc().forEach(a,b)}jd(a){const b=this.cc();Te(b,'forEachCurrentValue');return b.jd(a)}ui(a,b,c,d){a=new olympe.dc.W.Ad(a,b);(new olympe.dc.pa(this.F,[...this.W,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.W];for(const c of b){if(void 0===
|
|
703
703
|
c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.za.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.getTransform)break;a.push(c)}b=new olympe.dc.pa(this.F,a);b.cd(Se(b)||this.valueType||Object);return b}gk(a){return this.transform(new olympe.dc.W.Ye(a))}filter(a){return this.transform(new olympe.dc.W.$c(a))}Pf(){const a=new olympe.dc.oj(this.F,null===this.valueType?
|
|
704
704
|
void 0:this.valueType);let b=this.W;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.W;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.Ta(this.F)+a+')'}bs(){return this.cc().pg()}Xc(){return olympe.D.xa([this.zc()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.le(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.D.sb(b+']')},olympe.D.Oa)}};olympe.dc.pa.prototype.filter=olympe.dc.pa.prototype.filter;olympe.dc.pa.prototype.union=olympe.dc.pa.prototype.gk;
|
|
705
|
-
olympe.dc.pa.prototype.transform=olympe.dc.pa.prototype.transform;olympe.dc.pa.prototype.forEachCurrentValue=olympe.dc.pa.prototype.jd;olympe.dc.pa.prototype.forEach=olympe.dc.pa.prototype.forEach;olympe.dc.pa.prototype.getCurrentSize=olympe.dc.pa.prototype.Tf;olympe.dc.pa.prototype.observeSize=olympe.dc.pa.prototype.
|
|
706
|
-
olympe.dc.pa.prototype.getCurrentAt=olympe.dc.pa.prototype.le;olympe.dc.pa.prototype.observeAt=olympe.dc.pa.prototype.
|
|
705
|
+
olympe.dc.pa.prototype.transform=olympe.dc.pa.prototype.transform;olympe.dc.pa.prototype.forEachCurrentValue=olympe.dc.pa.prototype.jd;olympe.dc.pa.prototype.forEach=olympe.dc.pa.prototype.forEach;olympe.dc.pa.prototype.getCurrentSize=olympe.dc.pa.prototype.Tf;olympe.dc.pa.prototype.observeSize=olympe.dc.pa.prototype.Vw;olympe.dc.pa.prototype.observeFirst=olympe.dc.pa.prototype.Sw;olympe.dc.pa.prototype.getCurrentRank=olympe.dc.pa.prototype.ff;olympe.dc.pa.prototype.observeRank=olympe.dc.pa.prototype.Uw;
|
|
706
|
+
olympe.dc.pa.prototype.getCurrentAt=olympe.dc.pa.prototype.le;olympe.dc.pa.prototype.observeAt=olympe.dc.pa.prototype.Rw;olympe.dc.pa.prototype.offReady=olympe.dc.pa.prototype.Ki;olympe.dc.pa.prototype.onReady=olympe.dc.pa.prototype.pf;olympe.dc.pa.prototype.getBaseTag=olympe.dc.pa.prototype.kd;olympe.dc.pa.ka=[olympe.D.ed];l=olympe.dc.pa.prototype;l.mc.K=olympe.D.J.C;l.wd.K=olympe.D.J.L();l.cc.K=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);l.cd.K=new olympe.D.J(()=>{},[]);
|
|
707
707
|
l.kd.K=new olympe.D.J(()=>String,[]);l.Wk.K=new olympe.D.J(()=>Array,[]);l.pf.K=new olympe.D.J(()=>String,[]);l.Ki.K=new olympe.D.J(()=>{},[]);l.ds.K=olympe.D.J.O;l.cs.K=olympe.D.J.C;l.get.K=new olympe.D.J(()=>olympe.dc.Sync,[],'valueType');l.zh.K=new olympe.D.J(()=>Array,[]);l.Fg.K=olympe.D.J.C;l.has.K=olympe.D.J.O;l.Zf.K=olympe.D.J.C;l.df.K=new olympe.D.J(()=>olympe.dc.Sync,[],'valueType');l.le.K=olympe.D.J.C;l.Fe.K=new olympe.D.J(()=>String,[]);l.ef.K=olympe.D.J.C;l.Dd.K=olympe.D.J.G;l.ff.K=olympe.D.J.C;
|
|
708
|
-
l.ld.K=new olympe.D.J(()=>olympe.dc.Sync,[],'valueType');l.gf.K=new olympe.D.J(()=>String,[]);l.zc.K=olympe.D.J.G;l.Tf.K=olympe.D.J.C;l.forEach.K=new olympe.D.J(()=>{},[]);l.jd.K=olympe.D.J.C;l.ui.K=new olympe.D.J(()=>{},[]);l.transform.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.gk.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.filter.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Pf.K=new olympe.D.J(()=>olympe.dc.oj,[]);l.toString.K=olympe.D.J.C;l.bs.K=olympe.D.J.C;l.Xc.K=olympe.D.J.F;const Xe={
|
|
708
|
+
l.ld.K=new olympe.D.J(()=>olympe.dc.Sync,[],'valueType');l.gf.K=new olympe.D.J(()=>String,[]);l.zc.K=olympe.D.J.G;l.Tf.K=olympe.D.J.C;l.forEach.K=new olympe.D.J(()=>{},[]);l.jd.K=olympe.D.J.C;l.ui.K=new olympe.D.J(()=>{},[]);l.transform.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.gk.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.filter.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Pf.K=new olympe.D.J(()=>olympe.dc.oj,[]);l.toString.K=olympe.D.J.C;l.bs.K=olympe.D.J.C;l.Xc.K=olympe.D.J.F;const Xe={Lx:'append',Fk:'filter_not',wn:'filter_and',xn:'filter_or'};function Ye(a,b){a=Ze(a);a=olympe.dc.Sync.Qb(a);return(new olympe.dc.ga.Dm(a,b)).G}
|
|
709
709
|
olympe.dc.oj=class{constructor(a,b){this.C=Ze(a);this.N=olympe.dc.Ah().rb();this.valueType=void 0===b?olympe.dc.Sync:b;this.W=[];this.sa=[]}Re(){return new olympe.dc.pa(this.C,this.W,this.valueType)}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new $e('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.za.Property)throw new $e('transform','Properties cannot be used as transformer, unlike relations '+d);if(!d||'function'!==typeof d.getTransform)throw new $e('transform',
|
|
710
|
-
'one of the argument is not a Transformer '+d);const e=d.Mb();null!==e&&(this.valueType=e);this.W.push(d)}return this}gk(a){this.W.push(new olympe.dc.W.Ye(a));return this}
|
|
710
|
+
'one of the argument is not a Transformer '+d);const e=d.Mb();null!==e&&(this.valueType=e);this.W.push(d)}return this}gk(a){this.W.push(new olympe.dc.W.Ye(a));return this}Ix(a){this.W.push(new olympe.dc.W.Ye(Ze(a)));return this}fs(a){this.valueType=a;return this}jj(a){this.W.push(a);this.valueType=a.Mb()||olympe.dc.Sync;return this}Ou(a){for(const b of a)this.W.push(b),this.valueType=b.Mb()||olympe.dc.Sync;return this}Nu(a,b,c){a=new olympe.dc.W.Yb(a,a.Na(),b,c);this.W.push(a);this.valueType=a.Mb()||
|
|
711
711
|
olympe.dc.Sync;return this}Mu(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.R());void 0===c&&(c=e.Na())}a=new olympe.dc.W.ce(b,c);this.W.push(a);this.valueType=a.Mb()||olympe.dc.Sync;return this}Va(){this.jj(olympe.dc.Sync.instancesRel);return this}Ce(a){var b=this.sa.pop();b===Xe.Fk&&(a=new olympe.dc.ba.qe(a),b=this.sa.pop());switch(b){case Xe.wn:b=this.W.pop().C;b instanceof olympe.dc.ba.kg?(b=b.ba,b.push(a),a=new olympe.dc.ba.kg(...b)):a=new olympe.dc.ba.kg(b,a);b=this.sa.pop();
|
|
712
712
|
break;case Xe.xn:b=this.W.pop().C,b instanceof olympe.dc.ba.qg?(b=b.ba,b.push(a),a=new olympe.dc.ba.qg(...b)):a=new olympe.dc.ba.qg(b,a),b=this.sa.pop()}b===Xe.Fk&&(a=new olympe.dc.ba.qe(a),this.sa.pop());this.W.push(new olympe.dc.W.$c(a));return this}Fu(a,b,c){return this.Ce(new olympe.dc.ba.qd(Ye(a,c),new olympe.dc.ga.Tc(b)))}contains(a,b,c=!1,d){return this.Ce(new olympe.dc.ba.Id(Ye(a,d),new olympe.dc.ga.Tc(b),c))}$f(a){if(!(a instanceof Array))throw new $e('instanceOf','Provided argument "models" must be an array.');
|
|
713
713
|
const b=[];for(let c=0;c<a.length;c++)b.push(Ze(a[c]));return this.Ce(new olympe.dc.ba.Qe(b))}Tj(a){return this.Ce(new olympe.dc.ba.qd(new olympe.dc.ga.We,new olympe.dc.ga.Tc(Ze(a))))}Gu(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.Qg().Tj(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().Qg().Tj(a[b])}return this}Bi(a,b){if(!(a instanceof Array))throw new $e('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
|
|
714
|
-
a.forEach(e=>{c.push(e);d.push(e.Na())});return this.Ce(new olympe.dc.ba.Pe(c,d,b))}es(a,b,c){a=Ye(a,c);return this.Ce(new olympe.dc.ba.$d(a,new olympe.dc.ga.Tc(b)))}gs(a,b,c){a=Ye(a,c);return this.Ce(new olympe.dc.ba.ge(a,new olympe.dc.ga.Tc(b)))}
|
|
715
|
-
this.sa.push(Xe.wn);return this}or(){this.W[this.W.length-1]instanceof olympe.dc.W.$c&&this.sa.push(Xe.xn);return this}
|
|
714
|
+
a.forEach(e=>{c.push(e);d.push(e.Na())});return this.Ce(new olympe.dc.ba.Pe(c,d,b))}es(a,b,c){a=Ye(a,c);return this.Ce(new olympe.dc.ba.$d(a,new olympe.dc.ga.Tc(b)))}gs(a,b,c){a=Ye(a,c);return this.Ce(new olympe.dc.ba.ge(a,new olympe.dc.ga.Tc(b)))}Fw(a,b,c,d){a=Ye(a,d);return this.Ce(new olympe.dc.ba.Ue(a,b,c))}filter(a){const b=new class extends olympe.dc.ba.ig{C(c,d){return a(olympe.dc.Sync.Qb(d))}};return this.Ce(b)}Qg(){this.sa.push(Xe.Fk);return this}and(){this.W[this.W.length-1]instanceof olympe.dc.W.$c&&
|
|
715
|
+
this.sa.push(Xe.wn);return this}or(){this.W[this.W.length-1]instanceof olympe.dc.W.$c&&this.sa.push(Xe.xn);return this}Ax(a,b,c){a=Ze(a);let d=null;switch(olympe.dc.Ua().pc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.P.R():d=new olympe.dc.tb.String(new olympe.dc.ga.Rd(a,c));break;case olympe.dm.Number.P.R():d=new olympe.dc.tb.Number(new olympe.dc.ga.Od(a,c));break;case olympe.dm.DateTime.P.R():d=new olympe.dc.tb.DateTime(new olympe.dc.ga.Jd(a,c))}c=d;null!==c&&this.W.push(new olympe.dc.W.td(c,
|
|
716
716
|
b));return this}sort(a,b,c){const d=new class extends olympe.dc.tb.ig{L(e,f){return a(olympe.dc.Sync.Qb(f))}G(e,f){return b(e,f).valueOf()}};this.W.push(new olympe.dc.W.td(d,c));return this}Bu(){this.W.push(new olympe.dc.W.Zc);return this}tw(a,b){this.W.push(new olympe.dc.W.Ad(a,b));return this}};class $e extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
|
|
717
|
-
function Ze(a){return'string'===typeof a||a instanceof olympe.D.Oa?a:'function'===typeof a?olympe.dc.wa.Ub(a):olympe.D.Za(a)?a.Jj===olympe.D.Oa?a:olympe.D.xa([a],b=>olympe.D.sb(olympe.dc.Ca(b)),olympe.D.Oa):a.R()}l=olympe.dc.oj.prototype;l.Re.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.transform.K=olympe.D.J.L();l.gk.K=olympe.D.J.L();l.
|
|
718
|
-
l.Fu.K=olympe.D.J.L();l.contains.K=olympe.D.J.L();l.$f.K=olympe.D.J.L();l.Tj.K=olympe.D.J.L();l.Gu.K=olympe.D.J.L();l.Bi.K=olympe.D.J.L();l.es.K=olympe.D.J.L();l.gs.K=olympe.D.J.L();l.
|
|
717
|
+
function Ze(a){return'string'===typeof a||a instanceof olympe.D.Oa?a:'function'===typeof a?olympe.dc.wa.Ub(a):olympe.D.Za(a)?a.Jj===olympe.D.Oa?a:olympe.D.xa([a],b=>olympe.D.sb(olympe.dc.Ca(b)),olympe.D.Oa):a.R()}l=olympe.dc.oj.prototype;l.Re.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.transform.K=olympe.D.J.L();l.gk.K=olympe.D.J.L();l.Ix.K=olympe.D.J.L();l.fs.K=olympe.D.J.L();l.jj.K=olympe.D.J.L();l.Ou.K=olympe.D.J.L();l.Nu.K=olympe.D.J.L();l.Mu.K=olympe.D.J.L();l.Va.K=olympe.D.J.L();l.Ce.K=olympe.D.J.L();
|
|
718
|
+
l.Fu.K=olympe.D.J.L();l.contains.K=olympe.D.J.L();l.$f.K=olympe.D.J.L();l.Tj.K=olympe.D.J.L();l.Gu.K=olympe.D.J.L();l.Bi.K=olympe.D.J.L();l.es.K=olympe.D.J.L();l.gs.K=olympe.D.J.L();l.Fw.K=olympe.D.J.L();l.filter.K=olympe.D.J.L();l.Qg.K=olympe.D.J.L();l.and.K=olympe.D.J.L();l.or.K=olympe.D.J.L();l.Ax.K=olympe.D.J.L();l.sort.K=olympe.D.J.L();l.Bu.K=olympe.D.J.L();l.tw.K=olympe.D.J.L();olympe.dc.query.no=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.Dc}F(a){this.C.push(olympe.dc.Ca(a))}da(){return this.id}};function af(a){return olympe.D.Za(a)?'Node#'+a.Sa.da():String(a)}function bf(a,b){return olympe.D.Za(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
|
|
719
719
|
olympe.dc.query.No=class{constructor(){this.C=0;this.values=null}add(a){let b;b=olympe.D.Za(a)?'n'+a.Sa.da():'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.Xb=class{ia(){}C(){}F(){}oa(){}toString(){}};function De(a,b,c){var d=olympe.dc.La.jb;const e=b.da();let f=cf(a.za,e),g=olympe.dc.La.jb;null===f&&(f=Ce(b,a.G),a.L||(g=Je(f)));df(a.za,f,d,g);c&&pe(a.F,e,c);b=olympe.dc.ma.ra.Ph;const h=olympe.dc.ma.ra.Oh,k=m=>{null!==m&&(a.N.error(`graph subscription "${e}" failed to subscribe ${m}`),ef(a.za,e,d),qe(a.F,e),c(m,null))};g===olympe.dc.La.jb?(a.N.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.O.C(d,f,k)):(b=zc(new olympe.dc.ma(f.Lg.L===olympe.dc.Ld.uj?h:b,f,[g]),k),a.N.debug('QueryManager: [ID:',
|
|
720
720
|
e,'] sending GraphQuery to',g),a.C.send(b));return f}function Ee(a,b){var c=olympe.dc.La.jb;const d=olympe.dc.La.jb;if(c===d){const e=cf(a.za,b).Lg.L,f=ff(a.za,b);ef(a.za,b,c)&&f!==d&&e===olympe.dc.Ld.wg&&(c=zc(new olympe.dc.ma(olympe.dc.ma.ra.Kk,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else ef(a.za,b,c)}
|
|
721
721
|
function Fe(a,b,c){var d=olympe.dc.La.jb;b=Ce(b,a.G);const e=b.da();var f=a.F.C.has(e);c&&pe(a.F,e,c);if(!f){f=h=>{h&&(qe(a.F,e),c(h,null))};var g=Je(b);g===olympe.dc.La.jb?a.O.C(d,b,f):(d=zc(new olympe.dc.ma(olympe.dc.ma.ra.Oh,b,[g]),f),a.C.send(d))}}
|
|
@@ -780,7 +780,7 @@ function lg(a,b,c,d){const e=Object.create(null);d+=olympe.$.Sf();const f=(g,h,k
|
|
|
780
780
|
','+this.value.toString()+')'}};N('olympe.dc.predicates.BitMask',olympe.dc.ba.Yi);olympe.dc.ba.Yi.ka=[olympe.dc.Xb];let mg=0;olympe.dc.ba.ig=class{constructor(){this.id=mg++}ia(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}oa(){return`{"c":"${this.ia()}"}`}toString(){return this.ia()+'()'}};olympe.dc.ba.ig.ka=[olympe.dc.Xb];olympe.dc.ba.Mk=class{constructor(a,b,c){this.G=[];this.L=void 0!==c?c.map(olympe.dc.Ca):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.W.Yb?this.G.push(new ng(c.R(),c.Na(),c.F,c.C)):this.G.push(new ng(olympe.dc.Ca(c),b[d],1,1))}ia(){return O(olympe.dc.ba.Mk)}F(){return[this.G.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Ua(),e=olympe.$.Sf();a=(h,k,m)=>{k&&(null===this.L||this.L.includes(m))&&h(1)};const f=this.G;
|
|
781
781
|
for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;wc(d,b,a.bind(null,h=>{c.Vd()||c.Kb()||(g+=h,J(c,0<g))}),e);olympe.D.Ja().onDestroy(()=>xc(d,b,e));c.Je(!1);return c}oa(){return'{"c":"'+this.ia()+'","a":['+JSON.stringify(this.G.map(a=>a.oa()))+(null!==this.L?',"'+this.L.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.L?'#['+this.L.toString()+'], ':'')+this.G.map(a=>a.oa())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.ba.Mk);
|
|
782
782
|
class ng extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d;this.L=new Map;this.G=new Map}getTransform(a,b,c){const d=this.G,e=this.L,f=new Set,g=(k,m,n)=>{e.has(m)?e.get(m).set(c+n,k):e.set(m,(new Map).set(c+n,k))},h=(k,m,n,p,q)=>{const r=olympe.$.Sf();if(p){const t=n+q,v=u=>{const x=e.get(q);if(f.has(t))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${n} and ${q}`);void 0!==x&&
|
|
783
|
-
null!==x&&(f.add(t),d.set(q,(d.get(q)||0)+u),Array.from(x.values()).forEach(G=>G(u)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(m>=this.F&&b(u=>{d.set(q,(d.get(q)||0)+u);k(u)},p,q),(0>this.C||m<=this.C)&&q!==n&&Ad(a,q,this,h.bind(this,v,m+1,q),r))}else k(-d.get(q)),e.get(q).delete(c+n),0===e.get(q).size&&(d.delete(q),e.delete(q),Bd(a,q,this,r))};return(k,m,n)=>h(k,0,'origin',m,n)}oa(){return`${this.R()}, ${this.Na()}, ${this.F}, ${this.C}`}}olympe.dc.ba.Mk.ka=[olympe.dc.Xb];olympe.dc.W={};olympe.dc.W.zj={zr:1,Mr:-1,Wn:0};olympe.dc.W.
|
|
783
|
+
null!==x&&(f.add(t),d.set(q,(d.get(q)||0)+u),Array.from(x.values()).forEach(G=>G(u)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(m>=this.F&&b(u=>{d.set(q,(d.get(q)||0)+u);k(u)},p,q),(0>this.C||m<=this.C)&&q!==n&&Ad(a,q,this,h.bind(this,v,m+1,q),r))}else k(-d.get(q)),e.get(q).delete(c+n),0===e.get(q).size&&(d.delete(q),e.delete(q),Bd(a,q,this,r))};return(k,m,n)=>h(k,0,'origin',m,n)}oa(){return`${this.R()}, ${this.Na()}, ${this.F}, ${this.C}`}}olympe.dc.ba.Mk.ka=[olympe.dc.Xb];olympe.dc.W={};olympe.dc.W.zj={zr:1,Mr:-1,Wn:0};olympe.dc.W.hA={Mx:!0,iy:!1};olympe.dc.W.Db=class extends olympe.dc.za.Relation{constructor(a,b){super(olympe.dc.Ca(a),b||olympe.dc.Ka.DESTINATION)}Mb(){return Jc(this)}ia(){return O(olympe.dc.W.Db)}xd(){return new olympe.dc.W.Db(this.tag,this.direction===olympe.dc.Ka.DESTINATION?olympe.dc.Ka.ORIGIN:olympe.dc.Ka.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.Ua(),e=this.R(),f=this.Na();return(g,h,k,m)=>{Yf(b,k,h,e,f);g?Ad(d,h,this,(n,p)=>{const q=olympe.$.Ac(k+f+e+p,20),r=Lf(m,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},
|
|
784
784
|
k):Bd(d,h,this,k)}}oa(){return'{"c":"'+this.ia()+'","a":["'+this.R()+'","'+this.Na()+'"]}'}toString(){return'Related('+this.Na()+this.R()+')'}};N('olympe.dc.transformers.Related',olympe.dc.W.Db);olympe.dc.W.Db.ka=[olympe.dc.Pc];olympe.dc.W.Yb=class extends olympe.dc.za.Relation{constructor(a,b,c,d){super(olympe.dc.Ca(a),b||olympe.dc.Ka.DESTINATION);this.F='number'===typeof c?c:1;this.C='number'===typeof d?d:-1}Mb(){return Jc(this)}ia(){return O(olympe.dc.W.Yb)}getTransform(a,b,c){const d=olympe.dc.Ua(),e=Object.create(null),f=olympe.dc.Ka.ORIGIN,g=olympe.dc.Ka.DESTINATION,h=this.R(),k=this.Na(),m=(p,q,r)=>{if(!(0<=this.C&&p>=this.C)){var t=d.Wa(r,this);p+=1;for(let v=0,u=t.length;v<u;v++){if(void 0!==e[t[v]]||r===t[v])continue;
|
|
785
785
|
const x=olympe.$.Ac(q+k+(h+'_'+p)+t[v],20);b.register(x,q,r,h,k||g);null===k&&b.register(x,q,r,h,f)}}},n=(p,q,r,t,v,u)=>{v&&!b.F&&m(p,t,u);p>=this.F?c(v,u,t,Lf(r,v,u,t)):Yf(b,t,u,h,k);0<=this.C&&p>=this.C||(v?e[u]||(e[u]=!0,Ad(d,u,this,(x,G)=>{const C=p+1,z=olympe.$.Ac(t+k+(h+'_'+C)+G,20);n(C,u,r,z,x,G)},t)):(Bd(d,u,this,t),delete e[u]))};return(p,q,r,t)=>n(0,null,t,r,p,q)}oa(){return'{"c":"'+this.ia()+'","a":["'+this.R()+'","'+this.Na()+'",'+this.F+','+this.C+']}'}toString(){return'RecursiveRelated('+
|
|
786
786
|
this.Na()+this.R()+'['+this.F+'..'+this.C+'])'}};N('olympe.dc.transformers.RecursiveRelated',olympe.dc.W.Yb);olympe.dc.W.Yb.ka=[olympe.dc.Pc];function og(a){return a.C.map(b=>b.R())}
|
|
@@ -795,39 +795,39 @@ olympe.dc.W.Ye=class{constructor(a,b){this.W=this.C=null;a instanceof olympe.dc.
|
|
|
795
795
|
v.Vd()||v.Kb()||(k||(t.mc().fg(u=>{g=u;dg(b,n)}),Jf(b,()=>t.Mf(),n),k=!0),d.C(p,q,r),Kf(b,r,n))});Zf(b,m);return(p,q,r,t)=>{h||(t.mc().fg(v=>{f=v;dg(b,m)}),Jf(b,()=>t.Mf(),m),h=!0);d.C(p,q,r,m);Kf(b,r,m)}}oa(a){const b=this.W?'['+this.W.map(c=>c.oa(a)).join(',')+']':'null';return'{"c":"'+this.ia()+'","a":['+bf(a,this.C)+','+b+']}'}toString(){const a=olympe.D.Za(this.C)?'N:'+this.C.Sa.da():this.C.valueOf(),b=this.W?','+this.W.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
|
|
796
796
|
N('olympe.dc.transformers.Union',olympe.dc.W.Ye);olympe.dc.W.Ye.ka=[olympe.dc.Pc];olympe.dc.gg={};function rg(a,b){let c=Cc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.cf(b);if(null===b)break;c=Cc.get(b)||null}return c||null}function sg(a,b){const c=rg(a,a.db.model(b));return null===c?(a.N.error(`Instantiation of a Sync (tag = '${b}') that does not exist (or incompletely exists) in the local database.\n
|
|
797
797
|
This could lead to unwanted behaviour and must be fixed.
|
|
798
|
-
For more information, activate the database debug mode or call "dbMonitor.debug(${b})" from this console.`),new olympe.dc.Sync(void 0,b)):c.instantiate(b,a.C)}function tg(a){var b=olympe.dc.em();a=olympe.dc.Ca(a);const c=rg(b,a);if(null===c)throw Error(`Instantiation of a discrete Sync with a model not present in the GraphDB (tag = ${a}).`);return olympe.dc.Sync.instantiate(c,'app_instance',b.C,sg(b,a))}olympe.dc.gg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.gg.T={Ha:'dc.syncs.Logger',ta:'dc.syncs.SyncManager'};olympe.U.Ib(function(a){B(a,olympe.dc.gg.T.Ha,[olympe.ua.T.ta],b=>b.Gc('dc'));y(a,olympe.dc.gg.T.ta,olympe.dc.gg.SyncManager,olympe.dc.gg.T.Ha,olympe.dc.T.Yg,olympe.U.T.vf)});olympe.dc.$={};olympe.dc.$.
|
|
798
|
+
For more information, activate the database debug mode or call "dbMonitor.debug(${b})" from this console.`),new olympe.dc.Sync(void 0,b)):c.instantiate(b,a.C)}function tg(a){var b=olympe.dc.em();a=olympe.dc.Ca(a);const c=rg(b,a);if(null===c)throw Error(`Instantiation of a discrete Sync with a model not present in the GraphDB (tag = ${a}).`);return olympe.dc.Sync.instantiate(c,'app_instance',b.C,sg(b,a))}olympe.dc.gg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.gg.T={Ha:'dc.syncs.Logger',ta:'dc.syncs.SyncManager'};olympe.U.Ib(function(a){B(a,olympe.dc.gg.T.Ha,[olympe.ua.T.ta],b=>b.Gc('dc'));y(a,olympe.dc.gg.T.ta,olympe.dc.gg.SyncManager,olympe.dc.gg.T.Ha,olympe.dc.T.Yg,olympe.U.T.vf)});olympe.dc.$={};olympe.dc.$.LB=function(a){a=olympe.dc.Ca(a);const b=olympe.D.Ic(olympe.D.Oa,'getInstanceName'),c=olympe.dc.Ua(),d=yd(c,a,olympe.dc.Sync.nameProp,b.update.bind(b));olympe.D.Ja().Sc(c.G.bind(c,a,olympe.dc.Sync.nameProp,d));return b.yb()};olympe.dc.$.QB=function(a){return olympe.D.xa([a],b=>olympe.D.$w(olympe.dc.Ua().Eh(b)),olympe.D.fa)};olympe.dc.$.RB=function(a){return(a=olympe.D.Ta(a))?olympe.dc.Ua().Eh(a):!1};olympe.dc.$.Ho=class a{constructor(b=olympe.dc.La.dd){this.G=b}F(b){const c=new olympe.dc.db.Dc;this.C(b,c);return c}O(b,c,d){const e=new olympe.dc.db.Dc(b),f=new olympe.dc.query.Rh(b,this.G,c,e);this.C(d,e,(g,h)=>{h=h||[];const k=f.C.get(g)||new Set;for(const m of h)k.add(m);f.C.set(g,k)});return f}L(b,c){const d=new olympe.dc.db.Dc(b),e=new olympe.dc.query.Ir(b,d);this.C(c,d,(f,g,h)=>{h=h||[];const k=new He(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}C(b,c,d){const e=olympe.dc.Pb.Pd;for(const f of b)switch(b=
|
|
799
799
|
f.i?f.i:-1,f.o){case 1:const g=a.C(f.p||{});g.has(e)||g.set(e,this.G);c.Tb(f.t,g,b);break;case 2:c.bc(f.t,a.C(f.p),!0,b);break;case 3:c.oc(f.t,f.f,b);break;case 4:c.la(f.m,f.l,f.r,b);break;case 5:c.nb(f.m,f.l,f.r,b);break;case 6:d&&d(f.i,f.a,f.d);break;default:throw Error('Undefined patch operation: '+f.o);}}static C(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;if(b===olympe.dc.Pb.Pd||b===olympe.dc.Pb.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.Pb.VERSION,e);continue}let f=
|
|
800
800
|
typeof e;b.startsWith('fd')&&(b=olympe.dc.og.bd+b.substr(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;case '6':c.set(b,new Date(Date.UTC(e.y||1970,e.M&&
|
|
801
801
|
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.Ec(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.$.Eb={};olympe.dc.$.Eb.Jl=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.D.sb(a):a instanceof olympe.D.Oa?a:null;olympe.dc.$.Eb.Gl=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.qc(a):a instanceof olympe.D.fa?a:null;olympe.dc.$.Eb.Il=a=>'number'===typeof a||a instanceof Number?olympe.D.va(a):'string'===typeof a||a instanceof String?olympe.D.va(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ea?a:null;
|
|
802
802
|
olympe.dc.$.Eb.Hl=function(a){return'number'===typeof a||a instanceof Number?qb(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.D.ab(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.D.ab(a):a instanceof olympe.D.ab?a:null};olympe.dc.$.Eb.Rp=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?ub(a.valueOf()):null};olympe.dc.$.Eb.Sp=a=>a instanceof olympe.dc.Sync?a:a instanceof olympe.dc.Ec?olympe.dc.Sync.Qb(a.tag):null;
|
|
803
|
-
olympe.dc.$.Eb.Bg=a=>a instanceof olympe.dc.Ec?olympe.dc.Sync.Qb(a.tag):a;olympe.dc.$.Eb.ru=a=>{switch(typeof a){case 'boolean':return olympe.D.qc(a);case 'number':return olympe.D.va(a);case 'string':return olympe.D.sb(a);case 'object':if(a instanceof Date)return olympe.D.
|
|
804
|
-
olympe.dc.$.Eb.
|
|
803
|
+
olympe.dc.$.Eb.Bg=a=>a instanceof olympe.dc.Ec?olympe.dc.Sync.Qb(a.tag):a;olympe.dc.$.Eb.ru=a=>{switch(typeof a){case 'boolean':return olympe.D.qc(a);case 'number':return olympe.D.va(a);case 'string':return olympe.D.sb(a);case 'object':if(a instanceof Date)return olympe.D.Qw(a)}return a};
|
|
804
|
+
olympe.dc.$.Eb.IB=a=>{switch(a){case olympe.D.fa:return olympe.dc.$.Eb.Gl;case olympe.D.Oa:return olympe.dc.$.Eb.Jl;case olympe.D.ea:return olympe.dc.$.Eb.Il;case olympe.D.ab:return olympe.dc.$.Eb.Hl;case olympe.D.Color:return olympe.dc.$.Eb.Rp;case olympe.dc.Sync:return olympe.dc.$.Eb.Sp;default:return olympe.dc.$.Eb.Bg}};olympe.dc.T={ta:'dc.Manager',Jk:'dc.Graph',Yg:'dc.DBView',Ha:'dc.Logger',It:'dc.TransactionLogger',Mh:'dc.FileServiceManager',se:'dc.Router'};olympe.dc.Z={wf:'dc.debug',xg:'dc.subscribeAll',bn:'dc.defaultSource',un:'dc.fileCache',mn:'dc.errorOnAbstractInstantiation'};
|
|
805
805
|
olympe.U.Ib(function(a){D(a,olympe.dc.Z.wf,!1);D(a,olympe.dc.Z.xg,!1);D(a,olympe.dc.Z.bn,olympe.dc.La.dd);D(a,olympe.dc.Z.un,!0);D(a,olympe.dc.Z.mn,!0);B(a,olympe.dc.T.Ha,[olympe.ua.T.ta],b=>b.Gc('dc'));qa(a,olympe.dc.T.It,olympe.dc.transaction.T.Ha);qa(a,olympe.dc.T.Jk,olympe.dc.db.T.Jk);qa(a,olympe.dc.T.Yg,olympe.dc.db.T.$a);y(a,olympe.dc.T.Mh,olympe.dc.Br,olympe.dc.T.Ha,olympe.Da.T.ta,olympe.dc.T.se,olympe.$.T.Tg,new olympe.U.ha(olympe.dc.Z.un));ra(a,olympe.dc.T.se);y(a,olympe.dc.T.ta,olympe.dc.qa,
|
|
806
806
|
olympe.dc.T.Ha,olympe.dc.db.T.ta,olympe.dc.query.T.ta,olympe.dc.transaction.T.ta,olympe.dc.gg.T.ta,olympe.dc.T.Mh)},'olympe.dc');olympe.U.run([olympe.dc.db.T.ta,olympe.dc.query.T.ta,olympe.dc.transaction.T.ta,olympe.dc.gg.T.ta,olympe.dc.T.ta,olympe.dc.T.Mh],(a,b,c,d,e,f)=>{olympe.dc.Wc=()=>a;olympe.dc.Ah=()=>b;olympe.dc.Ch=()=>c;olympe.dc.em=()=>d;olympe.dc.mc=()=>e;olympe.dc.nv=()=>f},'DC singleton getter initialization');olympe.dc.Sync=class{constructor(a,b){this.tag=b;this.ja=olympe.dc.mc&&olympe.dc.mc();this.db=olympe.dc.Wc&&olympe.dc.Wc().view;this.model=null}static Tb(a,b,c,...d){b=olympe.dc.Ca(b);var e=Cc.get(b)||null;if(e=e&&e.C)return e(a,c,...d);a=a.create(b);c&&a.setProperty(olympe.dc.Sync.nameProp,c);return a.R()}static Qb(a){return sg(olympe.dc.em(),olympe.dc.Ca(a))}static vv(a){var b=rg(olympe.dc.em(),olympe.dc.Ca(a));b=b&&b.F;return new olympe.dc.pa(olympe.dc.Ca(a),olympe.dc.Sync.instancesRel,b)}static instantiate(a,
|
|
807
807
|
b,c,d){a=a.instantiate(b,c);a.model=d;return a}mc(){return this.ja}R(){return this.tag}iw(){return this.db.version(this)}hs(){return this.db.source(this)}ia(){return this.wb(olympe.dc.Sync.nameProp)}gq(){return olympe.D.xa([this.ia()],a=>olympe.D.sb(a),olympe.D.Oa,'getDisplayName',olympe.D.sb('('+this.toString()+')'))}Rj(){this.model||(this.model=olympe.dc.Sync.Qb(this.db.model(this)));return this.model}Ub(){return this.model?this.model.R():this.db.model(this)}Av(){return this.Rj().transform(new olympe.dc.W.Yb(olympe.dc.Fc.Zg,
|
|
808
|
-
olympe.dc.Ka.DESTINATION,0))}md(){return this.Wa(olympe.dc.Sync.instancesRel,olympe.dc.Sync)}Eh(){return olympe.D.xa([this.nq()],()=>olympe.D.fa.F,olympe.D.fa,'isModel',olympe.D.fa.C)}
|
|
808
|
+
olympe.dc.Ka.DESTINATION,0))}md(){return this.Wa(olympe.dc.Sync.instancesRel,olympe.dc.Sync)}Eh(){return olympe.D.xa([this.nq()],()=>olympe.D.fa.F,olympe.D.fa,'isModel',olympe.D.fa.C)}Tw(a){return new rxjs.Observable(b=>{const c=yd(this.db,this.tag,a,d=>{null===d||void 0===d?b.next(null):b.next(d)});olympe.D.Ja().Sc(()=>{b.complete();this.db.G(this.tag,a,c)})})}Gb(a){return this.db.Gb(this.tag,a,!0)}yi(){return this.transform(new olympe.dc.W.Yb(olympe.dc.Sync.extendRel.R(),olympe.dc.Ka.DESTINATION,
|
|
809
809
|
1))}nq(){return this.vc(olympe.dc.Sync.extendRel,olympe.dc.Sync)}Zu(){return this.vc(olympe.dc.Sync.zd,olympe.dc.Sync)}Wl(){return this.Wa(olympe.dc.Sync.containsRel,olympe.dc.Sync)}Iv(){return this.vc(olympe.dc.Sync.Ea,olympe.dm.User)}Pv(){return new olympe.dc.pa(this.R(),[new olympe.dc.W.Yb(olympe.dc.Sync.extendRel.R(),olympe.dc.Sync.extendRel.Na(),0),olympe.dc.Sync.propertyRel,new olympe.dc.W.Zc],olympe.dm.Property)}uv(){return new olympe.dc.pa(this.R(),[new olympe.dc.W.Yb(olympe.dc.Sync.extendRel.R(),
|
|
810
810
|
olympe.dc.Sync.extendRel.Na()),olympe.dc.Sync.propertyRel,new olympe.dc.W.Zc],olympe.dm.Property)}Gv(){return this.Wa(olympe.dc.Sync.propertyRel,olympe.dm.Property)}tv(){return this.Wa(olympe.dc.Sync.fb,olympe.dm.Property)}iq(){return this.Wa(olympe.dc.Sync.F,olympe.dm.ub)}Xf(a,b,c){const d=olympe.D.Ic(c,'Sync valueType'),e=yd(this.db,this.tag,a,olympe.D.Ja().vb(f=>{b&&null!==f&&void 0!==f&&(f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.node.onDestroy(()=>this.db.G(this.tag,a,e));return d.node}wb(a){return K(this.Xf(a,
|
|
811
811
|
olympe.dc.$.Eb.Jl,olympe.D.Oa))}Td(a){return K(this.Xf(a,olympe.dc.$.Eb.Il,olympe.D.ea))}Ig(a){return K(this.Xf(a,olympe.dc.$.Eb.Gl,olympe.D.fa))}Ai(a){return K(this.Xf(a,olympe.dc.$.Eb.Hl,olympe.D.ab))}oq(){return K(this.Xf(olympe.dm.Color.valueProp,olympe.dc.$.Eb.Rp,olympe.D.Color))}Rv(a){return K(this.Xf(a,olympe.dc.$.Eb.Sp,olympe.dc.Sync))}Wa(a,b){a=a instanceof olympe.dc.W.Db?a:new olympe.dc.W.Db(a.R(),a.Na());return new olympe.dc.pa(this.R(),a,b)}vc(a,b){return this.Wa(a,b).ld()}cq(a,b){a=this.db.Wa(this,
|
|
812
|
-
a);return b?a:a.map(c=>olympe.dc.Sync.Qb(c))}av(a,b){return this.cq(a,b)[0]||null}Sl(a,b){const c=this.db,d=olympe.$.Rb(),e=olympe.D.Ja(),f=new Map;Ad(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.lc(`forEachRelated: (${this.tag})-[:${a.R()}]-(${h})`,e),f.set(h,g),g.run(b,olympe.dc.Sync.Qb(h))):f.has(h)&&(f.get(h).gb(),f.delete(h))},d);e.Sc(()=>{Bd(c,this.tag,a,d)})}
|
|
812
|
+
a);return b?a:a.map(c=>olympe.dc.Sync.Qb(c))}av(a,b){return this.cq(a,b)[0]||null}Sl(a,b){const c=this.db,d=olympe.$.Rb(),e=olympe.D.Ja(),f=new Map;Ad(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.lc(`forEachRelated: (${this.tag})-[:${a.R()}]-(${h})`,e),f.set(h,g),g.run(b,olympe.dc.Sync.Qb(h))):f.has(h)&&(f.get(h).gb(),f.delete(h))},d);e.Sc(()=>{Bd(c,this.tag,a,d)})}Ex(){return new olympe.dc.pa(this.R(),[],Hc(this.R()))}transform(...a){return(new olympe.dc.pa(this.R(),[],this.constructor)).transform(...a)}Xc(){return this.gq()}toString(){if(!this.db.Fb(this.tag))return`unknown object #${this.tag||
|
|
813
813
|
'NULL_TAG'}`;const a=this.db.model(this.tag);var b=this.db.name(this);b=b?` instanceName: '${b}'`:'';return a?`${this.db.name(a)}#${this.tag}${b}`:`orphan object (no model) #${this.tag}${b}`}Jb(a){return a instanceof olympe.dc.Sync?this.R()===a.R():!1}yd(a){return olympe.D.xa([a],b=>olympe.D.qc(this.Jb(b)),olympe.D.fa)}yu(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.lb,c=!0;const d=olympe.dc.Ka.ORIGIN;for(const [e,f,g]of Dd(b,this))f===d?a.nb(e,g,this):e!==olympe.dc.Sync.modelRel.R()&&
|
|
814
|
-
a.nb(e,this,g);a.delete(this,olympe.dc.ob.NONE);c&&a.wd()}ev(){const a=new olympe.dc.lb;a.delete(this,olympe.dc.ob.DELETE);return a}};olympe.dc.Sync.prototype.getProperty=olympe.dc.Sync.prototype.Gb;olympe.dc.Sync.prototype.observeProperty=olympe.dc.Sync.prototype.
|
|
814
|
+
a.nb(e,this,g);a.delete(this,olympe.dc.ob.NONE);c&&a.wd()}ev(){const a=new olympe.dc.lb;a.delete(this,olympe.dc.ob.DELETE);return a}};olympe.dc.Sync.prototype.getProperty=olympe.dc.Sync.prototype.Gb;olympe.dc.Sync.prototype.observeProperty=olympe.dc.Sync.prototype.Tw;olympe.dc.Sync.prototype.getModelTag=olympe.dc.Sync.prototype.Ub;olympe.dc.Sync.prototype.getModel=olympe.dc.Sync.prototype.Rj;olympe.dc.Sync.prototype.getName=olympe.dc.Sync.prototype.ia;olympe.dc.Sync.prototype.getTag=olympe.dc.Sync.prototype.R;
|
|
815
815
|
olympe.dc.Sync.getInstancesOf=olympe.dc.Sync.vv;olympe.dc.Sync.getInstance=olympe.dc.Sync.Qb;olympe.dc.Sync.P=olympe.dc.wa.C('ff021000000000000001',olympe.dc.Sync);olympe.dc.Sync.Gi=olympe.dc.Sync.P.Ba(olympe.dc.Pb.VERSION);olympe.dc.Sync.nameProp=olympe.dc.Sync.P.Ba('ff023000000000000011');w('olympe.dc.Sync.nameProp',olympe.dc.Sync.nameProp);olympe.dc.Sync.ya=olympe.dc.Sync.P.Ba('ff023000000000000012');olympe.dc.Sync.ja=olympe.dc.Sync.P.Ma('ff02200000000000000a');
|
|
816
816
|
olympe.dc.Sync.fb=olympe.dc.Sync.P.Ma('ff02200000000000000b',olympe.dc.Ka.ORIGIN);olympe.dc.Sync.propertyRel=olympe.dc.Sync.P.Ma('ff02200000000000000c');w('olympe.dc.Sync.propertyRel',olympe.dc.Sync.propertyRel);olympe.dc.Sync.typeRel=olympe.dc.Sync.P.Ma('ff02200000000000000d',olympe.dc.Ka.ORIGIN);olympe.dc.Sync.modelRel=olympe.dc.Sync.P.Ma(olympe.dc.Fc.be);w('olympe.dc.Sync.modelRel',olympe.dc.Sync.modelRel);olympe.dc.Sync.instancesRel=P(olympe.dc.Sync.P,olympe.dc.Sync.modelRel);
|
|
817
817
|
w('olympe.dc.Sync.instancesRel',olympe.dc.Sync.instancesRel);olympe.dc.Sync.Ea=olympe.dc.Sync.P.Ma('ff022000000000000002');olympe.dc.Sync.F=olympe.dc.Sync.P.Ma('ff022000000000000003');olympe.dc.Sync.extendRel=olympe.dc.Sync.P.Ma(olympe.dc.Fc.Zg);w('olympe.dc.Sync.extendRel',olympe.dc.Sync.extendRel);olympe.dc.Sync.extendedByRel=P(olympe.dc.Sync.P,olympe.dc.Sync.extendRel);w('olympe.dc.Sync.extendedByRel',olympe.dc.Sync.extendedByRel);olympe.dc.Sync.containsRel=olympe.dc.Sync.P.Ma(olympe.dc.Fc.Qm);
|
|
818
818
|
w('olympe.dc.Sync.containsRel',olympe.dc.Sync.containsRel);olympe.dc.Sync.zd=P(olympe.dc.Sync.P,olympe.dc.Sync.containsRel);olympe.dc.Sync.ka=[olympe.dc.Nd];l=olympe.dc.Sync.prototype;l.mc.K=olympe.D.J.C;l.R.K=new olympe.D.J(()=>String,[]);l.iw.K=new olympe.D.J(()=>Number,[]);l.hs.K=new olympe.D.J(()=>String,[]);l.ia.K=olympe.D.J.F;l.gq.K=olympe.D.J.F;l.Rj.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.Ub.K=new olympe.D.J(()=>String,[]);l.Av.K=new olympe.D.J(()=>olympe.dc.pa,[]);
|
|
819
819
|
l.md.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Eh.K=olympe.D.J.O;l.yi.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.nq.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.Zu.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.Wl.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Iv.K=new olympe.D.J(()=>olympe.dm.User,[]);l.Pv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.uv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Gv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.tv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.iq.K=new olympe.D.J(()=>olympe.dc.pa,[]);
|
|
820
|
-
l.Xf.K=new olympe.D.J(()=>olympe.D.Node,[]);l.wb.K=olympe.D.J.F;l.Td.K=olympe.D.J.G;l.Ig.K=olympe.D.J.O;l.Ai.K=new olympe.D.J(()=>olympe.D.ab,[]);l.oq.K=new olympe.D.J(()=>olympe.D.Color,[]);l.Rv.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.Wa.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.vc.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.cq.K=olympe.D.J.C;l.av.K=olympe.D.J.C;l.Sl.K=new olympe.D.J(()=>{},[]);l.
|
|
820
|
+
l.Xf.K=new olympe.D.J(()=>olympe.D.Node,[]);l.wb.K=olympe.D.J.F;l.Td.K=olympe.D.J.G;l.Ig.K=olympe.D.J.O;l.Ai.K=new olympe.D.J(()=>olympe.D.ab,[]);l.oq.K=new olympe.D.J(()=>olympe.D.Color,[]);l.Rv.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.Wa.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.vc.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.cq.K=olympe.D.J.C;l.av.K=olympe.D.J.C;l.Sl.K=new olympe.D.J(()=>{},[]);l.Ex.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.transform.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Xc.K=olympe.D.J.F;
|
|
821
821
|
l.toString.K=olympe.D.J.C;l.Jb.K=olympe.D.J.C;l.yd.K=olympe.D.J.O;l.yu.K=new olympe.D.J(()=>{},[]);l.ev.K=new olympe.D.J(()=>olympe.dc.lb,[]);olympe.dc.pj=class{constructor(a){this.instance=a}R(){return this.instance.R()}Ci(){return lb(this.instance.Ig(olympe.dc.Sync.ya))}lv(){return this.instance.vc(olympe.dc.Sync.extendRel,olympe.dc.Sync)}yi(){return this.instance.transform(new olympe.dc.W.Yb(olympe.dc.Sync.extendRel.R(),olympe.dc.Ka.DESTINATION,olympe.dc.W.zj.zr))}cm(){return this.instance.transform(new olympe.dc.W.Yb(olympe.dc.Sync.extendRel.R(),olympe.dc.Ka.DESTINATION,olympe.dc.W.zj.Wn))}Cd(){return this.cm().transform(olympe.dc.Sync.propertyRel,
|
|
822
822
|
new olympe.dc.W.Zc)}Fv(){return this.instance.transform(olympe.dc.Sync.propertyRel)}Ud(){return this.cm().transform(olympe.dc.Sync.ja,new olympe.dc.W.Zc)}Hv(){return this.instance.transform(olympe.dc.Sync.ja)}static from(a){return olympe.D.xa([a],b=>{const c=b.R(),d=olympe.dc.Ua();if(!d.Eh(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.pj(b)},olympe.dc.pj,'transformToModelInfo')}static Ci(){return lb((void 0).Ig(olympe.dc.Sync.ya))}};olympe.dc.pj.ka=[olympe.dc.Nd];
|
|
823
|
-
l=olympe.dc.pj.prototype;l.lv.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.yi.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.cm.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Cd.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Fv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Ud.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Hv.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dc.
|
|
824
|
-
olympe.dc.Y.Ab=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.ia(),a=a.C.R(),Error('Cannot work on a new definition without calling done on the previous one or popping it. '+`Make sure done() method has been called on previous definition ${b} (${a})`);if(void 0===this)throw Error('Current def cannot be set to undefined.');a.C=this;this.tag=b;this.G=new Map;this.na=olympe.dc.Sync.P.R();this.ca=new Map;this.fb=new Map;this.
|
|
825
|
-
this.na=a;return this}Ub(){return this.na}Pi(a){Y(this);this.V=a;return this}
|
|
826
|
-
a);return this}Xt(a){Y(this);this.fb.set(a,a);return this}Mj(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.Sync.containsRel.R())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.
|
|
823
|
+
l=olympe.dc.pj.prototype;l.lv.K=new olympe.D.J(()=>olympe.dc.Sync,[]);l.yi.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.cm.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Cd.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Fv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Ud.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Hv.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dc.nz=class{};olympe.dc.Y={};olympe.dc.Y.ao=class{constructor(a){this.N=a}};olympe.dc.Y.ao.Ve={ci:0,Gz:1,Iz:3,pz:4};olympe.dc.Y.hj=class{};function Y(a){if(a.ja)throw Error('Cannot modify definition after definition is written');}
|
|
824
|
+
olympe.dc.Y.Ab=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.ia(),a=a.C.R(),Error('Cannot work on a new definition without calling done on the previous one or popping it. '+`Make sure done() method has been called on previous definition ${b} (${a})`);if(void 0===this)throw Error('Current def cannot be set to undefined.');a.C=this;this.tag=b;this.G=new Map;this.na=olympe.dc.Sync.P.R();this.ca=new Map;this.fb=new Map;this.Qa=new Map;this.Ea=new Map;this.ja=this.ya=!1;this.V=null}ek(a){Y(this);
|
|
825
|
+
this.na=a;return this}Ub(){return this.na}Pi(a){Y(this);this.V=a;return this}rx(){this.ya=!0;return this}qx(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.Sync.nameProp.R();b.set(c,a||'')}else Object.keys(a).forEach(c=>{b.set(c,a[c])});this.G=b;return this}Hh(a){Y(this);Object.keys(a).forEach(b=>{this.G.set(b,a[b])});return this}setProperty(a,b){Y(this);this.G.set(a,b);return this}fk(a){Y(this);const b=olympe.dc.Sync.nameProp.R();this.G.set(b,a);return this}Mp(a){Y(this);this.ca.set(a,
|
|
826
|
+
a);return this}Xt(a){Y(this);this.fb.set(a,a);return this}Mj(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.Sync.containsRel.R())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.Qa.set(a+'.'+b,[a,b]);return this}mi(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.Sync.containsRel.R())throw Error('Container must be defined using dedicated helper setContainedIn');
|
|
827
827
|
b&&this.Ea.set(a+'.'+b,[a,b]);return this}done(){if(this.ja)return this;const a=ug(this.C,this.ya);a.Tb(this.tag,this.G,-1);const b=this.C.eq();this.ca.forEach(c=>{b.includes(c)?this.C.vq('Instance '+this.tag+' is added to a goo that is among the default ones, this call is unnecessary'):a.la(olympe.dc.Sync.F.R(),this.tag,c,-1)});b.forEach(c=>{a.la(olympe.dc.Sync.F.R(),this.tag,c,-1)});vg(this.C,this);a.la(olympe.dc.Fc.be,this.tag,this.na,-1);this.V&&a.la(olympe.dc.Fc.Qm,this.V,this.tag,-1);this.fb.forEach(c=>
|
|
828
|
-
{a.la(olympe.dm.ub.C.R(),this.tag,c,-1)});this.L(-1);this.
|
|
829
|
-
olympe.dc.Y.Ab.prototype.addRelationTo=olympe.dc.Y.Ab.prototype.Mj;olympe.dc.Y.Ab.prototype.addParentGoo=olympe.dc.Y.Ab.prototype.Xt;olympe.dc.Y.Ab.prototype.addToGroupOfObjects=olympe.dc.Y.Ab.prototype.Mp;olympe.dc.Y.Ab.prototype.setName=olympe.dc.Y.Ab.prototype.fk;olympe.dc.Y.Ab.prototype.setProperty=olympe.dc.Y.Ab.prototype.setProperty;olympe.dc.Y.Ab.prototype.setProperties=olympe.dc.Y.Ab.prototype.Hh;olympe.dc.Y.Ab.prototype.setNameOrProperties=olympe.dc.Y.Ab.prototype.
|
|
830
|
-
olympe.dc.Y.Ab.prototype.setOptional=olympe.dc.Y.Ab.prototype.
|
|
828
|
+
{a.la(olympe.dm.ub.C.R(),this.tag,c,-1)});this.L(-1);this.Qa.forEach(c=>{a.la(c[0],this.tag,c[1],-1)});this.Ea.forEach(c=>{a.la(c[0],c[1],this.tag,-1)});this.ja=!0;this.C.C=void 0;return this}L(){}R(){return this.tag}ia(){return this.G.get('ff023000000000000011')}};olympe.dc.Y.Ab.prototype.getName=olympe.dc.Y.Ab.prototype.ia;olympe.dc.Y.Ab.prototype.getTag=olympe.dc.Y.Ab.prototype.R;olympe.dc.Y.Ab.prototype.done=olympe.dc.Y.Ab.prototype.done;olympe.dc.Y.Ab.prototype.addRelationFrom=olympe.dc.Y.Ab.prototype.mi;
|
|
829
|
+
olympe.dc.Y.Ab.prototype.addRelationTo=olympe.dc.Y.Ab.prototype.Mj;olympe.dc.Y.Ab.prototype.addParentGoo=olympe.dc.Y.Ab.prototype.Xt;olympe.dc.Y.Ab.prototype.addToGroupOfObjects=olympe.dc.Y.Ab.prototype.Mp;olympe.dc.Y.Ab.prototype.setName=olympe.dc.Y.Ab.prototype.fk;olympe.dc.Y.Ab.prototype.setProperty=olympe.dc.Y.Ab.prototype.setProperty;olympe.dc.Y.Ab.prototype.setProperties=olympe.dc.Y.Ab.prototype.Hh;olympe.dc.Y.Ab.prototype.setNameOrProperties=olympe.dc.Y.Ab.prototype.qx;
|
|
830
|
+
olympe.dc.Y.Ab.prototype.setOptional=olympe.dc.Y.Ab.prototype.rx;olympe.dc.Y.Ab.prototype.setContainedIn=olympe.dc.Y.Ab.prototype.Pi;olympe.dc.Y.Ab.prototype.setModelTag=olympe.dc.Y.Ab.prototype.ek;function wg(a,b,c){const d={[olympe.dc.Sync.nameProp.R()]:b.name||''},e=olympe.dc.Ca(olympe.dm.Property),f=olympe.dc.Sync.propertyRel.R(),g=b.tag;a.C.push();a.C.Pg(g,e).Hh(d).done();a.C.pop();b=b.type;ug(a.C).la(f,a.R(),g,c);ug(a.C).la(olympe.dm.Property.typeRel.R(),g,b,c);const h=ug(a.C);a.ca.forEach(k=>{h.la(olympe.dc.Sync.F.R(),g,k,c)})}
|
|
831
831
|
olympe.dc.Y.Uc=class extends olympe.dc.Y.Ab{constructor(a,b){super(a,b);this.O=this.C.OBJECT;this.Xa=new Map;this.hb=new Map}Kq(a){Y(this);this.O=a;return this}extends(a){return this.Kq(a)}li(){Y(this);this.setProperty(olympe.dc.Sync.ya.R(),!0);return this}defineProperty(a,b,c,d){Y(this);this.Xa.set(a,new olympe.dc.Y.Uc.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.og.bd+a,d);return this}pi(a,b,c,d,e,{oi:f=0,Li:g=0,Oi:h=0}={}){Y(this);b=new olympe.dc.Y.Uc.Relation(a,this.R(),b,c||'',
|
|
832
832
|
d,e,h,f,g);this.hb.set(a,b);return this}L(a){super.L(a);ug(this.C).la(olympe.dc.Sync.extendRel.R(),this.tag,this.O,a);this.Xa.forEach(b=>{wg(this,b,a)});this.hb.forEach(b=>{this.C.pi(b.C,b.G,b.F,b.name,b.aq,b.Yp,{Oi:b.Oi,oi:b.oi,Li:b.Li},a);const c=ug(this.C);this.ca.forEach(d=>{c.la(olympe.dc.Sync.F.R(),b.C,d,a)})})}};olympe.dc.Y.Uc.prototype.defineRelation=olympe.dc.Y.Uc.prototype.pi;olympe.dc.Y.Uc.prototype.defineProperty=olympe.dc.Y.Uc.prototype.defineProperty;
|
|
833
833
|
olympe.dc.Y.Uc.prototype['abstract']=olympe.dc.Y.Uc.prototype.li;olympe.dc.Y.Uc.prototype['extends']=olympe.dc.Y.Uc.prototype.extends;olympe.dc.Y.Uc.prototype.setParentTag=olympe.dc.Y.Uc.prototype.Kq;olympe.dc.Y.Uc.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.Y.Uc.Relation=class{constructor(a,b,c,d,e,f,g,h,k){this.C=a;this.G=b;this.F=c;this.name=d;this.aq=e;this.Yp=f;this.Oi=g;this.oi=h;this.Li=k}};function ug(a,b){return b?a.V:a.F}function vg(a,b){0<a.L.length&&(b.V||a.F.la(olympe.dc.Sync.containsRel.R(),a.L[a.L.length-1].R(),b.R(),-1))}
|
|
@@ -836,52 +836,52 @@ this.STRING=olympe.dm.String.P.R();this.BOOLEAN=olympe.dm.Boolean.P.R();this.NUM
|
|
|
836
836
|
this.READ=olympe.dm.Ia.C.ql;this.READ_CREATE=olympe.dm.Ia.C.vj;this.READ_WRITE=olympe.dm.Ia.C.READ_WRITE;this.READ_DELETE=olympe.dm.Ia.C.Ro;this.READ_CREATE_WRITE=olympe.dm.Ia.C.dt;this.READ_LINK=olympe.dm.Ia.C.ug;this.READ_CREATE_LINK=olympe.dm.Ia.C.ct;this.READ_WRITE_LINK=olympe.dm.Ia.C.gt;this.READ_DELETE_LINK=olympe.dm.Ia.C.ft;this.READ_CREATE_WRITE_LINK=olympe.dm.Ia.C.et;this.FULL=olympe.dm.Ia.C.zn;this.RELATION_CREATE=olympe.dm.Relation.G.rl;this.RIGHT_WRITE=olympe.dm.Relation.G.ul;this.RIGHT_LINK=
|
|
837
837
|
olympe.dm.Relation.G.tl;this.LEFT_WRITE=olympe.dm.Relation.G.al;this.LEFT_LINK=olympe.dm.Relation.G.$k;this.BOTH_WRITE=olympe.dm.Relation.G.qk;this.BOTH_LINK=olympe.dm.Relation.G.nk;this.DUMP_IGNORE=olympe.dm.Relation.C.Sn;this.DUMP_REF=olympe.dm.Relation.C.Vo;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.nt;this.DUMP_UNILATERAL=olympe.dm.Relation.C.Ej;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.yj;this.DUMP_EVERYTHING=olympe.dm.Relation.C.nn;this.DUMP_DEFAULT=olympe.dm.Relation.C.bd;this.DUMP_REV_DEFAULT=
|
|
838
838
|
olympe.dm.Relation.C.mt;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.pk;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.jt;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.kt;this.DELETE_EVERYTHING=olympe.dm.Relation.C.nn;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.Hb.O;this.DEFAULT_GOO=olympe.dm.ub.$b}eq(){return[...this.na]}push(){this.L.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.L.pop()}Lu(){const a=
|
|
839
|
-
new Map,b=olympe.dc.Y.zt.C(this.ca,this.F,this.V);for(const [c,d]of b.entries())a.set(c,d.G());return a}Tv(){return this.ca}
|
|
840
|
-
this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}fm(a){const b=this.ya.get(a)||1,c=olympe.$.fm(a,b);this.ya.set(a,b+1);return c}
|
|
841
|
-
b,c,-1)}
|
|
839
|
+
new Map,b=olympe.dc.Y.zt.C(this.ca,this.F,this.V);for(const [c,d]of b.entries())a.set(c,d.G());return a}Tv(){return this.ca}px(a){this.O=a}log(...a){this.O&&this.N&&this.N.log(...a)}Ji(...a){this.O&&this.N&&this.N.debug(...a)}vq(...a){this.O&&this.N&&this.N.warn(...a)}uq(...a){this.O&&this.N&&this.N.error(...a)}Pp(a){if(a&&20===a.length&&!this.Ea){if(this.ja[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.ja[a]=a}this.G=null===this.G?olympe.$.Tl():olympe.$.Sv(this.G);
|
|
840
|
+
this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}fm(a){const b=this.ya.get(a)||1,c=olympe.$.fm(a,b);this.ya.set(a,b+1);return c}vx(a){this.Ea=a}Au(){}lx(...a){this.Ji('Setting as default goo ',a);this.na=a}tx(a){this.ca=a}Pg(a,b){return(new olympe.dc.Y.Ab(this,a)).ek(b)}Mw(a,b){return(new olympe.dc.Y.Uc(this,a)).fk(b)}Lw(a,b){return(new olympe.dc.Y.Uc(this,a)).fk(b).li()}zq(a){return new olympe.dc.Y.Vc(this,a)}Ow(a){return new olympe.dc.Y.Ze(this,a)}ak(a,b,c){this.F.la(a,
|
|
841
|
+
b,c,-1)}Nw(a,b,c){return this.zq(this.Pp(c)).Mj(olympe.dm.Ia.O.R(),b).mi(olympe.dm.ub.L.R(),a)}defineProperty(a,b,c,d,e){this.Ji('Defining property ',d,' on model ',a);d={[olympe.dc.Sync.nameProp.R()]:d||''};void 0!==e&&this.bc(a,{[olympe.dc.og.bd+c]:e});this.C?(this.push(),this.Pg(c,olympe.dm.Property.P.R()).Hh(d).done(),this.pop()):this.Pg(c,olympe.dm.Property.P.R()).Hh(d).Pi(a).done();this.ak(olympe.dc.Sync.propertyRel.R(),a,c);this.ak(olympe.dm.Property.typeRel.R(),c,b)}pi(a,b,c,d,e,f,{oi:g=olympe.dm.Relation.L.gl,
|
|
842
842
|
Li:h=olympe.dm.Relation.G.rl,Oi:k=0}={},m=-1){if(void 0===e||null===e)throw Error('Cannot define a relation without defining the dump follow rules (must be set to db.DUMP_<something> and cannot be undefined or null)');if(void 0===f||null===f)throw Error('Cannot define a relation without defining the delete follow rules (must be set to db.DELETE_<something> and cannot be undefined or null)');const n=olympe.dm.Relation;d={[olympe.dc.Sync.nameProp.R()]:d||'',[n.Fl.R()]:g,[n.Mi.R()]:h,[n.Nl.R()]:e,[n.Ml.R()]:f,
|
|
843
843
|
[n.qm.R()]:k};this.C?(this.push(),this.Pg(a,n.P.R()).Hh(d).done(),this.pop()):this.Pg(a,n.P.R()).Hh(d).Pi(b).done();this.F.la(n.originModelRel.R(),b,a,m);this.F.la(n.destinationModelRel.R(),a,c,m)}yw(a,b){this.Ji('Linking instance ',a,' to goo ',b);this.F.la(olympe.dc.Sync.F.R(),a,b,-1)}uw(a,b){this.F.la(olympe.dm.ub.L.R(),a,b,-1)}vw(a,b){this.F.la(olympe.dm.Ia.O.R(),a,b,-1)}ww(a,b){this.F.la(olympe.dm.Hb.C.R(),a,b,-1)}bc(a,b,c=!1){this.Ji('Updating instance ',a);delete b[olympe.dc.Pb.Pd];delete b[olympe.dc.Pb.VERSION];
|
|
844
|
-
const d=new Map;Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.bc(a,d,c,-1)}assign(a,b,c){this.ak(b,a,c)}fu(a,b,c){this.V.la(b,a,c,-1)}wu(a){return new olympe.dc.Ec(a)}su(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}tu({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,
|
|
844
|
+
const d=new Map;Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.bc(a,d,c,-1)}assign(a,b,c){this.ak(b,a,c)}fu(a,b,c){this.V.la(b,a,c,-1)}wu(a){return new olympe.dc.Ec(a)}su(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}tu({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,XB:g=0,lC:h=0}={}){const k={c:4};k.y=a;k.M=b;k.d=c;k.h=d;k.m=e;k.s=f;k.S=g;k.z=h;return k}Pu(a){a=new Date(Date.parse(a));const b={c:4};b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();b.h=a.getHours();
|
|
845
845
|
b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}uu(a){a='number'===typeof a?new Date(a):a;const b={c:4};b.h=a.getHours();b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=a.getTimezoneOffset();b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();return b}vi(a,b,c){return olympe.aa.zb.fe.vi(a,c)}bq(a,b){return olympe.aa.zb.fe.vi(a,b)}nb(){throw Error('DeleteRelation method on OSaveFile is deprecated');}oc(){throw Error('DeleteInstance method on OSaveFile is deprecated');
|
|
846
846
|
}};olympe.dc.Y.Aa.prototype.deleteInstance=olympe.dc.Y.Aa.prototype.oc;olympe.dc.Y.Aa.prototype.deleteRelation=olympe.dc.Y.Aa.prototype.nb;olympe.dc.Y.Aa.prototype.generateAuthenticationData=olympe.dc.Y.Aa.prototype.bq;olympe.dc.Y.Aa.prototype.generateAuthData=olympe.dc.Y.Aa.prototype.vi;olympe.dc.Y.Aa.prototype.createDateTimeLegacy=olympe.dc.Y.Aa.prototype.uu;olympe.dc.Y.Aa.prototype.fromISODate=olympe.dc.Y.Aa.prototype.Pu;olympe.dc.Y.Aa.prototype.createDateTime=olympe.dc.Y.Aa.prototype.tu;
|
|
847
847
|
olympe.dc.Y.Aa.prototype.createColor=olympe.dc.Y.Aa.prototype.su;olympe.dc.Y.Aa.prototype.createReference=olympe.dc.Y.Aa.prototype.wu;olympe.dc.Y.Aa.prototype.assignOptional=olympe.dc.Y.Aa.prototype.fu;olympe.dc.Y.Aa.prototype.assign=olympe.dc.Y.Aa.prototype.assign;olympe.dc.Y.Aa.prototype.updateInstance=olympe.dc.Y.Aa.prototype.bc;olympe.dc.Y.Aa.prototype.linkRoleToUser=olympe.dc.Y.Aa.prototype.ww;olympe.dc.Y.Aa.prototype.linkOperationToRole=olympe.dc.Y.Aa.prototype.vw;
|
|
848
|
-
olympe.dc.Y.Aa.prototype.linkGroupOfObjectsToOperation=olympe.dc.Y.Aa.prototype.uw;olympe.dc.Y.Aa.prototype.linkToGroupOfObjects=olympe.dc.Y.Aa.prototype.yw;olympe.dc.Y.Aa.prototype.defineRelation=olympe.dc.Y.Aa.prototype.pi;olympe.dc.Y.Aa.prototype.defineProperty=olympe.dc.Y.Aa.prototype.defineProperty;olympe.dc.Y.Aa.prototype.newPermissions=olympe.dc.Y.Aa.prototype.
|
|
849
|
-
olympe.dc.Y.Aa.prototype.newOperation=olympe.dc.Y.Aa.prototype.zq;olympe.dc.Y.Aa.prototype.newAbstractModel=olympe.dc.Y.Aa.prototype.
|
|
850
|
-
olympe.dc.Y.Aa.prototype.setUseNewTags=olympe.dc.Y.Aa.prototype.
|
|
848
|
+
olympe.dc.Y.Aa.prototype.linkGroupOfObjectsToOperation=olympe.dc.Y.Aa.prototype.uw;olympe.dc.Y.Aa.prototype.linkToGroupOfObjects=olympe.dc.Y.Aa.prototype.yw;olympe.dc.Y.Aa.prototype.defineRelation=olympe.dc.Y.Aa.prototype.pi;olympe.dc.Y.Aa.prototype.defineProperty=olympe.dc.Y.Aa.prototype.defineProperty;olympe.dc.Y.Aa.prototype.newPermissions=olympe.dc.Y.Aa.prototype.Nw;olympe.dc.Y.Aa.prototype.newRelation=olympe.dc.Y.Aa.prototype.ak;olympe.dc.Y.Aa.prototype.newUser=olympe.dc.Y.Aa.prototype.Ow;
|
|
849
|
+
olympe.dc.Y.Aa.prototype.newOperation=olympe.dc.Y.Aa.prototype.zq;olympe.dc.Y.Aa.prototype.newAbstractModel=olympe.dc.Y.Aa.prototype.Lw;olympe.dc.Y.Aa.prototype.newModel=olympe.dc.Y.Aa.prototype.Mw;olympe.dc.Y.Aa.prototype.newInstance=olympe.dc.Y.Aa.prototype.Pg;olympe.dc.Y.Aa.prototype.setRootInstanceTag=olympe.dc.Y.Aa.prototype.tx;olympe.dc.Y.Aa.prototype.setDefaultGroupOfObjects=olympe.dc.Y.Aa.prototype.lx;olympe.dc.Y.Aa.prototype.disableChecks=olympe.dc.Y.Aa.prototype.Au;
|
|
850
|
+
olympe.dc.Y.Aa.prototype.setUseNewTags=olympe.dc.Y.Aa.prototype.vx;olympe.dc.Y.Aa.prototype.assignTag=olympe.dc.Y.Aa.prototype.Pp;olympe.dc.Y.Aa.prototype.logError=olympe.dc.Y.Aa.prototype.uq;olympe.dc.Y.Aa.prototype.logWarn=olympe.dc.Y.Aa.prototype.vq;olympe.dc.Y.Aa.prototype.logDebug=olympe.dc.Y.Aa.prototype.Ji;olympe.dc.Y.Aa.prototype.log=olympe.dc.Y.Aa.prototype.log;olympe.dc.Y.Aa.prototype.setLoggingEnabled=olympe.dc.Y.Aa.prototype.px;olympe.dc.Y.Aa.prototype.getRootInstanceTag=olympe.dc.Y.Aa.prototype.Tv;
|
|
851
851
|
olympe.dc.Y.Aa.prototype.flushContents=olympe.dc.Y.Aa.prototype.Lu;olympe.dc.Y.Aa.prototype.getDefaultGroupOfObjects=olympe.dc.Y.Aa.prototype.eq;olympe.dc.Y.Vc=class extends olympe.dc.Y.Ab{constructor(a,b){super(a,b);this.F=0;this.ek(olympe.dc.Ca(olympe.dm.Ia))}Kp(){Y(this);this.F|=1;this.G.set(olympe.dm.Ia.G.R(),this.F);return this}Hp(){Y(this);this.F|=2;this.G.set(olympe.dm.Ia.G.R(),this.F);return this}Np(){Y(this);this.F|=4;this.G.set(olympe.dm.Ia.G.R(),this.F);return this}Ip(){Y(this);this.F|=8;this.G.set(olympe.dm.Ia.G.R(),this.F);return this}Jp(){Y(this);this.F|=16;this.G.set(olympe.dm.Ia.G.R(),this.F);return this}St(){this.Kp().Ip().Hp().Jp().Np();
|
|
852
852
|
return this}gu(a){this.mi(olympe.dm.ub.L.R(),a);return this}hu(a){this.Mj(olympe.dm.Ia.O.R(),a);return this}};olympe.dc.Y.Vc.prototype.associateToRole=olympe.dc.Y.Vc.prototype.hu;olympe.dc.Y.Vc.prototype.associateToGoo=olympe.dc.Y.Vc.prototype.gu;olympe.dc.Y.Vc.prototype.addAllPermissions=olympe.dc.Y.Vc.prototype.St;olympe.dc.Y.Vc.prototype.addLinkPermission=olympe.dc.Y.Vc.prototype.Jp;olympe.dc.Y.Vc.prototype.addDeletePermission=olympe.dc.Y.Vc.prototype.Ip;
|
|
853
|
-
olympe.dc.Y.Vc.prototype.addWritePermission=olympe.dc.Y.Vc.prototype.Np;olympe.dc.Y.Vc.prototype.addCreatePermission=olympe.dc.Y.Vc.prototype.Hp;olympe.dc.Y.Vc.prototype.addReadPermission=olympe.dc.Y.Vc.prototype.Kp;olympe.dc.Y.If=class extends olympe.dc.Y.Uc{constructor(a,b,c){super(a,b);this.F=this.description=null;this.setProperty(olympe.dm.BrickMetadata.xb.R(),olympe.dm.BrickMetadata.fd.Zs);null!==c&&this.Lp(c)}Lp(a){this.Pi(a);this.mi(olympe.dm.Ob.G.R(),a);return this}
|
|
854
|
-
this.description&&a.setProperty(olympe.sc.tc.C.R(),this.description),this.F&&a.setProperty(olympe.sc.tc.L.R(),this.F),a.Pi(this.tag).Mp(this.tag).Mj(olympe.sc.tc.G.R(),this.tag).done(),this.C.pop()}};olympe.dc.Y.If.prototype.setSummary=olympe.dc.Y.If.prototype.
|
|
853
|
+
olympe.dc.Y.Vc.prototype.addWritePermission=olympe.dc.Y.Vc.prototype.Np;olympe.dc.Y.Vc.prototype.addCreatePermission=olympe.dc.Y.Vc.prototype.Hp;olympe.dc.Y.Vc.prototype.addReadPermission=olympe.dc.Y.Vc.prototype.Kp;olympe.dc.Y.If=class extends olympe.dc.Y.Uc{constructor(a,b,c){super(a,b);this.F=this.description=null;this.setProperty(olympe.dm.BrickMetadata.xb.R(),olympe.dm.BrickMetadata.fd.Zs);null!==c&&this.Lp(c)}Lp(a){this.Pi(a);this.mi(olympe.dm.Ob.G.R(),a);return this}ox(a){this.G.set(olympe.dm.Zd.hb.R(),a);return this}mx(a){Y(this);this.description=a;return this}ux(a){Y(this);this.F=a;return this}L(a){super.L(a);if(null!==this.description||null!==this.F)this.C.push(),a=this.C.Pg(this.C.fm(this.tag),olympe.sc.tc.P.R()),
|
|
854
|
+
this.description&&a.setProperty(olympe.sc.tc.C.R(),this.description),this.F&&a.setProperty(olympe.sc.tc.L.R(),this.F),a.Pi(this.tag).Mp(this.tag).Mj(olympe.sc.tc.G.R(),this.tag).done(),this.C.pop()}};olympe.dc.Y.If.prototype.setSummary=olympe.dc.Y.If.prototype.ux;olympe.dc.Y.If.prototype.setDescription=olympe.dc.Y.If.prototype.mx;olympe.dc.Y.If.prototype.setIcon=olympe.dc.Y.If.prototype.ox;olympe.dc.Y.If.prototype.addToFolder=olympe.dc.Y.If.prototype.Lp;olympe.dc.Y.zt=class a{constructor(b,c,d){this.F=b;this.sa=c||[];this.C=d||[]}static C(b,c,d){if(c instanceof olympe.dc.transaction.re&&d instanceof olympe.dc.transaction.re){c=ce(c);var e=ce(d)}else e=new olympe.dc.transaction.re(!0),c.gd(e),c=ce(e),d.gd(e),e=ce(e);d=new Map;var f=new a(b,c.Qf,e.Qf);f.kf()||d.set('delRel',f);f=new a(b,c.ye,e.ye);f.kf()||d.set('detInst',f);f=new a(b,c.bg,e.bg);f.kf()||d.set('newInst',f);f=new a(b,c.sf,e.sf);f.kf()||d.set('updateInst',f);b=new a(b,c.cg,e.cg);b.kf()||
|
|
855
855
|
d.set('newRel',b);return d}kf(){return 0===this.sa.length+this.C.length}G(){const b=(d,e)=>{var f=d.o,g=e.o;return f!==g?f<g?-1:1:1===f||2===f||3===f?(f=d.t,g=e.t,f===g?(d=Object.keys(d.p)[0],e=Object.keys(e.p)[0],void 0!==d?d.localeCompare(e):1):f.localeCompare(g)):4===f||5===f?(f=d.l,g=e.l,f===g?(f=d.m,g=e.m,f===g?d.r.localeCompare(e.r):f.localeCompare(g)):f.localeCompare(g)):JSON.stringify(f).localeCompare(JSON.stringify(g))},c=Object.create(null);c.rootTag=this.F;c.operations=this.sa.sort(b);
|
|
856
|
-
c.optionalOperations=this.C.sort(b);return c}};olympe.dc.Y.Ze=class extends olympe.dc.Y.Ab{constructor(a,b){super(a,b);this.F=this.O=null;this.ek(olympe.dc.Ca(olympe.dm.User))}
|
|
857
|
-
c=new Map;c.set(olympe.dm.User.loginProp.R(),b.login);c.set(olympe.dm.User.saltProp.R(),b.salt);c.set(olympe.dm.User.verifierProp.R(),b.verifier);ug(this.C).bc(this.R(),c,!1,a)}};olympe.dc.Y.Ze.prototype.awardRole=olympe.dc.Y.Ze.prototype.iu;olympe.dc.Y.Ze.prototype.setDomain=olympe.dc.Y.Ze.prototype.
|
|
856
|
+
c.optionalOperations=this.C.sort(b);return c}};olympe.dc.Y.Ze=class extends olympe.dc.Y.Ab{constructor(a,b){super(a,b);this.F=this.O=null;this.ek(olympe.dc.Ca(olympe.dm.User))}wx(a){Y(this);this.O=a;return this}rm(a){Y(this);this.F=a;return this}nx(){return this}iu(a){Y(this);this.mi(olympe.dm.User.C.R(),a);return this}L(a){super.L(a);if(null==this.O||''===this.O)throw Error('A username must be set when calling new User');if(null==this.F||''===this.F)throw Error('A password must be set when calling new User');const b=this.C.bq(this.O,this.F),
|
|
857
|
+
c=new Map;c.set(olympe.dm.User.loginProp.R(),b.login);c.set(olympe.dm.User.saltProp.R(),b.salt);c.set(olympe.dm.User.verifierProp.R(),b.verifier);ug(this.C).bc(this.R(),c,!1,a)}};olympe.dc.Y.Ze.prototype.awardRole=olympe.dc.Y.Ze.prototype.iu;olympe.dc.Y.Ze.prototype.setDomain=olympe.dc.Y.Ze.prototype.nx;olympe.dc.Y.Ze.prototype.setPassword=olympe.dc.Y.Ze.prototype.rm;olympe.dc.Y.Ze.prototype.setUsername=olympe.dc.Y.Ze.prototype.wx;olympe.dc.Y.T={Sr:'dc.io.IOService',dh:'dc.io.IOUrlsProvider'};olympe.U.Ib(function(a){ra(a,olympe.dc.Y.T.dh);B(a,olympe.dc.Y.T.Sr,[olympe.ua.T.ta,olympe.Da.T.ta,olympe.aa.T.ta,olympe.dc.Y.T.dh],b=>new olympe.dc.Y.ao(b.Gc('dc.io')))},'olympe.dc.io');olympe.dc.Y.SB=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.og.bd)&&(a=a.substring(1));const d=olympe.dc.Ua();return b?c?Fd(d,a,b):Fd(d,a,d.model(b)):d.Fb(a)};olympe.Ya={};olympe.Ya.Kf=class{da(){}Rc(){}na(){}ja(){}ca(){}close(){}};olympe.Ya.ra={vt:1,Xs:2,cz:3,sk:4,oy:5};olympe.Ya.hh=class{constructor(a,b,c,d){this.N=a;this.fb=new olympe.D.lc('Local source');this.F=new Map;this.ya=b;this.C=c;this.Ea=this.G=null;this.O=this.L=!1;d.get('syncTimeout');d.get('autoSync')&&this.hb();d.get('autoPersist')&&this.Xa()}xb(a){this.Ea=a}Qc(a){const b=olympe.D.Ja().vb(a);a=new olympe.async.di;a.add((c,d)=>{this.V(e=>e?d(e.message):c())});a.add((c,d)=>{this.Qa(e=>{e?d(e.message):c()})});a.add((c,d)=>{this.C.storage.F(d)});Ab(a,(c,d)=>{b(c?null:Error(d))});a.start()}$b(a,b,c,d,e){const f=
|
|
858
858
|
olympe.dc.ma.ra.yl,g=olympe.dc.ma.ra.zk,h=new olympe.dc.db.Dc,k=new olympe.async.Ff(olympe.D.Ja()),m=(n,p,q)=>{const r=n.tag(),t=n.Gb(olympe.dm.File.mimeTypeProp.R());Hb(this.C,v=>{olympe.dc.nv().ke(r,v,t,u=>{n.Ba(olympe.dm.File.urlProp.R(),u);const x=new Map;x.set(olympe.dm.File.urlProp.R(),u);h.bc(r,x);this.C.storage.C(q)})})};for(const n of c)(c=a.Qb(n))&&c.He()&&k.add(m.bind(this,c));Ab(k,(n,p)=>{n?(n=zc(new olympe.dc.ma(f,a,[b.da()]),q=>{q?e(q.message):(this.G(b.da(),g,h),q=Array.from(a.md()).map(r=>
|
|
859
|
-
r.tag()),olympe.dc.Wc().persist(q),d())}),b.na(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}
|
|
859
|
+
r.tag()),olympe.dc.Wc().persist(q),d())}),b.na(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Qa(a){const b=olympe.async.di.create(),c=b.G;b.add((d,e)=>{this.C.storage.F(e)});b.add((d,e,f)=>{const g=olympe.dc.La.jb,h=f.get('files'),k=new olympe.async.Ff(c);this.F.forEach((m,n)=>{if(n!==g){const p=this.Ea.L(n);null!==p?(k.add(this.$b.bind(this,m,p,h)),this.C.storage.C(void 0)):e(`The source: ${n} is not reachable.`)}});Ab(k,(m,n)=>{m?d():e(n||void 0)});k.start()});Ab(b,(d,e)=>{a(d?
|
|
860
860
|
null:Error(e));d&&(this.O=!1,this.F.clear())});b.start()}V(a){const b=new olympe.async.di(olympe.D.Ja());b.add((c,d)=>{Eb(this.C,e=>null===e?c():d(e))});b.add(c=>{const d=olympe.dc.Wc();this.F.forEach((e,f)=>{const g=Array.from(e.md()).map(h=>h.tag());Mc(d,e,g,[],f)(!0)});c()});Ab(b,(c,d)=>{a(d?Error(d):null)});b.start()}da(){return olympe.dc.La.jb}Rc(){return''}na(a){var b=olympe.dc.ma.ra.hi,c=olympe.dc.ma.ra.Ug;const d=olympe.dc.ma.ra.Ph,e=olympe.dc.ma.ra.Oh,f=olympe.dc.ma.ra.ng,g=olympe.dc.ma.ra.Lk,
|
|
861
861
|
h=olympe.dc.ma.ra.Hj,k=olympe.dc.ma.ra.Bk,m=olympe.dc.ma.ra.aj;var n=olympe.dc.ma.ra.Gk;const p=a.type;switch(p){case f:a.validate(null);this.C.storage.G(void 0);this.V(u=>{null!==u&&this.N.error(`Could not load transactions: ${u.message}`)});break;case b:case c:const q=a.content;a.C.forEach(u=>{let x=this.F.get(u);void 0===x&&(x=new olympe.dc.db.Dc,this.F.set(u,x));q.gd(x);this.L&&(this.O=!0)});a.validate(null);a=olympe.dc.transaction.zg.C.xo;this.G(olympe.dc.La.jb,n,{id:q.da(),finalize:a});break;
|
|
862
862
|
case e:case d:const r=a.C[0],t=a.content;a.validate(null);Cb(this.C,t.da(),u=>{this.N.warn('No graphresult for subscription : '+t.da(),u,'\n',t.Lg.toJSON());this.N.warn();this.G(r,g,new olympe.dc.query.Rh(t.da(),r,olympe.dc.La.jb,new olympe.dc.db.Dc))});break;case h:case m:case k:n=a.content;b=n.file;const v=n.Rg;c=n.eg;p===h?Gb(this.C,b,n.content,n.mimeType,v,c):p===m?Hb(this.C,u=>{v(u)}):this.C.storage.C(c);a.validate(null)}}ja(a){this.G=a}ca(){}close(){this.fb.gb()}hb(){olympe.D.rc([Qb(this.ya)],
|
|
863
|
-
a=>{if(a.valueOf()){const b=this.F.keys();this.
|
|
863
|
+
a=>{if(a.valueOf()){const b=this.F.keys();this.Qa(c=>{if(c)this.N.error('An error occurred while auto synchronising:\n'+c.message);else if(this.N.debug('Auto synchronise transactions successfully'),this.L)for(const d of b)Fb(this.C,e=>{this.N.error(`Could not clear transactions for ${d}: ${e}.`)})})}})}Xa(){let a;olympe.D.rc([Qb(this.ya)],b=>{b.valueOf()?(this.L=!1,a&&(ec(a),a=null)):(this.L=!0,a=dc(()=>{if(this.O){this.O=!1;for(const c of this.F.keys())Db(this.C,c,this.F.get(c),()=>{},d=>{this.N.error(`Could persist transaction for ${c}: ${d}`)})}},
|
|
864
864
|
5E3))})}};olympe.Ya.hh.C='context';olympe.Ya.hh.ka=[olympe.Ya.Kf];function xg(a,b){const c=b.da();a.C[c]?a.N.error('Attempt to register a source twice'):(a.C[c]=b,a.N.debug(`New source '${c}' added to the router.`))}olympe.Ya.wa=class{constructor(a){this.N=a;this.C=Object.create(null);this.F=Object.create(null)}forEach(a){const b=Object.keys(this.C);for(let c=0,d=b.length;c<d;c++)a(this.C[b[c]])}};olympe.Ya.Bj=class{C(){}};olympe.Ya.Buffer=class{constructor(){this.counter=0;this.fc=new Map}buffer(a){const b=this.counter++;this.fc.set(b,a);return this.clear.bind(this,b)}clear(a){this.fc.delete(a)}};olympe.Ya.Hf=class a{constructor(b,c,d,e,f,g){this.N=b;this.V=c;this.ca=new olympe.Ya.Buffer(this);this.za=d;this.G=this.$b(g);this.Xa=e;this.fb=new olympe.D.lc('Data Router context');this.F=new Map;this.na=new Map;this.hb(f)}hb(b){this.N.info('Initializing DR layer');xg(this.za,b);b.ja(this.Ea.bind(this));b.ca(this.ja.bind(this));b.xb(this);this.O((c,d)=>{this.N.debug('Source event occurred',d,'fired by source',c);if(d===olympe.dc.ei.$n&&(d=this.za,d.C[c])){const e=d.C[c];delete d.F[c];delete d.C[c];
|
|
865
|
-
e.close();d.N.debug('Peer connection closed :',c)}});olympe.D.Uj(Qb(this.V),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const c of this.ca.fc.values())this.
|
|
866
|
-
b)}Ea(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}L(b,c=!0){let d=this.za.C[b]||null;if(!c||null!==d)return d;d=this.fb.run(()=>this.Xa.C(b,this));xg(this.za,d);return d}ja(b,c){this.na.forEach(d=>{d(b,c)})}
|
|
865
|
+
e.close();d.N.debug('Peer connection closed :',c)}});olympe.D.Uj(Qb(this.V),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const c of this.ca.fc.values())this.Qa(c)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){zc(b,this.ca.buffer(b));this.Qa(b)}ya(b){return(b=this.L(b))?b.Rc():''}C(b,c){const d=olympe.$.Rb();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}O(b){this.na.set(olympe.$.Sf(),
|
|
866
|
+
b)}Ea(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}L(b,c=!0){let d=this.za.C[b]||null;if(!c||null!==d)return d;d=this.fb.run(()=>this.Xa.C(b,this));xg(this.za,d);return d}ja(b,c){this.na.forEach(d=>{d(b,c)})}Qa(b){this.N.debug('Processing message',b.toString());const c=b.type!==olympe.dc.ma.ra.xl&&b.type!==olympe.dc.ma.ra.Kk;this.xb(b).forEach(d=>{(d=this.L(d,c))&&d.na(b)})}xb(b){var c=olympe.dc.ma.ra.ng,d=olympe.dc.ma.ra.Oh,e=olympe.dc.ma.ra.Ph,f=olympe.dc.ma.ra.hi,g=olympe.dc.ma.ra.Ug;
|
|
867
867
|
const h=olympe.dc.ma.ra.Hj,k=olympe.dc.ma.ra.Bk,m=olympe.dc.ma.ra.aj;switch(b.type){case c:e=this.G.get(a.C.ng)||[];break;case d:case e:e=this.G.get(a.C.ol)||[];break;case f:case g:e=this.G.get(a.C.Ht)||[];break;case h:case m:case k:e=this.G.get(a.C.yr)||[];break;default:e=[]}c=b.content;d=!Rb(this.V);for(var n of e)if(e=n,f=c&&c.da&&c.da(),g=e.get('type'),g===a.F.el&&d||g===a.F.Qn&&e.get('id')===f||g===a.F.bd)return n=n.get('destinations'),this.N.debug('Message',b.toString(),'is redirect to',n),
|
|
868
868
|
n;this.N.debug('Message',b.toString(),'not redirect');return b.C}$b(b){const c=Object.values(olympe.Ya.Hf.C),d=Object.values(olympe.Ya.Hf.F);b=Object.entries(b);const e=new Map;b.forEach(([f,g])=>{if(c.includes(f))if(g instanceof Array){var h=[];e.set(f,h);g.forEach(k=>{const m=k.type;if(d.includes(m)){var n=k.destinations;n instanceof Array?(n=(new Map).set('type',m).set('destinations',n),h.push(n),m===a.F.Qn&&n.set('id',k.id)):this.N.error('Routing rule',f,m,'is not valid. Destinations must be stored in an array')}else this.N.error('Routing rule',
|
|
869
869
|
f,m,'is not valid. Valid rules are',d.toString())})}else this.N.error('Routing rule',f,'is not valid. Rules must be ordered in an array');else this.N.error('Routing rule',f,'is not valid. Valid messages are',c.toString())});return e}};olympe.Ya.Hf.C={ng:'getContext',ol:'query',Ht:'transaction',yr:'file'};olympe.Ya.Hf.F={bd:'default',el:'offline',Qn:'id'};olympe.Ya.Hf.ka=[olympe.dc.Hf];olympe.Ya.T={ta:'dr.Manager',Ha:'dr.Logger',ep:'dr.SourceRegistry',se:'dr.sources.Router',oh:'dr.sources.Factory',nj:'dr.sources.Local'};olympe.Ya.Z={Bm:'dr.autoSync',Am:'dr.autoPersist',jp:'dr.syncTimeout',Yo:'dr.routing'};
|
|
870
870
|
olympe.U.Ib(function(a){D(a,olympe.Ya.Z.Yo,{});D(a,olympe.Ya.Z.Bm,!1);D(a,olympe.Ya.Z.Am,!1);D(a,olympe.Ya.Z.jp,3E4);B(a,olympe.Ya.T.Ha,[olympe.ua.T.ta],b=>b.Gc('dr'));y(a,olympe.Ya.T.ep,olympe.Ya.wa,olympe.Ya.T.Ha);B(a,olympe.Ya.T.nj,[olympe.Ya.T.Ha,olympe.aa.T.ta,olympe.Vb.T.Zm,new olympe.U.ha(olympe.Ya.Z.Bm),new olympe.U.ha(olympe.Ya.Z.Am),new olympe.U.ha(olympe.Ya.Z.jp)],(b,c,d,e,f,g)=>{e=(new Map).set('autoSync',e).set('autoPersist',f).set('syncTimeout',g);return new olympe.Ya.hh(b,c,d,e)});
|
|
871
|
-
y(a,olympe.Ya.T.se,olympe.Ya.Hf,olympe.Ya.T.Ha,olympe.aa.T.ta,olympe.Ya.T.ep,olympe.Ya.T.oh,olympe.Ya.T.nj,new olympe.U.ha(olympe.Ya.Z.Yo));qa(a,olympe.dc.T.se,olympe.Ya.T.se);ra(a,olympe.Ya.T.oh);B(a,olympe.dc.query.ic.mj,[olympe.dc.query.ic.mj],b=>new olympe.dc.nl(b))},'olympe.dr');olympe.H={};olympe.H.xc={Xg:1,wf:2,wc:3,Se:4,fr:5,Sh:6,
|
|
871
|
+
y(a,olympe.Ya.T.se,olympe.Ya.Hf,olympe.Ya.T.Ha,olympe.aa.T.ta,olympe.Ya.T.ep,olympe.Ya.T.oh,olympe.Ya.T.nj,new olympe.U.ha(olympe.Ya.Z.Yo));qa(a,olympe.dc.T.se,olympe.Ya.T.se);ra(a,olympe.Ya.T.oh);B(a,olympe.dc.query.ic.mj,[olympe.dc.query.ic.mj],b=>new olympe.dc.nl(b))},'olympe.dr');olympe.H={};olympe.H.xc={Xg:1,wf:2,wc:3,Se:4,fr:5,Sh:6,wz:7};olympe.H.ra={Sh:1,Mt:2,xr:3,Uh:5};olympe.H.qa=class{O(){}connect(){}Ng(){}je(){}fd(){}Sd(){}zd(){}G(){}Rf(){}Be(){}Ea(){}Ei(){}yq(){}Aq(){}};olympe.H.qa.C={INIT:'initialize',CONNECTING:'connecting',Ne:'disconnected',Wg:'connected',wc:'error'};olympe.H.qa.G={fl:1,Cr:-1,Rr:-2,Ft:-3};function yg(a,b,c,d,e,f){const g=ic(a.L+'/'+b,olympe.Da.Wb.Yh.Mo,c,olympe.Da.Wb.ResponseType.mk);jc(g,{Authorization:olympe.D.Ta(Tb(a.F)),[olympe.Da.Wb.Headers.Xm]:d||'application/octet-stream'});a.G.Ge(g,h=>{h=h.status;h===olympe.Da.Wb.Ve.fl||h===olympe.Da.Wb.Ve.Rm?(h=new URL(g.C()),e(h.pathname)):f&&(h=`Failed to create file ${b}. Response code ${h}`,a.N.error(h),f(h))})}
|
|
872
872
|
function zg(a,b,c,d,e,f){const g=olympe.D.Ja();e={Rg:g.vb(e),eg:f&&g.vb(f)};if(a.C.has(b))a.C.get(b).push(e);else{a.C.set(b,[e]);if(null===c){var h=ic(a.L+'/'+b);jc(h,{Authorization:olympe.D.Ta(Tb(a.F))})}else h=ic(c);h.F=olympe.Da.Wb.ResponseType.mk;jc(h,{[olympe.Da.Wb.Headers.Xm]:d||'application/octet-stream'});a.O.run(()=>{a.G.Ge(h,k=>{const m=k.status,n=a.C.get(b);if(200<=m&&300>m){const p=k.data;n&&n.forEach(q=>{if(g.Kb()){const r=g.Qj(),t=g.da();a.N.warn(`Context ${r} ${t} is being destroyed while file tag ${b} is being downloaded`)}q.Rg(p)})}else{const p=
|
|
873
873
|
`Failed to download file ${b}. Response code ${m}`;n&&n.forEach(q=>{q.eg&&q.eg(p)})}a.C.delete(b)})})}}function Ag(a,b,c,d){const e=ic(a.L+'/'+b,olympe.Da.Wb.Yh.DELETE);jc(e,{Authorization:olympe.D.Ta(Tb(a.F))});a.G.Ge(e,f=>{f=f.status;200<=f&&300>f?c():(f=`Failed to delete file ${b}. Response code ${f}`,a.N.error(f),d&&d(f))})}olympe.H.Ar=class{constructor(a,b,c,d){this.N=a;this.G=b;this.F=c;this.L=d;this.C=new Map;this.O=new olympe.D.lc('File manager context')}};const Bg=olympe.dc.ma.ra.ng,Cg=olympe.dc.ma.ra.hi,Dg=olympe.dc.ma.ra.yl,Eg=olympe.dc.ma.ra.Ug,Fg=olympe.dc.ma.ra.gp,Gg=olympe.dc.ma.ra.xl,Hg=olympe.dc.ma.ra.Oh,Ig=olympe.dc.ma.ra.Ph,Jg=olympe.dc.ma.ra.Kk,Kg=olympe.dc.ma.ra.Gn,Lg=olympe.dc.ma.ra.Lk,Mg=olympe.dc.ma.ra.Bk,Ng=olympe.dc.ma.ra.aj,Og=olympe.dc.ma.ra.Hj,Pg=olympe.dc.ma.ra.Gk,Qg=olympe.dc.ma.ra.Lt,Rg=olympe.dc.ma.ra.it,Sg=olympe.dc.ma.ra.Dr,Tg=olympe.dc.ma.ra.Yq,Ug=olympe.dc.ma.ra.cr;
|
|
874
874
|
function Vg(a){a.F.Ea(olympe.H.xc.Xg,a.Xa.bind(a));olympe.D.rc([Qb(a.L)],b=>{b=b.valueOf()?olympe.dc.ei.Do:olympe.dc.ei.el;a.V&&a.V(a.id,b)},'Server source is online')}function Wg(a,b,c){const d=new olympe.dc.transaction.re(!0);b.gd(d);Xg(a,a.$b,Cg,!0,de(d),e=>{c&&c(e);a.C(olympe.dc.La.dd,Pg,{id:b.da(),finalize:olympe.dc.transaction.zg.C.Ps})})}
|
|
875
|
-
function Yg(a,b,c,d){const e=c.da();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Tk?a.hb:a.
|
|
875
|
+
function Yg(a,b,c,d){const e=c.da();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Tk?a.hb:a.Qa,g=(new olympe.H.X.ej).oa(c);c=new olympe.async.Ff(a.O);b===Ig&&c.add((k,m)=>{a.G.set(e,{notification:null,Yw:a.O.vb(n=>n?m(n):k())});Z(a,b,g,n=>n&&m(n.message))});const h=olympe.D.Ja();c.add((k,m)=>{h.run(()=>{Xg(a,f,Hg,!1,g,a.O.vb(n=>n?m(n.message):k()))})});Ab(c,(k,m)=>{const n=a.G.get(e);k&&n&&n.notification?a.C(a.id,Kg,n.notification):!k&&n&&Zg(a,Jg,e,p=>p&&a.N.warn(p));
|
|
876
876
|
a.G.delete(e);k&&b===Ig&&a.F.yq(e);d(m?Error(m):null)});c.start()}function Zg(a,b,c,d){a.N.log('Unsubscribe to: ',c);a.F.Aq(c);Z(a,b,{i:c},d)}
|
|
877
877
|
function $g(a,b,c,d){const e=new olympe.dc.query.No,f=c.da();var g=c.kd();let h=g;olympe.D.Za(g)&&(h=e.add(g));let k;try{k=ah(a,c.jf(),e)}catch(n){d(Error(`serialization failed for subscription "${f}": ${n.message}`));return}const m=olympe.H.Kf.C.Qr;g=bh(e);c={i:c.da(),y:m,b:h};k&&(c.q=k);g&&(c.p=g);Z(a,b,c,d);e.forEach((n,p)=>{olympe.D.Za(n)&&olympe.D.rc([n],q=>ch(a,f,dh(p,q),r=>null!==r&&a.N.warn(r)))})}function Z(a,b,c,d){b={c:b};Object.assign(b,c);a.F.G(olympe.H.xc.Xg,b,d&&(e=>{d(e)}))}
|
|
878
878
|
function Xg(a,b,c,d,e,f){if(a.F.O()){const g=olympe.H.xc.Xg;!d&&e&&Object.assign(e,{c});c=olympe.D.Ta(Tb(a.L)).valueOf();a.F.Rf(b,g,c,d,e,f)}else a.N.error('Server is disconnected, data request of type',c,'on url',b,'is canceled.'),f(Error('Server is disconnected'))}function ah(a,b,c){return b&&0<b.length?eh(a.xb,b,c):null}function ch(a,b,c,d){c&&Z(a,olympe.dc.ma.ra.xt,{i:b,p:c},d)}
|
|
879
|
-
olympe.H.Kf=class{constructor(a,b,c,d,e,f){this.id=a;this.N=b;this.F=c;this.L=e;this.xb=new olympe.H.X.pl;this.V=this.C=null;this.O=new olympe.D.lc('Server source context');this.ya=new olympe.dc.$.Ho(this.id);this.Ea=new olympe.H.Ar(this.N,d,this.L,f[0]);if(7!==f.length)throw Error('Some HTTP end points to the orchestrator are not specified ! Please check DI of olympe.communication module; wants 7 urls but got: '+f.length);this.fb=f[3];this.hb=f[4];this.
|
|
879
|
+
olympe.H.Kf=class{constructor(a,b,c,d,e,f){this.id=a;this.N=b;this.F=c;this.L=e;this.xb=new olympe.H.X.pl;this.V=this.C=null;this.O=new olympe.D.lc('Server source context');this.ya=new olympe.dc.$.Ho(this.id);this.Ea=new olympe.H.Ar(this.N,d,this.L,f[0]);if(7!==f.length)throw Error('Some HTTP end points to the orchestrator are not specified ! Please check DI of olympe.communication module; wants 7 urls but got: '+f.length);this.fb=f[3];this.hb=f[4];this.Qa=f[5];this.$b=f[6];this.G=new Map;Vg(this)}da(){return this.id}Rc(){return olympe.D.Ta(this.L.Yf())}na(a){var b=
|
|
880
880
|
a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Bg:Xg(this,this.fb,olympe.dc.ma.ra.ng,!1,null,c);break;case Eg:b=new olympe.dc.transaction.re;var d=a.Bc;a=a.nf;d.gd(b);Z(this,olympe.dc.ma.ra.Ug,{i:d.da(),r:a,p:de(b)});c(null);break;case Cg:b=new olympe.dc.transaction.re;d=a.Bc;a=a.nf;d.gd(b);Z(this,olympe.dc.ma.ra.hi,{i:d.da(),r:a,p:de(b)},c);break;case Dg:Wg(this,a.Bc,c);break;case Hg:case Ig:Yg(this,b,a,c);break;case Jg:Zg(this,b,a,c);break;case Fg:$g(this,b,a,c);break;case Gg:Z(this,
|
|
881
881
|
b,{i:a},c);break;case Qg:Z(this,Qg,{},c);break;case Rg:Z(this,Rg,{},c);break;case Sg:Z(this,Sg,{},c);break;case Tg:Z(this,Tg,a,c);break;case Ug:Z(this,Ug,{},c);break;case Ng:case Mg:case Og:b===Ng?zg(this.Ea,a.file,a.url,a.mimeType,a.Rg,a.eg):b===Og?yg(this.Ea,a.file,a.content,a.mimeType,a.Rg,a.eg):Ag(this.Ea,a.file,a.Rg,a.eg);c();break;default:this.N.info(`Message of type ${b} not supported yet`)}}ja(a){this.C=a}ca(a){this.V=a}close(){this.V(this.id,olympe.dc.ei.$n);this.O.gb()}Xa(a){var b=olympe.dc.ma.ra.zk,
|
|
882
882
|
c=olympe.dc.ma.ra.Hm;const d=olympe.dc.ma.ra.rj,e=olympe.dc.ma.ra.wt;var f=olympe.dc.ma.ra.ho;const g=olympe.dc.ma.ra.Er,h=a.c;h===b?(a=this.ya.F(a.p),this.C(this.id,b,a)):h===c?(b=a.error.reason,f=this.ya.F(a.p),this.C(this.id,c,{id:a.i,rollback:f,error:b})):h===Lg?(c=olympe.dc.La.jb,b=olympe.dc.La.dd,f=a.i,0<a.s?c=new olympe.dc.query.si.gj(f,b,c,a.info.error.reason):(c=this.ya.O(f,c,a.p),this.N.debug('< Graphdef Result (ID ',c.da(),'):',a.p),this.N.log('< Graphdef Result (ID ',c.da(),') with',c.F().zc(),
|
|
883
|
-
'operations')),this.C(this.id,Lg,c)):h===Kg?(c=a.i,a=this.ya.L(c,a.p),this.G.has(c)?(c=this.G.get(c),c.notification?Ge(a,c.notification):c.notification=a):this.C(this.id,Kg,a)):h===f?(c=new olympe.dc.query.no(a.i),a.l.forEach(c.F.bind(c)),this.C(this.id,f,c)):h===d?this.C(this.id,Pg,{id:a.i,finalize:olympe.dc.transaction.zg.C.rj,error:0<a.s?a.info.error.reason:null}):h===e?(c=this.G.get(a.i))&&c.
|
|
884
|
-
olympe.H.Kf.C={Qr:1,
|
|
883
|
+
'operations')),this.C(this.id,Lg,c)):h===Kg?(c=a.i,a=this.ya.L(c,a.p),this.G.has(c)?(c=this.G.get(c),c.notification?Ge(a,c.notification):c.notification=a):this.C(this.id,Kg,a)):h===f?(c=new olympe.dc.query.no(a.i),a.l.forEach(c.F.bind(c)),this.C(this.id,f,c)):h===d?this.C(this.id,Pg,{id:a.i,finalize:olympe.dc.transaction.zg.C.rj,error:0<a.s?a.info.error.reason:null}):h===e?(c=this.G.get(a.i))&&c.Yw(0<a.s?a.info.error.reason:null):h===g&&this.C(this.id,g,{PB:a.ids,mC:a.undo_stack_size,hC:a.redo_stack_size})}};
|
|
884
|
+
olympe.H.Kf.C={Qr:1,eA:2};olympe.H.Kf.F={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.Kf.ka=[olympe.Ya.Kf];olympe.H.Bj=class{constructor(a,b,c,d,e){this.N=a;this.O=b;this.G=c;this.F=d;this.L=e}C(a,b){a=new olympe.H.Kf(a,this.N,this.O,this.G,this.F,this.L);a.ja(b.Ea.bind(b));a.ca(b.ja.bind(b));return a}};olympe.H.Bj.ka=[olympe.Ya.Bj];olympe.H.hj=class{constructor(){}};olympe.H.hj.ka=[olympe.dc.Y.hj];olympe.H.Ga={};function fh(a){return new Promise(b=>a.C.end(!1,()=>b()))}function gh(a,b,c){oc(a.C,b,d=>{d=new olympe.H.Ga.fc.Request(d.dest,d.src,d.auth,d.seq,d.type,d.content);return c(d)})}function hh(a,b,c){a.G.set(b,c)}function ih(a,b){return new Promise((c,d)=>{pc(a.C,b,e=>e?d(e):c())})}function jh(a,b){return new Promise((c,d)=>{a.O.Kg(b.Ed(),(e,f)=>e?d(e):c(f))})}
|
|
885
885
|
olympe.H.Ga.qa=class{constructor(a,b,c,d){this.N=a;this.O=c;this.G=new Map;a=d.get('url');d=d.get('connectionOptions');this.C=new olympe.Da.qj(a,d);this.F=1;this.L=olympe.$.Rb()}connect(){return new Promise(a=>{mc(this.C)?a():this.C.connect(()=>{oc(this.C,this.L,b=>{b=new olympe.H.Ga.fc.Response(b.dest,b.src,b.seq,b.type,b.content);const c=this.G.get(b.G);c&&c(b);this.G.delete(b.G)});a()})})}Sg(a,b,c){return new Promise((d,e)=>{const f=a.source,g=new olympe.H.Ga.fc.Response(f,this.L,a.F,b,c);nc(this.C,
|
|
886
886
|
f,g.oa(),h=>h?e(h):d())})}request(a,b,c){return new Promise((d,e)=>{const f=this.F;this.F++;var g=olympe.D.Ta(Tb(this.O));g=new olympe.H.Ga.fc.Request(a,this.L,g,f,b,c);nc(this.C,a,g.oa(),h=>h?e(h):d(f))})}notify(a,b,c){return new Promise((d,e)=>{var f=this.F;this.F++;f=new olympe.H.Ga.fc.Response(b,a,f,olympe.H.Ga.fc.Response.ra.ii,c);nc(this.C,b,f.oa(),g=>g?e(g):d())})}};olympe.H.Ga.fc={};olympe.H.Ga.fc.Request=class{constructor(a,b,c,d,e,f){this.F=d;this.L=a;this.source=b;this.G=c;this.O=e;this.C=f||null}Ed(){return this.G}oa(){return{dest:this.L,src:this.source,seq:this.F,auth:this.G,type:this.O.toString(),content:this.C}}toString(){return JSON.stringify(this)}};olympe.H.Ga.fc.Request.ra={Oe:'GET',Zq:'CALL',wg:'SUBSCRIBE'};olympe.H.Ga.fc.Response=class{constructor(a,b,c,d,e){this.G=c;this.L=a;this.source=b;this.F=d;this.C=e||null}oa(){return{dest:this.L,src:this.source,seq:this.G,type:this.F.toString(),content:this.C}}toString(){return JSON.stringify(this)}};olympe.H.Ga.fc.Response.ra={ii:'VALUE',vm:'ACK',wc:'ERROR'};olympe.H.Ga.cb={};olympe.H.Ga.cb.uc=class{constructor(a){this.C=olympe.H.Ga.mc();this.F=a;this.N=olympe.ua.rb(`Service ${this.F}`)}start(){return this.C.connect()}Yj(){return new rxjs.Observable(a=>{gh(this.C,this.F,b=>a.next(new olympe.H.Ga.cb.ma(b,this.C)));return()=>ih(this.C,this.F).catch(b=>this.N.error('Failed to unsubscribe from '+this.F+', error: '+b))})}stop(){return fh(this.C)}};olympe.H.Ga.cb.uc.prototype.stop=olympe.H.Ga.cb.uc.prototype.stop;olympe.H.Ga.cb.uc.prototype.listen=olympe.H.Ga.cb.uc.prototype.Yj;
|
|
887
887
|
olympe.H.Ga.cb.uc.prototype.start=olympe.H.Ga.cb.uc.prototype.start;olympe.H.Ga.cb.ir=class extends olympe.H.Ga.cb.uc{toString(){return`CallService with id ${this.F}`}};olympe.H.Ga.cb.Ln=class extends olympe.H.Ga.cb.uc{toString(){return`GetService with id ${this.F}`}};olympe.H.Ga.cb.fi=class extends olympe.H.Ga.cb.uc{constructor(a){super(a);this.bk=olympe.$.Rb()}Yj(){return new rxjs.Observable(a=>{gh(this.C,this.F,b=>{this.C.Sg(b,olympe.H.Ga.fc.Response.ra.ii,{bk:this.bk}).catch(c=>a.error(c));a.next()});return()=>ih(this.C,this.F).catch(b=>this.N.error('Failed to unsubscribe from a SubscribeService with error '+b))})}notify(a){return this.C.notify(this.F,this.bk,a)}};olympe.H.Ga.cb.fi.prototype.notify=olympe.H.Ga.cb.fi.prototype.notify;
|
|
@@ -889,12 +889,12 @@ olympe.H.Ga.cb.fi.prototype.listen=olympe.H.Ga.cb.fi.prototype.Yj;olympe.H.Ga.cb
|
|
|
889
889
|
d(f))})}static observe(a,b){return new rxjs.Observable(c=>{const d=olympe.H.Ga.mc();let e=null;d.connect().then(()=>d.request(a,olympe.H.Ga.fc.Request.ra.wg,b)).then(f=>{hh(d,f,g=>{const h=g.C;h&&g.F===olympe.H.Ga.fc.Response.ra.ii?(e=h.bk,gh(d,e,k=>{k.C?c.next(k.C):c.error('No payload')})):c.error(null!==h?h.errorMessage:'No payload')})}).catch(f=>c.error(f));return()=>e&&ih(d,e).catch(f=>olympe.ua.rb('ServiceClient').error('Failed to unsubscribe from a topic '+f))})}};
|
|
890
890
|
olympe.H.Ga.cb.Client.observe=olympe.H.Ga.cb.Client.observe;olympe.H.Ga.cb.Client.get=olympe.H.Ga.cb.Client.get;olympe.H.Ga.cb.Client.call=olympe.H.Ga.cb.Client.call;olympe.H.Ga.cb.ma=class{constructor(a,b){this.request=a;this.C=b}Ke(){return jh(this.C,this.request)}body(){return this.request.C}Rt(){return this.C.Sg(this.request,olympe.H.Ga.fc.Response.ra.vm,void 0)}Sg(a){return this.C.Sg(this.request,olympe.H.Ga.fc.Response.ra.ii,a)}Ol(a){return this.C.Sg(this.request,olympe.H.Ga.fc.Response.ra.wc,{errorMessage:a.message})}};olympe.H.Ga.cb.ma.prototype.fail=olympe.H.Ga.cb.ma.prototype.Ol;olympe.H.Ga.cb.ma.prototype.reply=olympe.H.Ga.cb.ma.prototype.Sg;
|
|
891
891
|
olympe.H.Ga.cb.ma.prototype.ack=olympe.H.Ga.cb.ma.prototype.Rt;olympe.H.Ga.cb.ma.prototype.body=olympe.H.Ga.cb.ma.prototype.body;olympe.H.Ga.cb.ma.prototype.userTag=olympe.H.Ga.cb.ma.prototype.Ke;olympe.H.Sb={};function kh(a,b,c,d){c.c=b;a.C.G(olympe.H.xc.Se,c,d)}
|
|
892
|
-
olympe.H.Sb.
|
|
893
|
-
b){kh(this,olympe.H.Sb.
|
|
894
|
-
c)b(c);else switch(d.c){case olympe.H.Sb.
|
|
895
|
-
d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.aa.Xe(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}ja(a){kh(this,olympe.H.Sb.
|
|
896
|
-
e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.hf();f.access_token=b.ij().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.C();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.C('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.C.G(olympe.H.xc.Se,{c:olympe.H.Sb.
|
|
897
|
-
!1,null,(d,e)=>{c(d,e)})}lq(){return this.G}};olympe.H.Sb.
|
|
892
|
+
olympe.H.Sb.Pa=class{constructor(a,b,c,d,e,f){this.N=a;this.C=b;this.F=e;this.Qa=c;this.G=d;this.storage=f;const g=this.storage.C('AUTH');g&&(g.get('redirectTo',h=>{h&&(g.remove('redirectTo'),g.close(),this.F.redirect(h,null,olympe.aa.$h.C.Oe))}),g.close())}O(a){this.C.je(a)}L(a){this.C.Sd(a)}Ea(a){this.C.Ei(olympe.H.xc.Se,'logoutHandler');this.C.Ea(olympe.H.xc.Se,b=>{const c=b.c;c===olympe.H.Sb.Pa.C.Bs?(this.C.Be(),a(olympe.aa.qa.F.Si,b)):c===olympe.H.Sb.Pa.C.pt&&a(olympe.aa.qa.F.Rn,b)},'logoutHandler')}V(a,
|
|
893
|
+
b){kh(this,olympe.H.Sb.Pa.C.Se,{token:a.hf()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.Sb.Pa.C.wc:b(Error('Invalid token'));break;case olympe.H.Sb.Pa.C.ci:c=null;var e=d.payload;if(e){d=e.userName;const f=e.userTag,g=e.rndCook,h=e.payload,k=e.protocol;'SAML'===k?(e=e.samlToken,c=new olympe.aa.$o(d,f,g,h),c.C=e):'openid'===k&&(c=new olympe.aa.jl(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}na(a,b){kh(this,olympe.H.Sb.Pa.C.Lr,{I:a.Rc()},(c,d)=>{if(null!==
|
|
894
|
+
c)b(c);else switch(d.c){case olympe.H.Sb.Pa.C.wc:b(Error(`Username '${a.Rc()}' invalid, or password does not match`));break;case olympe.H.Sb.Pa.C.yt:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}ya(a,b){kh(this,olympe.H.Sb.Pa.C.Rq,{A:a.get('a'),M:a.get('m1'),I:a.Rc()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.Sb.Pa.C.wc:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));break;case olympe.H.Sb.Pa.C.ci:c=
|
|
895
|
+
d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.aa.Xe(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}ja(a){kh(this,olympe.H.Sb.Pa.C.te,{},(b,c)=>{null!==b?a(b):c.url&&c.request?a(null,c.url,c.request.replace(/\s/g,''),c.id):a(Error('Missing parameters from server response'))})}ca(a){const b=olympe.D.Ta(olympe.aa.mc().C.yb())||null;if(b instanceof olympe.aa.jl){const c=
|
|
896
|
+
e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.hf();f.access_token=b.ij().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.C();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.C('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.C.G(olympe.H.xc.Se,{c:olympe.H.Sb.Pa.C.Cs},a)}Gh(a){this.C.G(olympe.H.xc.Se,{c:olympe.H.Sb.Pa.C.Uh},a)}Kg(a,b,c){this.C.Rf(this.Qa+'/'+a,olympe.H.xc.Se,b,
|
|
897
|
+
!1,null,(d,e)=>{c(d,e)})}lq(){return this.G}};olympe.H.Sb.Pa.C={Se:1,Cs:2,wc:3,Uh:5,ci:6,Lr:10,yt:11,Rq:12,te:13,pt:14,Bs:20};olympe.H.Sb.Pa.ka=[olympe.aa.At,olympe.aa.zb.Sb.Wh,olympe.aa.zb.Sb.fe,olympe.aa.zb.Sb.te];olympe.H.X={};olympe.H.X.Pc=function(){};olympe.H.X.Pc.prototype.oa=function(){};olympe.H.X.pe=function(){};olympe.H.X.pe.prototype.oa=function(){};olympe.H.X.Xb=function(){};olympe.H.X.Xb.prototype.oa=function(){};olympe.H.X.ve=function(){};olympe.H.X.ve.prototype.oa=function(){};olympe.H.X.pl=function(){this.W={};this.tb={};this.ba={};this.ga=Object.create(null);var a=new olympe.H.X.W.Db;this.W[O(olympe.dc.W.Db)]=a;a=new olympe.H.X.W.ce;this.W[O(olympe.dc.W.ce)]=a;a=new olympe.H.X.W.Yb;this.W[O(olympe.dc.W.Yb)]=a;this.W[O(olympe.dc.W.td)]=new olympe.H.X.W.td;this.W[O(olympe.dc.W.$c)]=new olympe.H.X.W.$c;this.W[O(olympe.dc.W.Ad)]=new olympe.H.X.W.Ad;this.W[O(olympe.dc.W.Zc)]=new olympe.H.X.W.Zc;a=new olympe.H.X.tb.Number;this.tb[O(olympe.dc.tb.Number)]=a;a=new olympe.H.X.tb.String;
|
|
898
898
|
this.tb[O(olympe.dc.tb.String)]=a;this.ba[O(olympe.dc.ba.qd)]=new olympe.H.X.ba.qd;this.ba[O(olympe.dc.ba.$d)]=new olympe.H.X.ba.$d;this.ba[O(olympe.dc.ba.ge)]=new olympe.H.X.ba.ge;this.ba[O(olympe.dc.ba.Id)]=new olympe.H.X.ba.Id;this.ba[O(olympe.dc.ba.Ue)]=new olympe.H.X.ba.Ue;this.ba[O(olympe.dc.ba.qe)]=new olympe.H.X.ba.qe;a=new olympe.H.X.ba.Pe;this.ba[O(olympe.dc.ba.Pe)]=a;a=new olympe.H.X.ba.Qe;this.ba[O(olympe.dc.ba.Qe)]=a;this.ga[O(olympe.dc.ga.Tc)]=new olympe.H.X.ga.Tc;a=new olympe.H.X.ga.Od;
|
|
899
899
|
this.ga[O(olympe.dc.ga.Od)]=a;a=new olympe.H.X.ga.Rd;this.ga[O(olympe.dc.ga.Rd)]=a;a=new olympe.H.X.ga.Xd;this.ga[O(olympe.dc.ga.Xd)]=a;a=new olympe.H.X.ga.Jd;this.ga[O(olympe.dc.ga.Jd)]=a;this.ga[O(olympe.dc.ga.We)]=new olympe.H.X.ga.We};olympe.H.X.pl.prototype.constructor=olympe.H.X.pl;
|
|
900
900
|
function eh(a,b,c){var d='[';for(let k=0,m=b.length;k<m;k++){var e=0===k?'':',';var f=a;var g=b[k],h=c;const n=g.ia(),p=f.W[n];if(void 0===p)throw Error('No serializer registered for transformer: '+n);f=p.oa(g,h,f);d+=e+f}return d+']'}function lh(a,b,c){var d=b.ia(),e=a.ba[d];if(void 0===e)throw Error('No predicate registered for predicate: '+d);return e.oa(b,c,a)}function mh(a,b,c){var d=b.ia(),e=a.ga[d];if(void 0===e)throw Error('No valueDef registered for valueDef: '+d);return e.oa(b,c,a)}
|
|
@@ -906,22 +906,22 @@ function qh(a,b){if(a.C!==b)switch(a.N.log('State change '+a.C+' --\x3e '+b),a.C
|
|
|
906
906
|
b);}}
|
|
907
907
|
function rh(a,b){const c=olympe.H.qa.L.ci,d=olympe.H.qa.L.Ns;return e=>{if(null!==e&&void 0!==e){var f=null,g=e.s;if(g===d)a.N.debug(`Try to unsubscribe multiple times. This could be because you logged out before unsubscribe. ${e.info.error.reason}`);else if(void 0!==g&&g!==c){f=void 0!==olympe.H.qa.F[g]?`Status code = ${g} [${olympe.H.qa.F[g]}]`:`Status code = ${g}`;g=e.info;if(void 0!==g&&void 0!==g.error){var h=g.error.reason;'string'===typeof h&&0<h.length&&(f+=`\nReason:\n${g.error.reason}`);h=
|
|
908
908
|
g.error.detailedReason;'string'===typeof h&&0<h.length&&(f+=`\nDetails:\n${g.error.detailedReason}`)}f=Error('Rejected by orchestrator:\n'+f)}b(f,e)}}}
|
|
909
|
-
function sh(a){var b=JSON.parse(JSON.stringify(a));a=olympe.$.jq;const c=b.messageFamily,d=a(olympe.H.xc,c),e=b.payload;b='';switch(c){case olympe.H.xc.Xg:b=a(olympe.dc.ma.ra,e.c);break;case olympe.H.xc.wc:b=a(olympe.H.ra,e.c);break;case olympe.H.xc.Se:b=a(olympe.H.Sb.
|
|
909
|
+
function sh(a){var b=JSON.parse(JSON.stringify(a));a=olympe.$.jq;const c=b.messageFamily,d=a(olympe.H.xc,c),e=b.payload;b='';switch(c){case olympe.H.xc.Xg:b=a(olympe.dc.ma.ra,e.c);break;case olympe.H.xc.wc:b=a(olympe.H.ra,e.c);break;case olympe.H.xc.Se:b=a(olympe.H.Sb.Pa.C,e.c);break;case olympe.H.xc.Sh:2===e.c&&(b=a(olympe.H.qa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
|
|
910
910
|
function ph(a,b,c){if(a.V.delete(b)){c={s:23,info:c};const d=a.ca.get(b);d&&d(c);a.ca.delete(b)}}function th(a,b){a.N.error(b);qh(a,olympe.H.qa.C.wc)}function uh(a,b,c){a.N.info('Connected to',a.ya.C(),' | ',b?'server version:'+b:'',null!==c?`activity timeout: ${c}s`:'');qh(a,olympe.H.qa.C.Wg);null===c||a.Xa||vh(a,c);a.hb.forEach(d=>{const e=JSON.stringify(d);a.N.debug('>',sh(d));a.F.send(e);d=d.seqId;a.ca.has(d)&&a.V.set(d,Date.now())});a.hb.length=0}
|
|
911
911
|
function vh(a,b){ec('keepAliveSubscription');const c=dc(()=>{a.O()?a.G(olympe.H.xc.Xg,{c:olympe.H.ra.Uh,subIds:Array.from(a.$b)},(d,e)=>d&&a.N.error(e)):c.cancel()},1E3*b,'keepAliveSubscription')}
|
|
912
|
-
olympe.H.Hc.qa=class{constructor(a,b,c,d){this.N=a;this.xb=b;this.ya=c;this.F=null;this.Ib=d;this.Ae=this.Ib.get('reconnectionDelay');this.Qc=d.get('autoConnect');this.
|
|
913
|
-
this.$b=new Set;this.na=0;this.
|
|
912
|
+
olympe.H.Hc.qa=class{constructor(a,b,c,d){this.N=a;this.xb=b;this.ya=c;this.F=null;this.Ib=d;this.Ae=this.Ib.get('reconnectionDelay');this.Qc=d.get('autoConnect');this.gx=d.get('retryHttpOverload');this.ja=olympe.$.$e.parse(d.get('clientVersion'));this.fb=olympe.$.$e.parse(d.get('serverVersion'));this.C=olympe.H.qa.C.INIT;this.Xa=d.get('getContextMode');this.Zj=1;this.ca=new Map;this.Qa=new Map;this.L=olympe.D.Ic(olympe.D.fa,'Server is online');this.xe=new Map;this.ud=new Map;this.hb=[];this.V=new Map;
|
|
913
|
+
this.$b=new Set;this.na=0;this.fx=new Map;oh(this,d)}O(){return this.C===olympe.H.qa.C.Wg}connect(){this.Qc=!0;this.N.log('Asking NET layer for a connection to',fc(this.ya)+':'+this.ya.port,'...');this.F=this.xb.ca(this.ya);this.F.ya(this.Be.bind(this));this.F.na(this.Mg.bind(this));this.F.ja(()=>{this.F=null;this.C===olympe.H.qa.C.Wg&&2>this.na?(this.na++,setTimeout(()=>{this.connect()},100)):this.C!==olympe.H.qa.C.wc&&(this.na=0,qh(this,olympe.H.qa.C.Ne))});0===this.na&&qh(this,olympe.H.qa.C.CONNECTING)}Ng(){const a=
|
|
914
914
|
olympe.H.qa.C.CONNECTING;if(this.C===olympe.H.qa.C.Wg||this.C===a)this.Qc=!1,qh(this,olympe.H.qa.C.Ne)}je(a,b){void 0===b&&(b=olympe.$.Rb());this.xe.set(b,a);olympe.D.Ta(this.L)===olympe.D.fa.F&&a()}fd(a){this.xe.delete(a)}Sd(a,b){void 0===b&&(b=olympe.$.Rb());this.ud.set(b,a);olympe.D.Ta(this.L)===olympe.D.fa.C&&a()}zd(a){this.ud.delete(a)}Be(){this.na=0;this.N.debug('Websocket connected, sending handshake. Client version:',Ga(this.ja),'subscribeEverything:',this.Xa?'NO':'YES');this.G(olympe.H.xc.Sh,
|
|
915
|
-
{c:olympe.H.ra.Sh,cv:Ga(this.ja),m:this.Xa?0:1},this
|
|
915
|
+
{c:olympe.H.ra.Sh,cv:Ga(this.ja),m:this.Xa?0:1},this.ax.bind(this))}G(a,b,c){const d=this.Zj;this.Zj++;b={seqId:d,messageFamily:a,payload:b};void 0!==c&&this.ca.set(d,rh(this,c));this.O()||a===olympe.H.xc.Sh&&this.C===olympe.H.qa.C.CONNECTING?(a=JSON.stringify(b),this.N.debug('>',sh(b)),this.F.send(a),void 0!==c&&this.V.set(d,Date.now())):this.hb.push(b)}Rf(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=ic(a);if(e){g.method=olympe.Da.Wb.Yh.kl;
|
|
916
916
|
e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;jc(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',sh(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.Da.Wb.ResponseType.Dj;jc(g,{Authorization:c});const h=()=>{this.xb.Ge(g,k=>{switch(k.status){case olympe.Da.Wb.Ve.fl:case olympe.Da.Wb.Ve.Rm:case olympe.Da.Wb.Ve.Si:k=k.data;if(b!==olympe.H.xc.Xg||d){f&&f(null,k);break}k=this.Mg(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.Da.Wb.Ve.st:bc(h,
|
|
917
|
-
this.
|
|
917
|
+
this.gx);break;case olympe.Da.Wb.Ve.$q:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;default:k=Error(`Server is currently not available, http status: ${k.status}`),f&&f(k)}})};h()}Ea(a,b,c){void 0===c&&(c=olympe.$.Rb());let d=this.Qa.get(a);void 0===d&&(d=new Map,this.Qa.set(a,d));d.set(c,b)}Ei(a,b){a=this.Qa.get(a);void 0!==a&&a.delete(b)}yq(a){this.$b.add(a)}Aq(a){this.$b.delete(a)}ax(a,b){if(a)th(this,'Error in receiving handshake response: '+a.message);else{this.N.debug('Handshake response received');
|
|
918
918
|
var c=olympe.H.qa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.Rr:th(this,`Framework version (${Ga(this.ja)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);return;case c.Ft:th(this,`Framework version (${Ga(this.ja)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.Cr:th(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.fb.Jb(olympe.$.$e.C))this.N.warn('Handshake successful but received server version',
|
|
919
|
-
a,'is invalid. Cannot check against it');else try{const f=olympe.$.$e.parse(a);var e=this.fb;if(f.C!==e.C?f.C<e.C:f.F!==e.F?f.F<e.F:f.G<e.G){th(this,`Framework v${Ga(this.ja)} is expecting Orchestrator to be at least in v${Ga(this.fb)}`);return}this.N.log('Handshake successful. Orchestrator version: ',f,'required:',Ga(this.fb))}catch(f){th(this,f);return}if(b=b.identityProviders)for(const [f,g]of Object.entries(b))this.
|
|
919
|
+
a,'is invalid. Cannot check against it');else try{const f=olympe.$.$e.parse(a);var e=this.fb;if(f.C!==e.C?f.C<e.C:f.F!==e.F?f.F<e.F:f.G<e.G){th(this,`Framework v${Ga(this.ja)} is expecting Orchestrator to be at least in v${Ga(this.fb)}`);return}this.N.log('Handshake successful. Orchestrator version: ',f,'required:',Ga(this.fb))}catch(f){th(this,f);return}if(b=b.identityProviders)for(const [f,g]of Object.entries(b))this.fx.set(f,g);uh(this,a,d)}}Fi(a){if(this.C===olympe.H.qa.C.Wg){var b=olympe.D.Ja(),
|
|
920
920
|
c='onConnectionLost'+olympe.$.Rb();this.N.debug('Sending Ping');this.G(olympe.H.xc.fr,{c:1},()=>{cc(c);b.Kb()||b.run(()=>{bc(this.Fi.bind(this,a),4*a,c)})});bc(()=>{this.N.debug('Force close websocket after offline for',a);olympe.D.Vf().run(()=>{this.C!==olympe.H.qa.C.Ne&&(this.F&&this.F.close(),qh(this,olympe.H.qa.C.Ne))})},a,c)}}Mg(a){try{var b=JSON.parse(a)}catch(d){return this.N.error('Unable to parse response from server: '+d.toString()),Error('Unable to parse response from server')}this.N.debug('<',
|
|
921
|
-
sh(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.V.delete(a)){const d=this.ca.get(a);d&&d(b);this.ca.delete(a)}a=this.
|
|
922
|
-
olympe.H.qa.L={ci:0,Ns:18
|
|
921
|
+
sh(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.V.delete(a)){const d=this.ca.get(a);d&&d(b);this.ca.delete(a)}a=this.Qa.get(c);if(void 0!==a)for(const d of a.values())d(b);return null}Gi(){const a=Date.now();for(const [b,c]of this.V)3E4<a-c&&(this.N.warn(`No response was received from the server for the seqId = ${b}`),ph(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};olympe.H.Hc.qa.F=1E3;olympe.H.Hc.qa.G=3E4;olympe.H.Hc.qa.C='checkTimeoutMessages';
|
|
922
|
+
olympe.H.qa.L={ci:0,Ns:18,az:23};
|
|
923
923
|
olympe.H.qa.F={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',18:'Try to unsubscribe multiple times',
|
|
924
|
-
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.H.Hc.qa.ka=[olympe.H.qa];olympe.H.T={ta:'server.Manager',Jm:'server.bus.Manager',Ha:'server.Logger',oh:'server.SourceFactory',vn:'server.FileSvcHttpRequest',Rk:'server.ImportFileSvcHttpRequest',lk:'server.BackupSvcHttpRequest',Go:'server.OpenIDSvcHttpRequest',Dn:'server.GetContextSvcPathRequest',Tn:'server.ImplicitGDSvcPathRequest',pn:'server.ExplicitGDSvcPathRequest',rp:'server.TransactionOverHttpPathRequest',xp:'server.UserTokenRequest',dh:'server.IOUrlsProvider'};olympe.H.ad={Ih:'server.connectors.Auth',
|
|
924
|
+
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.H.Hc.qa.ka=[olympe.H.qa];olympe.H.T={ta:'server.Manager',Jm:'server.bus.Manager',Ha:'server.Logger',oh:'server.SourceFactory',vn:'server.FileSvcHttpRequest',Rk:'server.ImportFileSvcHttpRequest',lk:'server.BackupSvcHttpRequest',Go:'server.OpenIDSvcHttpRequest',Dn:'server.GetContextSvcPathRequest',Tn:'server.ImplicitGDSvcPathRequest',pn:'server.ExplicitGDSvcPathRequest',rp:'server.TransactionOverHttpPathRequest',xp:'server.UserTokenRequest',dh:'server.IOUrlsProvider'};olympe.H.ad={Ih:'server.connectors.Auth',Jz:'server.connectors.Signaling'};
|
|
925
925
|
olympe.H.Z={Md:'server.host',ee:'server.port',Qd:'server.ssl',xm:'server.autoConnect',So:'server.reconnectionDelay',To:'server.reconnectionShortDelay',Xo:'server.retryHttpOnOverload',Pm:'server.clientVersion',bp:'server.serverVersion',Im:'bus.host',Km:'bus.path',Lm:'bus.port',Mm:'bus.vhost',Uh:'bus.keepalive',lt:'bus.reschedulePings',dr:'bus.clientId',br:'bus.clean',ht:'bus.reconnectPeriod',gr:'bus.connectTimeout',vp:'bus.username',Io:'bus.password',at:'bus.queueQoSZero'};
|
|
926
926
|
olympe.H.Bb={Wd:'server.basePath',Bp:'server.wsPath',tn:'server.filePath',Vn:'server.importFilePath',Em:'server.backupSvcPath',Fo:'server.openIDSvcPath',Cn:'server.GetContextSvcPath',Un:'server.ImplicitGraphdefSvcPath',qn:'server.ExplicitGraphdefSvcPath',qp:'server.TransactionOverHttpPath',wp:'server.userTokenSvcPath'};
|
|
927
927
|
olympe.U.Ib(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;D(a,olympe.H.Z.Md,b);D(a,olympe.H.Z.ee,c?8080:443);D(a,olympe.H.Z.Qd,'localhost'!==b);D(a,olympe.H.Bb.Wd,'OlympeServer');D(a,olympe.H.Bb.Bp,'websocket');D(a,olympe.H.Bb.tn,'rest/filesvc');D(a,olympe.H.Bb.Vn,'rest/importsvc');D(a,olympe.H.Bb.Em,'rest/backupsvc');D(a,olympe.H.Bb.Fo,'rest/openid');D(a,olympe.H.Bb.Cn,'rest/initialData');D(a,olympe.H.Bb.Un,'rest/querysvc/graphDefImplicit');
|
|
@@ -932,68 +932,68 @@ new olympe.U.ha(olympe.H.Z.ee),new olympe.U.ha(olympe.H.Z.Qd),new olympe.U.ha(ol
|
|
|
932
932
|
[new olympe.U.ha(olympe.H.Z.Md),new olympe.U.ha(olympe.H.Z.ee),new olympe.U.ha(olympe.H.Z.Qd),new olympe.U.ha(olympe.H.Bb.Wd),new olympe.U.ha(olympe.H.Bb.qn)],b);B(a,olympe.H.T.rp,[new olympe.U.ha(olympe.H.Z.Md),new olympe.U.ha(olympe.H.Z.ee),new olympe.U.ha(olympe.H.Z.Qd),new olympe.U.ha(olympe.H.Bb.Wd),new olympe.U.ha(olympe.H.Bb.qp)],b);B(a,olympe.H.T.xp,[new olympe.U.ha(olympe.H.Z.Md),new olympe.U.ha(olympe.H.Z.ee),new olympe.U.ha(olympe.H.Z.Qd),new olympe.U.ha(olympe.H.Bb.Wd),new olympe.U.ha(olympe.H.Bb.wp)],
|
|
933
933
|
b);B(a,'server.ManagerConfig',[new olympe.U.ha(olympe.H.Z.xm),new olympe.U.ha(olympe.H.Z.So),new olympe.U.ha(olympe.H.Z.To),new olympe.U.ha(olympe.H.Z.Pm),new olympe.U.ha(olympe.H.Z.bp),new olympe.U.ha(olympe.dc.Z.xg),new olympe.U.ha(olympe.H.Z.Xo)],(...d)=>{const e='autoConnect reconnectionDelay reconnectionShortDelay clientVersion serverVersion getContextMode retryHttpOverload'.split(' '),f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});B(a,'server.bus.ManagerConfig',[new olympe.U.ha(olympe.H.Z.Md),
|
|
934
934
|
new olympe.U.ha(olympe.H.Z.Im),new olympe.U.ha(olympe.H.Z.Km),new olympe.U.ha(olympe.H.Z.Lm),new olympe.U.ha(olympe.H.Z.Mm),new olympe.U.ha(olympe.H.Z.vp),new olympe.U.ha(olympe.H.Z.Qd),new olympe.U.ha(olympe.H.Z.Uh),new olympe.U.ha(olympe.H.Z.lt),new olympe.U.ha(olympe.H.Z.dr),new olympe.U.ha(olympe.H.Z.br),new olympe.U.ha(olympe.H.Z.ht),new olympe.U.ha(olympe.H.Z.gr),new olympe.U.ha(olympe.H.Z.Io),new olympe.U.ha(olympe.H.Z.at)],(d,e,f,g,h,k,m,...n)=>{e=`${m?'wss://':'ws://'}${e||d}:${g}${f}/ws`;
|
|
935
|
-
const p='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout password queueQoSZero'.split(' ');n=n.reduce((q,r,t)=>{q[p[t]]=r;return q},{});n.username=`${h||d.split('.')[0]}:${k}`;d=new Map;d.set('url',e);d.set('connectionOptions',n);return d});y(a,olympe.H.T.ta,olympe.H.Hc.qa,olympe.H.T.Ha,olympe.Da.T.ta,'server.WebSocketRequest','server.ManagerConfig');y(a,olympe.H.ad.Ih,olympe.H.Sb.
|
|
935
|
+
const p='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout password queueQoSZero'.split(' ');n=n.reduce((q,r,t)=>{q[p[t]]=r;return q},{});n.username=`${h||d.split('.')[0]}:${k}`;d=new Map;d.set('url',e);d.set('connectionOptions',n);return d});y(a,olympe.H.T.ta,olympe.H.Hc.qa,olympe.H.T.Ha,olympe.Da.T.ta,'server.WebSocketRequest','server.ManagerConfig');y(a,olympe.H.ad.Ih,olympe.H.Sb.Pa,olympe.H.T.Ha,olympe.H.T.ta,olympe.H.T.xp,olympe.H.T.Go,olympe.aa.T.wj,olympe.Vb.T.lj);y(a,
|
|
936
936
|
olympe.H.T.Jm,olympe.H.Ga.qa,olympe.H.T.Ha,olympe.Da.T.ta,olympe.aa.T.ta,'server.bus.ManagerConfig');qa(a,olympe.aa.ad.ta,olympe.H.ad.Ih);qa(a,olympe.aa.ad.ko,olympe.H.ad.Ih);qa(a,olympe.aa.ad.fe,olympe.H.ad.Ih);qa(a,olympe.aa.ad.te,olympe.H.ad.Ih);B(a,olympe.H.T.oh,[olympe.ua.T.ta,olympe.H.T.ta,olympe.Da.T.ta,olympe.aa.T.ta,olympe.H.T.vn,olympe.H.T.Rk,olympe.H.T.lk,olympe.H.T.Dn,olympe.H.T.Tn,olympe.H.T.pn,olympe.H.T.rp],(d,e,f,g,h,k,m,n,p,q,r)=>new olympe.H.Bj(d.Gc('server.source'),e,f,g,[h,k,m,
|
|
937
937
|
n,p,q,r]));y(a,olympe.H.T.dh,olympe.H.hj,olympe.H.T.Rk,olympe.H.T.lk);qa(a,olympe.dc.Y.T.dh,olympe.H.T.dh);qa(a,olympe.Ya.T.oh,olympe.H.T.oh)},'olympe.communication');olympe.U.run([olympe.H.T.Jm],a=>{olympe.H.Ga.mc=()=>a});olympe.nc={};olympe.nc.Tq=class{run(){}};olympe.nc.qa=class{constructor(a,b){this.C=a;this.N=b;this.F=null;this.G='';this.N.info('HC Manager will execute application registered as:',this.C)}Ni(a,b,c=''){b||(b='default');b===this.C?(null===this.F?this.N.log('Application',c,'designated to be launched'):this.N.log('OVERRIDE: Application',c,'designated to be launched'),this.F=a,this.G=c):this.N.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.C)}run(){null!==this.F?(this.N.info('Running application:',this.G),
|
|
938
938
|
this.F.run()):this.N.error('No app registered under name: '+this.C)}};olympe.nc.Ni=function(a,b,c){const d=a.rb();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.nc.Z.Le+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Bd(olympe.nc.T.ta).Ib([b],function(e,f){f.Ni(e,c,b)},'olympe.hc.registerApp')};olympe.nc.T={ta:'hc.Manager',Ha:'hc.Logger'};olympe.nc.Z={Le:'hc.app',Ik:'hc.globalToken'};olympe.U.Ib(function(a){D(a,olympe.nc.Z.Le,'default');D(a,olympe.nc.Z.Ik,!1);B(a,olympe.nc.T.Ha,[olympe.ua.T.ta],b=>b.Gc('hc'));B(a,olympe.aa.T.Ti,[new olympe.U.ha(olympe.nc.Z.Le),new olympe.U.ha(olympe.nc.Z.Ik)],(b,c)=>new olympe.aa.jk(c?'':b));y(a,olympe.nc.T.ta,olympe.nc.qa,new olympe.U.ha(olympe.nc.Z.Le),olympe.nc.T.Ha)},'olympe.hc');olympe.U.run([olympe.nc.T.ta],a=>a.run(),'olympe.hc');olympe.dm={};olympe.dm.ub=class extends olympe.dc.Sync{na(){return this.Wa(olympe.dm.ub.L,olympe.dm.Ia)}};olympe.dm.ub.P=olympe.dc.wa.C('ff021000000000000007',olympe.dm.ub);olympe.dm.ub.L=olympe.dm.ub.P.Ma('ff022000000000000010');olympe.dm.ub.C=olympe.dm.ub.P.Ma('ff02200000000000000u');olympe.dm.ub.Fi=P(olympe.dm.ub.P,olympe.dc.Sync.F);olympe.dm.ub.Ng=P(olympe.dm.ub.P,olympe.dm.ub.C);olympe.dm.ub.xe=M('00000000000000000GOO','MODELS_GOO');olympe.dm.ub.$b=M('10000000000000000GOO','DEFAULT_GOO');
|
|
939
939
|
olympe.dm.ub.Ae=M('12000000000000000GOO','PERMISSIONS_GOO');olympe.dm.ub.prototype.na.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Ia=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}Wf(){return this.Td(olympe.dm.Ia.G)}ou(){return olympe.D.xa([this.Wf()],a=>parseInt(a,10)&olympe.dm.Ia.L.ql?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa)}lu(){return olympe.D.xa([this.Wf()],a=>parseInt(a,10)&olympe.dm.Ia.L.hr?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa)}pu(){return olympe.D.xa([this.Wf()],a=>parseInt(a,10)&olympe.dm.Ia.L.Ot?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa)}mu(){return olympe.D.xa([this.Wf()],a=>parseInt(a,10)&olympe.dm.Ia.L.DELETE?
|
|
940
940
|
olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa)}nu(){return olympe.D.xa([this.Wf()],a=>parseInt(a,10)&olympe.dm.Ia.L.ys?olympe.D.fa.F:olympe.D.fa.C,olympe.D.fa)}js(){return this.Wa(olympe.dm.Ia.O,olympe.dm.Hb)}iq(){return this.Wa(olympe.dm.Ia.F,olympe.dm.ub)}};olympe.dm.Ia.P=olympe.dc.wa.C('ff021000000000000008',olympe.dm.Ia);olympe.dm.Ia.G=olympe.dm.Ia.P.Ba('ff023000000000000021');olympe.dm.Ia.O=olympe.dm.Ia.P.Ma('ff022000000000000007');olympe.dm.Ia.F=P(olympe.dm.Ia.P,olympe.dm.ub.L);
|
|
941
|
-
olympe.dm.Ia.ca=M('00000000000000000OPS','GUEST_ROLE_DEFAULT_OPERATION');olympe.dm.Ia.V=M('13000000000000000OPS','AUTHENTICATED_ROLE_DEFAULT_OPERATION');olympe.dm.Ia.C={NONE:0,ql:1,vj:3,READ_WRITE:5,Ro:9,dt:7,
|
|
941
|
+
olympe.dm.Ia.ca=M('00000000000000000OPS','GUEST_ROLE_DEFAULT_OPERATION');olympe.dm.Ia.V=M('13000000000000000OPS','AUTHENTICATED_ROLE_DEFAULT_OPERATION');olympe.dm.Ia.C={NONE:0,ql:1,vj:3,READ_WRITE:5,Ro:9,dt:7,Ez:15,ug:17,ct:19,gt:21,ft:25,et:23,Fz:29,zn:31};olympe.dm.Ia.L={ql:1,hr:2,Ot:4,DELETE:8,ys:16};l=olympe.dm.Ia.prototype;l.Wf.K=olympe.D.J.G;l.ou.K=olympe.D.J.O;l.lu.K=olympe.D.J.O;l.pu.K=olympe.D.J.O;l.mu.K=olympe.D.J.O;l.nu.K=olympe.D.J.O;l.js.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Hb=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}ia(){return this.wb(olympe.dc.Sync.nameProp)}ks(){return olympe.D.Oa.EMPTY}rw(){return olympe.D.fa.C}fw(){return this.Wa(olympe.dm.Hb.C,olympe.dm.User)}Vu(){return this.Wa(olympe.dm.Hb.V,olympe.dm.Hb)}Kv(){return this.Wa(olympe.dm.Hb.L,olympe.dm.Hb)}ls(){return this.Wa(olympe.dm.Hb.G,olympe.dm.Ia)}};olympe.dm.Hb.P=olympe.dc.wa.C('ff021000000000000002',olympe.dm.Hb);olympe.dm.Hb.na=olympe.dm.Hb.P.Ba('ff023000000000000035');
|
|
942
942
|
olympe.dm.Hb.C=olympe.dm.Hb.P.Ma('ff022000000000000005');olympe.dm.Hb.L=olympe.dm.Hb.P.Ma('ff022000000000000006');olympe.dm.Hb.V=P(olympe.dm.Hb.P,olympe.dm.Hb.L);olympe.dm.Hb.G=P(olympe.dm.Hb.P,olympe.dm.Ia.O);olympe.dm.Hb.O=M('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.Hb.ca=M('ff011000000000000002','GUEST_USERS_ROLE');l=olympe.dm.Hb.prototype;l.ia.K=olympe.D.J.F;l.ks.K=olympe.D.J.F;l.rw.K=olympe.D.J.O;l.fw.K=new olympe.D.J(()=>olympe.dc.pa,[]);
|
|
943
943
|
l.Vu.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Kv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.ls.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.User=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}ov(){return this.$l()}ia(){return this.$l()}$l(){return this.wb(olympe.dm.User.loginProp)}ns(){return this.wb(olympe.dm.User.G)}ms(){return olympe.D.Oa.EMPTY}Xv(){return this.wb(olympe.dm.User.saltProp)}hw(){return this.wb(olympe.dm.User.verifierProp)}os(){return this.Wa(olympe.dm.User.C,olympe.dm.Hb)}};olympe.dm.User.P=olympe.dc.wa.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.P.Ba('ff023000000000000001');
|
|
944
944
|
w('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.G=olympe.dm.User.P.Ba('ff023000000000000002');olympe.dm.User.saltProp=olympe.dm.User.P.Ba('ff023000000000000004');w('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.P.Ba('ff023000000000000005');w('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.O=olympe.dm.User.P.Ba('ff023000000000000020');olympe.dm.User.SAMLnameIdProp=olympe.dm.User.P.Ba('ff023000000000000036');
|
|
945
|
-
w('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.P,olympe.dm.Hb.C);olympe.dm.User.L=M('0163d9653067b6237f62','GUEST_USER');l=olympe.dm.User.prototype;l.ov.K=olympe.D.J.F;l.ia.K=olympe.D.J.F;l.$l.K=olympe.D.J.F;l.ns.K=olympe.D.J.F;l.ms.K=olympe.D.J.F;l.Xv.K=olympe.D.J.F;l.hw.K=olympe.D.J.F;l.os.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Zd=class extends olympe.dm.ub{O(){return this.Wl()}
|
|
946
|
-
olympe.dm.BrickMetadata.fd={
|
|
945
|
+
w('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.P,olympe.dm.Hb.C);olympe.dm.User.L=M('0163d9653067b6237f62','GUEST_USER');l=olympe.dm.User.prototype;l.ov.K=olympe.D.J.F;l.ia.K=olympe.D.J.F;l.$l.K=olympe.D.J.F;l.ns.K=olympe.D.J.F;l.ms.K=olympe.D.J.F;l.Xv.K=olympe.D.J.F;l.hw.K=olympe.D.J.F;l.os.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Zd=class extends olympe.dm.ub{O(){return this.Wl()}Qa(){return this.wb(olympe.dm.Zd.hb)}};olympe.dm.Zd.P=olympe.dc.wa.C('01621fb84e3300000000',olympe.dm.Zd);olympe.dm.Zd.hb=olympe.dm.Zd.P.Ba('01609de3f292e3c2c6ff');olympe.dm.Zd.prototype.O.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Zd.prototype.Qa.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.Zd{fb(){return this.wb(olympe.dm.BrickMetadata.xb)}ya(){return this.wb(olympe.dm.BrickMetadata.Qc)}C(){return null}};olympe.dm.BrickMetadata.P=Lc(olympe.dc.wa.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.xb=olympe.dm.BrickMetadata.P.Ba('01621fb84e320000f001');olympe.dm.BrickMetadata.Qc=olympe.dm.BrickMetadata.P.Ba('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.Ei=olympe.dm.BrickMetadata.P.Ma('0161ae97622bb21f335b');
|
|
946
|
+
olympe.dm.BrickMetadata.fd={xz:'private',Zs:'public'};olympe.dm.BrickMetadata.je=M('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.Ve={py:'experimental',Kz:'stable',hy:'deprecated'};olympe.dm.BrickMetadata.prototype.fb.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.ya.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.C.K=new olympe.D.J(()=>String,[]);olympe.dm.Ob=class extends olympe.dm.BrickMetadata{L(){return new olympe.dc.pa(this.R(),[new olympe.dc.W.Yb(olympe.dm.Ob.O.R(),olympe.dc.Ka.DESTINATION,olympe.dc.W.zj.Wn,olympe.dc.W.zj.Mr),olympe.dm.Ob.G])}C(){return null}ca(){return this.Wa(olympe.dm.Ob.O,olympe.dm.Ob)}V(){return this.Wa(olympe.dm.Ob.G)}};olympe.dm.Ob.P=olympe.dc.wa.C('01612df1db9749227626',olympe.dm.Ob);olympe.dm.Ob.O=olympe.dm.Ob.P.Ma('016a697ef00ce7554691');olympe.dm.Ob.na=P(olympe.dm.Ob.P,olympe.dm.Ob.O);olympe.dm.Ob.G=olympe.dm.Ob.P.Ma('016a697ef00ce7554692');
|
|
947
947
|
P(olympe.dc.Sync.P,olympe.dm.Ob.G);olympe.dm.Ob.prototype.L.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Ob.prototype.ca.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Ob.prototype.V.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Module=class extends olympe.dc.Sync{mv(){return this.wb(olympe.dm.Module.V)}Cv(){return this.Td(olympe.dm.Module.ca)}ps(){return this.wb(olympe.dm.Module.G)}Jv(){return this.wb(olympe.dm.Module.na)}Xu(){return this.wb(olympe.dm.Module.L)}Dv(){return this.Wa(olympe.dm.Module.O,olympe.dm.Module)}Yv(){return this.Wa(olympe.dm.Module.C,olympe.dm.rd)}};olympe.dm.Module.P=olympe.dc.wa.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.V=olympe.dm.Module.P.Ba('ff023000000000000042');
|
|
948
948
|
olympe.dm.Module.ca=olympe.dm.Module.P.Ba('ff023000000000000043');olympe.dm.Module.G=olympe.dm.Module.P.Ba('ff023000000000000044');olympe.dm.Module.na=olympe.dm.Module.P.Ba('ff023000000000000045');olympe.dm.Module.L=olympe.dm.Module.P.Ba('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.P.Ba('ff023000000000000049');olympe.dm.Module.C=olympe.dm.Module.P.Ma('ff022000000000000013');olympe.dm.Module.O=olympe.dm.Module.P.Ma('ff022000000000000014');
|
|
949
|
-
olympe.dm.Module.
|
|
949
|
+
olympe.dm.Module.Qa=M('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');l=olympe.dm.Module.prototype;l.mv.K=olympe.D.J.F;l.Cv.K=olympe.D.J.G;l.ps.K=olympe.D.J.F;l.Jv.K=olympe.D.J.F;l.Xu.K=olympe.D.J.F;l.Dv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Yv.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.File=class extends olympe.dc.Sync{static ke(a,b,c,d,e,f){e=e||'application/data';d=olympe.$.xh().L(new Blob([d],{type:e}));return olympe.dm.File.Xp(a,b,c,d,e,f)}static Xp(a,b,c,d,e,f){a=b.create(a,f);b=olympe.D.ab.now();a.setProperty(olympe.dm.File.nameProp,c||'file').setProperty(olympe.dc.Sync.nameProp,c||'file').setProperty(olympe.dm.File.urlProp,d).setProperty(olympe.dm.File.creationDateProp,b).setProperty(olympe.dm.File.modificationDateProp,b).setProperty(olympe.dm.File.mimeTypeProp,
|
|
950
950
|
e||'application/data').setProperty(olympe.dm.File.C,!1);return a.R()}constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.C=e}am(){return this.wb(olympe.dm.File.mimeTypeProp)}Oj(a,b){const c=olympe.D.Ja().vb(a),d=b&&olympe.D.Ja().vb(b);(a=this.db.Gb(this,olympe.dm.File.urlProp,!0))&&a.startsWith('blob:')?this.C.F(a,e=>{this.C.G(e,c)},d):yc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}Vl(a,b){this.Oj(c=>{a(Ca(c))},b)}Pj(a,b){const c=olympe.D.Ja().vb(a);b=b&&olympe.D.Ja().vb(b);const d=this.db.Gb(this,
|
|
951
|
-
olympe.dm.File.C),e=this.db.Gb(this,olympe.dm.File.urlProp),f=g=>{const h=this.db.Gb(this,olympe.dm.File.mimeTypeProp);this.C.G(g,k=>{c(`data:${h};base64,${this.C.C(k)}`)})};d&&d.valueOf()?yc(this.F,this,f.bind(this),b):e&&e.startsWith('blob:')?this.C.F(e,f.bind(this),b):a(e)}Gq(a,b){const c=b&&olympe.D.Ja().vb(b);olympe.D.Eq([a],d=>{const e=new olympe.dc.lb;e.update(this,olympe.dc.Sync.nameProp,d);e.update(this,olympe.dm.File.nameProp,d);e.wd(f=>{c&&c(f)})})}
|
|
952
|
-
olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.
|
|
951
|
+
olympe.dm.File.C),e=this.db.Gb(this,olympe.dm.File.urlProp),f=g=>{const h=this.db.Gb(this,olympe.dm.File.mimeTypeProp);this.C.G(g,k=>{c(`data:${h};base64,${this.C.C(k)}`)})};d&&d.valueOf()?yc(this.F,this,f.bind(this),b):e&&e.startsWith('blob:')?this.C.F(e,f.bind(this),b):a(e)}Gq(a,b){const c=b&&olympe.D.Ja().vb(b);olympe.D.Eq([a],d=>{const e=new olympe.dc.lb;e.update(this,olympe.dc.Sync.nameProp,d);e.update(this,olympe.dm.File.nameProp,d);e.wd(f=>{c&&c(f)})})}kx(){this.G.G(this.db.Gb(this,olympe.dm.File.mimeTypeProp))}Vk(){return this.wb(olympe.dm.File.urlProp)}eo(){return this.wb(olympe.dm.File.nameProp)}$u(){return this.Ai(olympe.dm.File.creationDateProp)}Bv(){return this.Ai(olympe.dm.File.modificationDateProp)}rq(){return this.Ig(olympe.dm.File.C)}};
|
|
952
|
+
olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.kx;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Pj;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.Vl;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Oj;olympe.dm.File.createFileFromURL=olympe.dm.File.Xp;olympe.dm.File.createFile=olympe.dm.File.ke;olympe.dm.File.P=olympe.dc.wa.C('ff021000000000000030',olympe.dm.File,olympe.dc.T.Mh,olympe.Da.T.ta,olympe.$.T.Tg);
|
|
953
953
|
olympe.dm.File.nameProp=olympe.dm.File.P.Ba('ff023000000000000050');w('olympe.dm.File.nameProp',olympe.dm.File.nameProp);olympe.dm.File.creationDateProp=olympe.dm.File.P.Ba('ff023000000000000051');w('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.P.Ba('ff023000000000000055');w('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.P.Ba('ff023000000000000052');
|
|
954
954
|
w('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);olympe.dm.File.urlProp=olympe.dm.File.P.Ba('ff023000000000000053');w('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.P.Ba('ff023000000000000054');olympe.dm.File.P.C=olympe.dm.File.ke.bind(null,olympe.dm.File);olympe.dm.File.ka=[olympe.D.File];l=olympe.dm.File.prototype;l.am.K=olympe.D.J.F;l.Oj.K=new olympe.D.J(()=>{},[]);l.Vl.K=new olympe.D.J(()=>{},[]);l.Pj.K=new olympe.D.J(()=>{},[]);l.Gq.K=olympe.D.J.C;
|
|
955
955
|
l.Vk.K=olympe.D.J.F;l.eo.K=olympe.D.J.F;l.$u.K=new olympe.D.J(()=>olympe.D.ab,[]);l.Bv.K=new olympe.D.J(()=>olympe.D.ab,[]);l.rq.K=olympe.D.J.O;olympe.dm.rd=class extends olympe.dc.Sync{C(){return this.wb(olympe.dm.rd.G)}G(){return this.Td(olympe.dm.rd.L)}F(){return this.Wa(olympe.dm.rd.C,olympe.dm.Module)}};olympe.dm.rd.P=olympe.dc.wa.C('ff021000000000000041',olympe.dm.rd);olympe.dm.rd.G=olympe.dm.rd.P.Ba('ff023000000000000047');olympe.dm.rd.L=olympe.dm.rd.P.Ba('ff023000000000000048');olympe.dm.rd.C=olympe.dm.Module.C.xd();olympe.dm.rd.prototype.C.K=olympe.D.J.F;olympe.dm.rd.prototype.G.K=olympe.D.J.G;
|
|
956
|
-
olympe.dm.rd.prototype.F.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.jc=class extends olympe.dm.Ob{G(){return this.wb(olympe.dm.jc.ca)}Ea(){return this.wb(olympe.dm.jc.Xa)}F(){return this.Wa(olympe.dm.jc.V,olympe.dm.jc)}};olympe.dm.jc.P=olympe.dc.wa.C('0163d9594700fcf61e54',olympe.dm.jc);olympe.dm.jc.ca=olympe.dm.jc.P.Ba('017869c7d2833c9492c1');olympe.dm.jc.Xa=olympe.dm.jc.P.Ba('017869c80bb9929c76d0');olympe.dm.jc.V=olympe.dm.jc.P.Ma('ff02200000000000002b');olympe.dm.jc.Sd=P(olympe.dm.jc.P,olympe.dm.jc.V);olympe.dm.jc.
|
|
957
|
-
P(olympe.dc.Sync.P,olympe.dm.jc.
|
|
956
|
+
olympe.dm.rd.prototype.F.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.jc=class extends olympe.dm.Ob{G(){return this.wb(olympe.dm.jc.ca)}Ea(){return this.wb(olympe.dm.jc.Xa)}F(){return this.Wa(olympe.dm.jc.V,olympe.dm.jc)}};olympe.dm.jc.P=olympe.dc.wa.C('0163d9594700fcf61e54',olympe.dm.jc);olympe.dm.jc.ca=olympe.dm.jc.P.Ba('017869c7d2833c9492c1');olympe.dm.jc.Xa=olympe.dm.jc.P.Ba('017869c80bb9929c76d0');olympe.dm.jc.V=olympe.dm.jc.P.Ma('ff02200000000000002b');olympe.dm.jc.Sd=P(olympe.dm.jc.P,olympe.dm.jc.V);olympe.dm.jc.Qa=olympe.dm.jc.P.Ma('ff02200000000000002a');
|
|
957
|
+
P(olympe.dc.Sync.P,olympe.dm.jc.Qa);olympe.dm.jc.ud=M('100000000000000000dd','PRIMORDIAL');olympe.dm.jc.prototype.G.K=olympe.D.J.F;olympe.dm.jc.prototype.Ea.K=olympe.D.J.F;olympe.dm.jc.prototype.F.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.dm.Property=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}F(){return this.vc(olympe.dm.Property.definingModelRel,olympe.dc.Sync)}C(){return this.vc(olympe.dm.Property.typeRel,olympe.dc.Sync)}Xc(){return this.F().ia().Up(this.ia())}};olympe.dm.Property.P=olympe.dc.wa.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=P(olympe.dm.Property.P,olympe.dc.Sync.propertyRel);w('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);
|
|
958
958
|
olympe.dm.Property.typeRel=P(olympe.dm.Property.P,olympe.dc.Sync.typeRel);w('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.F.K=new olympe.D.J(()=>olympe.dc.Sync,[]);olympe.dm.Property.prototype.C.K=new olympe.D.J(()=>olympe.dc.Sync,[]);olympe.dm.Relation=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}xv(){return olympe.D.Oa.EMPTY}Uu(){return this.Td(olympe.dm.Relation.Fl)}Lv(){return this.Td(olympe.dm.Relation.Mi)}fq(){return this.Wa(olympe.dm.Relation.destinationModelRel,olympe.dc.Sync).ld()}mq(){return this.Wa(olympe.dm.Relation.originModelRel,olympe.dc.Sync).ld()}Xc(){return this.mq().ia().concat(['-',this.ia(),'->',this.fq().ia()])}};olympe.dm.Relation.P=olympe.dc.wa.C('ff021000000000000006',olympe.dm.Relation);
|
|
959
959
|
olympe.dm.Relation.Mi=olympe.dm.Relation.P.Ba('ff023000000000000030');olympe.dm.Relation.Fl=olympe.dm.Relation.P.Ba('ff023000000000000034');olympe.dm.Relation.Nl=olympe.dm.Relation.P.Ba('ff023000000000000037');olympe.dm.Relation.Ml=olympe.dm.Relation.P.Ba('ff023000000000000137');olympe.dm.Relation.qm=olympe.dm.Relation.P.Ba('ff023000000000000237');olympe.dm.Relation.originModelRel=P(olympe.dm.Relation.P,olympe.dc.Sync.ja);w('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);
|
|
960
960
|
olympe.dm.Relation.destinationModelRel=P(olympe.dm.Relation.P,olympe.dc.Sync.fb);w('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dm.Relation.C={Sn:0,pk:5,Vo:1,nt:4,Ej:2,yj:8,nn:10,jt:6,kt:9,bd:6,mt:9};olympe.dm.Relation.L={Ss:3,gl:4,Js:5,Is:6};olympe.dm.Relation.G={rl:0,ul:1,tl:2,al:4,$k:8,qk:5,nk:10};l=olympe.dm.Relation.prototype;l.xv.K=olympe.D.J.F;l.Uu.K=olympe.D.J.G;l.Lv.K=olympe.D.J.G;l.fq.K=new olympe.D.J(()=>olympe.dc.Sync,[]);
|
|
961
961
|
l.mq.K=new olympe.D.J(()=>olympe.dc.Sync,[]);olympe.dm.ai=class extends olympe.dm.Ob{};olympe.dm.ai.P=olympe.dc.wa.C('ff021000000000000020',olympe.dm.ai);olympe.dm.ai.ca=M('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.ai.V=M('10000000000000000001','OLYMPE_FOLDER');olympe.dm.tg=class extends olympe.dc.Sync{C(){}};olympe.dm.tg.P=olympe.dc.wa.C('ff021000000000000019',olympe.dm.tg);olympe.dm.String=class extends olympe.dm.tg{C(){return this.wb(olympe.dm.String.valueProp)}};olympe.dm.String.P=olympe.dc.wa.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.P.Ba('ff023000000000000026');w('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.C.K=olympe.D.J.F;olympe.dm.Boolean=class extends olympe.dm.tg{C(){return this.Ig(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.P=olympe.dc.wa.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.P.Ba('ff023000000000000027');w('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.C.K=olympe.D.J.O;olympe.dm.Color=class extends olympe.dm.tg{C(){return this.oq()}};olympe.dm.Color.P=olympe.dc.wa.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.P.Ba('ff023000000000000032');w('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.C.K=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.tg{C(){return this.Ai(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.P=olympe.dc.wa.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.P.Ba('ff023000000000000029');w('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.C.K=new olympe.D.J(()=>olympe.D.ab,[]);olympe.dm.Enum=class extends olympe.dm.String{static create(a,b,c,d,e){const f=olympe.dc.Ua();e=void 0!==e?e:f.Fb(b)&&f.md(b).length||0;return a.create(b).setProperty(olympe.dm.String.valueProp,c).setProperty(olympe.dc.Sync.nameProp,d||c).setProperty(olympe.dm.Enum.rankProp,e).R()}ia(){return olympe.D.xa([super.ia(),super.C()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.Oa)}Dd(){return this.Td(olympe.dm.Enum.rankProp)}};olympe.dm.Enum.create=olympe.dm.Enum.create;
|
|
962
962
|
olympe.dm.Enum.P=olympe.dc.wa.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.P.Ba('017a7690c915975ea995');olympe.dm.Enum.prototype.Dd.K=olympe.D.J.G;olympe.dm.zf=class extends olympe.dm.BrickMetadata{static create(a,b){return fe(a,b||{},olympe.dm.zf,olympe.dm.Enum).R()}gw(){return this.Wa(olympe.dc.Sync.instancesRel,olympe.dm.Enum)}};olympe.dm.zf.prototype.getValues=olympe.dm.zf.prototype.gw;olympe.dm.zf.create=olympe.dm.zf.create;olympe.dm.zf.P=olympe.dc.wa.C('017a768f966fc08ebb98',olympe.dm.zf);olympe.dm.Number=class extends olympe.dm.tg{C(){return this.Td(olympe.dm.Number.valueProp)}};olympe.dm.Number.P=olympe.dc.wa.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.P.Ba('ff023000000000000028');w('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.C.K=olympe.D.J.G;olympe.sc={};olympe.sc.T={Ha:'sc.Logger',vl:'sc.RootContext'};olympe.sc.Z={wf:'sc.debug',nr:'sc.disableTheme',Lo:'sc.production',Eo:'sc.onstartTimeout',Wo:'sc.remoteActionTimeout',Ks:'google.apikey'};
|
|
963
|
-
olympe.U.Ib(a=>{D(a,olympe.sc.Z.wf,!1);D(a,olympe.sc.Z.nr,!1);D(a,olympe.sc.Z.Lo,!1);D(a,olympe.sc.Z.Eo,2E4);D(a,olympe.sc.Z.Ks,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');D(a,olympe.sc.Z.Wo,1E4);B(a,olympe.sc.T.Ha,[olympe.ua.T.ta],b=>b.Gc('sc'));B(a,olympe.sc.T.vl,[new olympe.U.ha(olympe.sc.Z.Lo),new olympe.U.ha(olympe.sc.Z.Eo)],(b,c)=>{const d=new olympe.sc.eb('root','root',null);olympe.sc.
|
|
964
|
-
olympe.U.run([olympe.sc.T.vl],a=>{window.ctx=a});olympe.sc.
|
|
965
|
-
olympe.sc.Vj=()=>null!==olympe.dc.Ua().pc(void 0,olympe.sc.Runnable.C.xd());olympe.sc.
|
|
966
|
-
olympe.sc.
|
|
967
|
-
olympe.sc.
|
|
968
|
-
olympe.sc.
|
|
963
|
+
olympe.U.Ib(a=>{D(a,olympe.sc.Z.wf,!1);D(a,olympe.sc.Z.nr,!1);D(a,olympe.sc.Z.Lo,!1);D(a,olympe.sc.Z.Eo,2E4);D(a,olympe.sc.Z.Ks,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');D(a,olympe.sc.Z.Wo,1E4);B(a,olympe.sc.T.Ha,[olympe.ua.T.ta],b=>b.Gc('sc'));B(a,olympe.sc.T.vl,[new olympe.U.ha(olympe.sc.Z.Lo),new olympe.U.ha(olympe.sc.Z.Eo)],(b,c)=>{const d=new olympe.sc.eb('root','root',null);olympe.sc.jx=d;d.set('Production',b);d.set('onstartTimeout',c);return d})},'olympe.sc');
|
|
964
|
+
olympe.U.run([olympe.sc.T.vl],a=>{window.ctx=a});olympe.sc.VB=(a,b,c)=>{a.la(olympe.dc.Sync.containsRel,c,b);a.la(olympe.dc.Sync.F,b,c);a.la(olympe.dm.ub.C,b,c)};olympe.sc.TB=(a,b,c,d)=>{a.la(olympe.dc.Sync.F,b,d);a.la(olympe.dm.ub.C,b,d);a.la(olympe.dc.Sync.containsRel,c,b);a.la(olympe.sc.Runnable.F,c,b);a.la(olympe.sc.Runnable.C,c,b)};olympe.sc.nC=(a,b,c,d)=>{a.nb(olympe.dc.Sync.F,b,d);a.nb(olympe.dm.ub.C,b,d);a.nb(olympe.dc.Sync.containsRel,c,b);a.nb(olympe.sc.Runnable.F,c,b);a.nb(olympe.sc.Runnable.C,c,b)};
|
|
965
|
+
olympe.sc.Vj=()=>null!==olympe.dc.Ua().pc(void 0,olympe.sc.Runnable.C.xd());olympe.sc.pC=(a,b,c)=>{a.nb(olympe.dc.Sync.containsRel,c,b);a.nb(olympe.dc.Sync.F,b,c);a.nb(olympe.dm.ub.C,b,c)};olympe.sc.xw=(a,b,c)=>{a.la(olympe.dc.Sync.F,b,c);a.la(olympe.sc.Ra.G,c,b)};olympe.sc.Jx=(a,b,c)=>{a.nb(olympe.dc.Sync.F,b,c);a.nb(olympe.sc.Ra.G,c,b)};olympe.sc.UB=(a,b,c)=>{olympe.sc.xw(a,b,c);a.la(olympe.dc.Sync.containsRel,c,b);a.la(olympe.dm.ub.C,b,c)};
|
|
966
|
+
olympe.sc.oC=(a,b,c)=>{olympe.sc.Jx(a,b,c);a.nb(olympe.dc.Sync.containsRel,c,b);a.nb(olympe.dm.ub.C,b,c)};olympe.sc.yB=(a,b,c,d,e)=>{d=a.create(olympe.sc.tc).setProperty(olympe.sc.tc.C,d||null).setProperty(olympe.sc.tc.L,e||null);a.la(olympe.sc.tc.G,d,b);a.la(olympe.dc.Sync.containsRel,b,d);a.la(olympe.dc.Sync.F,d,c);return d.R()};olympe.sc.Bg=a=>{a=olympe.dc.$.Eb.Bg(a);return a instanceof olympe.sc.de?a.C():a};olympe.sc.MB=a=>{a=olympe.dc.Sync.Qb(a.tag);return a instanceof olympe.sc.de?a.C():a};
|
|
967
|
+
olympe.sc.JB=function(a){const b=olympe.dm.Ob.G.xd(),c=olympe.dc.Sync.containsRel.xd();var d=olympe.dc.Ca(a);if(void 0===d)return[];a=olympe.dc.Ua();var e=a.model(d);const f=[],g=[];let h=[];if(a.Di(e,olympe.dm.Ob))h.push(d);else{for(;null===a.pc(d,b);){e=a.pc(d,olympe.dc.Sync.instancesRel);const k=a.pc(d,c);e===k?(f.push(d),d=a.pc(k,c)):d=k}g.push(d);h.push(a.pc(g[0],b))}h=h.concat(a.Sj(h[0],olympe.dm.Ob.na));return[...f,...g,...h].reverse()};
|
|
968
|
+
olympe.sc.KB=a=>{a=a.valueOf();return a.startsWith('image/')?olympe.sc.eh:a.startsWith('video/')?olympe.sc.ji:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.Mc:olympe.dm.File};let wh=0,xh=0;const yh=olympe.dc.Ca;function zh(a,b){if(a.G)for(const c of a.G.values())b(c)}function Ah(a,b){b=olympe.dc.Ca(b);if(a.L&&a.L.has(b)){var c=a.L.get(b)-1;0===c?(a.L.delete(b),0===a.L.size&&(a.L=null),a=!0):(a.L.set(b,c),a=!1)}else a=!1;a&&Qc(olympe.dc.Wc(),void 0,[b])}function Bh(a,b){a.G&&a.G.delete(b.da())}function Ch(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.na&&!c.id.startsWith('_')&&(a=Ch(c.G,b)))return a;return null}
|
|
969
969
|
function Dh(a){a.ya=!0;zh(a,b=>{Dh(b)})}function Eh(a){a.ya=!1;zh(a,b=>{Eh(b)})}function Fh(a,b,c,d){const e='$'+b;a.ja.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{(f=a.O&&a.O.get(f))&&f.forEach(g=>{g(d)})});zh(a,f=>{!f.ya&&f.ja.has(b)||f.data.has(e)||Fh(f,b,c,d)});a.ja.delete(b)}function Gh(a,b,c){a.O||(a.O=new Map);let d=a.O.get(b);void 0===d&&(d=new Map,a.O.set(b,d));++wh;const e=wh;d.set(e,c);return()=>{const f=a.O.get(b);f&&(f.delete(e),0===f.size&&a.O.delete(b))}}
|
|
970
970
|
function Hh(a,b){b=olympe.dc.Ca(b);a.L||(a.L=new Map);const c=a.L.get(b)||0;a.L.set(b,c+1);0===c&&Qc(olympe.dc.Wc(),[b])}function Ih(a,b,c){a.ja.add(b);const d=a.O&&a.O.get('&'+b);if(d)for(const e of d.values())e(c);zh(a,e=>{e.ja.has(b)||Ih(e,b,c)});a.ja.delete(b)}function Jh(a,b){b=yh(b);null===a.G&&(a.G=new Map);let c=a.G.get(b);if(!c){c=new olympe.sc.eb(b,void 0,a);a.G.set(b,c);for(a=c.V;a&&a.na;)a=a.V;a&&Ih(a,b,c)}return c}function Kh(a){return(a=a.Ta('Production'))?a:!1}
|
|
971
|
-
olympe.sc.eb=class{constructor(a,b,c=olympe.sc.
|
|
971
|
+
olympe.sc.eb=class{constructor(a,b,c=olympe.sc.jx){++xh;this.id=a;this.ca=new Set;this.V=c;this.hd=b||null;this.C=new olympe.D.lc('SC Context');this.data=new Map;this.L=this.F=this.G=this.O=null;this.Ea=xh;this.na=!1;this.ja=new Set;this.ya=!1;this.N=olympe.ua.rb('sc');this.C.onDestroy(()=>{zh(this,d=>d.gb());this.L&&this.L.forEach((d,e)=>{for(let f=0;f<d;f++)Ah(this,e)});c&&Bh(this.V,this);this.ca.clear();this.C=this.V=null;null!==this.F&&0<this.F.length&&this.N.warn(`The context ${this.id} destroys but still has unreleased transactions. You probably forgot to end a transaction.`);
|
|
972
972
|
this.F=null})}da(){return this.id}getParent(){return this.V}set(a,b){if(this.C&&!this.C.Vd()){a=yh(a);var c='$'+a,d=this.data.get(c);d&&d.valueOf&&(d=d.valueOf());if(void 0===b||null===b)void 0!==d&&(this.data.delete(c),Fh(this,a,['*',this.id,...this.ca],null));else if(void 0===d||b.valueOf()!==d.valueOf())this.data.set(c,b),Fh(this,a,['*',this.id,...this.ca],b)}}remove(a){this.C&&!this.C.Vd()&&(a=yh(a),this.data.delete('$'+a)&&Fh(this,a,['*',this.id,...this.ca],null))}yb(a,b,c=!1){const d=olympe.dc.Ca(a),
|
|
973
973
|
e=olympe.D.Ic(b||Object,`Get context value flow source of ${d}`);e.node.onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.id:void 0));return e.yb()}get(a,b=!0){a=this.Ta(a,b);return void 0!==a?a:null}observe(a,b=!1,c=!0){return new rxjs.Observable(d=>{const e=this.on(a,f=>{(null!==f||b)&&d.next(f);this.onDestroy(()=>d.complete())},c?this.id:void 0);this.onDestroy(e)})}Ta(a,b=!1){a='$'+yh(a);let c=this.data.get(a),d=this.V;if(!b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.V;return c}on(a,
|
|
974
|
-
b,c){if(!this.C||this.C.Vd())return()=>{};const d=yh(a),e=c?yh(c):'*';a=Gh(this,'@'+e+'.'+d,b);c=c?(c=this.bm(e))?c.Ta(d,!0):void 0:this.Ta(d);void 0!==c&&b(c);olympe.D.Ja().onDestroy(a);return a}Wp(a){const b='_'+olympe.$.Rb();null===this.G&&(this.G=new Map);a=new olympe.sc.eb(b,a,this);this.G.set(b,a);return a}
|
|
975
|
-
this.F||(this.F=[]);a=new olympe.sc.lb;this.F.push({transaction:a,Xj:!0});return a}
|
|
976
|
-
b.ca.has(a))return b;const c=Ch(b.G,a);if(c)return c;b=b.V}return null}
|
|
977
|
-
olympe.sc.eb.prototype.offDestroy=olympe.sc.eb.prototype.dg;olympe.sc.eb.prototype.onDestroy=olympe.sc.eb.prototype.onDestroy;olympe.sc.eb.prototype.offClear=olympe.sc.eb.prototype.
|
|
978
|
-
olympe.sc.eb.prototype.getTransaction=olympe.sc.eb.prototype.Bh;olympe.sc.eb.prototype.pushTransaction=olympe.sc.eb.prototype.
|
|
979
|
-
olympe.sc.eb.C='EditionMode';olympe.sc.eb.G='Production';olympe.sc.eb.F='onstartTimeout';olympe.sc.Metadata=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}};olympe.sc.Metadata.P=olympe.dc.wa.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.tc=class extends olympe.dc.Sync{F(){return this.wb(olympe.sc.tc.L)}C(){return this.wb(olympe.sc.tc.C)}};olympe.sc.tc.P=olympe.dc.wa.C('01703376c4a81c0e9d90',olympe.sc.tc);olympe.sc.tc.L=olympe.sc.tc.P.Ba('01703376c4a81c0e9d91');olympe.sc.tc.C=olympe.sc.tc.P.Ba('01703376c4a81c0e9d92');olympe.sc.tc.G=olympe.sc.tc.P.Ma('01703376c4a81c0e9d93');P(olympe.dc.Sync.P,olympe.sc.tc.G);olympe.sc.tc.prototype.F.K=olympe.D.J.F;olympe.sc.tc.prototype.C.K=olympe.D.J.F;olympe.sc.Ie={};olympe.sc.Ie.Ag={
|
|
974
|
+
b,c){if(!this.C||this.C.Vd())return()=>{};const d=yh(a),e=c?yh(c):'*';a=Gh(this,'@'+e+'.'+d,b);c=c?(c=this.bm(e))?c.Ta(d,!0):void 0:this.Ta(d);void 0!==c&&b(c);olympe.D.Ja().onDestroy(a);return a}Wp(a){const b='_'+olympe.$.Rb();null===this.G&&(this.G=new Map);a=new olympe.sc.eb(b,a,this);this.G.set(b,a);return a}ex(a){this.F||(this.F=[]);this.F.push({transaction:a,Xj:!1})}Bh(){var a=this;let b=null;for(;(!b||b&&b.Xj)&&a;){const c=a.F;c&&0<c.length&&(b=c[c.length-1]);a=a.V}if(b&&!b.Xj)return b.transaction;
|
|
975
|
+
this.F||(this.F=[]);a=new olympe.sc.lb;this.F.push({transaction:a,Xj:!0});return a}hx(a){if(null!==this.F){const b=this.F.pop();0===this.F.length&&(this.F=null);if(b&&b.Xj){b.transaction.wd((c,d)=>{a&&a(!0,c,d)});return}}a&&a(!1,!0,null)}cx(){if(null===this.F)return null;const a=this.F.pop();0===this.F.length&&(this.F=null);return a&&a.transaction||null}Cq(a,b){const c=this.bm(a);c&&b(c);return Gh(this,'&'+a,b)}bm(a){if(a===this.id||this.ca.has(a)||!a)return this;let b=this.V;for(;b;){if(a===b.id||
|
|
976
|
+
b.ca.has(a))return b;const c=Ch(b.G,a);if(c)return c;b=b.V}return null}Xw(a){return null!==this.C?this.C.Sc(a):'noId'}Ww(a){null!==this.C&&this.C.Bq(a)}onDestroy(a){return null===this.C?(a(),'noId'):this.C.onDestroy(a)}dg(a){null!==this.C&&this.C.dg(a)}gb(){this.C&&!this.C.Kb()&&this.C.gb()}clear(){this.C&&!this.C.Kb()&&this.C.ze()}Kb(){return null===this.C||this.C.Kb()}};olympe.sc.eb.prototype.clear=olympe.sc.eb.prototype.clear;olympe.sc.eb.prototype.destroy=olympe.sc.eb.prototype.gb;
|
|
977
|
+
olympe.sc.eb.prototype.offDestroy=olympe.sc.eb.prototype.dg;olympe.sc.eb.prototype.onDestroy=olympe.sc.eb.prototype.onDestroy;olympe.sc.eb.prototype.offClear=olympe.sc.eb.prototype.Ww;olympe.sc.eb.prototype.onClear=olympe.sc.eb.prototype.Xw;olympe.sc.eb.prototype.getOtherContext=olympe.sc.eb.prototype.bm;olympe.sc.eb.prototype.onContext=olympe.sc.eb.prototype.Cq;olympe.sc.eb.prototype.popTransaction=olympe.sc.eb.prototype.cx;olympe.sc.eb.prototype.releaseTransaction=olympe.sc.eb.prototype.hx;
|
|
978
|
+
olympe.sc.eb.prototype.getTransaction=olympe.sc.eb.prototype.Bh;olympe.sc.eb.prototype.pushTransaction=olympe.sc.eb.prototype.ex;olympe.sc.eb.prototype.createChild=olympe.sc.eb.prototype.Wp;olympe.sc.eb.prototype.observe=olympe.sc.eb.prototype.observe;olympe.sc.eb.prototype.get=olympe.sc.eb.prototype.get;olympe.sc.eb.prototype.remove=olympe.sc.eb.prototype.remove;olympe.sc.eb.prototype.set=olympe.sc.eb.prototype.set;olympe.sc.eb.prototype.getParent=olympe.sc.eb.prototype.getParent;
|
|
979
|
+
olympe.sc.eb.C='EditionMode';olympe.sc.eb.G='Production';olympe.sc.eb.F='onstartTimeout';olympe.sc.Metadata=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}};olympe.sc.Metadata.P=olympe.dc.wa.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.tc=class extends olympe.dc.Sync{F(){return this.wb(olympe.sc.tc.L)}C(){return this.wb(olympe.sc.tc.C)}};olympe.sc.tc.P=olympe.dc.wa.C('01703376c4a81c0e9d90',olympe.sc.tc);olympe.sc.tc.L=olympe.sc.tc.P.Ba('01703376c4a81c0e9d91');olympe.sc.tc.C=olympe.sc.tc.P.Ba('01703376c4a81c0e9d92');olympe.sc.tc.G=olympe.sc.tc.P.Ma('01703376c4a81c0e9d93');P(olympe.dc.Sync.P,olympe.sc.tc.G);olympe.sc.tc.prototype.F.K=olympe.D.J.F;olympe.sc.tc.prototype.C.K=olympe.D.J.F;olympe.sc.Ie={};olympe.sc.Ie.Ag={ay:null,qt:'screenflow',Kt:'ui-design',cp:'software-intelligence',yk:'data-management'};olympe.sc.yc=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ie.Ag.cp}F(){return this.Wa(olympe.sc.yc.G,olympe.sc.logic.sg)}G(){return this.Wa(olympe.sc.yc.O,olympe.sc.logic.Gf)}};olympe.sc.yc.P=olympe.dc.wa.C('011100000000000adef0',olympe.sc.yc);olympe.sc.yc.G=olympe.sc.yc.P.Ma('016ac4f59a2917fdef01');olympe.sc.yc.O=olympe.sc.yc.P.Ma('016ac4f59a2917fdef02');olympe.sc.yc.P.C=(a,b)=>fe(a,b||'New function signature',olympe.sc.yc,olympe.sc.logic.Kd).R();
|
|
980
980
|
olympe.sc.yc.prototype.F.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.sc.yc.prototype.G.K=new olympe.D.J(()=>olympe.dc.pa,[]);function Lh(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function Mh(a,b){const c=[];for(const d of b)b=a.db.Gb(d,olympe.sc.logic.kc.C,!0),c[b]=d;return c}
|
|
981
|
-
olympe.sc.Ra=class extends olympe.dm.BrickMetadata{qs(a,b,c,d,e=!0){e||olympe.ua.rb('sc').error('parameter own= false ignored, investigate');return olympe.D.Je(K(this.Xf(a,olympe.dc.$.Eb.Bg,c)),d)}Vv(){return this.Wa(olympe.sc.Ra.G,olympe.sc.Runnable)}Yu(){return this.Wa(olympe.sc.Ra.
|
|
982
|
-
olympe.sc.logic.pb)}};olympe.sc.Ra.P=olympe.dc.wa.C('0112000000000000def0',olympe.sc.Ra);olympe.sc.Ra.Xa=olympe.sc.Ra.P.Ba('01692aa71f3108454479');olympe.sc.Ra.ud=olympe.sc.Ra.P.Ba('0166446c1f128ebc903a');olympe.sc.Ra.G=olympe.sc.Ra.P.Ma('01692a4af82e8984742c');olympe.sc.Ra.
|
|
981
|
+
olympe.sc.Ra=class extends olympe.dm.BrickMetadata{qs(a,b,c,d,e=!0){e||olympe.ua.rb('sc').error('parameter own= false ignored, investigate');return olympe.D.Je(K(this.Xf(a,olympe.dc.$.Eb.Bg,c)),d)}Vv(){return this.Wa(olympe.sc.Ra.G,olympe.sc.Runnable)}Yu(){return this.Wa(olympe.sc.Ra.Qa,olympe.sc.Runnable)}fo(){return this.db.Gb(this,olympe.sc.Ra.Xa)}Vj(){return null!==this.db.pc(this.tag,olympe.sc.Runnable.C.xd())}Xk(){return this.Wa(olympe.sc.Ra.O,olympe.sc.logic.kb)}kj(){return this.Wa(olympe.sc.Ra.V,
|
|
982
|
+
olympe.sc.logic.pb)}};olympe.sc.Ra.P=olympe.dc.wa.C('0112000000000000def0',olympe.sc.Ra);olympe.sc.Ra.Xa=olympe.sc.Ra.P.Ba('01692aa71f3108454479');olympe.sc.Ra.ud=olympe.sc.Ra.P.Ba('0166446c1f128ebc903a');olympe.sc.Ra.G=olympe.sc.Ra.P.Ma('01692a4af82e8984742c');olympe.sc.Ra.Qa=olympe.sc.Ra.P.Ma('01692a4af82e8984742d');olympe.sc.Ra.O=olympe.sc.Ra.P.Ma('01621fb84e320000f00a');olympe.sc.Ra.V=olympe.sc.Ra.P.Ma('01621fb84e320000f00b');olympe.sc.Ra.Mg=olympe.sc.Ra.P.Ma('0171838bcfed0000e00e');
|
|
983
983
|
olympe.sc.Ra.Rf=olympe.sc.Ra.P.Ma('0171838bcfed0000a00a');l=olympe.sc.Ra.prototype;l.qs.K=olympe.D.J.C;l.Vv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Yu.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.fo.K=olympe.D.J.C;l.Vj.K=olympe.D.J.C;l.Xk.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.kj.K=new olympe.D.J(()=>olympe.dc.pa,[]);function Nh(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)}})}
|
|
984
984
|
function Oh(a,b,c){const d=olympe.D.Ja(),e=zd(a.db,a.tag,d.vb((f,g,h)=>{const k=h?c:b;null!==k&&(h&&b&&b(f,null),null===g||void 0===g?k(f,null):k(f,olympe.sc.Bg(g)))}));d.onDestroy(()=>{var f=a.db;const g=V(f,a.tag);null!==g&&(g.V(ud,e),f.C.getState()===vd.uf&&f.C.O(e))})}
|
|
985
985
|
olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){const b=this.Bd();this.setup(a);this.onInit(a);b.fo()?(this.N.debug(`Hardcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.Ea}`),this.G(a)):(this.N.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.Ea}`),b.Sl(olympe.sc.Ra.G,c=>{if(c instanceof olympe.sc.Runnable){const d=Jh(a,c);c.Bd().Vj()&&(d.na=!0);c.run(d)}}));a.onDestroy(this.onDestroy.bind(this,
|
|
986
986
|
a))}onInit(){}G(){}onDestroy(){}co(a,b,c,d){a=b.yb(a,c,!0);void 0!==d&&olympe.D.Je(a,d);return a}Qv(a,b,c,d,e){olympe.D.om([d],f=>{b.set(a,olympe.D.sq(f)?f.valueOf():f)});return this.co(a,b,c,e)}Uv(){return this.vc(olympe.sc.Runnable.F,olympe.sc.Ra)}Bd(){return this.Rj()}Wv(){return this.vc(olympe.sc.Runnable.O,olympe.sc.Ra)}setup(a){Lh(this.Bd(),a);const b=a.C,c=this.L(),d=Nh(a,c),e=[];c.forEach((f,g)=>{f===this.ca?e[0]=g:f===this.V&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(b.run(()=>{Oh(this,d[e[0]],
|
|
987
987
|
d[e[1]])}),c[e[0]]=null,c[e[1]]=null);b.run(()=>{c.forEach((f,g)=>{f&&f.call(this,a,d[g])})})}L(){return[this.ca,this.V]}ca(a,b){Oh(this,b,null)}V(a,b){Oh(this,null,b)}Xa(a,b){const c=this.db,d=olympe.sc.logic.qb.L.xd(),e=olympe.sc.logic.qb.G,f=olympe.sc.logic.qb.C;this.Sl(d,g=>{var h=g.R();if(h=c.pc(h,e)||c.pc(h,f))g=Ph(g,a,b.bind(null,h)),olympe.D.Ja().onDestroy(g)})}};olympe.sc.Runnable.P=Lc(olympe.dc.wa.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.F=olympe.sc.Runnable.P.Ma('01692a4af82e8984742b');
|
|
988
|
-
olympe.sc.Runnable.C=olympe.sc.Runnable.P.Ma('01756a18d4921c103111');olympe.sc.Runnable.O=P(olympe.sc.Runnable.P,olympe.sc.Ra.G);olympe.sc.Runnable.V=P(olympe.sc.Runnable.P,olympe.sc.Ra.
|
|
988
|
+
olympe.sc.Runnable.C=olympe.sc.Runnable.P.Ma('01756a18d4921c103111');olympe.sc.Runnable.O=P(olympe.sc.Runnable.P,olympe.sc.Ra.G);olympe.sc.Runnable.V=P(olympe.sc.Runnable.P,olympe.sc.Ra.Qa);P(olympe.sc.Ra.P,olympe.sc.Runnable.F);P(olympe.sc.Ra.P,olympe.sc.Runnable.C);l=olympe.sc.Runnable.prototype;l.co.K=new olympe.D.J(()=>Object,[]);l.Qv.K=olympe.D.J.C;l.Uv.K=new olympe.D.J(()=>olympe.sc.Ra,[]);l.Bd.K=new olympe.D.J(()=>olympe.sc.Ra,[]);l.Wv.K=new olympe.D.J(()=>olympe.sc.Ra,[]);function Qh(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.de)return(a=a.F())?a.valueOf():null;if('function'===typeof a.R)return a.R()}return null}olympe.sc.de=class extends olympe.dc.Sync{F(){return this.db.Wa(this,olympe.sc.de.C)[0]}C(){return olympe.dc.Sync.Qb(Qh(this))}toString(){const a=Qh(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.de.P=olympe.dc.wa.C('0163c9ae01f2d6e9ca49',olympe.sc.de);olympe.sc.de.C=olympe.sc.de.P.Ma('0169b5a8a33144fb0b49');
|
|
989
989
|
P(olympe.dc.Sync.P,olympe.sc.de.C);olympe.sc.de.prototype.F.K=new olympe.D.J(()=>String,[]);olympe.sc.de.prototype.C.K=new olympe.D.J(()=>olympe.dc.Sync,[]);olympe.sc.en=class extends olympe.dm.Ob{C(){return olympe.sc.Ie.Ag.yk}};olympe.sc.en.P=olympe.dc.wa.C('0163a68ce44f3d1fa84c',olympe.sc.en);olympe.sc.Vg=class extends olympe.dm.BrickMetadata{};olympe.sc.Vg.P=olympe.dc.wa.C('016324fde11a836f76c2',olympe.sc.Vg);olympe.sc.Vg.P.C=function(a,b){return fe(a,b||'New model',olympe.sc.Vg).R()};let Rh=null;
|
|
990
990
|
function Sh(a,b){Rh=a;ue(ue(new olympe.dc.Af(a,olympe.dc.Ld.uj),olympe.sc.Fa.oe.ca),olympe.sc.Yc.G.xd()).wd((c,d)=>{if(c)olympe.ua.rb('sc').error('Error while loading business container:',c.message),b(olympe.sc.Yc.C.wc);else{c=null;for(const [e,f]of d.F().Ud())e===olympe.sc.Yc.G.R()&&(c=f);null!==c?Ae(te(new olympe.dc.Af(c),olympe.dc.ob.RUNTIME),(e,f)=>{const g=olympe.dc.Fc.be,h=olympe.dc.Fc.Zg,k=f.R();f=f.Na();return olympe.dc.Ua().$f(e,olympe.sc.Vg)&&f===olympe.dc.Ka.ORIGIN&&(k===g||k===h)}).wd(()=>
|
|
991
991
|
b(olympe.sc.Yc.C.jo)):(olympe.ua.rb('sc').error('No container found for the application',a),b(olympe.sc.Yc.C.dl))}})}olympe.sc.Yc=class extends olympe.dc.Sync{};olympe.sc.Yc.C={jo:0,dl:1,wc:2};olympe.sc.Yc.P=olympe.dc.wa.C('017b3aa8fae1e3d044dc',olympe.sc.Yc);olympe.sc.Yc.G=olympe.sc.Yc.P.Ma('017b3aa8fd1659291b92');olympe.sc.Yc.L=olympe.sc.Yc.P.Ma('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.Sync{};olympe.sc.Map.P=olympe.dc.wa.C('01631aacd5c1f9d61c5d',olympe.sc.Map);olympe.sc.Vh=class extends olympe.sc.Map{};olympe.sc.Vh.P=olympe.dc.wa.C('01631aacd8276ea98490',olympe.sc.Vh);olympe.sc.eh=class extends olympe.dm.File{L(){const a=olympe.D.Ic(olympe.D.Oa);this.Pj(b=>{a.update(olympe.D.sb(b))});return a.yb()}};olympe.sc.eh.P=Gc('01644b6297305d62fca2',olympe.sc.eh);olympe.sc.eh.P.C=olympe.dm.File.ke.bind(null,olympe.sc.eh);olympe.sc.eh.prototype.L.K=olympe.D.J.F;olympe.sc.Mc=class extends olympe.dm.File{L(){return this.wb(olympe.sc.Mc.G)}O(){return this.wb(olympe.sc.Mc.L)}V(){return this.Td(olympe.sc.Mc.O)}};olympe.sc.Mc.P=Gc('01647e113043c637b541',olympe.sc.Mc);olympe.sc.Mc.G=olympe.sc.Mc.P.Ba('01647e35ecd24ef0b88d');olympe.sc.Mc.L=olympe.sc.Mc.P.Ba('01647e677f5d1cfbdf42');olympe.sc.Mc.O=olympe.sc.Mc.P.Ba('01647e6780999bf8bd25');olympe.sc.Mc.P.C=(a,b,c,d)=>{c=olympe.dm.File.ke(olympe.sc.Mc,a,b,c,d);a.update(c,olympe.sc.Mc.G,b.split('.')[0]);return c};
|
|
992
992
|
olympe.sc.Mc.prototype.L.K=olympe.D.J.F;olympe.sc.Mc.prototype.O.K=olympe.D.J.F;olympe.sc.Mc.prototype.V.K=olympe.D.J.G;olympe.sc.ji=class extends olympe.dm.File{};olympe.sc.ji.P=Gc('0164643c432146a71d5c',olympe.sc.ji);olympe.sc.ji.P.C=olympe.dm.File.ke.bind(null,olympe.sc.ji);olympe.sc.Ap=class extends olympe.dc.Sync{};olympe.sc.Ap.P=olympe.dc.wa.C('016421bb3797e22d1c4e',olympe.sc.Ap);olympe.sc.logic={};olympe.sc.logic.Kn=(a,b)=>a===b?0:a>b?1:-1;
|
|
993
|
-
olympe.sc.logic.
|
|
993
|
+
olympe.sc.logic.dz=(a,b,c,d,e,f,g)=>{const h=b.R();b=olympe.D.Ta(b.C().R());let k,m;if(b===olympe.dc.Ca(olympe.dm.String))k=c.valueOf().toLowerCase(),m=p=>p.wb(h).toLowerCase();else if(b===olympe.dc.Ca(olympe.dm.Number))k=c.valueOf(),m=p=>p.Td(h);else if(b===olympe.dc.Ca(olympe.dm.DateTime))k=c.getTime(),m=p=>olympe.D.xa([p.Ai(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.Ua().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
|
|
994
994
|
return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.Kn(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.Kn(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.Pf().filter(p=>olympe.D.xa([m(p)],q=>{q=n(q.valueOf(),k);return olympe.D.qc(d.valueOf()?1===q:0<=q)},olympe.D.fa,'FilterList ListDefBuilder Filter TransformFlows')).Re())};
|
|
995
|
-
olympe.sc.logic.
|
|
996
|
-
olympe.sc.logic.wa=class{constructor(){}static C(a,b,...c){if(Uh[a])throw c=Wh(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.za.An(a,b,[olympe.sc.T.Ha].concat(c));return Uh[a]=b}};olympe.sc.logic.
|
|
995
|
+
olympe.sc.logic.xB=(a,b)=>{if(a instanceof olympe.D.ea)return a;if(a instanceof olympe.D.Oa)return a.Mq();if(a instanceof olympe.D.fa)return a.kq();if('string'===typeof a||'number'===typeof a)return olympe.D.va(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ea.vo};olympe.sc.logic.za={};function Th(a){Kc(a.P,(b,c)=>{b=b.create(a.P.F);b.setProperty(olympe.dc.Sync.nameProp,c);return b.R()})}olympe.sc.logic.za.An=class{constructor(a,b,c){this.P=olympe.dc.wa.C(a,b,...c);Th(this)}R(){return this.P.R()}};olympe.sc.logic.za.An.ka=[olympe.dc.Nd];const Uh=Object.create(null),Vh=Object.create(null);function Wh(a){if(void 0===Uh[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Hc(a)}function Xh(a,b,c=olympe.sc.logic.Function){if(Vh[a]){var d=Wh(a);throw Error(`Tag: ${a} - overwriting already defined functionDef "${d.name}" with "${b.name}"`);}d=olympe.dc.wa.C(a,b,...[]);Kc(d,(e,f,g)=>{const h=new olympe.sc.logic.Nh;f=h.create(f,g,b,c);e.we(h.Bh());return f.R()});return Vh[a]=d}
|
|
996
|
+
olympe.sc.logic.wa=class{constructor(){}static C(a,b,...c){if(Uh[a])throw c=Wh(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.za.An(a,b,[olympe.sc.T.Ha].concat(c));return Uh[a]=b}};olympe.sc.logic.fy=class{};olympe.sc.logic.Zi=class extends olympe.dc.Sync{};olympe.sc.logic.Zi.P=olympe.dc.wa.C('01621fb84e320000cf00',olympe.sc.logic.Zi);olympe.sc.logic.Error=class{constructor(a,b){this.code=a;this.xq=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}zv(){return this.xq}Wu(){return this.code}};w('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.Wu;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.zv;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
|
|
997
997
|
olympe.sc.logic.mg=class extends olympe.sc.logic.Zi{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.mg.P=olympe.dc.wa.C('016eeb5ede9f3094d8f0',olympe.sc.logic.mg);olympe.sc.logic.Nc=class extends olympe.dc.Sync{C(){return this.vc(olympe.sc.logic.Nc.C,olympe.dc.Sync)}};olympe.sc.logic.Nc.P=olympe.dc.wa.C('016ac4f59ee8ea2081ba',olympe.sc.logic.Nc);olympe.sc.logic.Nc.G=olympe.sc.logic.Nc.P.Ba('017bc044aeacce7ffc8f');olympe.sc.logic.Nc.C=olympe.sc.logic.Nc.P.Ma('016ac4f5a0091c4790e2');P(olympe.dc.Sync.P,olympe.sc.logic.Nc.C);olympe.sc.logic.Nc.prototype.C.K=new olympe.D.J(()=>olympe.dc.Sync,[]);olympe.sc.logic.sg=class extends olympe.sc.logic.Nc{};olympe.sc.logic.sg.P=olympe.dc.wa.C('016ac4f59c592b862457',olympe.sc.logic.sg);olympe.sc.logic.sg.L=olympe.sc.yc.G.xd();olympe.sc.logic.sg.P.C=(a,b,c,d,e)=>{b=fe(a,b||'New Predefined Input',olympe.sc.logic.sg,olympe.sc.logic.kb);b.setProperty(olympe.sc.logic.Nc.G,e);a.la(olympe.sc.logic.Nc.C,b,c);a.la(olympe.sc.yc.G,d,b);return b.R()};olympe.sc.logic.Gf=class extends olympe.sc.logic.Nc{};olympe.sc.logic.Gf.P=olympe.dc.wa.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Gf);olympe.sc.logic.Gf.L=P(olympe.sc.logic.Gf.P,olympe.sc.yc.O);olympe.sc.logic.Gf.P.C=(a,b,c,d,e)=>{b=fe(a,b||'New Predefined Output',olympe.sc.logic.Gf,olympe.sc.logic.pb);b.setProperty(olympe.sc.logic.Nc.G,e);a.la(olympe.sc.logic.Nc.C,b,c);a.la(olympe.sc.yc.O,d,b);return b.R()};olympe.sc.logic.Kd=class extends olympe.sc.Ra{C(){return olympe.sc.Ie.Ag.cp}O(){return this.Wl().Pf().$f([olympe.sc.logic.Function]).and().Qg().$f([olympe.sc.logic.Kc,olympe.sc.logic.Lc]).Re()}pv(){return this.Xk().Pf().Bi([olympe.dc.Sync.modelRel,olympe.sc.logic.sg.L]).Re()}qv(){return this.kj().Pf().Bi([olympe.dc.Sync.modelRel,olympe.sc.logic.Gf.L]).Re()}Uf(a){const b=this.db.Rl(this,[olympe.sc.Ra.O],c=>this.db.model(c)===olympe.dc.Ca(a));return b?olympe.dc.Sync.Qb(b):null}Gg(a){const b=this.db.Rl(this,
|
|
998
998
|
[olympe.sc.Ra.V],c=>this.db.model(c)===olympe.dc.Ca(a));return b?olympe.dc.Sync.Qb(b):null}dw(){return this.Xk().Pf().Bi([olympe.dc.Sync.modelRel],olympe.sc.logic.kb).Re()}ew(){return this.kj().Pf().Bi([olympe.dc.Sync.modelRel],olympe.sc.logic.pb).Re()}};Xh('01621fb84e320000f000',olympe.sc.logic.Kd,olympe.sc.logic.Function);l=olympe.sc.logic.Kd.prototype;l.pv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.qv.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.Uf.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);
|
|
999
999
|
l.Gg.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);l.dw.K=new olympe.D.J(()=>olympe.dc.pa,[]);l.ew.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.sc.logic.tf=class extends olympe.sc.logic.Kd{F(){return this.Uf('016ac63229782039429f')}G(){return this.Gg('016ac6322acf67eebfe7')}L(){return this.kj().Pf().jj(olympe.sc.logic.kc.typeRel).Tj(olympe.sc.logic.mg).Re().zc().hm(olympe.D.ea.ZERO)}};olympe.sc.logic.tf.ca='016ac63229782039429f';olympe.sc.logic.tf.na='016ac6322acf67eebfe7';olympe.sc.logic.tf.P=Xh('01621fb84e320000a000',olympe.sc.logic.tf,olympe.sc.logic.Action);
|
|
@@ -1021,27 +1021,27 @@ function ei(a,b){if(null===b||void 0===b)return null;switch(b.t){case 1:return n
|
|
|
1021
1021
|
function gi(a,b){var c=a.db;a=a.Bc;if(c.Fb(b)){a.Tb(b,c.Cd(b,!0),0);a.la(olympe.dc.Fc.be,b,c.model(b),0);for(const [d,e,f]of Dd(c,b))(c=a.Qb(f))&&c.He()&&(e===olympe.dc.Ka.DESTINATION?a.la(d,b,f,0):a.la(d,f,b,0))}else olympe.ua.rb('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
|
|
1022
1022
|
olympe.sc.logic.Aj=class{constructor(){this.db=olympe.dc.Ua();fi(this)}static oa(a){const b=new olympe.sc.logic.Aj;for(const [c,d]of a)null!==d&&void 0!==d&&(b.values[c]=b.C(d));return b.flush()}flush(){const a=Object.create(null),b=new olympe.dc.transaction.re;this.Bc.gd(b);a.p=de(b);a.v=this.values;fi(this);return a}C(a){switch(!0){case a instanceof olympe.D.ab:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.D.Color:return{t:2,
|
|
1023
1023
|
r:a.Jg().valueOf(),g:a.Hg().valueOf(),b:a.Dg().valueOf(),a:a.Cg().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.xq};case a&&'function'===typeof a.R:return a=a.R(),gi(this,a),{t:4,v:a};case Array.isArray(a):return a.map(this.C.bind(this));case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.C(d));return{t:5,m:b};case null===a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>
|
|
1024
|
-
{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Sk=class{constructor(a,b,c){this.db=olympe.dc.Ua();this.C=a;this.F=b;this.typeRel=c}};olympe.sc.logic.controllers.Sk.C={
|
|
1024
|
+
{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Sk=class{constructor(a,b,c){this.db=olympe.dc.Ua();this.C=a;this.F=b;this.typeRel=c}};olympe.sc.logic.controllers.Sk.C={gy:-1,$y:1};olympe.sc.logic.controllers.Bz=class extends olympe.sc.logic.controllers.Sk{constructor(){super(olympe.sc.yc.G,olympe.sc.yc.O,olympe.sc.logic.Nc.C)}};function hi(a,b,c,d,e,f,g,h,k){a=void 0!==h?h:a.db.Wa(c,g).length;d=olympe.dc.Sync.Tb(b,f,d,e,c,a,k);b.la(olympe.dc.Sync.containsRel,c,d);b.la(olympe.dc.Sync.F,d,c);return d}
|
|
1025
1025
|
olympe.sc.logic.controllers.ot=class extends olympe.sc.logic.controllers.Sk{constructor(){super(olympe.sc.Ra.O,olympe.sc.Ra.V,olympe.sc.logic.kc.typeRel)}G(a,b,c,d,e,f=olympe.sc.logic.kb){return hi(this,a,b,c,d,olympe.sc.logic.kb,this.C,e,f)}L(a,b,c,d,e,f=olympe.sc.logic.pb){return hi(this,a,b,c,d,olympe.sc.logic.pb,this.F,e,f)}O(a,b,c,d,e,f=olympe.sc.logic.kb){c=hi(this,a,b,c,d,olympe.sc.logic.kb,this.C,e,f);e=olympe.dc.Sync.Tb(a,olympe.sc.logic.Lc,void 0,c);a.la(olympe.dc.Sync.F,e,b);a.la(olympe.sc.Ra.G,
|
|
1026
1026
|
b,e);d=olympe.dc.Sync.Tb(a,olympe.sc.logic.pb,'Descender output',d);a.la(olympe.dc.Sync.F,d,b);a.la(olympe.sc.logic.Lc.G,e,d);a.la(olympe.dc.Sync.containsRel,e,d);return{tag:c,$p:e,Ju:d}}V(a,b,c,d,e,f=olympe.sc.logic.pb){c=hi(this,a,b,c,d,olympe.sc.logic.pb,this.F,e,f);a.la(olympe.dc.Sync.F,c,b);e=olympe.dc.Sync.Tb(a,olympe.sc.logic.Kc,void 0,c);a.la(olympe.dc.Sync.F,e,b);a.la(olympe.sc.Ra.G,b,e);d=olympe.dc.Sync.Tb(a,olympe.sc.logic.kb,'Ascender input',d);a.la(olympe.dc.Sync.F,d,b);a.la(olympe.sc.logic.Kc.G,
|
|
1027
|
-
e,d);a.la(olympe.dc.Sync.containsRel,e,d);return{tag:c,Op:e,exit:d}}};olympe.sc.logic.De={};olympe.sc.logic.De.Fr=class extends olympe.sc.logic.Function{constructor(a,b,c){super(a,b,c)}onUpdate(a,[b,c,d],[e]){fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${b},${c}&key=${d}`).then(f=>{f.ok?f.json().then(g=>{'OK'===g.status?e(g.results[0].formatted_address):e('No match')}):e('No match')})}};olympe.sc.logic.wa.C('0162d8f863d612851555',olympe.sc.logic.De.Fr);olympe.sc.logic.De.Gr=class extends olympe.sc.logic.Function{constructor(a,b,c,d){super(a,b,c);this.F=d}
|
|
1027
|
+
e,d);a.la(olympe.dc.Sync.containsRel,e,d);return{tag:c,Op:e,exit:d}}};olympe.sc.logic.De={};olympe.sc.logic.De.Fr=class extends olympe.sc.logic.Function{constructor(a,b,c){super(a,b,c)}onUpdate(a,[b,c,d],[e]){fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${b},${c}&key=${d}`).then(f=>{f.ok?f.json().then(g=>{'OK'===g.status?e(g.results[0].formatted_address):e('No match')}):e('No match')})}};olympe.sc.logic.wa.C('0162d8f863d612851555',olympe.sc.logic.De.Fr);olympe.sc.logic.De.Gr=class extends olympe.sc.logic.Function{constructor(a,b,c,d){super(a,b,c);this.F=d}run(a){Yh(this,a,(b,c)=>{try{c(olympe.dc.$.Eb.Bg(this.F.getParameter(b)))}catch(d){this.N.debug('Parameter not found : '+b)}})}};olympe.sc.logic.wa.C('0166e45d472c667c91a0',olympe.sc.logic.De.Gr,olympe.U.T.vf);olympe.sc.logic.De.Tr=class extends olympe.sc.logic.Function{constructor(a,b,c,d){super(a,b,c);this.F=d}run(a){Yh(this,a,b=>{olympe.D.rc([Qb(this.F)],c=>{b(c)})})}};olympe.sc.logic.wa.C('0171a137d3955814862d',olympe.sc.logic.De.Tr,olympe.aa.T.ta);olympe.sc.logic.De.Bt=class extends olympe.sc.logic.Function{onUpdate(a,[b,c],[d]){const e=olympe.dc.Ca(b);e?Be(te(new olympe.dc.Af(e),olympe.dc.ob.RUNTIME),c).wd(()=>{d(olympe.dc.Sync.Qb(e))}):this.N.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.wa.C('0174bf4b7e006e4b788a',olympe.sc.logic.De.Bt);olympe.sc.logic.actions={};olympe.sc.logic.actions.lr=class extends olympe.sc.logic.Action{constructor(a,b,c,d){super(a,b,c);this.F=d}onUpdate(a,b,[c]){this.F.O()?c():(this.F.je(()=>{this.F.fd('connectAction');c()},'connectAction'),olympe.D.Ja().Sc(()=>{this.F.fd('connectAction')}),this.F.connect())}};olympe.sc.logic.wa.C('01760e73465c1c401b06',olympe.sc.logic.actions.lr,olympe.H.T.ta);olympe.sc.logic.actions.sr=class extends olympe.sc.logic.Action{constructor(a,b,c,d){super(a,b,c);this.F=d}onUpdate(a,b,[c]){this.F.O()?(this.F.Sd(()=>{this.F.zd('disconnectAction');c()},'disconnectAction'),olympe.D.Ja().Sc(()=>{this.F.zd('disconnectAction')}),this.F.Ng()):c()}};olympe.sc.logic.wa.C('01760e73465c1c401b08',olympe.sc.logic.actions.sr,olympe.H.T.ta);olympe.sc.logic.De.Es=class extends olympe.sc.logic.Function{run(a){this.setup(a);const [b,c,d]=Zh(this,a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.N.warn('No list to iter upon'),this.N.info(a.da())):f<e?(b(g.le(f)),f++,c((new Date).getTime())):(Eh(h),d((new Date).getTime()))};this.getInputs().forEach((m,n)=>a.on(m,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.Tf();f=0;Dh(h);k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
|
|
1028
1028
|
olympe.sc.logic.wa.C('0171889b060b6cd54300',olympe.sc.logic.De.Es);olympe.sc.logic.actions.Gs=class extends olympe.sc.logic.Action{constructor(a,b,c,d){super(a,b,c);this.Ii=d}onUpdate(a,b,[c,d]){this.Ii.V(e=>{null!==e?c(olympe.sc.logic.mg.create(e.message,100)):d()})}};olympe.sc.logic.wa.C('01774b2923083a39b010',olympe.sc.logic.actions.Gs,olympe.Ya.T.nj);olympe.sc.logic.actions.Dt=class extends olympe.sc.logic.Action{constructor(a,b,c,d,e){super(a,b,c);this.Ii=d;this.F=e}run(a){Yh(this,a,(b,c)=>{Rb(this.F)?this.Ii.Qc(d=>{null!==d?b(olympe.sc.logic.mg.create(d.message,100)):c()}):b(olympe.sc.logic.mg.create('Not connected to server',100))})}};olympe.sc.logic.wa.C('0171a13bc1b0c4d628d8',olympe.sc.logic.actions.Dt,olympe.Ya.T.nj,olympe.aa.T.ta);olympe.sc.logic.ec={};olympe.sc.logic.ec.Uk=class extends olympe.sc.logic.Kd{F(){return this.Uf('016ac63808535703691c')}};olympe.sc.logic.ec.Uk.P=Xh('0169b6876a03f139d50a',olympe.sc.logic.ec.Uk);olympe.sc.logic.ec.Uk.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);olympe.sc.logic.ec.hl=class extends olympe.sc.logic.Kd{F(){return this.Uf('016ac63809a9a8e6db96')}G(){return this.Gg('016ac6380ab003363b3e')}};Xh('01646ad602f933b8caaf',olympe.sc.logic.ec.hl);olympe.sc.logic.ec.hl.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);olympe.sc.logic.ec.hl.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);olympe.sc.logic.ec.tj=class extends olympe.sc.logic.Kd{F(){return this.Uf('016ac6380bd98f1d91a0')}L(){return this.Gg('016ac63c589ae38ca3ae')}G(){return this.Gg('016ac63c5a377fceabaa')}};Xh('0168ec42fc01747a98b6',olympe.sc.logic.ec.tj);olympe.sc.logic.ec.tj.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);olympe.sc.logic.ec.tj.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);olympe.sc.logic.ec.tj.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);olympe.sc.logic.ec.vg=class extends olympe.sc.logic.Kd{Yk(){return this.Uf('017a7b07b09e3b22c8b4')}pq(){return this.Uf('017a7b07ba05807a74b0')}Zk(){return this.Gg('017a7b0818c12388d731')}Yl(){return this.Gg('017a7b085146d5e69aec')}ss(){return olympe.D.fa.F}};olympe.sc.logic.ec.vg.na='017a7b07b09e3b22c8b4';olympe.sc.logic.ec.vg.Be='017a7b07ba05807a74b0';olympe.sc.logic.ec.vg.Sd='017a7b0818c12388d731';olympe.sc.logic.ec.vg.ca='017a7b085146d5e69aec';
|
|
1029
|
-
olympe.sc.logic.ec.vg.P=Xh('017a7b07a948e30508fa',olympe.sc.logic.ec.vg,olympe.sc.logic.nh);l=olympe.sc.logic.ec.vg.prototype;l.Yk.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);l.pq.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);l.Zk.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);l.Yl.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);l.ss.K=olympe.D.J.O;olympe.sc.logic.ec.lp=class extends olympe.sc.logic.Kd{F(){return this.Uf('016ac63c5b3ed0562740')}};Xh('016a9766c230916ea5ec',olympe.sc.logic.ec.lp);olympe.sc.logic.ec.lp.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);olympe.sc.Fa={};olympe.sc.Fa.oe=class extends olympe.sc.Ra{C(){return olympe.sc.Ie.Ag.qt}};olympe.sc.Fa.oe.P=Lc(olympe.dc.wa.C('01120300000000adef00',olympe.sc.Fa.oe));olympe.sc.Fa.oe.ca=olympe.sc.Fa.oe.P.Ma('0171bc1f15da96dfdb89');P(olympe.dm.ai.P,olympe.sc.Fa.oe.ca);olympe.sc.Fa.Vi=class extends olympe.sc.Runnable{run(a){var b=this.Ub();a.id===b||a.ca.has(b)||(a.ca.add(b),Ih(a,b,a));super.run(a)}F(){const a=this.db.pc(this.Ub(),olympe.sc.Fa.oe.ca);return olympe.dc.Sync.Qb(a)}};olympe.sc.Fa.Vi.P=Lc(olympe.dc.wa.C('0113030000000aca1100',olympe.sc.Fa.Vi));olympe.sc.Fa.Vi.prototype.F.K=new olympe.D.J(()=>olympe.dm.jc,[]);olympe.sc.Fa.ib=class extends olympe.dc.Sync{vs(){return this.Ig(olympe.sc.Fa.ib.G)}
|
|
1030
|
-
olympe.sc.Fa.ib.P=olympe.dc.wa.C('011203300000000adef5',olympe.sc.Fa.ib);olympe.sc.Fa.ib.G=olympe.sc.Fa.ib.P.Ba('011203300000000adef6');olympe.sc.Fa.ib.xb=olympe.sc.Fa.ib.P.Ba('011203300000000adef7');olympe.sc.Fa.ib.C=olympe.sc.Fa.ib.P.Ba('011203300000000adef8');olympe.sc.Fa.ib.V=olympe.sc.Fa.ib.P.Ba('011203300000000adef9');olympe.sc.Fa.ib.hb=olympe.sc.Fa.ib.P.Ba('011203300000000adefa');olympe.sc.Fa.ib.
|
|
1031
|
-
olympe.sc.Fa.ib.Xa=olympe.sc.Fa.ib.P.Ba('011203300000000adefd');olympe.sc.Fa.ib.ca=olympe.sc.Fa.ib.P.Ba('011203300000000adefe');olympe.sc.Fa.ib.na=olympe.sc.Fa.ib.P.Ba('011203300000000adeff');olympe.sc.Fa.ib.O=olympe.sc.Fa.ib.P.Ba('011203300000000adee0');olympe.sc.Fa.ib.$b={INIT:0,
|
|
1029
|
+
olympe.sc.logic.ec.vg.P=Xh('017a7b07a948e30508fa',olympe.sc.logic.ec.vg,olympe.sc.logic.nh);l=olympe.sc.logic.ec.vg.prototype;l.Yk.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);l.pq.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);l.Zk.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);l.Yl.K=new olympe.D.J(()=>olympe.sc.logic.pb,[]);l.ss.K=olympe.D.J.O;olympe.sc.logic.ec.lp=class extends olympe.sc.logic.Kd{F(){return this.Uf('016ac63c5b3ed0562740')}};Xh('016a9766c230916ea5ec',olympe.sc.logic.ec.lp);olympe.sc.logic.ec.lp.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.kb,[]);olympe.sc.Fa={};olympe.sc.Fa.oe=class extends olympe.sc.Ra{C(){return olympe.sc.Ie.Ag.qt}};olympe.sc.Fa.oe.P=Lc(olympe.dc.wa.C('01120300000000adef00',olympe.sc.Fa.oe));olympe.sc.Fa.oe.ca=olympe.sc.Fa.oe.P.Ma('0171bc1f15da96dfdb89');P(olympe.dm.ai.P,olympe.sc.Fa.oe.ca);olympe.sc.Fa.Vi=class extends olympe.sc.Runnable{run(a){var b=this.Ub();a.id===b||a.ca.has(b)||(a.ca.add(b),Ih(a,b,a));super.run(a)}F(){const a=this.db.pc(this.Ub(),olympe.sc.Fa.oe.ca);return olympe.dc.Sync.Qb(a)}};olympe.sc.Fa.Vi.P=Lc(olympe.dc.wa.C('0113030000000aca1100',olympe.sc.Fa.Vi));olympe.sc.Fa.Vi.prototype.F.K=new olympe.D.J(()=>olympe.dm.jc,[]);olympe.sc.Fa.ib=class extends olympe.dc.Sync{vs(){return this.Ig(olympe.sc.Fa.ib.G)}Jw(){return this.Ig(olympe.sc.Fa.ib.xb)}us(){return this.Td(olympe.sc.Fa.ib.C)}kv(){return this.wb(olympe.sc.Fa.ib.V)}Ov(){return this.wb(olympe.sc.Fa.ib.hb)}Nv(){return this.wb(olympe.sc.Fa.ib.Qa)}Ul(){this.wb(olympe.sc.Fa.ib.Xa)}yv(){return this.wb(olympe.sc.Fa.ib.ca)}Tu(){return this.wb(olympe.sc.Fa.ib.L)}Mv(){return this.wb(olympe.sc.Fa.ib.na)}ts(){return this.wb(olympe.sc.Fa.ib.O)}};
|
|
1030
|
+
olympe.sc.Fa.ib.P=olympe.dc.wa.C('011203300000000adef5',olympe.sc.Fa.ib);olympe.sc.Fa.ib.G=olympe.sc.Fa.ib.P.Ba('011203300000000adef6');olympe.sc.Fa.ib.xb=olympe.sc.Fa.ib.P.Ba('011203300000000adef7');olympe.sc.Fa.ib.C=olympe.sc.Fa.ib.P.Ba('011203300000000adef8');olympe.sc.Fa.ib.V=olympe.sc.Fa.ib.P.Ba('011203300000000adef9');olympe.sc.Fa.ib.hb=olympe.sc.Fa.ib.P.Ba('011203300000000adefa');olympe.sc.Fa.ib.Qa=olympe.sc.Fa.ib.P.Ba('011203300000000adefb');olympe.sc.Fa.ib.L=olympe.sc.Fa.ib.P.Ba('011203300000000adefc');
|
|
1031
|
+
olympe.sc.Fa.ib.Xa=olympe.sc.Fa.ib.P.Ba('011203300000000adefd');olympe.sc.Fa.ib.ca=olympe.sc.Fa.ib.P.Ba('011203300000000adefe');olympe.sc.Fa.ib.na=olympe.sc.Fa.ib.P.Ba('011203300000000adeff');olympe.sc.Fa.ib.O=olympe.sc.Fa.ib.P.Ba('011203300000000adee0');olympe.sc.Fa.ib.$b={INIT:0,Yx:1,cA:2,Mz:3,Lz:4,dA:5,wc:9};l=olympe.sc.Fa.ib.prototype;l.vs.K=olympe.D.J.O;l.Jw.K=olympe.D.J.O;l.us.K=olympe.D.J.G;l.kv.K=olympe.D.J.F;l.Ov.K=olympe.D.J.F;l.Nv.K=olympe.D.J.F;l.Ul.K=olympe.D.J.F;l.yv.K=olympe.D.J.F;
|
|
1032
1032
|
l.Tu.K=olympe.D.J.F;l.Mv.K=olympe.D.J.F;l.ts.K=olympe.D.J.F;olympe.sc.Fa.Nk=class extends olympe.sc.Fa.Vi{run(a){super.run(a);a.set(olympe.sc.Ra.ud,(new Date).getTime())}};olympe.sc.Fa.Nk.P=olympe.dc.wa.C('0113032000000aca1102',olympe.sc.Fa.Nk,olympe.sc.T.Ha);olympe.sc.Fa.ue=class extends olympe.sc.Fa.oe{F(){return(new olympe.dc.oj(this.R(),olympe.sc.Fa.ib)).jj(olympe.sc.Fa.ue.na).Re().ld()}};olympe.sc.Fa.ue.P=olympe.dc.wa.C('011203300000000adef3',olympe.sc.Fa.ue);olympe.sc.Fa.ue.na=olympe.sc.Fa.ue.P.Ma('011203300000000adef4');P(olympe.sc.Fa.ib.P,olympe.sc.Fa.ue.na);
|
|
1033
|
-
olympe.sc.Fa.ue.P.C=(a,b,c)=>{b=fe(a,b||'New Service Application model',olympe.sc.Fa.ue,olympe.sc.Fa.Nk);a.la(olympe.sc.Fa.oe.ca,b,c);c=a.create(olympe.sc.Fa.ib).R();a.la(olympe.sc.Fa.ue.na,b,c);return b.R()};olympe.sc.Fa.ue.prototype.F.K=new olympe.D.J(()=>olympe.sc.Fa.ib,[]);olympe.sc.yg=class extends olympe.dc.Sync{static get(){return olympe.dc.Sync.Qb('011203300000000adf0f')}};olympe.sc.yg.P=olympe.dc.wa.C('011203300000000adf00',olympe.sc.yg);olympe.sc.yg.G=olympe.sc.yg.P.Ba('011203300000000adf01');olympe.sc.yg.C=olympe.sc.yg.P.Ba('011203300000000adf02');olympe.sc.yg.L='011203300000000adf0f';olympe.sc.
|
|
1033
|
+
olympe.sc.Fa.ue.P.C=(a,b,c)=>{b=fe(a,b||'New Service Application model',olympe.sc.Fa.ue,olympe.sc.Fa.Nk);a.la(olympe.sc.Fa.oe.ca,b,c);c=a.create(olympe.sc.Fa.ib).R();a.la(olympe.sc.Fa.ue.na,b,c);return b.R()};olympe.sc.Fa.ue.prototype.F.K=new olympe.D.J(()=>olympe.sc.Fa.ib,[]);olympe.sc.yg=class extends olympe.dc.Sync{static get(){return olympe.dc.Sync.Qb('011203300000000adf0f')}};olympe.sc.yg.P=olympe.dc.wa.C('011203300000000adf00',olympe.sc.yg);olympe.sc.yg.G=olympe.sc.yg.P.Ba('011203300000000adf01');olympe.sc.yg.C=olympe.sc.yg.P.Ba('011203300000000adf02');olympe.sc.yg.L='011203300000000adf0f';olympe.sc.ey=class{};olympe.sc.fn=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ie.Ag.yk}};olympe.sc.fn.P=olympe.dc.wa.C('01645fe6873aeea59e64',olympe.sc.fn);olympe.sc.Yd=class extends olympe.sc.Runnable{Ea(){return this.Wa(olympe.sc.Yd.L,olympe.sc.Runnable)}F(){return this.Wa(olympe.sc.Yd.G,olympe.dm.Property)}};olympe.sc.Yd.P=Lc(olympe.dc.wa.C('016c2d996d9ca27fa9d8',olympe.sc.Yd));olympe.sc.Yd.L=olympe.sc.Yd.P.Ma('016c3cb7742ec9309e0b');olympe.sc.Yd.G=olympe.sc.Yd.P.Ma('016c42d3454636f90533');olympe.sc.Yd.prototype.Ea.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.sc.Yd.prototype.F.K=new olympe.D.J(()=>olympe.dc.pa,[]);olympe.sc.rn=class extends olympe.dm.Ob{C(){return olympe.sc.Ie.Ag.yk}};olympe.sc.rn.P=olympe.dc.wa.C('017a7a9ff057958e5678',olympe.sc.rn);olympe.sc.to=class extends olympe.dm.Ob{C(){return olympe.sc.Ie.Ag.Kt}};olympe.sc.to.P=olympe.dc.wa.C('01644b6d4543b344b857',olympe.sc.to);olympe.sc.uo=class extends olympe.dc.Sync{};olympe.sc.uo.P=olympe.dc.wa.C('0162f672366be5ca7a86',olympe.sc.uo);olympe.sc.mp=class extends olympe.sc.Yd{};olympe.sc.mp.P=olympe.dc.wa.C('016d3f37610ae4fc3962',olympe.sc.mp);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.P=olympe.dc.wa.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.lb=class extends olympe.dc.lb{create(a,b){b=super.create(a,b);var c=null===Rh?null:olympe.dc.Ua().zi(Rh,[olympe.sc.Fa.oe.ca,olympe.sc.Yc.G.xd()])[0]||null;null!==c?olympe.dc.Ua().$f(a,olympe.sc.Vg)&&this.la(olympe.sc.Yc.L,c,b):olympe.ua.rb('sc').warn('No business container for new instance of',olympe.dc.Ca(a));return b}};olympe.sc.Ie.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Ie.Zd=olympe.dm.Zd;olympe.sc.od={};function ii(a){a.N.info('Starting application '+a.C);let b=!1;const c=olympe.dc.Ua();if(0<a.C.length){const d=wc(c,a.C,(e,f)=>{if(e){const g=tg(f);g.run?(a.N.debug('application retrieved: running'),(new olympe.D.lc('Application execution context',a.F.C)).run(()=>{b=!0;g.run(Jh(a.F,g.R()))})):a.N.error('application retrieved: not an Application with a run() method')}else ji(a)});olympe.D.Ja().onDestroy(()=>{xc(c,a.C,d)});bc(()=>{b||a.N.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},
|
|
1034
1034
|
1E4)}}
|
|
1035
1035
|
function ki(a,b){if(a.L)a.N.debug('Sending getContext request'),of(a.O,d=>{d?a.N.error('failed to synchronise (authenticated) with server: '+d.message):(a.N.debug('synchronisation request successful'),b())});else{var c=olympe.dc.Ld.wg;const d=olympe.dc.Ld.uj,e=Kh(a.F)?d:c;a.N.debug((Kh(a.F)?'PULLING':'SUBSCRIBING')+' application '+a.C);c=new olympe.async.di(olympe.D.Ja());c.add((f,g)=>{te(new olympe.dc.Af(a.C,e),olympe.dc.ob.RUNTIME).wd(h=>{h?g(h.message):f()})});c.add(f=>{olympe.D.rc([a.G.Yf()],g=>
|
|
1036
1036
|
{(new olympe.dc.pa(g)).pf(f)})});c.add((f,g)=>{const h=olympe.sc.Yc.C.jo,k=olympe.sc.Yc.C.dl;Sh(a.C,m=>{switch(m){case h:case k:f();break;default:g('Error while loading the business container')}})});Ab(c,(f,g)=>{if(g)throw Error(g);b()});c.start()}}function ji(a){a.N.debug('Stop the application');a.F.C.ze()}
|
|
1037
1037
|
olympe.sc.od.wl=class{constructor(a,b,c,d,e,f,g){this.G=a;this.O=b;this.N=c;this.F=d;this.C=e;this.L=f;this.V=g||!1}run(){const a=olympe.aa.qa.C.hg,b=olympe.aa.qa.C.Ne,c=olympe.aa.qa.C.bh,d=olympe.aa.qa.C.Jh;this.N.debug('runtime starting for app #'+this.C);let e=!1;const f=()=>{e||(ii(this),e=!0)};olympe.D.rc([this.G.getState()],g=>{switch(g){case a:case c:this.N.debug('Server session opened, calling once connected callback');ki(this,f);break;case b:this.N.debug('Disconnected, working offline.');
|
|
1038
1038
|
this.V&&!e&&ki(this,f);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),e=!1,ji(this)}},'Runtime initial auth state listener')}};olympe.sc.od.wl.C='app_instance';olympe.sc.od.wl.ka=[olympe.nc.Tq];olympe.sc.od.Wi={RUNTIME:'sc.runtime.Main'};olympe.sc.od.Z={Le:'sc.app',Co:'sc.offlineStart'};
|
|
1039
1039
|
olympe.U.Ib(function(a){D(a,olympe.sc.od.Z.Le,'');D(a,olympe.sc.od.Z.Co,!1);B(a,olympe.aa.T.Ti,[new olympe.U.ha(olympe.nc.Z.Le),new olympe.U.ha(olympe.sc.od.Z.Le),new olympe.U.ha(olympe.nc.Z.Ik)],(b,c,d)=>new olympe.aa.jk(d?'':b+(c?'-'+c:'')));y(a,olympe.sc.od.Wi.RUNTIME,olympe.sc.od.wl,olympe.aa.T.ta,olympe.dc.query.T.ta,olympe.sc.T.Ha,olympe.sc.T.vl,new olympe.U.ha(olympe.sc.od.Z.Le),new olympe.U.ha(olympe.dc.Z.xg),new olympe.U.ha(olympe.sc.od.Z.Co));olympe.nc.Ni(a,olympe.sc.od.Wi.RUNTIME,'sc.runtime');
|
|
1040
|
-
olympe.nc.Ni(a,olympe.sc.od.Wi.RUNTIME,'sc.headless');olympe.nc.Ni(a,olympe.sc.od.Wi.RUNTIME)},'olympe.sc.runtime');olympe.public={};function li(a,b){const c=new olympe.aa.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{Kb(olympe.public.
|
|
1041
|
-
olympe.public.
|
|
1042
|
-
b),'srp')}static
|
|
1043
|
-
olympe.public.
|
|
1044
|
-
olympe.public.pe=class{static create(a){return new class extends olympe.dc.tb.ig{L(b,c){return olympe.dc.Sync.Qb(c)}G(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.D.Ic(olympe.D.ea),e=b.subscribe(f=>d.update(olympe.D.va(f)));olympe.D.Ja().Sc(()=>e.unsubscribe());return d.yb()}}}};'object'===typeof exports&&(exports={FunctionBrick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,Context:olympe.sc.eb,registerBrick:olympe.sc.logic.wa.C,ErrorFlow:olympe.sc.logic.Error,Entry:olympe.dc.za.Entry,Color:olympe.D.Color,Parameter:olympe.U.ha,Auth:olympe.public.
|
|
1040
|
+
olympe.nc.Ni(a,olympe.sc.od.Wi.RUNTIME,'sc.headless');olympe.nc.Ni(a,olympe.sc.od.Wi.RUNTIME)},'olympe.sc.runtime');olympe.public={};function li(a,b){const c=new olympe.aa.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{Kb(olympe.public.Pa.get(),c,b,()=>{d()})})}
|
|
1041
|
+
olympe.public.Pa=class{static Ru(a,b){return olympe.aa.zb.fe.vi(a,b)}static getState(){return Pb(olympe.public.Pa.get())}static bv(){return olympe.D.Ta(olympe.public.Pa.get().Yf())}static Ed(){return olympe.D.Ta(Tb(olympe.public.Pa.get()))}static rv(){return olympe.D.Ta(olympe.public.Pa.get().yh())||void 0}static Gh(){olympe.public.Pa.get().Gh()}static Kg(a){return new Promise((b,c)=>{olympe.public.Pa.get().Kg(a,d=>d?c(d):b())})}static Bw(a,b){return li((new Map).set('username',a).set('password',
|
|
1042
|
+
b),'srp')}static Aw(){return li(new Map,'saml')}static Cw(a,b){return li((new Map).set('username',a).set('nonce',b),'localToken')}static zw(){return li(new Map,'openID')}static km(){return new Promise(a=>{Sb(()=>{olympe.public.Pa.get().na.delete('logoutCallback');a()});olympe.public.Pa.get().km()})}static get(){return olympe.aa.mc()}};olympe.public.Pa.logout=olympe.public.Pa.km;olympe.public.Pa.loginOpenID=olympe.public.Pa.zw;olympe.public.Pa.loginToken=olympe.public.Pa.Cw;
|
|
1043
|
+
olympe.public.Pa.loginSAML=olympe.public.Pa.Aw;olympe.public.Pa.loginSRP=olympe.public.Pa.Bw;olympe.public.Pa.getUserFromToken=olympe.public.Pa.Kg;olympe.public.Pa.sendKeepAlive=olympe.public.Pa.Gh;olympe.public.Pa.getIDPToken=olympe.public.Pa.rv;olympe.public.Pa.getToken=olympe.public.Pa.Ed;olympe.public.Pa.getCurrentUser=olympe.public.Pa.bv;olympe.public.Pa.getState=olympe.public.Pa.getState;olympe.public.Pa.generateSRPData=olympe.public.Pa.Ru;olympe.public.Xb=class{static create(a){return new class extends olympe.dc.ba.ig{C(b,c){b=a(olympe.dc.Sync.Qb(c));if('boolean'===typeof b)return b;const d=olympe.D.Ic(olympe.D.fa),e=b.subscribe(f=>d.update(olympe.D.qc(f)));olympe.D.Ja().Sc(()=>e.unsubscribe());return d.yb()}}}};
|
|
1044
|
+
olympe.public.pe=class{static create(a){return new class extends olympe.dc.tb.ig{L(b,c){return olympe.dc.Sync.Qb(c)}G(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.D.Ic(olympe.D.ea),e=b.subscribe(f=>d.update(olympe.D.va(f)));olympe.D.Ja().Sc(()=>e.unsubscribe());return d.yb()}}}};'object'===typeof exports&&(exports={FunctionBrick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,Context:olympe.sc.eb,registerBrick:olympe.sc.logic.wa.C,ErrorFlow:olympe.sc.logic.Error,Entry:olympe.dc.za.Entry,Color:olympe.D.Color,Parameter:olympe.U.ha,Auth:olympe.public.Pa,AuthState:{INIT:olympe.aa.qa.C.INIT,DISCONNECTED:olympe.aa.qa.C.Ne,GUEST:olympe.aa.qa.C.bh,AUTHENTICATING:olympe.aa.qa.C.Jh,ERROR:olympe.aa.qa.C.wc,AUTHENTICATED:olympe.aa.qa.C.hg},Config:class{static getParameter(a){return olympe.U.getParameter(a)}},
|
|
1045
1045
|
Sync:olympe.dc.Sync,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,Enum:olympe.dm.zf,EnumValue:olympe.dm.Enum,File:olympe.dm.File,User:olympe.dm.User,BusinessObject:olympe.dc.Sync,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,DBView:class extends olympe.dc.$a{static get(){return olympe.dc.Ua()}},ListDef:olympe.dc.pa,instanceToTag:olympe.dc.Ca,registerSync:olympe.dc.wa.C,
|
|
1046
1046
|
onDestroy:a=>olympe.D.Ja().onDestroy(a),offDestroy:a=>olympe.D.Ja().dg(a),Direction:olympe.dc.Ka,FollowRules:olympe.dc.ob,transformers:{Related:olympe.dc.W.Db,RecursiveRelated:olympe.dc.W.Yb,Distinct:olympe.dc.W.Zc,Filter:olympe.dc.W.$c,Limit:olympe.dc.W.Ad,Sort:olympe.dc.W.td,Union:olympe.dc.W.Ye},Predicate:olympe.public.Xb,predicates:{And:olympe.dc.ba.kg,Or:olympe.dc.ba.qg,Not:olympe.dc.ba.qe,Equals:olympe.dc.ba.qd,Contains:olympe.dc.ba.Id,Greater:olympe.dc.ba.$d,Smaller:olympe.dc.ba.ge,HasRelated:olympe.dc.ba.Pe,
|
|
1047
1047
|
InstanceOf:olympe.dc.ba.Qe,Regex:olympe.dc.ba.Ue},Comparator:olympe.public.pe,comparators:{Number:olympe.dc.tb.Number,String:olympe.dc.tb.String,DateTime:olympe.dc.tb.DateTime},valuedefs:{BooleanProperty:olympe.dc.ga.Xd,StringProperty:olympe.dc.ga.Rd,NumberProperty:olympe.dc.ga.Od,DateTimeProperty:olympe.dc.ga.Jd,Constant:olympe.dc.ga.Tc,Tag:olympe.dc.ga.We},Transaction:olympe.sc.lb,CreateInstance:olympe.dc.transaction.sa.pd,UpdateInstance:olympe.dc.transaction.sa.rh,BurstTransaction:olympe.dc.Lh,
|