@olympeio/runtime-web 9.10.4 → 9.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1335,49 +1335,48 @@ olympe.sa.$e(function(a){E(a,olympe.dc.db.pa.WG,olympe.dc.db.Vn.C.lF);E(a,olympe
1335
1335
  (b,c,d,e,f,g,k)=>{e=g?olympe.dc.db.Vn.C.TB:e;d=(new Map).set('selfTag',d).set('garbageCollector',e).set('garbageCollectorDelay',f).set('debug',k);return new olympe.dc.db.Database(b,c,d)});B(a,olympe.dc.db.ba.QB,olympe.dc.zd,olympe.dc.db.ba.Vb,olympe.dc.db.ba.Gy);C(a,olympe.dc.db.ba.Vv,[olympe.dc.db.ba.Ob],b=>b.ZX);C(a,olympe.dc.db.ba.Ob,[olympe.dc.db.ba.Vb,olympe.dc.db.ba.Gy,olympe.dc.db.ba.QB,new olympe.sa.zb(olympe.dc.pa.tp),new olympe.sa.zb(olympe.dc.db.pa.JB),new olympe.sa.zb(olympe.dc.db.pa.Vv),
1336
1336
  new olympe.sa.zb(olympe.dc.db.pa.VS),new olympe.sa.zb(olympe.dc.db.pa.US)],(b,c,d,e,f,g,k,l)=>{g=(new Map).set('active',g).set('counters',k).set('callbacks',l);e=(new Map).set('debug',e).set('bufferTimeout',f);return new olympe.dc.db.BQ(b,c,d,e,g)})},'olympe.dc.db');olympe.sa.run([olympe.dc.db.ba.Gy,olympe.dc.db.ba.Vv],(a,b)=>{olympe.Jj().db=a;olympe.Jj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.query={};function Qj(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
1337
1337
  olympe.dc.query.Qn=class{constructor(a,b,c){this.db=olympe.dc.eb();this.C=a;this.Ec=b;this.Sv=c}fb(){return{p:this.Ec.ka(),o:this.Sv}}toString(){return'sortByQueryPart-'+this.Sv+this.Ec.ka()}Ur(){const a=this.db.Wd(this.Ec,olympe.dm.Property.typeRel),b=olympe.dc.Ya;if(this.db.Xm(a,olympe.dm.String))return Qj((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return Qj((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return Qj((c,d)=>c.getTime()-d.getTime());if(a===b(olympe.dm.Color))return Qj((c,
1338
- d)=>c.compare(d));olympe.gb.Cb('dc.query').warn(`No comparator found for type with tag ${a}`);return Qj(()=>-1)}Ac(){return this.Ec}};olympe.dc.Ok=class{ka(){}};olympe.dc.Ok.prototype.getTag=olympe.dc.Ok.prototype.ka;olympe.dc.f0=olympe.dc.Ok;function Rj(a){let b;if(null==(b=a.C)?0:b.Fi())if(a=a.R,!a.T){let c;null==(c=a.W)||c.call(a)}}function Sj(a,b,c){if(a.db.source(b)===a.source){var d=`${a.D}:${b}:notif`;qh(a.db,b,(e,f)=>{if(e){Rj(a);let g;null==(g=a.C)||g.$(f)}else if(c&&Si(a.db,f,d),!a.db.tc(f)){Rj(a);let g;null==(g=a.C)||g.D(f,olympe.dc.Te.NONE)}},d);c&&Ri(a.db,b,(e,f,g)=>{Rj(a);let k;g||null!=(k=a.C)&&k.oh(b,new Map([[e,f]]))},d)}}function Tj(a,b,c,d,e){Rj(a);let f,g;b?null==(f=a.C)||f.Qb(c,d,e):null==(g=a.C)||g.Xf(c,d,e)}
1339
- olympe.dc.query.gT=class{constructor(a,b,c,d){this.V=a;this.source=b;this.D=c;this.R=d;this.C=this.O=null;this.db=olympe.dc.eb()}stop(a){nh(this.db,a,`${this.D}:${a}:notif`)}};olympe.dc.query.uz={ASC:'ASC',DESC:'DESC'};function Uj(a){const b=Vj(a.query),c=new Map;for(let e=b.length;0<=e;e--){const f=0<e?b[e-1].ja():a.O,g=0<e?b[e-1].C:'root',k=0<e&&b[e-1].T(),l=a.C.get(f),m=new Set(l.xg()),n=new Map,p=a.R.has(f);let r=p?';':'';if(c.has(f)){const [t,u,v]=c.get(f);c.delete(f);r+=v;t.forEach((w,x)=>{for(const y of l.C(x)){let A;n.set(y,Array.from(w).map(H=>p?`${x};${H}`:H).reduce((H,G)=>H.add(G),null!=(A=n.get(y))?A:new Set))}m.delete(x)});u&&m.forEach(w=>{const x=p?`${w};${v}`:v;for(const y of l.C(w)){let A;n.set(y,
1338
+ d)=>c.compare(d));olympe.gb.Cb('dc.query').warn(`No comparator found for type with tag ${a}`);return Qj(()=>-1)}Ac(){return this.Ec}};olympe.dc.Ok=class{ka(){}};olympe.dc.Ok.prototype.getTag=olympe.dc.Ok.prototype.ka;olympe.dc.f0=olympe.dc.Ok;function Rj(a){let b;if(null==(b=a.C)?0:b.Fi())if(a=a.T,!a.T){let c;null==(c=a.W)||c.call(a)}}function Sj(a,b,c){if(a.db.source(b)===a.source){var d=`${a.D}:${b}:notif`;qh(a.db,b,(e,f)=>{if(e){Rj(a);let g;null==(g=a.C)||g.$(f)}else if(c&&Si(a.db,f,d),!a.db.tc(f)){Rj(a);let g;null==(g=a.C)||g.D(f,olympe.dc.Te.NONE)}},d);c&&Ri(a.db,b,(e,f,g)=>{Rj(a);let k;g||null!=(k=a.C)&&k.oh(b,new Map([[e,f]]))},d)}}function Tj(a,b,c,d,e){Rj(a);let f,g;b?null==(f=a.C)||f.Qb(c,d,e):null==(g=a.C)||g.Xf(c,d,e)}
1339
+ function Uj(a){let b;const c=!(null==(b=a.C)?0:b.Fi());a.O=c?a.C:null;a.R.forEach(d=>d());a.R=[];c&&(a.C=new olympe.dc.db.Rf,a.V.C()&&a.V.debug(`Commit notification with ${a.O.Qc()} operations for query ${a.D}`))}olympe.dc.query.gT=class{constructor(a,b,c,d){this.V=a;this.source=b;this.D=c;this.T=d;this.C=this.O=null;this.db=olympe.dc.eb();this.R=[]}stop(a){this.R.push(()=>nh(this.db,a,`${this.D}:${a}:notif`))}};olympe.dc.query.uz={ASC:'ASC',DESC:'DESC'};function Vj(a){const b=Wj(a.query),c=new Map;for(let e=b.length;0<=e;e--){const f=0<e?b[e-1].ja():a.O,g=0<e?b[e-1].C:'root',k=0<e&&b[e-1].T(),l=a.C.get(f),m=new Set(l.xg()),n=new Map,p=a.R.has(f);let r=p?';':'';if(c.has(f)){const [t,u,v]=c.get(f);c.delete(f);r+=v;t.forEach((w,x)=>{for(const y of l.C(x)){let A;n.set(y,Array.from(w).map(H=>p?`${x};${H}`:H).reduce((H,G)=>H.add(G),null!=(A=n.get(y))?A:new Set))}m.delete(x)});u&&m.forEach(w=>{const x=p?`${w};${v}`:v;for(const y of l.C(w)){let A;n.set(y,
1340
1340
  (null!=(A=n.get(y))?A:new Set).add(x))}})}else m.forEach(t=>{const u=p?`${t};`:'';for(const v of l.C(t))n.has(v)?n.get(v).add(u):n.set(v,(new Set).add(u))});if(0<e&&c.has(g)){const [t,u,v]=c.get(g),w=new Map;n.forEach((x,y)=>{let A;null==(A=t.get(y))||A.forEach(H=>{let G;const R=null!=(G=w.get(y))?G:new Set;x.forEach(fa=>R.add(fa+H));w.set(y,R)});n.delete(y);t.delete(y)});u&&n.forEach((x,y)=>{w.set(y,new Set(Array.from(x).map(A=>A+v)))});b[e-1].T()&&t.forEach((x,y)=>{w.set(y,new Set(Array.from(x).map(A=>
1341
- r+A)))});c.set(g,[w,u&&k,r+v])}else c.set(g,[n,k,r])}let d;a=null==(d=c.get('root'))?void 0:d[0].get('root');return Array.from(null!=a?a:[]).map(e=>e.slice(0,-1).split(';'))}function Wj(a){if(null===a.D){const b={Oe:a.query.Ur(),Mi:a.Mi,max:a.query.C.max,offset:a.query.C.offset};a.D=olympe.dc.xc.from(a.$,Uj(a),b)}return a.D}function Xj(a,b){a.W=b}function Yj(a){if(!a.T){null!==a.D&&(a.$=a.D);a.D=null;a.T=!0;let b;null==(b=a.W)||b.call(a)}}
1342
- function Zj(a,b){let c;return null!=(c=a.C.get(b).xg())?c:[]}function ak(a,b,c){let d,e;return null!=(e=null==(d=a.C.get(c))?void 0:d.has(b))?e:!1}function bk(a,b,c=a.O,d='root'){const e=a.C.get(c);if(!e)return a.V.error('Try to insert result entry to a higher level than possible'),null;const f=!e.has(b);e.D(b,d)&&Yj(a);let g;f&&(null==(g=a.Dl)||Sj(g,b,a.R.has(c)));return f}function ck(a,b,c,d,e,f){null!==a.Dl&&(d===olympe.dc.Ib.ORIGIN?Tj(a.Dl,b,c,f,e):Tj(a.Dl,b,c,e,f))}
1343
- function dk(a){a.V.C()&&a.V.debug(`Start sending notifications for query ${a.query.ja()}`);const b=new olympe.dc.query.gT(a.V,a.query.Sd(),a.query.ja(),a);a.C.forEach((c,d)=>{for(const e of c.xg())Sj(b,e,a.R.has(d))});null!=b.C||(b.C=new olympe.dc.db.Rf);a.Dl=b}function ek(a){null!==a.Dl&&(a.V.C()&&a.V.debug(`Stop sending notifications for query ${a.query.ja()}`),a.C.forEach(b=>{for(const c of b.xg())a.Dl.stop(c)}),a.Dl=null)}
1344
- function fk(a){a.T=!1;if(null!=(a=a.Dl)){let b;const c=!(null==(b=a.C)?0:b.Fi());a.O=c?a.C:null;c&&(a.C=new olympe.dc.db.Rf,a.V.C()&&a.V.debug(`Commit notification with ${a.O.Qc()} operations for query ${a.D}`))}}
1345
- olympe.dc.query.fK=class{constructor(a,b){this.V=a;this.query=b;this.O=olympe.oa.Xd(b.D);this.wb=new Map;this.C=(new Map).set(this.O,new olympe.dc.query.wb.fD);this.R=new Set(b.O);this.Mi=-1;this.T=!1;this.W=null;this.$=olympe.dc.xc.empty();this.Dl=this.D=null;a=Vj(b);a.forEach(c=>{const d=c.ja();this.wb.set(d,c.clone());this.C.set(d,c.da())});b=b.Ur();if(null!==b){b=b.C;let c=-1;for(const d of[this.O].concat(a.map(e=>e.ja())))if(c+=this.R.has(d)?1:0,b===d){this.Mi=c;break}}}remove(a,b=this.O,c='root'){b=
1346
- this.C.get(b);if(null==b?0:b.remove(a,c))if(Yj(this),!b.has(a)){let d;null==(d=this.Dl)||d.stop(a);return!0}return!1}hh(a){const b=a.D,c=olympe.oa.Xd(b);a=Vj(a);const d=[];for(const [f,g]of this.C){if(g.R(b))return!0;g.has(b)&&d.push(f)}const e=(new Map).set(c,d);return 0<d.length&&a.every(f=>{let g;const k=(null!=(g=e.get(f.C))?g:[]).flatMap(l=>f.$(l,this.wb.get(l))).filter(l=>{let m,n;return null!=(n=null==(m=this.wb.get(l))?void 0:m.hh(f))?n:!1});e.set(f.ja(),k);return 0<k.length})}};function gk(a){if(!olympe.dc.eb().me(a,olympe.dm.Property))throw new olympe.dc.query.ti(`The specified property while trying to build a query predicate is invalid: ${a}`);}
1347
- function hk(a){var b=olympe.dc.query.Yb.C.nL;const c=olympe.dc.query.Yb.C.DG,d=olympe.dc.query.Yb.C.By,e=olympe.dc.query.Yb.C.xH,f=olympe.dc.query.Yb.C.LJ,g=olympe.dc.query.Yb.C.pK,k=olympe.dc.query.Yb.C.kF,l=olympe.dc.query.Yb.C.UJ;switch(a.pr){case b:return new olympe.dc.query.Ca.mD(a.t);case c:b=a.v;switch(a.t){case 2:b=new Date(b);break;case 3:b=olympe.dc.CloudObject.get(b);break;case 4:b=olympe.j.Color.create(b.r,b.g,b.b,b.a)}return new olympe.dc.query.Ca.Lk(a.p,b,olympe.dc.eb());case d:return new olympe.dc.query.Ca.Sn(a.p,
1348
- a.s,olympe.dc.eb(),a.c);case e:return new olympe.dc.query.Ca.Ov(olympe.dc.eb(),a.p,a.b,a.l,a.s);case f:return new olympe.dc.query.Ca.ik(hk(a.v));case g:return new olympe.dc.query.Ca.mo(a.p,new RegExp(a.r),olympe.dc.eb(),a.c);case l:return new olympe.dc.query.Ca.Wk(...a.p.map(m=>hk(m)));case k:return new olympe.dc.query.Ca.Ni(...a.p.map(m=>hk(m)));default:return null}}
1349
- olympe.dc.query.Yb=class{observe(){}Kd(){}compile(){return[[this]]}Re(){return new olympe.dc.query.Ca.ik(this)}be(){}hh(){}clear(){}fb(){}nh(){}toString(){}Rb(a){return this===a}static xO(...a){return new olympe.dc.query.Ca.mD(a)}static Rb(a,b){gk(a);return new olympe.dc.query.Ca.Lk(a,b,olympe.dc.eb())}static contains(a,b,c=!0){gk(a);return new olympe.dc.query.Ca.Sn(a,b,olympe.dc.eb(),c)}static vY(a,b,c=!0){gk(a);return new olympe.dc.query.Ca.mo(a,b,olympe.dc.eb(),c)}static HA(a,b,c=!0){gk(a);return new olympe.dc.query.Ca.Ov(olympe.dc.eb(),
1350
- a,b,!1,c)}static ey(a,b,c=!0){gk(a);return new olympe.dc.query.Ca.Ov(olympe.dc.eb(),a,b,!0,c)}static and(...a){if(!a.every(b=>b instanceof olympe.dc.query.Yb))throw new olympe.dc.query.ti(`Some specified predicates, while trying to build an AND query predicate are invalid: ${a}`);return new olympe.dc.query.Ca.Ni(...a)}static or(...a){if(!a.every(b=>b instanceof olympe.dc.query.Yb))throw new olympe.dc.query.ti(`Some specified predicates, while trying to build an OR query predicate are invalid: ${a}`);
1341
+ r+A)))});c.set(g,[w,u&&k,r+v])}else c.set(g,[n,k,r])}let d;a=null==(d=c.get('root'))?void 0:d[0].get('root');return Array.from(null!=a?a:[]).map(e=>e.slice(0,-1).split(';'))}function Xj(a){if(null===a.D){const b={Oe:a.query.Ur(),Mi:a.Mi,max:a.query.C.max,offset:a.query.C.offset};a.D=olympe.dc.xc.from(a.$,Vj(a),b)}return a.D}function Yj(a,b){a.W=b}function Zj(a){if(!a.T){null!==a.D&&(a.$=a.D);a.D=null;a.T=!0;let b;null==(b=a.W)||b.call(a)}}
1342
+ function ak(a,b){let c;return null!=(c=a.C.get(b).xg())?c:[]}function bk(a,b,c){let d,e;return null!=(e=null==(d=a.C.get(c))?void 0:d.has(b))?e:!1}function ck(a,b,c=a.O,d='root'){const e=a.C.get(c);if(!e)return a.V.error('Try to insert result entry to a higher level than possible'),null;const f=!e.has(b);e.D(b,d)&&Zj(a);let g;f&&(null==(g=a.Dl)||Sj(g,b,a.R.has(c)));return f}function dk(a,b,c,d,e,f){null!==a.Dl&&(d===olympe.dc.Ib.ORIGIN?Tj(a.Dl,b,c,f,e):Tj(a.Dl,b,c,e,f))}
1343
+ function ek(a){a.V.C()&&a.V.debug(`Start sending notifications for query ${a.query.ja()}`);const b=new olympe.dc.query.gT(a.V,a.query.Sd(),a.query.ja(),a);a.C.forEach((c,d)=>{for(const e of c.xg())Sj(b,e,a.R.has(d))});null!=b.C||(b.C=new olympe.dc.db.Rf);a.Dl=b}function fk(a){null!==a.Dl&&(a.V.C()&&a.V.debug(`Stop sending notifications for query ${a.query.ja()}`),a.C.forEach(b=>{for(const c of b.xg())a.Dl.stop(c)}),a.Dl=null)}function gk(a){a.T=!1;let b;null==(b=a.Dl)||Uj(b)}
1344
+ olympe.dc.query.fK=class{constructor(a,b){this.V=a;this.query=b;this.O=olympe.oa.Xd(b.D);this.wb=new Map;this.C=(new Map).set(this.O,new olympe.dc.query.wb.fD);this.R=new Set(b.O);this.Mi=-1;this.T=!1;this.W=null;this.$=olympe.dc.xc.empty();this.Dl=this.D=null;a=Wj(b);a.forEach(c=>{const d=c.ja();this.wb.set(d,c.clone());this.C.set(d,c.da())});b=b.Ur();if(null!==b){b=b.C;let c=-1;for(const d of[this.O].concat(a.map(e=>e.ja())))if(c+=this.R.has(d)?1:0,b===d){this.Mi=c;break}}}remove(a,b=this.O,c='root'){b=
1345
+ this.C.get(b);if(null==b?0:b.remove(a,c))if(Zj(this),!b.has(a)){let d;null==(d=this.Dl)||d.stop(a);return!0}return!1}hh(a){const b=a.D,c=olympe.oa.Xd(b);a=Wj(a);const d=[];for(const [f,g]of this.C){if(g.R(b))return!0;g.has(b)&&d.push(f)}const e=(new Map).set(c,d);return 0<d.length&&a.every(f=>{let g;const k=(null!=(g=e.get(f.C))?g:[]).flatMap(l=>f.$(l,this.wb.get(l))).filter(l=>{let m,n;return null!=(n=null==(m=this.wb.get(l))?void 0:m.hh(f))?n:!1});e.set(f.ja(),k);return 0<k.length})}};function hk(a){if(!olympe.dc.eb().me(a,olympe.dm.Property))throw new olympe.dc.query.ti(`The specified property while trying to build a query predicate is invalid: ${a}`);}
1346
+ function ik(a){var b=olympe.dc.query.Yb.C.nL;const c=olympe.dc.query.Yb.C.DG,d=olympe.dc.query.Yb.C.By,e=olympe.dc.query.Yb.C.xH,f=olympe.dc.query.Yb.C.LJ,g=olympe.dc.query.Yb.C.pK,k=olympe.dc.query.Yb.C.kF,l=olympe.dc.query.Yb.C.UJ;switch(a.pr){case b:return new olympe.dc.query.Ca.mD(a.t);case c:b=a.v;switch(a.t){case 2:b=new Date(b);break;case 3:b=olympe.dc.CloudObject.get(b);break;case 4:b=olympe.j.Color.create(b.r,b.g,b.b,b.a)}return new olympe.dc.query.Ca.Lk(a.p,b,olympe.dc.eb());case d:return new olympe.dc.query.Ca.Sn(a.p,
1347
+ a.s,olympe.dc.eb(),a.c);case e:return new olympe.dc.query.Ca.Ov(olympe.dc.eb(),a.p,a.b,a.l,a.s);case f:return new olympe.dc.query.Ca.ik(ik(a.v));case g:return new olympe.dc.query.Ca.mo(a.p,new RegExp(a.r),olympe.dc.eb(),a.c);case l:return new olympe.dc.query.Ca.Wk(...a.p.map(m=>ik(m)));case k:return new olympe.dc.query.Ca.Ni(...a.p.map(m=>ik(m)));default:return null}}
1348
+ olympe.dc.query.Yb=class{observe(){}Kd(){}compile(){return[[this]]}Re(){return new olympe.dc.query.Ca.ik(this)}be(){}hh(){}clear(){}fb(){}nh(){}toString(){}Rb(a){return this===a}static xO(...a){return new olympe.dc.query.Ca.mD(a)}static Rb(a,b){hk(a);return new olympe.dc.query.Ca.Lk(a,b,olympe.dc.eb())}static contains(a,b,c=!0){hk(a);return new olympe.dc.query.Ca.Sn(a,b,olympe.dc.eb(),c)}static vY(a,b,c=!0){hk(a);return new olympe.dc.query.Ca.mo(a,b,olympe.dc.eb(),c)}static HA(a,b,c=!0){hk(a);return new olympe.dc.query.Ca.Ov(olympe.dc.eb(),
1349
+ a,b,!1,c)}static ey(a,b,c=!0){hk(a);return new olympe.dc.query.Ca.Ov(olympe.dc.eb(),a,b,!0,c)}static and(...a){if(!a.every(b=>b instanceof olympe.dc.query.Yb))throw new olympe.dc.query.ti(`Some specified predicates, while trying to build an AND query predicate are invalid: ${a}`);return new olympe.dc.query.Ca.Ni(...a)}static or(...a){if(!a.every(b=>b instanceof olympe.dc.query.Yb))throw new olympe.dc.query.ti(`Some specified predicates, while trying to build an OR query predicate are invalid: ${a}`);
1351
1350
  return new olympe.dc.query.Ca.Wk(...a)}static Re(a){if(!(a instanceof olympe.dc.query.Yb))throw new olympe.dc.query.ti(`The specified predicate, while trying to build a NOT query predicate is invalid: ${a}`);return new olympe.dc.query.Ca.ik(a)}};olympe.dc.query.Yb.not=olympe.dc.query.Yb.Re;olympe.dc.query.Yb.or=olympe.dc.query.Yb.or;olympe.dc.query.Yb.and=olympe.dc.query.Yb.and;olympe.dc.query.Yb.smallerThan=olympe.dc.query.Yb.ey;olympe.dc.query.Yb.greaterThan=olympe.dc.query.Yb.HA;
1352
- olympe.dc.query.Yb.regex=olympe.dc.query.Yb.vY;olympe.dc.query.Yb.contains=olympe.dc.query.Yb.contains;olympe.dc.query.Yb.equals=olympe.dc.query.Yb.Rb;olympe.dc.query.Yb['in']=olympe.dc.query.Yb.xO;olympe.dc.query.Yb.C={nL:0,DG:1,By:2,xH:3,LJ:4,pK:5,UJ:6,kF:7};function Vj(a){return Array.from(a.wb)}
1353
- function ik(a,b){var c=b.relation,d=olympe.dm.Relation.originModelRel,e=olympe.dm.Relation.destinationModelRel;d=a.db.Wd(c,c.zc()===olympe.dc.Ib.ORIGIN?e:d);if(0>a.cursor)e=a.C.Hl;else if(e=a.wb[a.cursor],null!==e.ma)e=e.ma;else{var f=olympe.dc.Ib.ORIGIN;e=olympe.dc.eb().Wd(e.relation,e.relation.zc()===f?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel)}if(a.db.tc(olympe.dc.CloudObject)&&(null===d||!a.db.Xm(d,e)&&!a.db.Xm(e,d)))throw new olympe.dc.query.ti(`The specified relation "${c}" is invalid at the current level "${a.db.name(e)} (${e})" of the Query you are building. Please make sure you did not forget a .back() or another relation.`);d=
1354
- b.ja();for(c=a.cursor+1;c<a.wb.length&&a.wb[c].ja()!==d;)c++;b=c<a.wb.length?a.wb:a.wb.concat(b);return new olympe.dc.nb(a.D,a.source,b,c,a.O,a.C)}function jk(a,b=a.cursor){return 0<=b?a.wb[b].ja():olympe.oa.Xd(a.D)}
1355
- function kk(a,b,c,d={}){var e=olympe.dc.Te.Wi;const f=(null==d?0:d.Xg)?d.Xg:olympe.dc.nb.Jf.cm,g=(null==d?0:d.kB)?'__code-as-data__':void 0;b=olympe.dc.Ya(b);const k=olympe.dc.Kj().Em(b);b=(new olympe.dc.nb(b,k)).Zi();b.wb=[f===olympe.dc.nb.Jf.Qp?new olympe.dc.query.wb.TG(jk(b),e,c):new olympe.dc.query.wb.ph(jk(b),e,c)];let l;b.R=null!=(l=null==d?void 0:d.DO)?l:!1;return b.observe(a,{Xg:f,$z:g})}
1356
- function lk(a,b,...c){a=b.reduce((d,e)=>d.oc(e),a);return(c?a.filter(olympe.dc.query.Yb.xO(...c)):a).back(b.length)}function mk(a){const b=0===a.O.size?a.Zi():a;if(null!==b.C.Mi&&!b.O.has(jk(a,b.C.Mi)))throw new olympe.dc.query.ti('AndReturn was not called for the current level before sortBy operator');return b}function nk(a,b){let c,d;return b.R||(null!=(d=null==(c=a.T)?void 0:c.has(b.ja()))?d:!1)}
1351
+ olympe.dc.query.Yb.regex=olympe.dc.query.Yb.vY;olympe.dc.query.Yb.contains=olympe.dc.query.Yb.contains;olympe.dc.query.Yb.equals=olympe.dc.query.Yb.Rb;olympe.dc.query.Yb['in']=olympe.dc.query.Yb.xO;olympe.dc.query.Yb.C={nL:0,DG:1,By:2,xH:3,LJ:4,pK:5,UJ:6,kF:7};function Wj(a){return Array.from(a.wb)}
1352
+ function jk(a,b){var c=b.relation,d=olympe.dm.Relation.originModelRel,e=olympe.dm.Relation.destinationModelRel;d=a.db.Wd(c,c.zc()===olympe.dc.Ib.ORIGIN?e:d);if(0>a.cursor)e=a.C.Hl;else if(e=a.wb[a.cursor],null!==e.ma)e=e.ma;else{var f=olympe.dc.Ib.ORIGIN;e=olympe.dc.eb().Wd(e.relation,e.relation.zc()===f?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel)}if(a.db.tc(olympe.dc.CloudObject)&&(null===d||!a.db.Xm(d,e)&&!a.db.Xm(e,d)))throw new olympe.dc.query.ti(`The specified relation "${c}" is invalid at the current level "${a.db.name(e)} (${e})" of the Query you are building. Please make sure you did not forget a .back() or another relation.`);d=
1353
+ b.ja();for(c=a.cursor+1;c<a.wb.length&&a.wb[c].ja()!==d;)c++;b=c<a.wb.length?a.wb:a.wb.concat(b);return new olympe.dc.nb(a.D,a.source,b,c,a.O,a.C)}function kk(a,b=a.cursor){return 0<=b?a.wb[b].ja():olympe.oa.Xd(a.D)}
1354
+ function lk(a,b,c,d={}){var e=olympe.dc.Te.Wi;const f=(null==d?0:d.Xg)?d.Xg:olympe.dc.nb.Jf.cm,g=(null==d?0:d.kB)?'__code-as-data__':void 0;b=olympe.dc.Ya(b);const k=olympe.dc.Kj().Em(b);b=(new olympe.dc.nb(b,k)).Zi();b.wb=[f===olympe.dc.nb.Jf.Qp?new olympe.dc.query.wb.TG(kk(b),e,c):new olympe.dc.query.wb.ph(kk(b),e,c)];let l;b.R=null!=(l=null==d?void 0:d.DO)?l:!1;return b.observe(a,{Xg:f,$z:g})}
1355
+ function mk(a,b,...c){a=b.reduce((d,e)=>d.oc(e),a);return(c?a.filter(olympe.dc.query.Yb.xO(...c)):a).back(b.length)}function nk(a){const b=0===a.O.size?a.Zi():a;if(null!==b.C.Mi&&!b.O.has(kk(a,b.C.Mi)))throw new olympe.dc.query.ti('AndReturn was not called for the current level before sortBy operator');return b}function ok(a,b){let c,d;return b.R||(null!=(d=null==(c=a.T)?void 0:c.has(b.ja()))?d:!1)}
1357
1356
  olympe.dc.nb=class{constructor(a,b,c=[],d=-1,e=new Set,f={max:-1,offset:0,Mi:null,Hl:null}){this.db=olympe.dc.eb();if('string'!==typeof a||''===a)throw new olympe.dc.query.ti('The root of the query cannot be empty.');this.D=a;this.source=b;this.wb=c;this.cursor=d;this.O=e;this.C=f;this.T=this.id=null;this.R=!1}static from(a,b){a=olympe.dc.Ya(a);if(!olympe.dc.CloudObject.Mw(a))throw new olympe.dc.query.ti(`Try to create a query from an instance that does not exist (${a}). Please try to use \`Query.fromTag()\` instead.`);
1358
1357
  b=null!=b?b:olympe.dc.Kj().Em(a);b=new olympe.dc.nb(a,b);b.C.Hl=olympe.dc.eb().model(a);return b}static Em(a,b,c){if(!olympe.dc.CloudObject.Mw(b)&&!c)throw new olympe.dc.query.ti(`Try to create a query from an instance (${a}) with an explicit datatype that does not exist (${b})`);a=olympe.dc.Ya(a);c=null!=c?c:olympe.dc.Kj().fromModel(b);c=new olympe.dc.nb(a,c);c.C.Hl=olympe.dc.Ya(b);return c}static KA(a,b=!0,c){const d=olympe.dc.Ya(a);var e=olympe.dc.eb();if(!e.zu(d))throw new olympe.dc.query.ti(`Try to create a query to get instances of ${a}, which is not a data type or does not exist.`);
1359
- a=null!=c?c:olympe.dc.Kj().fromModel(d);a=new olympe.dc.nb(d,a);a.C.Hl=e.model(d);b&&(a=ik(a,new olympe.dc.query.wb.Mk(jk(a),olympe.dc.CloudObject.extendedByRel,!0,!1)));b=a;e=new olympe.dc.query.wb.ht(jk(a),olympe.dc.CloudObject.instancesRel,!1);e.ma=d;return ik(b,e)}static af(a,b,c,d,e){var f;const g=null!=(f=null==e?void 0:e.Xg)?f:olympe.dc.nb.Jf.cm;f=(null==e?0:e.kB)?'__code-as-data__':void 0;b=olympe.dc.Ya(b);d=null!=d?d:olympe.dc.Kj().Em(b);d=(new olympe.dc.nb(b,d)).Zi();b=g===olympe.dc.nb.Jf.Qp;
1360
- d.wb=[b?new olympe.dc.query.wb.TG(jk(d),c):new olympe.dc.query.wb.ph(jk(d),c)];let k;d.R=null!=(k=null==e?void 0:e.DO)?k:!1;let l;return d.observe(a,{Xg:g,$z:f,Fw:null!=(l=null==e?void 0:e.Fw)?l:b})}oc(a,b=!1){if(!(a instanceof olympe.dc.Oc.Relation))throw new olympe.dc.query.ti(`The relation given to follow() is invalid: ${a}`);return ik(this,new olympe.dc.query.wb.ht(jk(this),a,b))}Yp(a,b=!1,c=!1){if(!(a instanceof olympe.dc.Oc.Relation))throw new olympe.dc.query.ti(`The relation given to followRecursively() is invalid: ${a}`);
1361
- return ik(this,new olympe.dc.query.wb.Mk(jk(this),a,b,c))}Zi(){const a=(new Set(this.O)).add(jk(this));return new olympe.dc.nb(this.D,this.source,this.wb,this.cursor,a,this.C)}Qc(){return this.wb.length}filter(a){if(!(a instanceof olympe.dc.query.Yb))throw new olympe.dc.query.ti(`The specified predicate while trying to filter a query is invalid: ${a}`);const b=Array.from(this.wb);b[this.cursor]=b[this.cursor].filter(a);return new olympe.dc.nb(this.D,this.source,b,this.cursor,this.O,this.C)}Gw(){return this}bn(a,
1358
+ a=null!=c?c:olympe.dc.Kj().fromModel(d);a=new olympe.dc.nb(d,a);a.C.Hl=e.model(d);b&&(a=jk(a,new olympe.dc.query.wb.Mk(kk(a),olympe.dc.CloudObject.extendedByRel,!0,!1)));b=a;e=new olympe.dc.query.wb.ht(kk(a),olympe.dc.CloudObject.instancesRel,!1);e.ma=d;return jk(b,e)}static af(a,b,c,d,e){var f;const g=null!=(f=null==e?void 0:e.Xg)?f:olympe.dc.nb.Jf.cm;f=(null==e?0:e.kB)?'__code-as-data__':void 0;b=olympe.dc.Ya(b);d=null!=d?d:olympe.dc.Kj().Em(b);d=(new olympe.dc.nb(b,d)).Zi();b=g===olympe.dc.nb.Jf.Qp;
1359
+ d.wb=[b?new olympe.dc.query.wb.TG(kk(d),c):new olympe.dc.query.wb.ph(kk(d),c)];let k;d.R=null!=(k=null==e?void 0:e.DO)?k:!1;let l;return d.observe(a,{Xg:g,$z:f,Fw:null!=(l=null==e?void 0:e.Fw)?l:b})}oc(a,b=!1){if(!(a instanceof olympe.dc.Oc.Relation))throw new olympe.dc.query.ti(`The relation given to follow() is invalid: ${a}`);return jk(this,new olympe.dc.query.wb.ht(kk(this),a,b))}Yp(a,b=!1,c=!1){if(!(a instanceof olympe.dc.Oc.Relation))throw new olympe.dc.query.ti(`The relation given to followRecursively() is invalid: ${a}`);
1360
+ return jk(this,new olympe.dc.query.wb.Mk(kk(this),a,b,c))}Zi(){const a=(new Set(this.O)).add(kk(this));return new olympe.dc.nb(this.D,this.source,this.wb,this.cursor,a,this.C)}Qc(){return this.wb.length}filter(a){if(!(a instanceof olympe.dc.query.Yb))throw new olympe.dc.query.ti(`The specified predicate while trying to filter a query is invalid: ${a}`);const b=Array.from(this.wb);b[this.cursor]=b[this.cursor].filter(a);return new olympe.dc.nb(this.D,this.source,b,this.cursor,this.O,this.C)}Gw(){return this}bn(a,
1362
1361
  b=0){return new olympe.dc.nb(this.D,this.source,this.wb,this.cursor,this.O,{Mi:this.C.Mi,max:a,offset:b,Hl:this.C.Hl})}lv(a,b=olympe.dc.query.uz.ASC){if(0>this.cursor)throw new olympe.dc.query.ti('You are trying to sort an empty query. Please first follow at least one relation to sort a query.');if(!olympe.dc.eb().me(a,olympe.dm.Property))throw new olympe.dc.query.ti(`The specified property while trying to sort a query is invalid: ${a}`);const c=this.wb[this.cursor],d={Mi:this.cursor,max:this.C.max,
1363
- offset:this.C.offset,Hl:this.C.Hl},e=Array.from(this.wb);e[this.cursor]=c.sort(a,b);return new olympe.dc.nb(this.D,this.source,e,this.cursor,this.O,d)}Ur(){const a=this.C.Mi;let b;return null!==a?null==(b=this.wb[a])?void 0:b.Ur():null}back(a=1){if(0>this.cursor||1>a)return this;let b=this.cursor;for(let c=0;c<a;c++){const d=this.wb[b].C;for(b--;-1<b&&jk(this,b)!==d;)b--}return new olympe.dc.nb(this.D,this.source,Array.from(this.wb),b,this.O,this.C)}parse(){const a=new Map,b=jk(this,-1),c={limit:this.C.max,
1362
+ offset:this.C.offset,Hl:this.C.Hl},e=Array.from(this.wb);e[this.cursor]=c.sort(a,b);return new olympe.dc.nb(this.D,this.source,e,this.cursor,this.O,d)}Ur(){const a=this.C.Mi;let b;return null!==a?null==(b=this.wb[a])?void 0:b.Ur():null}back(a=1){if(0>this.cursor||1>a)return this;let b=this.cursor;for(let c=0;c<a;c++){const d=this.wb[b].C;for(b--;-1<b&&kk(this,b)!==d;)b--}return new olympe.dc.nb(this.D,this.source,Array.from(this.wb),b,this.O,this.C)}parse(){const a=new Map,b=kk(this,-1),c={limit:this.C.max,
1364
1363
  offset:this.C.offset,returned:this.O.has(b),filter:[],optional:!1,inheritance:!1,next:[]};a.set(b,c);this.db.zu(this.D)?c.dataType=olympe.dc.Ya(this.D):(c.root=olympe.dc.Ya(this.D),c.dataType=this.C.Hl);this.wb.forEach((d,e)=>{const f=d.ja(),g=d.nh();Object.assign(g,{returned:this.O.has(f),next:[]});a.set(f,g);g.sort&&this.C.Mi!==e&&delete g.sort;if(1>=e&&d instanceof olympe.dc.query.wb.ht&&d.relation.Rb(olympe.dc.CloudObject.instancesRel))Object.assign(c,g);else if(0===e&&d instanceof olympe.dc.query.wb.Mk&&
1365
- d.relation.Rb(olympe.dc.CloudObject.extendedByRel))Object.assign(c,g),c.inheritance=!0;else{let k;null==(k=a.get(d.C))||k.next.push(g)}});return c}Kd(a){const b=(null==a?0:a.Xg)?a.Xg:olympe.dc.nb.Jf.vz;let c;return olympe.dc.query.yA().executeQuery(mk(this),b,{Nr:null!=(c=null==a?void 0:a.$z)?c:null==a?void 0:a.cacheId,jg:null==a?void 0:a.jg}).then(d=>{let e;return null!=(e=null==d?void 0:Wj(d))?e:olympe.dc.xc.empty()})}zf(){return Wj(ok(olympe.dc.query.yA(),mk(this)))}observe(a,b){const c=(null==
1366
- b?0:b.Xg)?b.Xg:olympe.dc.nb.Jf.cm;a='function'===typeof a.se?a.se():a;let d;return pk(olympe.dc.query.yA(),mk(this),a,olympe.dc.Jc.SELF,c,{Nr:null!=(d=null==b?void 0:b.$z)?d:null==b?void 0:b.cacheId,jg:null==b?void 0:b.jg,Fw:null==b?void 0:b.Fw}).pipe(rxjs.operators.map(e=>Wj(e)),rxjs.operators.distinctUntilChanged())}ja(){null===this.id&&(this.id=olympe.oa.Xd(this.D+Vj(this).map(a=>a.R()).join()+Array.from(new Set(this.O)).sort().toString()+this.C.Mi+this.C.max+this.C.offset));return this.id}Sd(){return this.source}fb(){let a;
1364
+ d.relation.Rb(olympe.dc.CloudObject.extendedByRel))Object.assign(c,g),c.inheritance=!0;else{let k;null==(k=a.get(d.C))||k.next.push(g)}});return c}Kd(a){const b=(null==a?0:a.Xg)?a.Xg:olympe.dc.nb.Jf.vz;let c;return olympe.dc.query.yA().executeQuery(nk(this),b,{Nr:null!=(c=null==a?void 0:a.$z)?c:null==a?void 0:a.cacheId,jg:null==a?void 0:a.jg}).then(d=>{let e;return null!=(e=null==d?void 0:Xj(d))?e:olympe.dc.xc.empty()})}zf(){return Xj(pk(olympe.dc.query.yA(),nk(this)))}observe(a,b){const c=(null==
1365
+ b?0:b.Xg)?b.Xg:olympe.dc.nb.Jf.cm;a='function'===typeof a.se?a.se():a;let d;return qk(olympe.dc.query.yA(),nk(this),a,olympe.dc.Jc.SELF,c,{Nr:null!=(d=null==b?void 0:b.$z)?d:null==b?void 0:b.cacheId,jg:null==b?void 0:b.jg,Fw:null==b?void 0:b.Fw}).pipe(rxjs.operators.map(e=>Xj(e)),rxjs.operators.distinctUntilChanged())}ja(){null===this.id&&(this.id=olympe.oa.Xd(this.D+Wj(this).map(a=>a.R()).join()+Array.from(new Set(this.O)).sort().toString()+this.C.Mi+this.C.max+this.C.offset));return this.id}Sd(){return this.source}fb(){let a;
1367
1366
  return{b:this.D,p:this.wb.map(b=>b.fb()),r:Array.from(this.O),s:this.source,e:{m:this.C.max,o:this.C.offset,s:this.C.Mi,rm:null!=(a=this.C.Hl)?a:this.db.model(this.D)}}}toString(){return`Query: ${JSON.stringify(this)}`}toJSON(){return{origin:this.db.tc(this.D)?olympe.dc.CloudObject.get(this.D):this.D,relations:this.wb.map(a=>a.toJSON())}}};olympe.dc.nb.prototype.observe=olympe.dc.nb.prototype.observe;olympe.dc.nb.prototype.executeFromCache=olympe.dc.nb.prototype.zf;
1368
1367
  olympe.dc.nb.prototype.execute=olympe.dc.nb.prototype.Kd;olympe.dc.nb.prototype.parse=olympe.dc.nb.prototype.parse;olympe.dc.nb.prototype.back=olympe.dc.nb.prototype.back;olympe.dc.nb.prototype.sortBy=olympe.dc.nb.prototype.lv;olympe.dc.nb.prototype.limit=olympe.dc.nb.prototype.bn;olympe.dc.nb.prototype.cast=olympe.dc.nb.prototype.Gw;olympe.dc.nb.prototype.filter=olympe.dc.nb.prototype.filter;olympe.dc.nb.prototype.andReturn=olympe.dc.nb.prototype.Zi;olympe.dc.nb.prototype.followRecursively=olympe.dc.nb.prototype.Yp;
1369
- olympe.dc.nb.prototype.follow=olympe.dc.nb.prototype.oc;olympe.dc.nb.followRule=olympe.dc.nb.af;olympe.dc.nb.instancesOf=olympe.dc.nb.KA;olympe.dc.nb.fromTag=olympe.dc.nb.Em;olympe.dc.nb.from=olympe.dc.nb.from;olympe.dc.nb.Jf={cm:1,vz:2,Qp:3};olympe.dc.nb.C={GB:'cacheBucketName',DH:'isCacheable'};function qk(a){null===a.$b&&null===a.C&&(a.$b=zh(a.O))}
1370
- olympe.dc.query.vi=class extends olympe.dc.$q{constructor(a){super(a,null);this.O=new olympe.dc.transaction.Xk}static Pw(a){const b=new olympe.dc.query.vi(`DataResult_${a.ja()}`);b.D=a.Sd();return b}static C(a){const b=new olympe.dc.query.vi(a.i);let c;b.D=null!=(c=a.s)?c:null;let d;b.aA=null!=(d=a.t)?d:null;let e;b.$b=null!=(e=a.p)?e:[];return b}Wf(a){qk(this);return super.Wf(a)}Zf(){qk(this);return super.Zf()}wA(){qk(this);return super.wA()}create(a,b,c){this.O.yf(a,this.D,c,b);return this}Qb(a,
1371
- b,c){this.O.Qb(a,b,c,null,null);return this}fb(){return super.fb()}};olympe.dc.query.vi.prototype.createRelation=olympe.dc.query.vi.prototype.Qb;olympe.dc.query.vi.prototype.create=olympe.dc.query.vi.prototype.create;olympe.dc.query.vi.fromQuery=olympe.dc.query.vi.Pw;function ok(a,b){const c=new olympe.dc.query.fK(a.V,b);if(a.D.view.tc(b.D)){bk(c,b.D);for(const d of Vj(b))d.Kd(c)}return c}
1372
- function pk(a,b,c,d,e,f){const g=b.ja();let k=a.C.get(g);if(!k){var l=b.Sd();a.V.debug(`Create new subscription for query ${g} for subscriber ${d}, to be executed by the data source ${l}`);l=!1===f.jg||a.R&&l===olympe.dc.Jc.SERVER?[]:Array.from(a.C.values());k=new olympe.dc.query.nK(a.V,a.D,b,e,a.W.bind(a,e,f));a.C.set(g,k);rk(k,m=>a.O.add(m));k.start(l)&&(null==f?0:f.Nr)&&sk(a,b,e,f).catch(m=>{a.V.error(`Was not able to get the result of the subscribed query ${g} to add it to the cache: ${m}`)})}return new rxjs.Observable(m=>
1373
- {const n=()=>{p&&c.IO(p);m.complete();if(r){var t=r;const v=a.C.get(g);a.V.debug(`${d} unsubscribed from ${g}`);if(null==v)t=0;else{var u=v;u.O.delete(t)&&u.V.debug(`Remove subscriber ${d} for query ${u.query.ja()}, now have ${u.O.size} subscribers`);d!==olympe.dc.Jc.SELF&&(u.ca--,0===u.ca&&ek(u.C));t=0===u.O.size}t&&(a.V.debug(`No more subscriber to ${g}, remove the subscription`),a.O.delete(g),a.C.delete(g),v.destroy())}},p=c.Ve(n),r=tk(k,d,m);return n})}
1374
- function uk(a){a.O.forEach(b=>{let c;null==(c=a.C.get(b))||vk(c)});a.O.clear()}function wk(a,b,c,d){return q(function*(){const e=null!=d?d:c===olympe.dc.nb.Jf.Qp;if(b instanceof ReadableStream)yield yi(a.D,b,{CD:e});else{var f;if(f=b instanceof olympe.dc.$q)f=b.ja(),f=!a.T.R.has(f);f&&a.D.lh(b,{CD:e})}})}function xk(a){a.V.debug('Send GetContext request to the orchestrator');const b=new olympe.dc.Request(olympe.dc.Request.C.cr,olympe.dc.Jc.SERVER);return oh(a.kf,b).then(c=>{a.D.lh(c)})}
1375
- function yk(a,b){const c=b.Sd();if(c===olympe.dc.Jc.SELF||a.R&&c===olympe.dc.Jc.SERVER)return Promise.resolve(!0);a=Array.from(a.C.values()).filter(d=>d.hh(b)).map(d=>new Promise(e=>d.Ii(f=>e(!f))));return Promise.all(a).then(d=>d.some(e=>e))}function sk(a,b,c,d){return q(function*(){var e=b.Sd();e=uh(uh(new olympe.dc.Request(olympe.dc.Request.C.Ct,e,b),olympe.dc.nb.C.DH,c===olympe.dc.nb.Jf.Qp),olympe.dc.nb.C.GB,null==d?void 0:d.Nr);return oh(a.kf,e)})}
1376
- function zk(a,b,c){const d=[];for(const e of a.C.values())Ak(e,b,c)&&d.push(sk(a,e.query,olympe.dc.nb.Jf.vz,{}).then(f=>wk(a,f,olympe.dc.nb.Jf.vz)));return Promise.all(d).then(()=>{})}
1377
- olympe.dc.query.HT=class{constructor(a,b,c,d,e){this.V=a;this.D=b;this.T=c;this.kf=d;this.R=e;this.C=new Map;this.O=new Set;zi(b,()=>uk(this));xh(d,olympe.dc.Request.C.jG,f=>{wk(this,f.Pe(),olympe.dc.nb.Jf.cm).catch(g=>this.V.error(`Error while applying data notification on DB: ${g}`))})}executeQuery(a,b,c){const d=this;return q(function*(){const e='boolean'===typeof c.jg?c.jg:yield yk(d,a);if(!e||(null==c?0:c.Nr))try{const f=yield sk(d,a,b,c);e||(yield wk(d,f,b))}catch(f){return d.V.error(`Error while sending a query to data source ${a.Sd()}: ${f}`),
1378
- null}return ok(d,a)})}W(a,b,c,d,e,f){const g=c.Sd();if(g===olympe.dc.Jc.SELF||b.jg||this.R&&g===olympe.dc.Jc.SERVER)return e(),null;if(a!==olympe.dc.nb.Jf.cm)return sk(this,c,a,b).then(t=>{var u=t;t instanceof ReadableStream&&(u=(u=d())?t.pipeThrough(u):t);return wk(this,u,a,b.Fw)}).then(e).catch(f),null;let k,l=!1;const m=t=>{k=[];t&&this.V.debug(`Resend subscription ${c.ja()} after detection of dead subscription in the remote service`);sk(this,c,a,b).then(u=>{if(l)return this.V.warn(`Received data result after query subscription ${c.ja()} has been destroyed. Could happen with queries observed multiple times successively quickly.`),
1379
- Promise.resolve();var v=u;u instanceof ReadableStream&&(v=(v=d())?u.pipeThrough(v):u);return wk(this,v,a,b.Fw).then(()=>{k.forEach(w=>wk(this,w,a))}).finally(()=>{k=null})}).then(e).catch(f)},n=c.ja();m(!1);const p=uh(new olympe.dc.Request(olympe.dc.Request.C.zz,g,c),olympe.dc.nb.C.GB,null==b?void 0:b.Nr),r=this.kf.subscribe(p,m.bind(this,!0)).pipe(qb(olympe.Y.errors.fH,()=>{},0)).pipe(qb(olympe.Y.errors.MF,(t,u)=>{this.V.debug(`Data Provider: Subscribe to topic ${t.ja()} now that we are back online, after waiting for ${u}ms`);
1380
- m(!0)},0)).subscribe(rxjs.Subscriber.create(t=>{Array.isArray(k)?k.push(t):wk(this,t,a)},t=>{this.V.error(`An error occurred with the subscription ${n}: ${t}`);f(String(t))}));return()=>{l=!0;this.V.debug(`Unsubscribe to query ${n} from data source ${g}`);r.unsubscribe()}}};function Bk(a){const b=olympe.dc.eb();let c=!1;const d=a.k.map(e=>{const f=e.split('.').map(g=>b.tc(g)?olympe.dc.CloudObject.get(g):(olympe.gb.Cb('dc.query').error(`CloudObject with tag ${g} not present but required for deserialization`),c=!0,null));return[e,1===f.length?f[0]:f]});return c?null:olympe.dc.xc.create(d,a.a,a.r)}
1368
+ olympe.dc.nb.prototype.follow=olympe.dc.nb.prototype.oc;olympe.dc.nb.followRule=olympe.dc.nb.af;olympe.dc.nb.instancesOf=olympe.dc.nb.KA;olympe.dc.nb.fromTag=olympe.dc.nb.Em;olympe.dc.nb.from=olympe.dc.nb.from;olympe.dc.nb.Jf={cm:1,vz:2,Qp:3};olympe.dc.nb.C={GB:'cacheBucketName',DH:'isCacheable'};function rk(a){null===a.$b&&null===a.C&&(a.$b=zh(a.O))}
1369
+ olympe.dc.query.vi=class extends olympe.dc.$q{constructor(a){super(a,null);this.O=new olympe.dc.transaction.Xk}static Pw(a){const b=new olympe.dc.query.vi(`DataResult_${a.ja()}`);b.D=a.Sd();return b}static C(a){const b=new olympe.dc.query.vi(a.i);let c;b.D=null!=(c=a.s)?c:null;let d;b.aA=null!=(d=a.t)?d:null;let e;b.$b=null!=(e=a.p)?e:[];return b}Wf(a){rk(this);return super.Wf(a)}Zf(){rk(this);return super.Zf()}wA(){rk(this);return super.wA()}create(a,b,c){this.O.yf(a,this.D,c,b);return this}Qb(a,
1370
+ b,c){this.O.Qb(a,b,c,null,null);return this}fb(){return super.fb()}};olympe.dc.query.vi.prototype.createRelation=olympe.dc.query.vi.prototype.Qb;olympe.dc.query.vi.prototype.create=olympe.dc.query.vi.prototype.create;olympe.dc.query.vi.fromQuery=olympe.dc.query.vi.Pw;function pk(a,b){const c=new olympe.dc.query.fK(a.V,b);if(a.D.view.tc(b.D)){ck(c,b.D);for(const d of Wj(b))d.Kd(c)}return c}
1371
+ function qk(a,b,c,d,e,f){const g=b.ja();let k=a.C.get(g);if(!k){var l=b.Sd();a.V.debug(`Create new subscription for query ${g} for subscriber ${d}, to be executed by the data source ${l}`);l=!1===f.jg||a.R&&l===olympe.dc.Jc.SERVER?[]:Array.from(a.C.values());k=new olympe.dc.query.nK(a.V,a.D,b,e,a.W.bind(a,e,f));a.C.set(g,k);sk(k,m=>a.O.add(m));k.start(l)&&(null==f?0:f.Nr)&&tk(a,b,e,f).catch(m=>{a.V.error(`Was not able to get the result of the subscribed query ${g} to add it to the cache: ${m}`)})}return new rxjs.Observable(m=>
1372
+ {const n=()=>{p&&c.IO(p);m.complete();if(r){var t=r;const v=a.C.get(g);a.V.debug(`${d} unsubscribed from ${g}`);if(null==v)t=0;else{var u=v;u.O.delete(t)&&u.V.debug(`Remove subscriber ${d} for query ${u.query.ja()}, now have ${u.O.size} subscribers`);d!==olympe.dc.Jc.SELF&&(u.ca--,0===u.ca&&fk(u.C));t=0===u.O.size}t&&(a.V.debug(`No more subscriber to ${g}, remove the subscription`),a.O.delete(g),a.C.delete(g),v.destroy())}},p=c.Ve(n),r=uk(k,d,m);return n})}
1373
+ function vk(a){a.O.forEach(b=>{let c;null==(c=a.C.get(b))||wk(c)});a.O.clear()}function xk(a,b,c,d){return q(function*(){const e=null!=d?d:c===olympe.dc.nb.Jf.Qp;if(b instanceof ReadableStream)yield yi(a.D,b,{CD:e});else{var f;if(f=b instanceof olympe.dc.$q)f=b.ja(),f=!a.T.R.has(f);f&&a.D.lh(b,{CD:e})}})}function yk(a){a.V.debug('Send GetContext request to the orchestrator');const b=new olympe.dc.Request(olympe.dc.Request.C.cr,olympe.dc.Jc.SERVER);return oh(a.kf,b).then(c=>{a.D.lh(c)})}
1374
+ function zk(a,b){const c=b.Sd();if(c===olympe.dc.Jc.SELF||a.R&&c===olympe.dc.Jc.SERVER)return Promise.resolve(!0);a=Array.from(a.C.values()).filter(d=>d.hh(b)).map(d=>new Promise(e=>d.Ii(f=>e(!f))));return Promise.all(a).then(d=>d.some(e=>e))}function tk(a,b,c,d){return q(function*(){var e=b.Sd();e=uh(uh(new olympe.dc.Request(olympe.dc.Request.C.Ct,e,b),olympe.dc.nb.C.DH,c===olympe.dc.nb.Jf.Qp),olympe.dc.nb.C.GB,null==d?void 0:d.Nr);return oh(a.kf,e)})}
1375
+ function Ak(a,b,c){const d=[];for(const e of a.C.values())Bk(e,b,c)&&d.push(tk(a,e.query,olympe.dc.nb.Jf.vz,{}).then(f=>xk(a,f,olympe.dc.nb.Jf.vz)));return Promise.all(d).then(()=>{})}
1376
+ olympe.dc.query.HT=class{constructor(a,b,c,d,e){this.V=a;this.D=b;this.T=c;this.kf=d;this.R=e;this.C=new Map;this.O=new Set;zi(b,()=>vk(this));xh(d,olympe.dc.Request.C.jG,f=>{xk(this,f.Pe(),olympe.dc.nb.Jf.cm).catch(g=>this.V.error(`Error while applying data notification on DB: ${g}`))})}executeQuery(a,b,c){const d=this;return q(function*(){const e='boolean'===typeof c.jg?c.jg:yield zk(d,a);if(!e||(null==c?0:c.Nr))try{const f=yield tk(d,a,b,c);e||(yield xk(d,f,b))}catch(f){return d.V.error(`Error while sending a query to data source ${a.Sd()}: ${f}`),
1377
+ null}return pk(d,a)})}W(a,b,c,d,e,f){const g=c.Sd();if(g===olympe.dc.Jc.SELF||b.jg||this.R&&g===olympe.dc.Jc.SERVER)return e(),null;if(a!==olympe.dc.nb.Jf.cm)return tk(this,c,a,b).then(t=>{var u=t;t instanceof ReadableStream&&(u=(u=d())?t.pipeThrough(u):t);return xk(this,u,a,b.Fw)}).then(e).catch(f),null;let k,l=!1;const m=t=>{k=[];t&&this.V.debug(`Resend subscription ${c.ja()} after detection of dead subscription in the remote service`);tk(this,c,a,b).then(u=>{if(l)return this.V.warn(`Received data result after query subscription ${c.ja()} has been destroyed. Could happen with queries observed multiple times successively quickly.`),
1378
+ Promise.resolve();var v=u;u instanceof ReadableStream&&(v=(v=d())?u.pipeThrough(v):u);return xk(this,v,a,b.Fw).then(()=>{k.forEach(w=>xk(this,w,a))}).finally(()=>{k=null})}).then(e).catch(f)},n=c.ja();m(!1);const p=uh(new olympe.dc.Request(olympe.dc.Request.C.zz,g,c),olympe.dc.nb.C.GB,null==b?void 0:b.Nr),r=this.kf.subscribe(p,m.bind(this,!0)).pipe(qb(olympe.Y.errors.fH,()=>{},0)).pipe(qb(olympe.Y.errors.MF,(t,u)=>{this.V.debug(`Data Provider: Subscribe to topic ${t.ja()} now that we are back online, after waiting for ${u}ms`);
1379
+ m(!0)},0)).subscribe(rxjs.Subscriber.create(t=>{Array.isArray(k)?k.push(t):xk(this,t,a)},t=>{this.V.error(`An error occurred with the subscription ${n}: ${t}`);f(String(t))}));return()=>{l=!0;this.V.debug(`Unsubscribe to query ${n} from data source ${g}`);r.unsubscribe()}}};function Ck(a){const b=olympe.dc.eb();let c=!1;const d=a.k.map(e=>{const f=e.split('.').map(g=>b.tc(g)?olympe.dc.CloudObject.get(g):(olympe.gb.Cb('dc.query').error(`CloudObject with tag ${g} not present but required for deserialization`),c=!0,null));return[e,1===f.length?f[0]:f]});return c?null:olympe.dc.xc.create(d,a.a,a.r)}
1381
1380
  olympe.dc.xc=class{constructor(){this.C=[];this.D=new Map;this.O=[];this.R=[];this.hash=''}static empty(){return new olympe.dc.xc}[Symbol.iterator](){let a=0;return{next:()=>{var b={done:!0};a<this.C.length&&(b=this.C[a],b={value:[b,this.D.get(b)],done:!1},a++);return b}}}entries(){return this.C.map(a=>[a,this.D.get(a)])}values(){return this.D.values()}keys(){return this.C.values()}Ol(){return this.C.map(a=>this.D.get(a))}size(){return this.C.length}has(a){return this.D.has(a)||this.Ol().includes(a)}indexOf(a){return null===
1382
1381
  a||void 0===a?-1:'string'===typeof a?this.C.indexOf(a):this.Ol().indexOf(a)}get(a){return(a=this.D.get(a))?a:null}Vd(){return this.Hh(0)}Hh(a){return a<this.C.length?this.D.get(this.C[a]):null}push(...a){const b=this.Ol();b.push(...a);return b}pop(){if(0===this.C.length)return[];const a=this.Ol();a.pop();return a}shift(){if(0<this.C.length){const a=this.Ol();a.shift();return a}return[]}filter(a){return this.Ol().filter(a)}find(a){return(a=this.Ol().find(a))?a:null}forEach(a){this.C.forEach((b,c)=>
1383
1382
  a(this.D.get(b),c))}map(a){return this.Ol().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.xc.create(b,Array.from(this.O),Array.from(this.R))}reduce(a,b){return this.Ol().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.O);for(const d of a)c=c.concat(d.O.map(e=>e+c.length));a=this.R.concat(...a.map(d=>d.R));return olympe.dc.xc.create(b,c,a)}toString(){return`QueryResult: ${JSON.stringify(this)}`}toJSON(){return this.Ol()}lu(){return this.O.map(a=>
@@ -1385,105 +1384,105 @@ this.D.get(this.C[a]))}uu(){return this.R.map(a=>{a=a.split('.');return 1===a.le
1385
1384
  if(c===a.hash)return a;const g=p=>''===p?null:olympe.dc.CloudObject.get(p);e=b.map(p=>[p.join('.'),1===p.length?g(p[0]):p.map(g)]);const k=new Set(e.map(p=>p[0])),l=new Set(a.keys()),m=[],n=[];e.forEach(([p],r)=>{!l.has(p)&&m.push(r)});l.forEach(p=>{!k.has(p)&&n.push(p)});return olympe.dc.xc.create(e,m,n,c)}static create(a,b,c,d){const e=new olympe.dc.xc;e.C=a.map(f=>f[0]);e.D=new Map(a);e.hash=d||olympe.oa.Xd(e.C.join(''));e.O=b||e.C.map((f,g)=>g);e.R=c||[];return e}fb(a){a&&this.C.flatMap(b=>b.split('.')).forEach(a);
1386
1385
  return{k:this.C,a:this.O,r:this.R}}};olympe.dc.xc.prototype.getRemoved=olympe.dc.xc.prototype.uu;olympe.dc.xc.prototype.getAdded=olympe.dc.xc.prototype.lu;olympe.dc.xc.prototype.concat=olympe.dc.xc.prototype.concat;olympe.dc.xc.prototype.reduce=olympe.dc.xc.prototype.reduce;olympe.dc.xc.prototype.sort=olympe.dc.xc.prototype.sort;olympe.dc.xc.prototype.map=olympe.dc.xc.prototype.map;olympe.dc.xc.prototype.forEach=olympe.dc.xc.prototype.forEach;olympe.dc.xc.prototype.find=olympe.dc.xc.prototype.find;
1387
1386
  olympe.dc.xc.prototype.filter=olympe.dc.xc.prototype.filter;olympe.dc.xc.prototype.shift=olympe.dc.xc.prototype.shift;olympe.dc.xc.prototype.pop=olympe.dc.xc.prototype.pop;olympe.dc.xc.prototype.push=olympe.dc.xc.prototype.push;olympe.dc.xc.prototype.getAt=olympe.dc.xc.prototype.Hh;olympe.dc.xc.prototype.getFirst=olympe.dc.xc.prototype.Vd;olympe.dc.xc.prototype.get=olympe.dc.xc.prototype.get;olympe.dc.xc.prototype.indexOf=olympe.dc.xc.prototype.indexOf;olympe.dc.xc.prototype.has=olympe.dc.xc.prototype.has;
1388
- olympe.dc.xc.prototype.size=olympe.dc.xc.prototype.size;olympe.dc.xc.prototype.toArray=olympe.dc.xc.prototype.Ol;olympe.dc.xc.prototype.keys=olympe.dc.xc.prototype.keys;olympe.dc.xc.prototype.values=olympe.dc.xc.prototype.values;olympe.dc.xc.prototype.entries=olympe.dc.xc.prototype.entries;olympe.dc.xc.empty=olympe.dc.xc.empty;function Ck(a){return 1<a.size()?(olympe.gb.Cb('dc').warn(`a follow() on a QuerySingle has ${a.size()} results (0 or 1 expected) -> returns null`),null):a.Vd()||null}olympe.dc.Rh=class{constructor(a){this.query=a}static from(a){return new olympe.dc.Rh(olympe.dc.nb.from(a))}oc(a){return new olympe.dc.Rh(this.query.oc(a))}Gw(){return this}Kd(a){return this.query.Kd(a).then(b=>Ck(b))}zf(){return Ck(this.query.zf())}};olympe.dc.Rh.prototype.executeFromCache=olympe.dc.Rh.prototype.zf;
1389
- olympe.dc.Rh.prototype.execute=olympe.dc.Rh.prototype.Kd;olympe.dc.Rh.prototype.cast=olympe.dc.Rh.prototype.Gw;olympe.dc.Rh.prototype.follow=olympe.dc.Rh.prototype.oc;const Dk=olympe.dc.Ib.ORIGIN,Ek=olympe.dc.Ib.DESTINATION;function rk(a,b){Xj(a.C,()=>{a.lc()||null!==a.D||b(a.query.ja())})}function tk(a,b,c){const d=a.uid;a.uid++;a.O.set(d,c);b===olympe.dc.Jc.SELF?a.Ii(e=>e?c.error(e):c.next(a.C)):(a.ca++,1===a.ca&&a.Ii(()=>dk(a.C)));a.V.debug(`Add subscriber ${b} for query ${a.query.ja()}, now have ${a.O.size} subscribers`);return d}
1390
- function Ak(a,b,c){if(a.query.Sd()!==b)return!1;c.Wf(a.da);(b=a.da.flush())&&a.V.debug(`Subscription ${a.query.ja()} is considered as obsolete after the transaction ${c.ja()} applied on DB`);return b}function vk(a){fk(a.C);a.O.forEach(b=>{b.next(a.C)})}
1391
- function Fk(a,b,c){const d=[];let e=!1;const f=new olympe.async.wz(olympe.j.Eo());for(const g of b)if(g.hh(a.query)&&(e||(e=!0),f.add(k=>g.Ii(l=>{!l&&d.push(g);k()}))),null!==g.D&&nk(a.query,g.query)){let k;null==(k=a.W)||k.push(g)}rd(f,g=>c(g?d:[]));f.start();return e}
1392
- function Gk(a){const b=a.query.ja(),c=new Map,d=r=>{const t=c.get(r);return t?1===t.size?Array.from(t)[0]:(u,v,w,x)=>t.forEach(y=>y(u,v,w,x)):()=>{}},e=Vj(a.query),f=a.C;for(let r=e.length-1;0<=r;r--){var g=e[r];const t=g.ja(),u=g.C;g=g.observe(f,d(t));let v;c.set(u,(null!=(v=c.get(u))?v:new Set).add(g))}const k=a.db,l=a.query.D,m=olympe.oa.Xd(l),n=qh(k,l,(r,t)=>{r?bk(f,t):f.remove(t);d(m)(r,t,null,b)});let p;null==(p=a.$)||p.push(()=>{nh(k,l,n)});Hk(a)}
1393
- function Ik(a){const b=a.za(a.query,a.Pa.bind(a),()=>{null===a.D||a.lc()||Gk(a)},d=>{a.lc()||(a.V.error(`Error while getting data from data source (${a.query.Sd()}) to ensure coverage of the query ${a.query.ja()}: ${d}`),Hk(a))});let c;b&&(null==(c=a.$)||c.push(b))}function Jk(a,b){a.T.delete(b);0===a.T.size&&(a.T=null,Promise.resolve().then(()=>{!a.lc()&&Ik(a)}))}function Hk(a){const b=a.D;a.D=null;null==b||b.forEach(c=>c())}
1394
- olympe.dc.query.nK=class{constructor(a,b,c,d,e){this.V=a;this.ma=b;this.db=b.view;this.query=c;this.Xg=d;this.C=new olympe.dc.query.fK(this.V,c);this.ca=0;this.uid=1;this.$=[];this.O=new Map;this.D=[()=>fk(this.C)];this.za=e;this.da=new Kk(a,this.db,c,this.C);this.R=this.T=null;this.W=[]}start(a){return Fk(this,a,b=>{0<b.length?(this.T=new Set(b),this.T.forEach(c=>{null===c.R&&(c.R=new Set);c.R.add(this)}),Gk(this)):Ik(this)})}hh(a){return!this.lc()&&this.query.Sd()===a.Sd()&&(this.query.ja()===a.ja()||
1395
- (null===this.D||this.query.D===a.D)&&this.C.hh(a))}Ii(a){null!==this.D?this.D.push(a):a();return this}destroy(a){a?this.V.error(`Destroy subscription ${this.query.ja()} after error: ${a}`):this.V.debug(`Destroy subscription ${this.query.ja()}`);const b=this.$;this.$=null;this.O.forEach(e=>a?e.error(a):e.complete());let c;null==(c=this.R)||c.forEach(e=>Jk(e,this));let d;null==(d=this.T)||d.forEach(e=>{e.R.delete(this);0===e.R.size&&(e.R=null)});b.forEach(e=>e())}lc(){return null===this.$}Pa(){const a=
1396
- olympe.dc.nb.Jf.Qp;if(this.Xg===a)return olympe.oa.stream.tap(c=>{c=c.wA().filter(d=>d.o===olympe.dc.eh.C).map(d=>d.t);this.ma.nk(c,'Batch mode')});let b;if(0<(null==(b=this.W)?void 0:b.length)){const c=this.W.filter(e=>e.Xg===a).map(e=>new Promise(f=>e.Ii(f))),d=this.W.filter(e=>e.Xg!==a).map(e=>new Promise(f=>e.Ii(f)));this.W=void 0;return new TransformStream({start:()=>Promise.all(c),flush:()=>Promise.all(d)})}return null}};function Lk(a,b){return a.C.has(Ek+b)||a.C.has(Dk+b)}
1397
- class Kk{constructor(a,b,c,d){this.V=a;this.db=b;this.O=d;this.T=[];this.R=-1<c.C.max||0<c.C.offset;this.C=new Map;this.result=!1;const e=new Map;for(const f of Vj(c)){a=f.ja();this.T.push(a);if(f instanceof olympe.dc.query.wb.Ht){a=f.relation;a=`${a.zc()}${a.ka()}`;let g;b=null!=(g=this.C.get(a))?g:[];b.push(f);this.C.set(a,b)}Mk(f).forEach(g=>{let k;const l=null!=(k=e.get(g))?k:[];l.push(f.ja());e.set(g,l)})}this.properties=Array.from(e.entries())}flush(){const a=this.result;this.result=!1;return a}yf(){}oh(a,
1398
- b){if(!(this.result||!this.R&&this.db.tc(a))){var c;this.result||(this.result=null==(c=this.properties)?void 0:c.some(([d,e])=>b.has(d)&&ak(this.O,a,e)))}}D(a){this.result||this.db.tc(a)&&!this.R||this.result||(this.result=this.T.some(b=>ak(this.O,a,b)))}Qb(a,b,c){if(!this.result&&Lk(this,a)){var d=this.db.tc(b),e=this.db.tc(c);if(d&&!e||!d&&e){const f=this.C.get(Ek+a);a=this.C.get(Dk+a);this.result||(this.result=d&&(null==f?void 0:f.some(g=>ak(this.O,b,g.C)))||e&&(null==a?void 0:a.some(g=>ak(this.O,
1399
- c,g.C))))}}}Xf(a,b,c){if(!this.result&&this.R&&Lk(this,a)&&this.db.EO(b,new olympe.dc.Oc.Relation(a),c)){const d=this.C.get(Ek+a);a=this.C.get(Dk+a);const e=this.O;this.result||(this.result=(null==d?void 0:d.some(f=>ak(e,b,f.C)&&ak(e,c,f.ja())))||(null==a?void 0:a.some(f=>ak(e,c,f.C)&&ak(e,b,f.ja()))))}}}olympe.dc.query.nK.Aa=[olympe.dc.Ut];function Nk(a){return new olympe.dc.query.Relation(a.tag,a.direction,!0)}
1387
+ olympe.dc.xc.prototype.size=olympe.dc.xc.prototype.size;olympe.dc.xc.prototype.toArray=olympe.dc.xc.prototype.Ol;olympe.dc.xc.prototype.keys=olympe.dc.xc.prototype.keys;olympe.dc.xc.prototype.values=olympe.dc.xc.prototype.values;olympe.dc.xc.prototype.entries=olympe.dc.xc.prototype.entries;olympe.dc.xc.empty=olympe.dc.xc.empty;function Dk(a){return 1<a.size()?(olympe.gb.Cb('dc').warn(`a follow() on a QuerySingle has ${a.size()} results (0 or 1 expected) -> returns null`),null):a.Vd()||null}olympe.dc.Rh=class{constructor(a){this.query=a}static from(a){return new olympe.dc.Rh(olympe.dc.nb.from(a))}oc(a){return new olympe.dc.Rh(this.query.oc(a))}Gw(){return this}Kd(a){return this.query.Kd(a).then(b=>Dk(b))}zf(){return Dk(this.query.zf())}};olympe.dc.Rh.prototype.executeFromCache=olympe.dc.Rh.prototype.zf;
1388
+ olympe.dc.Rh.prototype.execute=olympe.dc.Rh.prototype.Kd;olympe.dc.Rh.prototype.cast=olympe.dc.Rh.prototype.Gw;olympe.dc.Rh.prototype.follow=olympe.dc.Rh.prototype.oc;const Ek=olympe.dc.Ib.ORIGIN,Fk=olympe.dc.Ib.DESTINATION;function sk(a,b){Yj(a.C,()=>{a.lc()||null!==a.D||b(a.query.ja())})}function uk(a,b,c){const d=a.uid;a.uid++;a.O.set(d,c);b===olympe.dc.Jc.SELF?a.Ii(e=>e?c.error(e):c.next(a.C)):(a.ca++,1===a.ca&&a.Ii(()=>ek(a.C)));a.V.debug(`Add subscriber ${b} for query ${a.query.ja()}, now have ${a.O.size} subscribers`);return d}
1389
+ function Bk(a,b,c){if(a.query.Sd()!==b)return!1;c.Wf(a.da);(b=a.da.flush())&&a.V.debug(`Subscription ${a.query.ja()} is considered as obsolete after the transaction ${c.ja()} applied on DB`);return b}function wk(a){gk(a.C);a.O.forEach(b=>{b.next(a.C)})}
1390
+ function Gk(a,b,c){const d=[];let e=!1;const f=new olympe.async.wz(olympe.j.Eo());for(const g of b)if(g.hh(a.query)&&(e||(e=!0),f.add(k=>g.Ii(l=>{!l&&d.push(g);k()}))),null!==g.D&&ok(a.query,g.query)){let k;null==(k=a.W)||k.push(g)}rd(f,g=>c(g?d:[]));f.start();return e}
1391
+ function Hk(a){const b=a.query.ja(),c=new Map,d=r=>{const t=c.get(r);return t?1===t.size?Array.from(t)[0]:(u,v,w,x)=>t.forEach(y=>y(u,v,w,x)):()=>{}},e=Wj(a.query),f=a.C;for(let r=e.length-1;0<=r;r--){var g=e[r];const t=g.ja(),u=g.C;g=g.observe(f,d(t));let v;c.set(u,(null!=(v=c.get(u))?v:new Set).add(g))}const k=a.db,l=a.query.D,m=olympe.oa.Xd(l),n=qh(k,l,(r,t)=>{r?ck(f,t):f.remove(t);d(m)(r,t,null,b)});let p;null==(p=a.$)||p.push(()=>{nh(k,l,n)});Ik(a)}
1392
+ function Jk(a){const b=a.za(a.query,a.Pa.bind(a),()=>{null===a.D||a.lc()||Hk(a)},d=>{a.lc()||(a.V.error(`Error while getting data from data source (${a.query.Sd()}) to ensure coverage of the query ${a.query.ja()}: ${d}`),Ik(a))});let c;b&&(null==(c=a.$)||c.push(b))}function Kk(a,b){a.T.delete(b);0===a.T.size&&(a.T=null,Promise.resolve().then(()=>{!a.lc()&&Jk(a)}))}function Ik(a){const b=a.D;a.D=null;null==b||b.forEach(c=>c())}
1393
+ olympe.dc.query.nK=class{constructor(a,b,c,d,e){this.V=a;this.ma=b;this.db=b.view;this.query=c;this.Xg=d;this.C=new olympe.dc.query.fK(this.V,c);this.ca=0;this.uid=1;this.$=[];this.O=new Map;this.D=[()=>gk(this.C)];this.za=e;this.da=new Lk(a,this.db,c,this.C);this.R=this.T=null;this.W=[]}start(a){return Gk(this,a,b=>{0<b.length?(this.T=new Set(b),this.T.forEach(c=>{null===c.R&&(c.R=new Set);c.R.add(this)}),Hk(this)):Jk(this)})}hh(a){return!this.lc()&&this.query.Sd()===a.Sd()&&(this.query.ja()===a.ja()||
1394
+ (null===this.D||this.query.D===a.D)&&this.C.hh(a))}Ii(a){null!==this.D?this.D.push(a):a();return this}destroy(a){a?this.V.error(`Destroy subscription ${this.query.ja()} after error: ${a}`):this.V.debug(`Destroy subscription ${this.query.ja()}`);const b=this.$;this.$=null;this.O.forEach(e=>a?e.error(a):e.complete());let c;null==(c=this.R)||c.forEach(e=>Kk(e,this));let d;null==(d=this.T)||d.forEach(e=>{e.R.delete(this);0===e.R.size&&(e.R=null)});b.forEach(e=>e())}lc(){return null===this.$}Pa(){const a=
1395
+ olympe.dc.nb.Jf.Qp;if(this.Xg===a)return olympe.oa.stream.tap(c=>{c=c.wA().filter(d=>d.o===olympe.dc.eh.C).map(d=>d.t);this.ma.nk(c,'Batch mode')});let b;if(0<(null==(b=this.W)?void 0:b.length)){const c=this.W.filter(e=>e.Xg===a).map(e=>new Promise(f=>e.Ii(f))),d=this.W.filter(e=>e.Xg!==a).map(e=>new Promise(f=>e.Ii(f)));this.W=void 0;return new TransformStream({start:()=>Promise.all(c),flush:()=>Promise.all(d)})}return null}};function Mk(a,b){return a.C.has(Fk+b)||a.C.has(Ek+b)}
1396
+ class Lk{constructor(a,b,c,d){this.V=a;this.db=b;this.O=d;this.T=[];this.R=-1<c.C.max||0<c.C.offset;this.C=new Map;this.result=!1;const e=new Map;for(const f of Wj(c)){a=f.ja();this.T.push(a);if(f instanceof olympe.dc.query.wb.Ht){a=f.relation;a=`${a.zc()}${a.ka()}`;let g;b=null!=(g=this.C.get(a))?g:[];b.push(f);this.C.set(a,b)}Nk(f).forEach(g=>{let k;const l=null!=(k=e.get(g))?k:[];l.push(f.ja());e.set(g,l)})}this.properties=Array.from(e.entries())}flush(){const a=this.result;this.result=!1;return a}yf(){}oh(a,
1397
+ b){if(!(this.result||!this.R&&this.db.tc(a))){var c;this.result||(this.result=null==(c=this.properties)?void 0:c.some(([d,e])=>b.has(d)&&bk(this.O,a,e)))}}D(a){this.result||this.db.tc(a)&&!this.R||this.result||(this.result=this.T.some(b=>bk(this.O,a,b)))}Qb(a,b,c){if(!this.result&&Mk(this,a)){var d=this.db.tc(b),e=this.db.tc(c);if(d&&!e||!d&&e){const f=this.C.get(Fk+a);a=this.C.get(Ek+a);this.result||(this.result=d&&(null==f?void 0:f.some(g=>bk(this.O,b,g.C)))||e&&(null==a?void 0:a.some(g=>bk(this.O,
1398
+ c,g.C))))}}}Xf(a,b,c){if(!this.result&&this.R&&Mk(this,a)&&this.db.EO(b,new olympe.dc.Oc.Relation(a),c)){const d=this.C.get(Fk+a);a=this.C.get(Ek+a);const e=this.O;this.result||(this.result=(null==d?void 0:d.some(f=>bk(e,b,f.C)&&bk(e,c,f.ja())))||(null==a?void 0:a.some(f=>bk(e,c,f.C)&&bk(e,b,f.ja()))))}}}olympe.dc.query.nK.Aa=[olympe.dc.Ut];function Ok(a){return new olympe.dc.query.Relation(a.tag,a.direction,!0)}
1400
1399
  olympe.dc.query.Relation=class extends olympe.dc.Oc.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.ka())+', ';a+='"direction": '+JSON.stringify(this.zc())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static ke(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.query.Relation(b.tag,b.direction,b.recursive)}static from(a,b){return new olympe.dc.query.Relation(a.ka(),a.zc(),null!=b?b:a instanceof olympe.dc.Ra.zj)}fe(){const a=
1401
- olympe.dc.Ib.DESTINATION,b=olympe.dc.Ib.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}ja(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.ba={Vb:'dc.query.Logger',fw:'dc.query.QueryProcessor'};olympe.sa.$e(function(a){C(a,olympe.dc.query.ba.Vb,[olympe.gb.ba.Ob],b=>b.Vg('query'));B(a,olympe.dc.query.ba.fw,olympe.dc.query.HT,olympe.dc.query.ba.Vb,olympe.dc.db.ba.Ob,olympe.dc.transaction.ba.Ob,olympe.dc.ba.tr,new olympe.sa.zb(olympe.dc.pa.Kt))});olympe.sa.run([olympe.dc.query.ba.fw],a=>{olympe.dc.query.yA=()=>a});olympe.dc.query.ti=class extends Error{};olympe.dc.query.Ca={};olympe.dc.query.Ca.Ni=class extends olympe.dc.query.Yb{constructor(...a){super();this.Ca=a}compile(){return this.Ca.reduce((a,b)=>{const c=[];for(const d of b.compile()){for(const e of a)d.push(...e);c.push(d)}return c},[])}Re(){return new olympe.dc.query.Ca.Wk(...this.Ca.map(a=>a.Re()))}be(){return this.Ca.flatMap(a=>a.be())}hh(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}Kd(a){return this.Ca.reduce((b,c)=>b&&c.Kd(a),!0)}observe(a,
1400
+ olympe.dc.Ib.DESTINATION,b=olympe.dc.Ib.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}ja(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.ba={Vb:'dc.query.Logger',fw:'dc.query.QueryProcessor'};olympe.sa.$e(function(a){C(a,olympe.dc.query.ba.Vb,[olympe.gb.ba.Ob],b=>b.Vg('query'));B(a,olympe.dc.query.ba.fw,olympe.dc.query.HT,olympe.dc.query.ba.Vb,olympe.dc.db.ba.Ob,olympe.dc.transaction.ba.Ob,olympe.dc.ba.tr,new olympe.sa.zb(olympe.dc.pa.Kt))});olympe.sa.run([olympe.dc.query.ba.fw],a=>{olympe.dc.query.yA=()=>a});olympe.dc.query.ti=class extends Error{};olympe.dc.query.Ca={};olympe.dc.query.Ca.Ni=class extends olympe.dc.query.Yb{constructor(...a){super();this.Ca=a}compile(){const a=b=>0<b.length?b[0].reduce((c,d)=>[...c,...a(b.slice(1)).map(e=>[...d,...e])],[]):[[]];return a(this.Ca.map(b=>b.compile()))}Re(){return new olympe.dc.query.Ca.Wk(...this.Ca.map(a=>a.Re()))}be(){return this.Ca.flatMap(a=>a.be())}hh(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}Kd(a){return this.Ca.reduce((b,c)=>b&&c.Kd(a),!0)}observe(a,
1402
1401
  b,c){const d=Array(this.Ca.length).fill(!1);let e=null;const f=(g,k)=>{d[g]=k;g=d.every(l=>l);e!==g&&(e=g,c(g))};this.Ca.forEach((g,k)=>{g.observe(a,olympe.oa.Xd('AND-'+b+a+k),f.bind(null,k))})}fb(){return{pr:olympe.dc.query.Yb.C.kF,p:this.Ca.map(a=>a.fb())}}nh(){throw Error('toObject for AND predicate should not be called');}toString(){return'And-'+this.Ca.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.Ca.forEach((c,d)=>{c.clear(a,olympe.oa.Xd('AND-'+b+a+d))})}};olympe.dc.query.Ca.Sn=class extends olympe.dc.query.Yb{constructor(a,b,c,d=!1){super();this.Ec=olympe.dc.Ya(a);this.substring=b;this.db=c;this.C=d}be(){return[this.Ec]}hh(a,b){return a instanceof olympe.dc.query.Ca.Sn&&a.Ec===this.Ec?b?a.C?a.substring.toLowerCase().includes(this.substring.toLowerCase()):a.substring.includes(this.substring):this.C?this.substring.toLowerCase().includes(a.substring.toLowerCase()):this.substring.includes(a.substring):!1}Ac(){return this.Ec}Kd(a){return this.apply(this.db.Ac(a,
1403
1402
  this.Ec))}observe(a,b,c){Pi(this.db,a,this.Ec,d=>{c(this.apply(d))},olympe.oa.Xd(b+a+this.toString()))}apply(a){a=olympe.dc.Ad.ug(a);return'string'===typeof a?this.C?a.includes(this.substring):a.toLowerCase().includes(this.substring.toLowerCase()):!1}toString(){return'Contains'+this.Ec+'-'+this.substring+'-'+this.C}clear(a,b){Qi(this.db,a,this.Ec,olympe.oa.Xd(b+a+this.toString()))}nh(){return{name:'CONTAINS',property:this.Ac(),value:this.substring,caseSensitive:this.C}}fb(){return{pr:olympe.dc.query.Yb.C.By,
1404
1403
  p:this.Ec,s:this.substring,c:this.C}}};olympe.dc.query.Ca.Lk=class extends olympe.dc.query.Yb{constructor(a,b,c){super();this.Ec=olympe.dc.Ya(a);this.C=olympe.dc.Ad.ug(null!=b?b:null);this.db=c}be(){return[this.Ec]}hh(a){if(a instanceof olympe.dc.query.Ca.Lk&&this.Ec===a.Ec)if('object'===typeof this.C&&null!==this.C){if(this.C instanceof olympe.dc.CloudObject)return this.C.Rb(a.C);if(this.C instanceof Date)return a.C instanceof Date&&this.C.getTime()===a.C.getTime();if(this.C instanceof olympe.j.Color)return this.C.Rb(a.C)}else return this.C===
1405
1404
  a.C;return!1}Kd(a){return this.apply(this.db.Ac(a,this.Ec))}observe(a,b,c){Pi(this.db,a,this.Ec,d=>{c(this.apply(d))},olympe.oa.Xd(b+a+this.toString()));null===this.C&&null===this.db.Ac(a,this.Ec)&&c(!0)}clear(a,b){Qi(this.db,a,this.Ec,olympe.oa.Xd(b+a+this.toString()))}apply(a){a=olympe.dc.Ad.ug(a);return'object'===typeof a&&null!==a?a instanceof olympe.dc.CloudObject?a.Rb(this.C):a instanceof Date?this.C instanceof Date&&this.C.getTime()===a.getTime():a instanceof olympe.j.Color?a.Rb(this.C):!1:
1406
- a===this.C}toString(){let a,b;const c=null!=(b=null==(a=this.C)?void 0:a.toString())?b:'null';return'Equals-'+this.Ec+'-'+c}nh(){return{name:'EQUALS',property:this.Ec,value:this.C}}fb(){let a=1,b=this.C;switch(!0){case this.C instanceof Date:a=2;b=this.C.toJSON();break;case this.C instanceof olympe.dc.CloudObject:a=3;b=this.C.ka();break;case this.C instanceof olympe.j.Color:a=4,b=this.C.toJSON()}return{pr:olympe.dc.query.Yb.C.DG,p:this.Ec,t:a,v:b}}};function Ok(a,b,c){return olympe.oa.Xd(c+b+a.C+a.Ec)}
1405
+ a===this.C}toString(){let a,b;const c=null!=(b=null==(a=this.C)?void 0:a.toString())?b:'null';return'Equals-'+this.Ec+'-'+c}nh(){return{name:'EQUALS',property:this.Ec,value:this.C}}fb(){let a=1,b=this.C;switch(!0){case this.C instanceof Date:a=2;b=this.C.toJSON();break;case this.C instanceof olympe.dc.CloudObject:a=3;b=this.C.ka();break;case this.C instanceof olympe.j.Color:a=4,b=this.C.toJSON()}return{pr:olympe.dc.query.Yb.C.DG,p:this.Ec,t:a,v:b}}};function Pk(a,b,c){return olympe.oa.Xd(c+b+a.C+a.Ec)}
1407
1406
  olympe.dc.query.Ca.Ov=class extends olympe.dc.query.Yb{constructor(a,b,c,d=!0,e=!0){super();this.db=a;this.Ec=olympe.dc.Ya(b);this.C=(this.O=('object'===typeof c||'string'===typeof c)&&olympe.dc.CloudObject.Mw(c))?olympe.dc.Ya(c):c;this.D=d;this.R=e}Re(){return new olympe.dc.query.Ca.Ov(this.db,this.Ec,this.C,!this.D,!this.R)}be(){return[this.Ec]}hh(a,b){if(b)throw Error('Check coverage of inequality should not happen with opposite = true');return a instanceof olympe.dc.query.Ca.Ov&&this.Ec===a.Ec?
1408
- typeof this.C!==typeof a.C||this.D!==a.D?!1:this.O?this.C===a.C:this.D&&this.C>=a.C||!this.D&&this.C<=a.C:!1}Ac(){return this.Ec}Kd(a){return this.compare(this.db.Ac(a,this.Ec),this.O?this.db.Ac(a,this.C):this.C)}observe(a,b,c){this.O&&Pi(this.db,a,this.C,d=>{const e=this.db.Ac(a,this.Ec);null!==e&&c(this.compare(e,d))},Ok(this,a,b));Pi(this.db,a,this.Ec,d=>{const e=this.O?this.db.Ac(a,this.C):this.C;c(null!==e?this.compare(d,e):!0)},Ok(this,a,b))}compare(a,b){return null===a?!1:null===b?!0:this.R?
1409
- this.D?a<b:a>b:this.D?a<=b:a>=b}clear(a,b){Qi(this.db,a,this.Ec,Ok(this,a,b));this.O&&Qi(this.db,a,this.C,Ok(this,a,b))}nh(){return{name:'INEQUALITY_OPERATOR',property:this.Ac(),operator:this.D?'<':'>',strict:this.R,value:this.C}}fb(){return{pr:olympe.dc.query.Yb.C.xH,p:this.Ec,b:this.C,l:this.D,s:this.R}}toString(){return(this.D?'LowerThan-':'GreaterThan-')+this.Ec+'-'+this.R+'-'+this.C}};olympe.dc.query.Ca.ik=class extends olympe.dc.query.Yb{constructor(a){super();this.C=a}compile(){const a=this.C.Re();return this.Rb(a)?super.compile():a.compile()}Re(){return this.C}be(){return this.C.be()}hh(a,b){return a instanceof olympe.dc.query.Ca.ik?this.C.hh(a.C,b):this.C.hh(a,!b)}Kd(a){return!this.C.Kd(a)}observe(a,b,c){let d=null;this.C.observe(a,olympe.oa.Xd('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}nh(){return{name:'NOT',predicate:this.C.nh()}}fb(){return{pr:olympe.dc.query.Yb.C.LJ,v:this.C.fb()}}toString(){return`NOT-${this.C.toString()}`}clear(a,
1407
+ typeof this.C!==typeof a.C||this.D!==a.D?!1:this.O?this.C===a.C:this.D&&this.C>=a.C||!this.D&&this.C<=a.C:!1}Ac(){return this.Ec}Kd(a){return this.compare(this.db.Ac(a,this.Ec),this.O?this.db.Ac(a,this.C):this.C)}observe(a,b,c){this.O&&Pi(this.db,a,this.C,d=>{const e=this.db.Ac(a,this.Ec);null!==e&&c(this.compare(e,d))},Pk(this,a,b));Pi(this.db,a,this.Ec,d=>{const e=this.O?this.db.Ac(a,this.C):this.C;c(null!==e?this.compare(d,e):!0)},Pk(this,a,b))}compare(a,b){return null===a?!1:null===b?!0:this.R?
1408
+ this.D?a<b:a>b:this.D?a<=b:a>=b}clear(a,b){Qi(this.db,a,this.Ec,Pk(this,a,b));this.O&&Qi(this.db,a,this.C,Pk(this,a,b))}nh(){return{name:'INEQUALITY_OPERATOR',property:this.Ac(),operator:this.D?'<':'>',strict:this.R,value:this.C}}fb(){return{pr:olympe.dc.query.Yb.C.xH,p:this.Ec,b:this.C,l:this.D,s:this.R}}toString(){return(this.D?'LowerThan-':'GreaterThan-')+this.Ec+'-'+this.R+'-'+this.C}};olympe.dc.query.Ca.ik=class extends olympe.dc.query.Yb{constructor(a){super();this.C=a}compile(){const a=this.C.Re();return this.Rb(a)?super.compile():a.compile()}Re(){return this.C}be(){return this.C.be()}hh(a,b){return a instanceof olympe.dc.query.Ca.ik?this.C.hh(a.C,b):this.C.hh(a,!b)}Kd(a){return!this.C.Kd(a)}observe(a,b,c){let d=null;this.C.observe(a,olympe.oa.Xd('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}nh(){return{name:'NOT',predicate:this.C.nh()}}fb(){return{pr:olympe.dc.query.Yb.C.LJ,v:this.C.fb()}}toString(){return`NOT-${this.C.toString()}`}clear(a,
1410
1409
  b){this.C.clear(a,olympe.oa.Xd('NOT'+b+a))}Rb(a){return a instanceof olympe.dc.query.Ca.ik?this.C.Rb(a.C):!1}};olympe.dc.query.Ca.Wk=class extends olympe.dc.query.Yb{constructor(...a){super();this.Ca=a}compile(){return this.Ca.map(a=>a.compile()).flat()}Re(){return new olympe.dc.query.Ca.Ni(...this.Ca.map(a=>a.Re()))}be(){return this.Ca.flatMap(a=>a.be())}hh(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}Kd(a){return this.Ca.reduce((b,c)=>b||c.Kd(a),!1)}observe(a,b,c){const d=Array(this.Ca.length).fill(!1);let e=null;const f=(g,k)=>{d[g]=k;g=
1411
- d.some(l=>l);e!==g&&(e=g,c(g))};this.Ca.forEach((g,k)=>{g.observe(a,olympe.oa.Xd('OR-'+b+a+k),f.bind(null,k))})}nh(){throw Error('toObject for OR predicate should not be called');}fb(){return{pr:olympe.dc.query.Yb.C.UJ,p:this.Ca.map(a=>a.fb())}}toString(){return'And-'+this.Ca.reduce((a,b)=>a.toString()+'-'+b.toString(),'')}clear(a,b){this.Ca.forEach((c,d)=>{c.clear(a,olympe.oa.Xd('OR-'+b+a+d))})}};olympe.dc.query.Ca.mo=class extends olympe.dc.query.Yb{constructor(a,b,c,d=!0){super();this.Ec=olympe.dc.Ya(a);this.C='string'===typeof b?new RegExp(d?b:b.toLowerCase()):d?b:new RegExp(b.source.toLowerCase());this.db=c;this.D=d}be(){return[this.Ec]}hh(a){return a instanceof olympe.dc.query.Ca.mo&&this.Ec===a.Ec&&this.C.toString()===a.C.toString()}Kd(a){return this.apply(this.db.Ac(a,this.Ec))}observe(a,b,c){Pi(this.db,a,this.Ec,d=>{c(this.apply(d))},olympe.oa.Xd(b+a+this.toString()))}apply(a){a=olympe.dc.Ad.ug(a);
1412
- return'string'===typeof a?(a=this.C.test(this.D?a:a.toLowerCase()),this.C.lastIndex=0,a):!1}toString(){return'Regex'+this.Ec+'-'+this.C.toString()+'-'+this.D}nh(){return{name:'REGEX',property:this.Ec,pattern:this.C,caseSensitive:this.D}}fb(){return{pr:olympe.dc.query.Yb.C.pK,p:this.Ec,r:this.C.source,c:this.D}}clear(a,b){Qi(this.db,a,this.Ec,olympe.oa.Xd(b+a+this.toString()))}};olympe.dc.query.Ca.mD=class extends olympe.dc.query.Yb{constructor(a){super();this.C=new Set(a.map(olympe.dc.Ya))}be(){return[]}hh(a){return a instanceof olympe.dc.query.Ca.mD&&Array.from(a.C).every(b=>this.C.has(b))}Kd(a){return this.C.has(a)}observe(a,b,c){c(this.C.has(a))}clear(){}toString(){return'Tags-'+Array.from(this.C)}nh(){return{name:'IS',tags:Array.from(this.C)}}fb(){return{pr:olympe.dc.query.Yb.C.nL,t:Array.from(this.C)}}};olympe.dc.query.wb={};function Mk(a){let b,c;const d=new Set(null!=(c=null==(b=a.D)?void 0:b.be())?c:[]);let e;a.Oe&&d.add(null==(e=a.Oe)?void 0:e.Ac().ka());return d}function Pk(a){if(!a.ca){let b,c;a.ca=null!=(c=null==(b=a.D)?void 0:b.compile())?c:[]}return a.ca}function Qk(a,b){for(const c of b)if(a.some(d=>d.hh(c,!1)))return!0;return!1}
1413
- function Rk(a,b){if(null===a.D)return b;let c=!1;const d=a.toString();return(e,f,g,k)=>{const l=olympe.oa.Xd(k+f+d);e?a.D.observe(f,l,m=>{c||b(m,f,g,l)}):(c=!0,a.D.clear(f,l),c=!1,b(!1,f,g,l))}}function Sk(a,b,c){if(null===a.Oe)return c;const d=a.toString();return(e,f,g,k)=>{const l=a.Oe.Ac();k=olympe.oa.Xd(k+d);e?Pi(a.db,f,l,()=>{Yj(b)},k):Qi(a.db,f,l,k);c(e,f,g,k)}}
1414
- olympe.dc.query.wb.UC=class{constructor(a,b){this.db=olympe.dc.eb();this.C=a;this.optional=b;this.ca=this.Oe=this.D=this.id=null}static C(a){var b=a.i;if('string'===typeof a.f)return new olympe.dc.query.wb.ph(b,a.f);var c=a.o;const d=new olympe.dc.Oc.Relation(a.t,a.d);b='boolean'===typeof a.s?new olympe.dc.query.wb.Mk(b,d,a.s,c):new olympe.dc.query.wb.ht(b,d,c);void 0!==a.p&&(b.D=hk(a.p));void 0!==a.c&&(c=b.ja(),a=a.c,a=new olympe.dc.query.Qn(c,new olympe.dc.Oc.Property(a.p),a.o),b.Oe=a);return b}clone(){}R(){let a,
1415
- b,c,d;return`${this.C}-${this.optional}${null!=(c=null==(a=this.D)?void 0:a.toString())?c:''}${null!=(d=null==(b=this.Oe)?void 0:b.toString())?d:''}`}nh(){}toJSON(){}fb(){const a={i:this.C,o:this.optional};null!==this.D&&(a.p=this.D.fb());null!==this.Oe&&(a.c=this.Oe.fb());return a}W(){}da(){return new olympe.dc.query.wb.fD}$(){}ja(){this.id||(this.id=this.W());return this.id}T(){return this.optional}hh(a){const b=Pk(this);if(0===b.length)return!0;a=Pk(a);if(0===a.length)return!1;for(const c of a)if(!b.some(d=>
1416
- Qk(d,c)))return!1;return!0}filter(a){const b=this.clone(),c=b.D;null===c?b.D=a:b.D=c instanceof olympe.dc.query.Ca.Ni?new olympe.dc.query.Ca.Ni(...Array.from(c.Ca),a):new olympe.dc.query.Ca.Ni(b.D,a);return b}sort(a,b){const c=this.clone();c.Oe=new olympe.dc.query.Qn(this.ja(),a,b);return c}Ur(){return this.Oe}Kd(a){if(null!==this.D){var b=this.ja();for(const c of Zj(a,b))this.D.Kd(c)||a.remove(c,b,null)}}observe(a,b){const c=this.ja();return Rk(this,Sk(this,a,(d,e,f,g)=>{(d?bk(a,e,c,f):a.remove(e,
1410
+ d.some(l=>l);e!==g&&(e=g,c(g))};this.Ca.forEach((g,k)=>{g.observe(a,olympe.oa.Xd('OR-'+b+a+k),f.bind(null,k))})}nh(){throw Error('toObject for OR predicate should not be called');}fb(){return{pr:olympe.dc.query.Yb.C.UJ,p:this.Ca.map(a=>a.fb())}}toString(){return'Or-'+this.Ca.reduce((a,b)=>a.toString()+'-'+b.toString(),'')}clear(a,b){this.Ca.forEach((c,d)=>{c.clear(a,olympe.oa.Xd('OR-'+b+a+d))})}};olympe.dc.query.Ca.mo=class extends olympe.dc.query.Yb{constructor(a,b,c,d=!0){super();this.Ec=olympe.dc.Ya(a);this.C='string'===typeof b?new RegExp(d?b:b.toLowerCase()):d?b:new RegExp(b.source.toLowerCase());this.db=c;this.D=d}be(){return[this.Ec]}hh(a){return a instanceof olympe.dc.query.Ca.mo&&this.Ec===a.Ec&&this.C.toString()===a.C.toString()}Kd(a){return this.apply(this.db.Ac(a,this.Ec))}observe(a,b,c){Pi(this.db,a,this.Ec,d=>{c(this.apply(d))},olympe.oa.Xd(b+a+this.toString()))}apply(a){a=olympe.dc.Ad.ug(a);
1411
+ return'string'===typeof a?(a=this.C.test(this.D?a:a.toLowerCase()),this.C.lastIndex=0,a):!1}toString(){return'Regex'+this.Ec+'-'+this.C.toString()+'-'+this.D}nh(){return{name:'REGEX',property:this.Ec,pattern:this.C,caseSensitive:this.D}}fb(){return{pr:olympe.dc.query.Yb.C.pK,p:this.Ec,r:this.C.source,c:this.D}}clear(a,b){Qi(this.db,a,this.Ec,olympe.oa.Xd(b+a+this.toString()))}};olympe.dc.query.Ca.mD=class extends olympe.dc.query.Yb{constructor(a){super();this.C=new Set(a.map(olympe.dc.Ya))}be(){return[]}hh(a){return a instanceof olympe.dc.query.Ca.mD&&Array.from(a.C).every(b=>this.C.has(b))}Kd(a){return this.C.has(a)}observe(a,b,c){c(this.C.has(a))}clear(){}toString(){return'Tags-'+Array.from(this.C)}nh(){return{name:'IS',tags:Array.from(this.C)}}fb(){return{pr:olympe.dc.query.Yb.C.nL,t:Array.from(this.C)}}};olympe.dc.query.wb={};function Nk(a){let b,c;const d=new Set(null!=(c=null==(b=a.D)?void 0:b.be())?c:[]);let e;a.Oe&&d.add(null==(e=a.Oe)?void 0:e.Ac().ka());return d}function Qk(a){if(!a.ca){let b,c;a.ca=null!=(c=null==(b=a.D)?void 0:b.compile())?c:[]}return a.ca}function Rk(a,b){for(const c of b)if(a.some(d=>d.hh(c,!1)))return!0;return!1}
1412
+ function Sk(a,b){if(null===a.D)return b;let c=!1;const d=a.toString();return(e,f,g,k)=>{const l=olympe.oa.Xd(k+f+d);e?a.D.observe(f,l,m=>{c||b(m,f,g,l)}):(c=!0,a.D.clear(f,l),c=!1,b(!1,f,g,l))}}function Tk(a,b,c){if(null===a.Oe)return c;const d=a.toString();return(e,f,g,k)=>{const l=a.Oe.Ac();k=olympe.oa.Xd(k+d);e?Pi(a.db,f,l,()=>{Zj(b)},k):Qi(a.db,f,l,k);c(e,f,g,k)}}
1413
+ olympe.dc.query.wb.UC=class{constructor(a,b){this.db=olympe.dc.eb();this.C=a;this.optional=b;this.ca=this.Oe=this.D=this.id=null}static C(a){var b=a.i;if('string'===typeof a.f)return new olympe.dc.query.wb.ph(b,a.f);var c=a.o;const d=new olympe.dc.Oc.Relation(a.t,a.d);b='boolean'===typeof a.s?new olympe.dc.query.wb.Mk(b,d,a.s,c):new olympe.dc.query.wb.ht(b,d,c);void 0!==a.p&&(b.D=ik(a.p));void 0!==a.c&&(c=b.ja(),a=a.c,a=new olympe.dc.query.Qn(c,new olympe.dc.Oc.Property(a.p),a.o),b.Oe=a);return b}clone(){}R(){let a,
1414
+ b,c,d;return`${this.C}-${this.optional}${null!=(c=null==(a=this.D)?void 0:a.toString())?c:''}${null!=(d=null==(b=this.Oe)?void 0:b.toString())?d:''}`}nh(){}toJSON(){}fb(){const a={i:this.C,o:this.optional};null!==this.D&&(a.p=this.D.fb());null!==this.Oe&&(a.c=this.Oe.fb());return a}W(){}da(){return new olympe.dc.query.wb.fD}$(){}ja(){this.id||(this.id=this.W());return this.id}T(){return this.optional}hh(a){const b=Qk(this);if(0===b.length)return!0;a=Qk(a);if(0===a.length)return!1;for(const c of a)if(!b.some(d=>
1415
+ Rk(d,c)))return!1;return!0}filter(a){const b=this.clone(),c=b.D;null===c?b.D=a:b.D=c instanceof olympe.dc.query.Ca.Ni?new olympe.dc.query.Ca.Ni(...Array.from(c.Ca),a):new olympe.dc.query.Ca.Ni(b.D,a);return b}sort(a,b){const c=this.clone();c.Oe=new olympe.dc.query.Qn(this.ja(),a,b);return c}Ur(){return this.Oe}Kd(a){if(null!==this.D){var b=this.ja();for(const c of ak(a,b))this.D.Kd(c)||a.remove(c,b,null)}}observe(a,b){const c=this.ja();return Sk(this,Tk(this,a,(d,e,f,g)=>{(d?ck(a,e,c,f):a.remove(e,
1417
1416
  c,f))&&b(d,e,f,g)}))}Rb(){}};olympe.dc.query.wb.Ht=class extends olympe.dc.query.wb.UC{constructor(a,b,c){super(a,c);this.relation=b;this.ma=null}};olympe.dc.query.wb.VC=class{has(){}R(){}C(){}xg(){}D(){}remove(){}};olympe.dc.query.wb.ph=class extends olympe.dc.query.wb.UC{constructor(a,b,c){super(a,!1);this.af=b;this.O=null!=c?c:null}clone(){return new olympe.dc.query.wb.ph(this.C,this.af,this.O)}W(){return olympe.oa.Xd(this.C+olympe.dc.query.wb.ph.Dc)}da(){return new olympe.dc.query.wb.EH(this.db,this.O)}$(a,b){return b instanceof olympe.dc.query.wb.ph?[a]:[olympe.oa.Xd(a+olympe.dc.query.wb.ph.Dc)]}hh(a){if(a instanceof olympe.dc.query.wb.Ht){const b=olympe.dc.Ib.ORIGIN,c=olympe.dc.Ib.DESTINATION,d=olympe.dc.Lf.sh,
1418
- e=olympe.dc.Lf.bt,f=olympe.dm.Relation.C.vK,g=olympe.dm.Relation.C.yL;a=a.relation;const k=a.zc(),l=a.ka();return k!==c||l!==d&&l!==e?!!(Zi(this.db,a,this.af)&(a.zc()===b?f:g)):!0}return a instanceof olympe.dc.query.wb.ph?this.af===a.af:!1}Kd(a){const b=this.ja();for(const c of Zj(a,this.C))for(const d of Ph(this.db,c,this.af))bk(a,d,b,c)}observe(a,b){const c=this.ja(),d=(e,f,g,k)=>{const l=`${k}:${g}`;f?$i(this.db,g,this.af,(m,n,p,r,t)=>{p&&(p=r?bk(a,t,c,g):a.remove(t,c,g),null!==n&&ck(a,r,m,n,g,
1419
- t),p&&d(e,r,t,k))},l):aj(this.db,g,this.af,l);b(f,g,e,l)};return(e,f,g,k)=>{(e?bk(a,f,c,f):a.remove(f,c,f))&&d(f,e,f,olympe.oa.Xd(k+f+this.toString()))}}fb(){return Object.assign(super.fb(),{f:this.af})}R(){return`followRulePart-${this.af}-${super.R()}`}nh(){throw Error('Try to parse a part of an implicit query. Data connectors do not support those queries.');}toString(){return`FollowRule Part: ${this.db.name(this.af)} (${this.af})`}Rb(a){return a instanceof olympe.dc.query.wb.ph&&this.af===a.af}toJSON(){return{type:'follow rule',
1420
- rule:`${this.db.name(this.af)} (${this.af})`}}T(){return!1}filter(){olympe.gb.Cb('dc.query').warn('Should never try to filter on queries with follow rules, ignore...');return this}sort(){olympe.gb.Cb('dc.query').warn('Should never try to sort queries with follow rules, ignore...');return this}};olympe.dc.query.wb.ph.Dc='followRules';olympe.dc.query.wb.ht=class extends olympe.dc.query.wb.Ht{constructor(a,b,c){super(a,olympe.dc.query.Relation.from(b,!1),c)}clone(){const a=new olympe.dc.query.wb.ht(this.C,this.relation,this.optional);a.D=this.D;a.Oe=this.Oe;return a}W(){return olympe.oa.Xd(this.C+this.relation.ja())}$(a,b){if(b instanceof olympe.dc.query.wb.ph)return[a];const c=[a+this.relation.ja(),a+Nk(this.relation).ja()+!1,a+Nk(this.relation).ja()+!0,a+olympe.dc.query.wb.ph.Dc].map(d=>olympe.oa.Xd(d));b instanceof olympe.dc.query.wb.Mk&&
1421
- b.relation.Rb(this.relation)&&c.push(a);return c}Kd(a){const b=this.ja();for(const c of Zj(a,this.C))this.db.pc(c,this.relation).forEach(d=>{bk(a,d,b,c)});super.Kd(a)}observe(a,b){const c=super.observe(a,b),d=this.relation.ka(),e=this.relation.zc(),f=this.toString();return(g,k,l,m)=>{const n=olympe.oa.Xd(m+k+f);g?Ui(this.db,k,this.relation,(p,r)=>{ck(a,p,d,e,k,r);c(p,r,k,n)},n):this.db.D(k,this.relation,n)}}fb(){return Object.assign(super.fb(),{t:this.relation.ka(),d:this.relation.zc()})}R(){return`followPart-${this.relation.ja()}-${super.R()}`}nh(){const a=
1422
- {recursive:!1,relation:this.relation,filter:Pk(this).map(b=>b.map(c=>c.nh())),optional:this.T()};this.Oe&&(a.sort={property:this.Oe.Ac(),order:this.Oe.Sv});return a}toString(){return`Follow Part: ${this.relation}`}toJSON(){return{type:'follow',relation:`${this.db.name(this.relation)} (${this.relation.ka()})`,direction:this.relation.zc()}}Rb(a){return a instanceof olympe.dc.query.wb.ht&&this.relation.Rb(a.relation)}};olympe.dc.query.wb.Mk=class extends olympe.dc.query.wb.Ht{constructor(a,b,c,d){super(a,olympe.dc.query.Relation.from(b,!0),d);this.O=c}da(){return new olympe.dc.query.wb.AK}clone(){const a=new olympe.dc.query.wb.Mk(this.C,this.relation,this.O,this.optional);a.D=this.D;a.Oe=this.Oe;return a}W(){return olympe.oa.Xd(this.C+this.relation.ja()+this.O)}$(a,b){if(b instanceof olympe.dc.query.wb.ph)return[a];const c=[a+this.relation.ja()+this.O,a+olympe.dc.query.wb.ph.Dc].map(d=>olympe.oa.Xd(d));b instanceof
1423
- olympe.dc.query.wb.Mk&&b.relation.Rb(this.relation)&&c.push(a);return c}Kd(a){const b=this.ja();for(const c of Zj(a,this.C))this.O&&bk(a,c,b,c),this.db.iq(c,this.relation).forEach(d=>{bk(a,d,b,c)});super.Kd(a)}observe(a,b){const c=this.relation.ka(),d=this.relation.zc(),e=(f,g,k,l)=>{const m=olympe.oa.Xd(l+g);f?Ui(this.db,g,this.relation,(n,p)=>{ck(a,n,c,d,g,p);super.observe(a,(r,t,u,v)=>{b(r,t,u,v);e(r,t,u,l)})(n,p,k,m)},m):this.db.D(g,this.relation,m)};return(f,g,k,l)=>{k=l+this.toString();this.O&&
1424
- super.observe(a,b)(f,g,g,olympe.oa.Xd(k+g));e(f,g,g,k)}}fb(){return Object.assign(super.fb(),{s:this.O,t:this.relation.ka(),d:this.relation.zc()})}R(){return`followRecursivelyPart-${this.relation.ja()}-${this.O}-${super.R()}`}nh(){const a={recursive:this.O?'INCLUDE_SELF':'EXCLUDE_SELF',relation:this.relation,filter:Pk(this).map(b=>b.map(c=>c.nh())),optional:this.T()};this.Oe&&(a.sort={property:this.Oe.Ac(),order:this.Oe.Sv});return a}toString(){return`FollowRecursively Part: ${this.relation}`}toJSON(){return{type:'follow recursively',
1425
- relation:`${this.db.name(this.relation)} (${this.relation.ka()})`,direction:this.relation.zc()}}Rb(a){return a instanceof olympe.dc.query.wb.Mk&&this.relation.Rb(a.relation)&&this.O===a.O}};olympe.dc.query.wb.TG=class extends olympe.dc.query.wb.ph{observe(a,b){const c=this.ja();return(d,e,f,g)=>{d?bk(a,e,c,e):a.remove(e,c,e);b(d,e,e,g)}}};olympe.dc.query.wb.EH=class{constructor(a,b){this.db=a;this.origin=null;this.content=new Map;this.O=null!=b?b:null}xg(){return this.content.keys()}C(a){return this.content.has(a)&&null!==this.origin?[this.origin].values():[].values()}has(a){return this.content.has(a)}R(a){let b;return(null==(b=this.O)?void 0:b.call(this,a))||!1}D(a,b){null===this.origin&&(this.origin=b);const c=this.content.get(a);if(!c)return this.content.set(a,(new Map).set(b,1)),!0;let d;a=null!=(d=c.get(b))?d:0;c.set(b,a+1);return!1}remove(a,
1417
+ e=olympe.dc.Lf.bt,f=olympe.dm.Relation.C.vK,g=olympe.dm.Relation.C.yL;a=a.relation;const k=a.zc(),l=a.ka();return k!==c||l!==d&&l!==e?!!(Zi(this.db,a,this.af)&(a.zc()===b?f:g)):!0}return a instanceof olympe.dc.query.wb.ph?this.af===a.af:!1}Kd(a){const b=this.ja();for(const c of ak(a,this.C))for(const d of Ph(this.db,c,this.af))ck(a,d,b,c)}observe(a,b){const c=this.ja(),d=(e,f,g,k)=>{const l=`${k}:${g}`;f?$i(this.db,g,this.af,(m,n,p,r,t)=>{p&&(p=r?ck(a,t,c,g):a.remove(t,c,g),null!==n&&dk(a,r,m,n,g,
1418
+ t),p&&d(e,r,t,k))},l):aj(this.db,g,this.af,l);b(f,g,e,l)};return(e,f,g,k)=>{(e?ck(a,f,c,f):a.remove(f,c,f))&&d(f,e,f,olympe.oa.Xd(k+f+this.toString()))}}fb(){return Object.assign(super.fb(),{f:this.af})}R(){return`followRulePart-${this.af}-${super.R()}`}nh(){throw Error('Try to parse a part of an implicit query. Data connectors do not support those queries.');}toString(){return`FollowRule Part: ${this.db.name(this.af)} (${this.af})`}Rb(a){return a instanceof olympe.dc.query.wb.ph&&this.af===a.af}toJSON(){return{type:'follow rule',
1419
+ rule:`${this.db.name(this.af)} (${this.af})`}}T(){return!1}filter(){olympe.gb.Cb('dc.query').warn('Should never try to filter on queries with follow rules, ignore...');return this}sort(){olympe.gb.Cb('dc.query').warn('Should never try to sort queries with follow rules, ignore...');return this}};olympe.dc.query.wb.ph.Dc='followRules';olympe.dc.query.wb.ht=class extends olympe.dc.query.wb.Ht{constructor(a,b,c){super(a,olympe.dc.query.Relation.from(b,!1),c)}clone(){const a=new olympe.dc.query.wb.ht(this.C,this.relation,this.optional);a.D=this.D;a.Oe=this.Oe;return a}W(){return olympe.oa.Xd(this.C+this.relation.ja())}$(a,b){if(b instanceof olympe.dc.query.wb.ph)return[a];const c=[a+this.relation.ja(),a+Ok(this.relation).ja()+!1,a+Ok(this.relation).ja()+!0,a+olympe.dc.query.wb.ph.Dc].map(d=>olympe.oa.Xd(d));b instanceof olympe.dc.query.wb.Mk&&
1420
+ b.relation.Rb(this.relation)&&c.push(a);return c}Kd(a){const b=this.ja();for(const c of ak(a,this.C))this.db.pc(c,this.relation).forEach(d=>{ck(a,d,b,c)});super.Kd(a)}observe(a,b){const c=super.observe(a,b),d=this.relation.ka(),e=this.relation.zc(),f=this.toString();return(g,k,l,m)=>{const n=olympe.oa.Xd(m+k+f);g?Ui(this.db,k,this.relation,(p,r)=>{dk(a,p,d,e,k,r);c(p,r,k,n)},n):this.db.D(k,this.relation,n)}}fb(){return Object.assign(super.fb(),{t:this.relation.ka(),d:this.relation.zc()})}R(){return`followPart-${this.relation.ja()}-${super.R()}`}nh(){const a=
1421
+ {recursive:!1,relation:this.relation,filter:Qk(this).map(b=>b.map(c=>c.nh())),optional:this.T()};this.Oe&&(a.sort={property:this.Oe.Ac(),order:this.Oe.Sv});return a}toString(){return`Follow Part: ${this.relation}`}toJSON(){return{type:'follow',relation:`${this.db.name(this.relation)} (${this.relation.ka()})`,direction:this.relation.zc()}}Rb(a){return a instanceof olympe.dc.query.wb.ht&&this.relation.Rb(a.relation)}};olympe.dc.query.wb.Mk=class extends olympe.dc.query.wb.Ht{constructor(a,b,c,d){super(a,olympe.dc.query.Relation.from(b,!0),d);this.O=c}da(){return new olympe.dc.query.wb.AK}clone(){const a=new olympe.dc.query.wb.Mk(this.C,this.relation,this.O,this.optional);a.D=this.D;a.Oe=this.Oe;return a}W(){return olympe.oa.Xd(this.C+this.relation.ja()+this.O)}$(a,b){if(b instanceof olympe.dc.query.wb.ph)return[a];const c=[a+this.relation.ja()+this.O,a+olympe.dc.query.wb.ph.Dc].map(d=>olympe.oa.Xd(d));b instanceof
1422
+ olympe.dc.query.wb.Mk&&b.relation.Rb(this.relation)&&c.push(a);return c}Kd(a){const b=this.ja();for(const c of ak(a,this.C))this.O&&ck(a,c,b,c),this.db.iq(c,this.relation).forEach(d=>{ck(a,d,b,c)});super.Kd(a)}observe(a,b){const c=this.relation.ka(),d=this.relation.zc(),e=(f,g,k,l)=>{const m=olympe.oa.Xd(l+g);f?Ui(this.db,g,this.relation,(n,p)=>{dk(a,n,c,d,g,p);super.observe(a,(r,t,u,v)=>{b(r,t,u,v);e(r,t,u,l)})(n,p,k,m)},m):this.db.D(g,this.relation,m)};return(f,g,k,l)=>{k=l+this.toString();this.O&&
1423
+ super.observe(a,b)(f,g,g,olympe.oa.Xd(k+g));e(f,g,g,k)}}fb(){return Object.assign(super.fb(),{s:this.O,t:this.relation.ka(),d:this.relation.zc()})}R(){return`followRecursivelyPart-${this.relation.ja()}-${this.O}-${super.R()}`}nh(){const a={recursive:this.O?'INCLUDE_SELF':'EXCLUDE_SELF',relation:this.relation,filter:Qk(this).map(b=>b.map(c=>c.nh())),optional:this.T()};this.Oe&&(a.sort={property:this.Oe.Ac(),order:this.Oe.Sv});return a}toString(){return`FollowRecursively Part: ${this.relation}`}toJSON(){return{type:'follow recursively',
1424
+ relation:`${this.db.name(this.relation)} (${this.relation.ka()})`,direction:this.relation.zc()}}Rb(a){return a instanceof olympe.dc.query.wb.Mk&&this.relation.Rb(a.relation)&&this.O===a.O}};olympe.dc.query.wb.TG=class extends olympe.dc.query.wb.ph{observe(a,b){const c=this.ja();return(d,e,f,g)=>{d?ck(a,e,c,e):a.remove(e,c,e);b(d,e,e,g)}}};olympe.dc.query.wb.EH=class{constructor(a,b){this.db=a;this.origin=null;this.content=new Map;this.O=null!=b?b:null}xg(){return this.content.keys()}C(a){return this.content.has(a)&&null!==this.origin?[this.origin].values():[].values()}has(a){return this.content.has(a)}R(a){let b;return(null==(b=this.O)?void 0:b.call(this,a))||!1}D(a,b){null===this.origin&&(this.origin=b);const c=this.content.get(a);if(!c)return this.content.set(a,(new Map).set(b,1)),!0;let d;a=null!=(d=c.get(b))?d:0;c.set(b,a+1);return!1}remove(a,
1426
1425
  b){a===this.origin&&(this.origin=null);if(null===this.origin||!this.db.tc(a)||!b)return this.content.delete(a);var c=this.content.get(a);if(!c)return!1;const d=c.get(b);if(1<d)return c.set(b,d-1),!0;b=c.delete(b);if(0===c.size)return this.content.delete(a);if(b){c=new Set(c.keys());for(const e of c){if(this.origin===e)return!0;let f,g;for(const k of null!=(g=null==(f=this.content.get(e))?void 0:f.keys())?g:[])c.add(k)}return this.content.delete(a)}return!1}};olympe.dc.query.wb.EH.Aa=[olympe.dc.query.wb.VC];olympe.dc.query.wb.AK=class{constructor(){this.content=new Map}xg(){return this.content.keys()}C(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.keys())?c:[]}has(a){return this.content.has(a)}R(){return!1}D(a,b){let c=this.content.get(a);c||(c=new Map,this.content.set(a,c));let d;a=null!=(d=c.get(b))?d:0;c.set(b,a+1);return 0===a}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a),d=null==c?void 0:c.get(b);if(1<d)return c.set(b,d-1),!1;let e;b=null!=
1427
1426
  (e=null==c?void 0:c.delete(b))?e:!1;0===(null==c?void 0:c.size)&&this.content.delete(a);return b}};olympe.dc.query.wb.AK.Aa=[olympe.dc.query.wb.VC];olympe.dc.query.wb.fD=class{constructor(){this.content=new Map}xg(){return this.content.keys()}C(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.values())?c:[]}has(a){return this.content.has(a)}R(){return!1}D(a,b){let c=this.content.get(a);c||(c=new Set,this.content.set(a,c));a=c.size;c.add(b);return a<c.size}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a);let d;b=null!=(d=null==c?void 0:c.delete(b))?d:!1;0===(null==c?void 0:c.size)&&this.content.delete(a);
1428
- return b}};olympe.dc.query.wb.fD.Aa=[olympe.dc.query.wb.VC];olympe.dc.sources={};olympe.dc.sources.RT=class extends Error{};olympe.dc.sources.Ly=class{ja(){}init(){}destroy(){}da(){return q(function*(){})}subscribe(){}};const Tk=olympe.Fa.Rc.gk.GET,Uk=olympe.Fa.Rc.gk.Pp,Vk=olympe.Fa.Rc.gk.Qg,Wk=olympe.Fa.Rc.gk.eK,Xk=olympe.Fa.Rc.Headers.Ey;function Yk(a){const b=`/${olympe.sa.getParameter(olympe.dc.sources.pa.iC)}/:${'sourceId'}/:${'requestType'}`.replace(/\/+/g,'/').replace(/\/$/,'');md().catch(c=>a.V.error(`Error while starting the HTTP Service: ${c}`));a.V.debug(`Started HTTP service with path: ${b}`)}
1429
- function Zk(a){Promise.reject('Try to close a route on a web server using the browser implementation.').catch(b=>{a.V.error(`An error occurred while stopping the data sources http service: ${b}`)})}function $k(a,b,c){0===a.D.size&&Yk(a);a.D.set(b,c);return()=>{a.D.delete(b);0===a.D.size&&Zk(a)}}function al(a,b){return b instanceof olympe.Fa.Mv?be(a.R,b,Fd(a.$).Ci()):Promise.reject('No http request to send')}
1430
- function bl(a,b){var c=a.le(b.Yf(),b.getType());if(!c)return Promise.reject(`No destination URL to send the query to destination: ${b.Yf()}`);const d=b.Pe(),e=JSON.stringify(a.O.fb(d));c=bd(c,Uk,e,olympe.Fa.Rc.ResponseType.JSON);cd(c,{['X-Source-Origin']:b.origin,[Xk]:'application/json'});return al(a,c).then(f=>(f=f.data)?a.O.W(f):olympe.dc.query.vi.Pw(d))}
1431
- function cl(a,b){var c=a.le(b.Yf(),b.getType());if(!c)return Promise.reject(`No destination URL to send the transaction to destination: ${b.Yf()}`);const d=JSON.stringify(a.O.fb(b.Pe()));c=bd(c,Uk,d);cd(c,{['X-Source-Origin']:b.origin,[Xk]:'application/json'});return al(a,c).then(e=>Number.parseInt(e.data,10))}
1427
+ return b}};olympe.dc.query.wb.fD.Aa=[olympe.dc.query.wb.VC];olympe.dc.sources={};olympe.dc.sources.RT=class extends Error{};olympe.dc.sources.Ly=class{ja(){}init(){}destroy(){}da(){return q(function*(){})}subscribe(){}};const Uk=olympe.Fa.Rc.gk.GET,Vk=olympe.Fa.Rc.gk.Pp,Wk=olympe.Fa.Rc.gk.Qg,Xk=olympe.Fa.Rc.gk.eK,Yk=olympe.Fa.Rc.Headers.Ey;function Zk(a){const b=`/${olympe.sa.getParameter(olympe.dc.sources.pa.iC)}/:${'sourceId'}/:${'requestType'}`.replace(/\/+/g,'/').replace(/\/$/,'');md().catch(c=>a.V.error(`Error while starting the HTTP Service: ${c}`));a.V.debug(`Started HTTP service with path: ${b}`)}
1428
+ function $k(a){Promise.reject('Try to close a route on a web server using the browser implementation.').catch(b=>{a.V.error(`An error occurred while stopping the data sources http service: ${b}`)})}function al(a,b,c){0===a.D.size&&Zk(a);a.D.set(b,c);return()=>{a.D.delete(b);0===a.D.size&&$k(a)}}function bl(a,b){return b instanceof olympe.Fa.Mv?be(a.R,b,Fd(a.$).Ci()):Promise.reject('No http request to send')}
1429
+ function cl(a,b){var c=a.le(b.Yf(),b.getType());if(!c)return Promise.reject(`No destination URL to send the query to destination: ${b.Yf()}`);const d=b.Pe(),e=JSON.stringify(a.O.fb(d));c=bd(c,Vk,e,olympe.Fa.Rc.ResponseType.JSON);cd(c,{['X-Source-Origin']:b.origin,[Yk]:'application/json'});return bl(a,c).then(f=>(f=f.data)?a.O.W(f):olympe.dc.query.vi.Pw(d))}
1430
+ function dl(a,b){var c=a.le(b.Yf(),b.getType());if(!c)return Promise.reject(`No destination URL to send the transaction to destination: ${b.Yf()}`);const d=JSON.stringify(a.O.fb(b.Pe()));c=bd(c,Vk,d);cd(c,{['X-Source-Origin']:b.origin,[Yk]:'application/json'});return bl(a,c).then(e=>Number.parseInt(e.data,10))}
1432
1431
  olympe.dc.sources.cR=class{constructor(a,b,c,d,e,f){this.V=a;this.R=c;this.$=d;this.W=e;this.O=f;this.D=new Map;new olympe.j.ee('Http service of remote data provider');this.T=new Map;this.C=new Map;this.ca=new Map([[olympe.dc.Request.C.cr,olympe.Y.xf.cr],[olympe.dc.Request.C.Zq,olympe.Y.xf.Qy],[olympe.dc.Request.C.Hr,olympe.Y.xf.Qy],[olympe.dc.Request.C.Yq,olympe.Y.xf.Qy],[olympe.dc.Request.C.zF,olympe.Y.xf.yF],[olympe.dc.Request.C.tK,olympe.Y.xf.sK],[olympe.dc.Request.C.cH,olympe.Y.xf.bH],[olympe.dc.Request.C.Ct,
1433
- olympe.Y.xf.OF],[olympe.dc.Request.C.Mt,olympe.Y.xf.TRANSACTION]])}le(a,b){if(a===olympe.dc.Jc.SERVER){var c;return null!=(c=$d(this.R,this.ca.get(b)))?c:null}var d=this.T.get(a);if(!d){const e=this.W.Sd(a);c=m=>{var n=null!=e?e:a;m=n instanceof olympe.dm.DataSource?n.yo(m):dl(n,m);null===m&&this.V.error(`Impossible to build URL for data source ${n}`);return m};d=olympe.dc.sources.pa.qt;const f=olympe.dc.sources.pa.Jp,g=olympe.dc.sources.pa.Lv,k=olympe.dc.sources.pa.iC;let l;d=`${c(g)?'https':'http'}://${c(d)}:${null!=
1434
- (l=c(f))?l:c(g)?443:80}`+`/${c(k)}/${a}`.replace(/\/+/g,'/').replace(/\/$/,'');this.T.set(a,d)}return`${d}/${b}`}jh(a){var b=this.le(a.Yf(),a.getType());if(!b)return Promise.reject(`No destination URL to send the status request to destination: ${a.Yf()}`);b=ed(bd(b,Tk),olympe.Fa.Rc.ResponseType.JSON);cd(b,{['X-Source-Origin']:a.origin});return al(this,b).then(c=>c.data)}uploadFileContent(a){const {tag:b,model:c,content:d}=a.Pe(),e=a.Yf(),f=this.le(e,a.getType());if(!f)return Promise.reject(`No destination URL to upload the file. ${b}`);
1435
- const g=bd(e===olympe.dc.Jc.SERVER?`${f}/${b}`:`${f}?tag=${b}&model=${c}`,Wk,d);cd(g,{[Xk]:'application/octet-stream'});e!==olympe.dc.Jc.SERVER&&cd(g,{['X-Source-Origin']:a.origin});return al(this,g).then(()=>(new URL(g.le())).pathname)}deleteFileContent(a){const {tag:b,model:c}=a.Pe(),d=a.Yf();var e=this.le(d,a.getType());if(!e)return Promise.reject(`No destination URL to delete the file. ${b}`);e=bd(d===olympe.dc.Jc.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,Vk,b);d!==olympe.dc.Jc.SERVER&&cd(e,
1436
- {['X-Source-Origin']:a.origin});return al(this,e).then(()=>{})}downloadFileContent(a){const {tag:b,model:c}=a.Pe(),d=a.Yf();var e=this.le(d,a.getType());if(!e)return Promise.reject(Error(`No destination URL to download the file. ${b}`));var f;const g=null!=(f=this.C.get(b))?f:[];f=new Promise((k,l)=>{g.push({done:k,gu:l})});if(this.C.has(b))return f;this.C.set(b,g);e=bd(d===olympe.dc.Jc.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,Tk,void 0,olympe.Fa.Rc.ResponseType.Pt);d!==olympe.dc.Jc.SERVER&&
1437
- cd(e,{['X-Source-Origin']:a.origin});al(this,e).then(k=>{let l;null==(l=this.C.get(b))||l.forEach(m=>m.done(k.data))}).catch(k=>{let l;null==(l=this.C.get(b))||l.forEach(m=>m.gu(`${k}`))}).finally(()=>{this.C.delete(b)});return f}};olympe.dc.sources.CH=class{constructor(a,b){this.V=a;this.kf=b}};olympe.dc.sources.CH.lk={lw:0,j1:1,l1:3,C0:4};const el=olympe.dc.Request.C.Vf,fl=olympe.dc.Request.C.Ct,gl=olympe.dc.Request.C.zz,hl=olympe.dc.Request.C.Hr,il=olympe.dc.Request.C.Zq,jl=olympe.dc.Request.C.Yq,kl=olympe.dc.Request.C.wv,ll=olympe.dc.Request.C.xv,ml=olympe.dc.Request.C.no,nl=olympe.dc.Request.C.Mt;
1438
- function ol(a,b){const c=b.ja();null===a.D&&(a.D=new olympe.oa.Nt(6E4),kb(a.D,(f,g)=>{a.applyTransaction(g,!1).catch(k=>{a.V.error(`Error occurred when applying burst transaction ${f} to the data source: ${k}`)})}),lb(a.D,()=>{a.D=null}));let d;const e=null!=(d=a.D.get(c))?d:new olympe.dc.db.Rf(c);b.Wf(e);ib(a.D.C,c)||a.D.set(c,e)}
1439
- function pl(a,b){const c=b.ja();let d,e;const f=null!=(e=null==(d=a.D)?void 0:d.get(c))?e:new olympe.dc.db.Rf(c);let g;null==(g=a.D)||g.delete(c);b.Wf(f);return a.applyTransaction(f,!1).catch(k=>{a.V.error(`Error occurred when applying burst transaction ${c} to the data source: ${k}`)})}function ql(a,b){const c=rxjs.defer(()=>a.C.executeQuery(b));return 0<a.W?rxjs.interval(a.W).pipe(rxjs.operators.switchMap(()=>c)):c}
1440
- olympe.dc.sources.rJ=class{constructor(a,b){this.V=a;this.C=b;this.kf=null;this.T=olympe.dc.query.yA();this.R=olympe.dc.iN();this.O=new olympe.j.ee('Context of source '+this.ja());let c;this.W=null!=(c=b.yo(olympe.dc.sources.pa.SC))?c:-1;this.D=null}ja(){return this.C.ja()}init(a){this.kf=a;if(this.ja()===olympe.dc.Jc.SELF)return this;(new Promise((b,c)=>{let d=!0;rl(this.C,this.O).subscribe(rxjs.Subscriber.create(e=>{if(this.V.C()){this.V.debug(`Data source ${this.C.name()} has loaded ${e.size()} data types in its cache:`);
1441
- for(const [f,g]of e)this.V.debug(`=> DataType: ${g.name()} (${f})`)}d&&(d=!1,b())},c))})).then(()=>this.C.init(this.O)).catch(b=>{this.V.error(`Error while initialization of DataSource ${this.C.name()} (${this.ja()}): ${b}`)});return this}healthCheck(){return this.C.healthCheck().then(()=>`Data source ${this.C.name()} (${this.C.ja()}) OK`)}destroy(){this.O.destroy();return this.C.destroy()}da(a){const b=a.Pe();var c=a.getType();switch(c){case el:const d=olympe.dm.DataSource.Vf.we,e=olympe.dm.DataSource.Vf.Dt;
1442
- return this.C.healthCheck().then(()=>({s:e})).catch(g=>({s:d,r:String(g)}));case fl:return this.C.executeQuery(b);case kl:return c=b.Zf(),ol(this,c),this.R.lh(ph(c)),Promise.resolve();case ml:case nl:const f=b.Zf();return this.applyTransaction(f,c===nl).finally(()=>{if(a.origin===olympe.dc.Jc.SELF){var g=f.ja();g=th(new olympe.dc.Request(olympe.dc.Request.C.Ry,olympe.dc.Jc.SELF,{id:g,finalize:olympe.dc.transaction.po.C.Yv,error:null}),this.ja());let k;null==(k=this.kf)||k.ai(g)}});case ll:return pl(this,
1443
- b.Zf());case hl:return b.content instanceof Uint8Array?this.C.uploadFileContent(b.tag,b.model,b.content).then(()=>`datasource://${b.tag}`):Promise.reject('File content is undefined');case il:return this.C.downloadFileContent(b.tag,b.model);case jl:return this.C.deleteFileContent(b.tag,b.model);default:return Promise.reject(`Request of type ${a.getType()} is not supported by the data source`)}}subscribe(a){if(a.getType()===gl){const b=a.Pe();a=a.origin;return a===olympe.dc.Jc.SELF?ql(this,b):pk(this.T,
1444
- b,this.O,a,olympe.dc.nb.Jf.cm,{}).pipe(rxjs.operators.map(c=>{let d,e;return null!=(e=null==(d=c.Dl)?void 0:d.O)?e:null}),rxjs.operators.filter(c=>null!==c),rxjs.operators.map(c=>ph(c,Date.now())))}return rxjs.throwError(()=>Error('Subscription request not supported'))}applyTransaction(a,b){const c=this;return q(function*(){var d=sl(a);yield c.C.applyTransaction(d,{batch:b});d=Date.now();yield zk(c.T,c.ja(),a);c.R.lh(ph(a,d));return d})}};olympe.dc.sources.rJ.Aa=[olympe.dc.sources.Ly];function sl(a){const b=olympe.dc.sources.Sp.C.mQ,c=olympe.dc.sources.Sp.C.IU,d=olympe.dc.sources.Sp.C.uQ,e=olympe.dc.sources.Sp.C.nQ,f=olympe.dc.sources.Sp.C.vQ,g=[],k=[],l=[],m=[],n=[];a.je.forEach((p,r)=>{const t=p.Qe();p.O()?g.push(tl(b,r,t,p.$()?p.be():null)):p.$h()?l.push(tl(d,r,t,null,p.R())):p.$()&&k.push(tl(c,r,t,p.be()));for(const [u,v,w]of p.Xh())p=a.ih(v),w?m.push(new ul(e,u,r,v,t,p.Qe())):n.push(new ul(f,u,r,v,t,p.Qe()))});return n.concat(l,g,k,m)}
1445
- function tl(a,b,c,d,e){if('string'!==typeof c)throw Error(`Patch: model of instance ${b} is missing. It is invalid transaction.`);return new vl(a,b,c,d,e)}olympe.dc.sources.Sp=class{constructor(a){this.type=a}};class vl extends olympe.dc.sources.Sp{constructor(a,b,c,d,e){super(a);this.object=b;this.model=c;this.properties=null!=d?d:null;this.deleteRules=null!=e?e:olympe.dc.Te.NONE}}
1446
- class ul extends olympe.dc.sources.Sp{constructor(a,b,c,d,e,f){super(a);this.relation=b;this.from=c;this.to=d;this.fromModel=e;this.toModel=f}}olympe.dc.sources.Sp.C={mQ:'CREATE',IU:'UPDATE',uQ:'DELETE',nQ:'CREATE_RELATION',vQ:'DELETE_RELATION'};function wl(a,b){b=th(new olympe.dc.Request(olympe.dc.Request.C.Ry,olympe.dc.Jc.SELF,{id:b,finalize:olympe.dc.transaction.po.C.Yv,error:null}),a.ja());let c;null==(c=a.kf)||c.ai(b)}
1432
+ olympe.Y.xf.OF],[olympe.dc.Request.C.Mt,olympe.Y.xf.TRANSACTION]])}le(a,b){if(a===olympe.dc.Jc.SERVER){var c;return null!=(c=$d(this.R,this.ca.get(b)))?c:null}var d=this.T.get(a);if(!d){const e=this.W.Sd(a);c=m=>{var n=null!=e?e:a;m=n instanceof olympe.dm.DataSource?n.yo(m):el(n,m);null===m&&this.V.error(`Impossible to build URL for data source ${n}`);return m};d=olympe.dc.sources.pa.qt;const f=olympe.dc.sources.pa.Jp,g=olympe.dc.sources.pa.Lv,k=olympe.dc.sources.pa.iC;let l;d=`${c(g)?'https':'http'}://${c(d)}:${null!=
1433
+ (l=c(f))?l:c(g)?443:80}`+`/${c(k)}/${a}`.replace(/\/+/g,'/').replace(/\/$/,'');this.T.set(a,d)}return`${d}/${b}`}jh(a){var b=this.le(a.Yf(),a.getType());if(!b)return Promise.reject(`No destination URL to send the status request to destination: ${a.Yf()}`);b=ed(bd(b,Uk),olympe.Fa.Rc.ResponseType.JSON);cd(b,{['X-Source-Origin']:a.origin});return bl(this,b).then(c=>c.data)}uploadFileContent(a){const {tag:b,model:c,content:d}=a.Pe(),e=a.Yf(),f=this.le(e,a.getType());if(!f)return Promise.reject(`No destination URL to upload the file. ${b}`);
1434
+ const g=bd(e===olympe.dc.Jc.SERVER?`${f}/${b}`:`${f}?tag=${b}&model=${c}`,Xk,d);cd(g,{[Yk]:'application/octet-stream'});e!==olympe.dc.Jc.SERVER&&cd(g,{['X-Source-Origin']:a.origin});return bl(this,g).then(()=>(new URL(g.le())).pathname)}deleteFileContent(a){const {tag:b,model:c}=a.Pe(),d=a.Yf();var e=this.le(d,a.getType());if(!e)return Promise.reject(`No destination URL to delete the file. ${b}`);e=bd(d===olympe.dc.Jc.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,Wk,b);d!==olympe.dc.Jc.SERVER&&cd(e,
1435
+ {['X-Source-Origin']:a.origin});return bl(this,e).then(()=>{})}downloadFileContent(a){const {tag:b,model:c}=a.Pe(),d=a.Yf();var e=this.le(d,a.getType());if(!e)return Promise.reject(Error(`No destination URL to download the file. ${b}`));var f;const g=null!=(f=this.C.get(b))?f:[];f=new Promise((k,l)=>{g.push({done:k,gu:l})});if(this.C.has(b))return f;this.C.set(b,g);e=bd(d===olympe.dc.Jc.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,Uk,void 0,olympe.Fa.Rc.ResponseType.Pt);d!==olympe.dc.Jc.SERVER&&
1436
+ cd(e,{['X-Source-Origin']:a.origin});bl(this,e).then(k=>{let l;null==(l=this.C.get(b))||l.forEach(m=>m.done(k.data))}).catch(k=>{let l;null==(l=this.C.get(b))||l.forEach(m=>m.gu(`${k}`))}).finally(()=>{this.C.delete(b)});return f}};olympe.dc.sources.CH=class{constructor(a,b){this.V=a;this.kf=b}};olympe.dc.sources.CH.lk={lw:0,j1:1,l1:3,C0:4};const fl=olympe.dc.Request.C.Vf,gl=olympe.dc.Request.C.Ct,hl=olympe.dc.Request.C.zz,il=olympe.dc.Request.C.Hr,jl=olympe.dc.Request.C.Zq,kl=olympe.dc.Request.C.Yq,ll=olympe.dc.Request.C.wv,ml=olympe.dc.Request.C.xv,nl=olympe.dc.Request.C.no,ol=olympe.dc.Request.C.Mt;
1437
+ function pl(a,b){const c=b.ja();null===a.D&&(a.D=new olympe.oa.Nt(6E4),kb(a.D,(f,g)=>{a.applyTransaction(g,!1).catch(k=>{a.V.error(`Error occurred when applying burst transaction ${f} to the data source: ${k}`)})}),lb(a.D,()=>{a.D=null}));let d;const e=null!=(d=a.D.get(c))?d:new olympe.dc.db.Rf(c);b.Wf(e);ib(a.D.C,c)||a.D.set(c,e)}
1438
+ function ql(a,b){const c=b.ja();let d,e;const f=null!=(e=null==(d=a.D)?void 0:d.get(c))?e:new olympe.dc.db.Rf(c);let g;null==(g=a.D)||g.delete(c);b.Wf(f);return a.applyTransaction(f,!1).catch(k=>{a.V.error(`Error occurred when applying burst transaction ${c} to the data source: ${k}`)})}function rl(a,b){const c=rxjs.defer(()=>a.C.executeQuery(b));return 0<a.W?rxjs.interval(a.W).pipe(rxjs.operators.switchMap(()=>c)):c}
1439
+ olympe.dc.sources.rJ=class{constructor(a,b){this.V=a;this.C=b;this.kf=null;this.T=olympe.dc.query.yA();this.R=olympe.dc.iN();this.O=new olympe.j.ee('Context of source '+this.ja());let c;this.W=null!=(c=b.yo(olympe.dc.sources.pa.SC))?c:-1;this.D=null}ja(){return this.C.ja()}init(a){this.kf=a;if(this.ja()===olympe.dc.Jc.SELF)return this;(new Promise((b,c)=>{let d=!0;sl(this.C,this.O).subscribe(rxjs.Subscriber.create(e=>{if(this.V.C()){this.V.debug(`Data source ${this.C.name()} has loaded ${e.size()} data types in its cache:`);
1440
+ for(const [f,g]of e)this.V.debug(`=> DataType: ${g.name()} (${f})`)}d&&(d=!1,b())},c))})).then(()=>this.C.init(this.O)).catch(b=>{this.V.error(`Error while initialization of DataSource ${this.C.name()} (${this.ja()}): ${b}`)});return this}healthCheck(){return this.C.healthCheck().then(()=>`Data source ${this.C.name()} (${this.C.ja()}) OK`)}destroy(){this.O.destroy();return this.C.destroy()}da(a){const b=a.Pe();var c=a.getType();switch(c){case fl:const d=olympe.dm.DataSource.Vf.we,e=olympe.dm.DataSource.Vf.Dt;
1441
+ return this.C.healthCheck().then(()=>({s:e})).catch(g=>({s:d,r:String(g)}));case gl:return this.C.executeQuery(b);case ll:return c=b.Zf(),pl(this,c),this.R.lh(ph(c)),Promise.resolve();case nl:case ol:const f=b.Zf();return this.applyTransaction(f,c===ol).finally(()=>{if(a.origin===olympe.dc.Jc.SELF){var g=f.ja();g=th(new olympe.dc.Request(olympe.dc.Request.C.Ry,olympe.dc.Jc.SELF,{id:g,finalize:olympe.dc.transaction.po.C.Yv,error:null}),this.ja());let k;null==(k=this.kf)||k.ai(g)}});case ml:return ql(this,
1442
+ b.Zf());case il:return b.content instanceof Uint8Array?this.C.uploadFileContent(b.tag,b.model,b.content).then(()=>`datasource://${b.tag}`):Promise.reject('File content is undefined');case jl:return this.C.downloadFileContent(b.tag,b.model);case kl:return this.C.deleteFileContent(b.tag,b.model);default:return Promise.reject(`Request of type ${a.getType()} is not supported by the data source`)}}subscribe(a){if(a.getType()===hl){const b=a.Pe();a=a.origin;return a===olympe.dc.Jc.SELF?rl(this,b):qk(this.T,
1443
+ b,this.O,a,olympe.dc.nb.Jf.cm,{}).pipe(rxjs.operators.map(c=>{let d,e;return null!=(e=null==(d=c.Dl)?void 0:d.O)?e:null}),rxjs.operators.filter(c=>null!==c),rxjs.operators.map(c=>ph(c,Date.now())))}return rxjs.throwError(()=>Error('Subscription request not supported'))}applyTransaction(a,b){const c=this;return q(function*(){var d=tl(a);yield c.C.applyTransaction(d,{batch:b});d=Date.now();yield Ak(c.T,c.ja(),a);c.R.lh(ph(a,d));return d})}};olympe.dc.sources.rJ.Aa=[olympe.dc.sources.Ly];function tl(a){const b=olympe.dc.sources.Sp.C.mQ,c=olympe.dc.sources.Sp.C.IU,d=olympe.dc.sources.Sp.C.uQ,e=olympe.dc.sources.Sp.C.nQ,f=olympe.dc.sources.Sp.C.vQ,g=[],k=[],l=[],m=[],n=[];a.je.forEach((p,r)=>{const t=p.Qe();p.O()?g.push(ul(b,r,t,p.$()?p.be():null)):p.$h()?l.push(ul(d,r,t,null,p.R())):p.$()&&k.push(ul(c,r,t,p.be()));for(const [u,v,w]of p.Xh())p=a.ih(v),w?m.push(new vl(e,u,r,v,t,p.Qe())):n.push(new vl(f,u,r,v,t,p.Qe()))});return n.concat(l,g,k,m)}
1444
+ function ul(a,b,c,d,e){if('string'!==typeof c)throw Error(`Patch: model of instance ${b} is missing. It is invalid transaction.`);return new wl(a,b,c,d,e)}olympe.dc.sources.Sp=class{constructor(a){this.type=a}};class wl extends olympe.dc.sources.Sp{constructor(a,b,c,d,e){super(a);this.object=b;this.model=c;this.properties=null!=d?d:null;this.deleteRules=null!=e?e:olympe.dc.Te.NONE}}
1445
+ class vl extends olympe.dc.sources.Sp{constructor(a,b,c,d,e,f){super(a);this.relation=b;this.from=c;this.to=d;this.fromModel=e;this.toModel=f}}olympe.dc.sources.Sp.C={mQ:'CREATE',IU:'UPDATE',uQ:'DELETE',nQ:'CREATE_RELATION',vQ:'DELETE_RELATION'};function xl(a,b){b=th(new olympe.dc.Request(olympe.dc.Request.C.Ry,olympe.dc.Jc.SELF,{id:b,finalize:olympe.dc.transaction.po.C.Yv,error:null}),a.ja());let c;null==(c=a.kf)||c.ai(b)}
1447
1446
  olympe.dc.sources.KB=class{constructor(a,b){this.V=a;this.D=b;this.kf=null}ja(){}W(){}$(){}init(a){this.kf=a;return this}destroy(){return Promise.resolve()}da(a){const b=this;return q(function*(){if(!b.D.D)return b.W(a);var c=olympe.dc.Request.C.Vf,d=olympe.dc.Request.C.Ct;const e=olympe.dc.Request.C.no,f=olympe.dc.Request.C.Mt;var g=olympe.dc.Request.C.wv;const k=olympe.dc.Request.C.xv,l=olympe.dc.Request.C.Hr;var m=olympe.dc.Request.C.Zq;const n=olympe.dc.Request.C.Yq,p=olympe.dc.sources.Ej(),r=
1448
- a.getType(),t=a.Yf();if(xd(b.D)){r===d&&(c=a.Pe(),(g=vh(a).get(olympe.dc.nb.C.GB))&&(yield xl(p,c.ja(),g)),b.V.debug(`Data Provider: Query ${c.ja()} will be executed with its default Remote or Server provider`));if(r===m&&(m=a.Pe(),'string'===typeof(null==m?void 0:m.url)&&m.url.startsWith('offline://')))return p.downloadFileContent(m.tag);m=yield b.W(a);if(r===d){const u=a.Pe();d=m;const v=new olympe.dc.db.Rf(`fullResult_${u.ja()}`);m=d.pipeThrough(new TransformStream({transform:(w,x)=>q(function*(){const y=
1449
- w.Zf();yield yl(p,y);y.Wf(v);b.V.C()&&b.V.debug(`Data Provider: Data result for query ${u.ja()}`,y.je.size,'instances',Array.from(y.Xh()).length,'relations');x.enqueue(w)}),flush:()=>q(function*(){yield zl(p,u.ja(),t,v,!0)})}))}else if(r===e||r===f||r===k)b.V.debug('Data Provider: Persisting graph patch in offline cache after successful transaction'),yield Al(p,null,t,a.Pe().Zf(),!1);return m}b.V.debug(`Data Provider: Request (type: ${r}) will be sent to the cache data provider: ${a.Pe()}`);switch(r){case c:return{s:olympe.dm.DataSource.Vf.jk};
1450
- case d:return p.executeQuery(a.Pe());case e:case f:case k:d=a.Pe();const u=d.Zf().ja();return p.applyTransaction(d,t).finally(()=>wl(b,u));case g:return Promise.resolve();case l:return d=a.Pe(),p.uploadFileContent(d.tag,d.content,d.mimeType);case m:return p.downloadFileContent(a.Pe().tag);case n:return p.deleteFileContent(a.Pe().tag);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${b.ja()}`)}})}subscribe(a,b){if(!this.D.D)return this.$(a,b);const c=olympe.dc.sources.Ej(),
1451
- d=a.Pe(),e=a.Yf();return rxjs.of(null).pipe(rxjs.operators.switchMap(()=>{if(xd(this.D)){const f=new rxjs.Observable(k=>{olympe.j.QO([this.D.Io()],()=>{k.error(new olympe.Y.errors.fH('Go Offline',d.ja()))})}),g=this.$(a,b);return rxjs.merge(f,g)}return new rxjs.Observable(f=>{olympe.j.QO([this.D.Io()],()=>{f.error(new olympe.Y.errors.MF('Back Online',d.ja()))})})})).pipe(rxjs.operators.switchMap(f=>rxjs.from(Al(c,d.ja(),e,f.Zf()).then(()=>f).catch(g=>{this.V.error(`Data Provider: Cache database failed to handle the data result with message: ${g}`);
1452
- throw g;}))))}};olympe.dc.sources.KB.Aa=[olympe.dc.sources.Ly];const Bl=olympe.dc.Request.C.Vf,Cl=olympe.dc.Request.C.Ct,Dl=olympe.dc.Request.C.zz,El=olympe.dc.Request.C.no,Fl=olympe.dc.Request.C.Mt,Gl=olympe.dc.Request.C.wv,Hl=olympe.dc.Request.C.xv,Il=olympe.dc.Request.C.Hr,Jl=olympe.dc.Request.C.Zq,Kl=olympe.dc.Request.C.Yq;function Ll(a,b){let c;return(null==(c=a.za.Sd(b))?void 0:c.yo(olympe.dc.sources.pa.am))!==olympe.dm.DataSource.am.lH}
1453
- function Ml(a,b){let c;return(null==(c=a.za.Sd(b))?void 0:c.yo(olympe.dc.sources.pa.am))!==olympe.dm.DataSource.am.HF}function Nl(a,b){b=b.Lg();if(b!==olympe.dm.User.C&&a.yo(olympe.dc.sources.pa.ZC))throw a=`User ${b} has no right to access the restricted data source ${a.name()} (${a.ja()}). Please use an admin account instead.`,new olympe.dc.sources.RT(a);}
1454
- function Ol(a,b,c,d,e){return q(function*(){var f=olympe.Y.pd.C.SEND,g=olympe.Y.pd.C.GET;const k=olympe.Y.pd.C.PUBLISH,l=olympe.Y.pd.C.SUBSCRIBE,m=d.UO();var n=d.body();if(e!==n.Lg())throw Error('Access denied: try to impersonate a user');Nl(c,n);let p;if(null==(p=a.kf)||!p.sources.has(n.Yf()))throw Error(`Try to process a message with destination data source ${n.Yf()} coming from remote but not started here`);if(m===l){if(n.getType()===Dl)f=n.Pe().ja();else throw Error('Not supported type of subscription');
1455
- g=yield d.jE(f);a.ca.set(g,f);g=a.T.get(f);g||(g=new Pl(a.V,f,b,th(n,olympe.dc.Jc.Rp)),a.T.set(f,g));g.subscribe()}else m===g?(n=yield oh(b,n),void 0!==n?yield d.ai(n):a.V.warn(`Request from ${d.source()} requires an output value, but got undefined instead.`)):m===f?(yield oh(b,n),yield d.nM()):m===k&&(yield oh(b,n))})}
1456
- olympe.dc.sources.CK=class extends olympe.dc.sources.KB{constructor(a,b,c,d,e,f){super(a,d);this.R=b;this.C=c;this.db=e;this.O=new olympe.j.ee('Remote Provider Context');this.ma=new Map;this.T=new Map;this.ca=new Map;this.za=f}ja(){return olympe.dc.Jc.Rp}W(a){var b=olympe.Y.de;const c=a.Yf(),d=a.getType();this.V.C()&&this.V.debug(`Request (type: ${d}) will be sent to remote data provider ${c}: ${a.Pe()}`);switch(d){case Bl:const e=olympe.dm.DataSource.Vf.we,f=olympe.dm.DataSource.Vf.Dt;b=Ll(this,
1457
- c)?b.get(c,a):Promise.resolve({s:f});a=Ml(this,c)?this.C.jh(a):Promise.resolve({s:f});return Promise.all([b,a]).then(([l,m])=>{if((null==l?void 0:l.s)===e||(null==m?void 0:m.s)===e){let n,p;return{s:e,r:`${null!=(n=null==l?void 0:l.r)?n:''} ${null!=(p=null==m?void 0:m.r)?p:''}`}}return{s:f}});case Cl:return Ml(this,c)?bl(this.C,a):b.get(c,a);case El:const g=a.Pe().Zf().ja();return(Ll(this,c)?b.get(c,a):cl(this.C,a)).finally(()=>wl(this,g));case Fl:const k=a.Pe().Zf().ja();return(Ml(this,c)?cl(this.C,
1458
- a):b.get(c,a)).finally(()=>wl(this,k));case Gl:return Ll(this,c)?b.publish(c,a).catch(l=>{this.V.error(`An error occurred while sending "burst transaction" to the data source ${c}: ${l}`)}):Promise.resolve();case Hl:return Ll(this,c)?b.get(c,a):cl(this.C,a);case Il:return Ml(this,c)?this.C.uploadFileContent(a):b.get(c,a);case Jl:return Ml(this,c)?this.C.downloadFileContent(a):b.get(c,a);case Kl:return Ml(this,c)?this.C.deleteFileContent(a):b.send(c,a);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${this.ja()}`)}}$(a,
1459
- b){const c=a.Yf(),d=a.getType();if(!Ll(this,c))return rxjs.throwError(()=>Error(`Subscription request not supported for data source ${this.db.name(c)} (${c}) which uses HTTP only.`));this.V.C()&&this.V.debug(`Subscription (type: ${d}) will be sent to remote data provider ${c}: ${a.Pe()}`);return d===Dl?olympe.Y.de.observe(c,this.O,a,{onRetry:b}):rxjs.throwError(()=>Error(`Do not handle subscription request of type ${d}`))}init(a){super.init(a);if(a.O)return this;olympe.dc.nb.from(this.R,this.R).oc(olympe.dm.DataSource.qx).filter(olympe.dc.query.Yb.Rb(olympe.dm.DataSource.Yt,
1447
+ a.getType(),t=a.Yf();if(xd(b.D)){r===d&&(c=a.Pe(),(g=vh(a).get(olympe.dc.nb.C.GB))&&(yield yl(p,c.ja(),g)),b.V.debug(`Data Provider: Query ${c.ja()} will be executed with its default Remote or Server provider`));if(r===m&&(m=a.Pe(),'string'===typeof(null==m?void 0:m.url)&&m.url.startsWith('offline://')))return p.downloadFileContent(m.tag);m=yield b.W(a);if(r===d){const u=a.Pe();d=m;const v=new olympe.dc.db.Rf(`fullResult_${u.ja()}`);m=d.pipeThrough(new TransformStream({transform:(w,x)=>q(function*(){const y=
1448
+ w.Zf();yield zl(p,y);y.Wf(v);b.V.C()&&b.V.debug(`Data Provider: Data result for query ${u.ja()}`,y.je.size,'instances',Array.from(y.Xh()).length,'relations');x.enqueue(w)}),flush:()=>q(function*(){yield Al(p,u.ja(),t,v,!0)})}))}else if(r===e||r===f||r===k)b.V.debug('Data Provider: Persisting graph patch in offline cache after successful transaction'),yield Bl(p,null,t,a.Pe().Zf(),!1);return m}b.V.debug(`Data Provider: Request (type: ${r}) will be sent to the cache data provider: ${a.Pe()}`);switch(r){case c:return{s:olympe.dm.DataSource.Vf.jk};
1449
+ case d:return p.executeQuery(a.Pe());case e:case f:case k:d=a.Pe();const u=d.Zf().ja();return p.applyTransaction(d,t).finally(()=>xl(b,u));case g:return Promise.resolve();case l:return d=a.Pe(),p.uploadFileContent(d.tag,d.content,d.mimeType);case m:return p.downloadFileContent(a.Pe().tag);case n:return p.deleteFileContent(a.Pe().tag);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${b.ja()}`)}})}subscribe(a,b){if(!this.D.D)return this.$(a,b);const c=olympe.dc.sources.Ej(),
1450
+ d=a.Pe(),e=a.Yf();return rxjs.of(null).pipe(rxjs.operators.switchMap(()=>{if(xd(this.D)){const f=new rxjs.Observable(k=>{olympe.j.QO([this.D.Io()],()=>{k.error(new olympe.Y.errors.fH('Go Offline',d.ja()))})}),g=this.$(a,b);return rxjs.merge(f,g)}return new rxjs.Observable(f=>{olympe.j.QO([this.D.Io()],()=>{f.error(new olympe.Y.errors.MF('Back Online',d.ja()))})})})).pipe(rxjs.operators.switchMap(f=>rxjs.from(Bl(c,d.ja(),e,f.Zf()).then(()=>f).catch(g=>{this.V.error(`Data Provider: Cache database failed to handle the data result with message: ${g}`);
1451
+ throw g;}))))}};olympe.dc.sources.KB.Aa=[olympe.dc.sources.Ly];const Cl=olympe.dc.Request.C.Vf,Dl=olympe.dc.Request.C.Ct,El=olympe.dc.Request.C.zz,Fl=olympe.dc.Request.C.no,Gl=olympe.dc.Request.C.Mt,Hl=olympe.dc.Request.C.wv,Il=olympe.dc.Request.C.xv,Jl=olympe.dc.Request.C.Hr,Kl=olympe.dc.Request.C.Zq,Ll=olympe.dc.Request.C.Yq;function Ml(a,b){let c;return(null==(c=a.za.Sd(b))?void 0:c.yo(olympe.dc.sources.pa.am))!==olympe.dm.DataSource.am.lH}
1452
+ function Nl(a,b){let c;return(null==(c=a.za.Sd(b))?void 0:c.yo(olympe.dc.sources.pa.am))!==olympe.dm.DataSource.am.HF}function Ol(a,b){b=b.Lg();if(b!==olympe.dm.User.C&&a.yo(olympe.dc.sources.pa.ZC))throw a=`User ${b} has no right to access the restricted data source ${a.name()} (${a.ja()}). Please use an admin account instead.`,new olympe.dc.sources.RT(a);}
1453
+ function Pl(a,b,c,d,e){return q(function*(){var f=olympe.Y.pd.C.SEND,g=olympe.Y.pd.C.GET;const k=olympe.Y.pd.C.PUBLISH,l=olympe.Y.pd.C.SUBSCRIBE,m=d.UO();var n=d.body();if(e!==n.Lg())throw Error('Access denied: try to impersonate a user');Ol(c,n);let p;if(null==(p=a.kf)||!p.sources.has(n.Yf()))throw Error(`Try to process a message with destination data source ${n.Yf()} coming from remote but not started here`);if(m===l){if(n.getType()===El)f=n.Pe().ja();else throw Error('Not supported type of subscription');
1454
+ g=yield d.jE(f);a.ca.set(g,f);g=a.T.get(f);g||(g=new Ql(a.V,f,b,th(n,olympe.dc.Jc.Rp)),a.T.set(f,g));g.subscribe()}else m===g?(n=yield oh(b,n),void 0!==n?yield d.ai(n):a.V.warn(`Request from ${d.source()} requires an output value, but got undefined instead.`)):m===f?(yield oh(b,n),yield d.nM()):m===k&&(yield oh(b,n))})}
1455
+ olympe.dc.sources.CK=class extends olympe.dc.sources.KB{constructor(a,b,c,d,e,f){super(a,d);this.R=b;this.C=c;this.db=e;this.O=new olympe.j.ee('Remote Provider Context');this.ma=new Map;this.T=new Map;this.ca=new Map;this.za=f}ja(){return olympe.dc.Jc.Rp}W(a){var b=olympe.Y.de;const c=a.Yf(),d=a.getType();this.V.C()&&this.V.debug(`Request (type: ${d}) will be sent to remote data provider ${c}: ${a.Pe()}`);switch(d){case Cl:const e=olympe.dm.DataSource.Vf.we,f=olympe.dm.DataSource.Vf.Dt;b=Ml(this,
1456
+ c)?b.get(c,a):Promise.resolve({s:f});a=Nl(this,c)?this.C.jh(a):Promise.resolve({s:f});return Promise.all([b,a]).then(([l,m])=>{if((null==l?void 0:l.s)===e||(null==m?void 0:m.s)===e){let n,p;return{s:e,r:`${null!=(n=null==l?void 0:l.r)?n:''} ${null!=(p=null==m?void 0:m.r)?p:''}`}}return{s:f}});case Dl:return Nl(this,c)?cl(this.C,a):b.get(c,a);case Fl:const g=a.Pe().Zf().ja();return(Ml(this,c)?b.get(c,a):dl(this.C,a)).finally(()=>xl(this,g));case Gl:const k=a.Pe().Zf().ja();return(Nl(this,c)?dl(this.C,
1457
+ a):b.get(c,a)).finally(()=>xl(this,k));case Hl:return Ml(this,c)?b.publish(c,a).catch(l=>{this.V.error(`An error occurred while sending "burst transaction" to the data source ${c}: ${l}`)}):Promise.resolve();case Il:return Ml(this,c)?b.get(c,a):dl(this.C,a);case Jl:return Nl(this,c)?this.C.uploadFileContent(a):b.get(c,a);case Kl:return Nl(this,c)?this.C.downloadFileContent(a):b.get(c,a);case Ll:return Nl(this,c)?this.C.deleteFileContent(a):b.send(c,a);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${this.ja()}`)}}$(a,
1458
+ b){const c=a.Yf(),d=a.getType();if(!Ml(this,c))return rxjs.throwError(()=>Error(`Subscription request not supported for data source ${this.db.name(c)} (${c}) which uses HTTP only.`));this.V.C()&&this.V.debug(`Subscription (type: ${d}) will be sent to remote data provider ${c}: ${a.Pe()}`);return d===El?olympe.Y.de.observe(c,this.O,a,{onRetry:b}):rxjs.throwError(()=>Error(`Do not handle subscription request of type ${d}`))}init(a){super.init(a);if(a.O)return this;olympe.dc.nb.from(this.R,this.R).oc(olympe.dm.DataSource.qx).filter(olympe.dc.query.Yb.Rb(olympe.dm.DataSource.Yt,
1460
1459
  !0)).filter(olympe.dc.query.Yb.Rb(olympe.dm.DataSource.DM,!0)).observe(this.O).subscribe(b=>{b.lu().forEach(this.Ha.bind(this,a));b.uu().forEach(c=>{let d;null==(d=this.ma.get(c))||d.destroy();this.ma.delete(c)})});this.db.Ac(this.R,olympe.dm.DataSource.DM)&&(new olympe.Y.de(this.R,this.O)).Bu().subscribe(b=>{b=b.body();b instanceof olympe.dc.Request?a.ai(b):this.V.error('Self source received something else than a data request, ignore it.')});return this}destroy(){return q(function*(){})}Ha(a,b){const c=
1461
- b.ka(),d=new olympe.j.ee(`Published data provider context ${c}`,this.O);this.ma.set(c,d);let e,f;Ql(b,d).subscribe(g=>{let k;null==(k=e)||k();let l;null==(l=f)||l.stop();g!==olympe.dm.DataSource.am.HF&&(e=$k(this.C,c,m=>{Nl(b,m);return oh(a,m)}),d.onDestroy(()=>{let m;return null==(m=e)?void 0:m()}));g!==olympe.dm.DataSource.am.lH&&(g=new olympe.j.ee(`Bus Service of data source ${c}`,d),f=(new olympe.Y.de(c,g)).wP(this.Pa.bind(this)),f.Bu().subscribe(m=>{m.qv().then(n=>Ol(this,a,b,m,n)).catch(n=>
1460
+ b.ka(),d=new olympe.j.ee(`Published data provider context ${c}`,this.O);this.ma.set(c,d);let e,f;Rl(b,d).subscribe(g=>{let k;null==(k=e)||k();let l;null==(l=f)||l.stop();g!==olympe.dm.DataSource.am.HF&&(e=al(this.C,c,m=>{Ol(b,m);return oh(a,m)}),d.onDestroy(()=>{let m;return null==(m=e)?void 0:m()}));g!==olympe.dm.DataSource.am.lH&&(g=new olympe.j.ee(`Bus Service of data source ${c}`,d),f=(new olympe.Y.de(c,g)).wP(this.Pa.bind(this)),f.Bu().subscribe(m=>{m.qv().then(n=>Pl(this,a,b,m,n)).catch(n=>
1462
1461
  {this.V.warn(`Error occurred while processing request from ${m.source()}: ${n}`);return m.gu(n instanceof Error?n:Error(n))})}))})}Pa(a){const b=this.ca.get(a);this.ca.delete(a);if(a=b)null==(a=this.T.get(b))?a=0:(0<a.C&&--a.C,0===a.C?(a.V.debug(`Data subscription ${a.D} has more subscriber: unsubscribe`),a.O.unsubscribe(),a=!0):(a.V.debug(`Data subscription ${a.D} has ${a.C} subscribers`),a=!1));a&&this.T.delete(b)}};
1463
- class Pl{constructor(a,b,c,d){this.V=a;this.D=b;this.C=0;this.O=c.subscribe(d).subscribe({next:e=>{olympe.Y.de.publish(b,e).catch(f=>a.error(`Error occurred while publishing a data notification: ${f}`))},error:e=>a.error(`Error occurred while trying to subscribe to topic ${b} for a datasource: ${e}`)})}subscribe(){this.C++;this.V.debug(`Data subscription ${this.D} has ${this.C} subscribers`);return this}}olympe.dc.sources.CK.Aa=[olympe.dc.sources.Ly];const Rl={gM:10,VF:11,LG:12,kK:13,QUERY_RESULT:14,dH:15,nG:16,no:17,lK:18,mG:19,gw:20};function Sl(a,b){const c=new olympe.dc.transaction.Xk,d=new olympe.dc.transaction.Xk;b.forEach(e=>{const f=new Map(Array.from(Object.entries(e.p).map(([k,l])=>[k,a.C(l)]))),g=e.v?d:c;g.yf(e.t,e.s,f,e.m);e.r.forEach(k=>g.Qb(k.r,k.o,k.d))});a.ca.lh(yh(zh(d),olympe.dc.Jc.SELF),{persist:!1});a.ca.lh(yh(zh(c),olympe.dc.Jc.SELF))}
1464
- olympe.dc.sources.Mf=class extends olympe.Y.Mf{constructor(a){super();this.ca=a;this.db=a.view;this.O=new Map}fb(a){a=super.fb(a);if(0<this.O.size){const b=Array.from(this.O.values());this.O.clear();return Object.assign(Ge(Rl.gM,a),{i:b})}return a}W(a){return(null==a?void 0:a.t)===Rl.gM&&Array.isArray(null==a?void 0:a.i)?(Sl(this,a.i),this.C(a.v)):this.C(a)}D(a){switch(!0){case a instanceof olympe.dm.File:var b=Rl.LG;{const c=a.ka(),d={t:c};if(!this.O.has(c)&&(this.R(c),!this.db.Bl(c))){const e=a.get(olympe.dm.File.urlProp);
1465
- if(e.startsWith('blob:')||e.startsWith('stream:'))a=olympe.dc.rN().Pa(a),this.O.get(c).p[olympe.dm.File.urlProp.ka()]='stream://'+c,d.s=this.D(a)}a=d}return Ge(b,a);case a instanceof olympe.dc.CloudObject:return Ge(Rl.VF,this.R(a.ka()));case a instanceof olympe.dc.nb:return Ge(Rl.kK,a.fb());case a instanceof olympe.dc.xc:return Ge(Rl.QUERY_RESULT,a.fb(this.R.bind(this)));case a instanceof olympe.dc.db.Rf:return b=new olympe.dc.transaction.Xk,a.Wf(b),Ge(Rl.dH,{i:a.ja(),p:zh(b)});case a instanceof olympe.dc.Request:return Ge(Rl.nG,
1466
- {r:a.getType(),o:a.origin,d:a.Yf(),u:a.Lg(),c:this.D(a.Pe())});case a instanceof olympe.dc.transaction.rw:return Ge(Rl.no,{r:a.fs(),p:this.D(a.Zf())});case a instanceof olympe.dc.query.vi:return Ge(Rl.lK,a.fb());case a instanceof olympe.dc.$q:return Ge(Rl.mG,a.fb());case a instanceof olympe.dc.Kf:return Ge(Rl.gw,this.R(a.ka()));default:return super.D(a)}}C(a){if(null===a||'object'!==typeof a)return super.C(a);const {t:b,v:c}=a;switch(b){case Rl.LG:var d=c.t;c.s&&(a=this.C(c.s),olympe.dc.rN().Oa(d,
1467
- a));return olympe.dc.CloudObject.get(d);case Rl.VF:return olympe.dc.CloudObject.get(c);case Rl.kK:return d=c.p.map(olympe.dc.query.wb.UC.C),a=c.e,new olympe.dc.nb(c.b,c.s,d,d.length-1,new Set(c.r),{max:a.m,offset:a.o,Mi:a.s,Hl:a.rm});case Rl.QUERY_RESULT:return Bk(c);case Rl.dH:return(new olympe.dc.transaction.cw).C(c.p,c.i);case Rl.nG:return a=null!=(d=this.C(c.c))?d:void 0,th(new olympe.dc.Request(c.r,c.d,a,c.u),c.o);case Rl.no:return d=this.C(c.p),new olympe.dc.transaction.rw(d,c.r);case Rl.lK:return olympe.dc.query.vi.C(c);
1468
- case Rl.mG:return olympe.dc.$q.C(c);case Rl.gw:return new olympe.dc.Kf(c);default:return super.C(a)}}R(a){if(this.O.has(a))return a;if(!this.db.tc(a))throw new olympe.dc.WJ(a);const b={};this.db.be(a).forEach((d,e)=>{b[e]=this.D(d)});var c=[];for(const [d,e,f]of cj(this.db,a))this.O.has(f)&&c.push(e===olympe.dc.Ib.DESTINATION?{r:d,o:a,d:f}:{r:d,o:f,d:a});c={t:a,m:this.db.model(a),s:this.db.source(a),p:b,r:c};this.db.Bl(a)||(c.v=!0);this.O.set(a,c);return a}};const Tl=olympe.dc.Request.C.cr,Ul=olympe.dc.Request.C.no,Vl=olympe.dc.Request.C.Mt,Wl=olympe.dc.Request.C.wv,Xl=olympe.dc.Request.C.zF,Yl=olympe.dc.Request.C.tK,Zl=olympe.dc.Request.C.Ct,$l=olympe.dc.Request.C.zz,am=olympe.dc.Request.C.cH,bm=olympe.dc.Request.C.TQ,cm=olympe.dc.Request.C.UQ,dm=olympe.dc.Request.C.VQ,em=olympe.dc.Request.C.Yq,fm=olympe.dc.Request.C.Zq,gm=olympe.dc.Request.C.Hr,hm=olympe.dc.Request.C.Ry,im=olympe.dc.Request.C.GU,jm=olympe.dc.Request.C.KT,km=olympe.dc.Request.C.YG,lm=
1469
- olympe.dc.Request.C.xv,mm=olympe.dc.Request.C.gQ,nm=olympe.dc.Request.C.Vf;function om(a){return pm(a,olympe.dc.Request.C.cr).then(b=>{b=b.data.p;const c=yh(b,a.ja());a.V.C()&&a.V.debug('< Get Context result',b);a.V.T()&&a.V.log('< Get Context result has',b.length,'operations');return c})}function qm(a,b){const c=new olympe.dc.transaction.Xk({mk:!1,bu:!1}),d=b.Zf(),e=b.C;d.Wf(c);return rm(a,Ul,{i:d.ja(),r:b.fs(),p:zh(c),bd:e?!0:void 0}).then(f=>f.ct)}
1470
- function sm(a,b){const c=b.Zf(),d=new olympe.dc.transaction.Xk({XA:!0,mk:!1,bu:!1});c.Wf(d);b=b.C?'bd=true':'';return pm(a,Vl,zh(d),b,olympe.Fa.Rc.ResponseType.Lz).then(e=>{try{let f;return null!=(f=JSON.parse(e.data).ct)?f:Date.now()}catch(f){return Date.now()}}).finally(()=>{tm(a,hm,{id:c.ja(),finalize:olympe.dc.transaction.po.C.Yv})})}
1471
- function um(a,b){const c=new olympe.dc.transaction.Xk({mk:!1,bu:!1}),d=b.Zf();d.Wf(c);return rm(a,Wl,{i:d.ja(),r:b.fs(),p:zh(c)},!1).catch(e=>a.V.error(`Error while publishing burst transaction: ${e}`))}function vm(a,b){const c=new olympe.dc.transaction.Xk({mk:!1,bu:!1});b=b.Zf();b.Wf(c);return rm(a,lm,{i:b.ja(),p:zh(c)}).then(d=>d.ct)}
1472
- function wm(a,b){const c=encodeURI(eb(olympe.oa.Dj(),JSON.stringify(xm(a,b))));a.V.C()&&a.V.debug(`Static GraphDef query ${b} sent to orchestrator`);return pm(a,Zl,void 0,`query=${c}&v=${a.version}`,olympe.Fa.Rc.ResponseType.el).then(d=>ym(a,d))}function zm(a,b){const c=b.ja();a.V.C()&&a.V.debug(`Query (${c}) sent to orchestrator: ${b}`);const d=xm(a,b);return a.za.C(()=>pm(a,am,d,void 0,olympe.Fa.Rc.ResponseType.el)).then(e=>ym(a,e))}
1473
- function Am(a,b){if(!ie(a.Na))return a.V.error(`Server is disconnected, backup of instance ${b} is canceled.`),Promise.reject('Server is disconnected');b=xm(a,olympe.dc.nb.from(b));b.f=olympe.dc.Te.tG;b=bd(a.C.le(olympe.dc.Jc.SERVER,Xl),olympe.Fa.Rc.gk.Pp,JSON.stringify(b),olympe.Fa.Rc.ResponseType.Pt);cd(b,{[olympe.Fa.Rc.Headers.Ey]:olympe.Fa.Rc.eG.JSON});return al(a.C,b).then(c=>c.data)}
1474
- function Bm(a,b,c,d){if(!ie(a.Na))return a.V.error('Server is disconnected, restore of instance is canceled.'),Promise.reject('Server is disconnected');const e=a.C.le(olympe.dc.Jc.SERVER,Yl);b=bd(e+`?debug=${c}&optional=${d}`,olympe.Fa.Rc.gk.Pp,b);cd(b,{[olympe.Fa.Rc.Headers.Ey]:olympe.Fa.Rc.eG.dV});return al(a.C,b).then(f=>f.data)}
1475
- function rm(a,b,c,d=!0){const e=olympe.Y.xj.Xq,f={c:b};Object.assign(f,c);if(d)return new Promise((g,k)=>{le(a.Na,e,f,(l,m)=>{l?k(l):g(m)})});le(a.Na,e,f);return Promise.resolve()}
1476
- function xm(a,b){var c=Vj(b);b={i:b.ja(),b:[b.D],m:!0,v:!0};if(c[0]instanceof olympe.dc.query.wb.ph)Object.assign(b,{f:c[0].af,q:[]});else{const d=(k,l)=>{k.every(m=>!m.Rb(l))&&k.push(l);return k},e=new Map;for(let k=c.length-1;0<=k;k--){const l=c[k],m=l.C;let n;const p=d(null!=(n=e.get(m))?n:[],l);if(l instanceof olympe.dc.query.wb.Mk&&l.O){let r;null==(r=e.get(l.ja()))||r.forEach(t=>d(p,t))}e.set(m,p)}let f,g;c=null!=(g=e.get(null==(f=c[0])?void 0:f.C))?g:[];Object.assign(b,{f:olympe.dc.Te.NONE,
1477
- q:c.map(a.ca.bind(a,e))})}return b}function tm(a,b,c){b=th(new olympe.dc.Request(b,olympe.dc.Jc.SELF,c),a.ja());let d;null==(d=a.kf)||d.ai(b)}
1478
- function pm(a,b,c,d,e){const f=a.C.le(a.ja(),b);if('string'!==typeof f)return Promise.reject(`ServerProvider: no url for type ${b}`);b=bd(`${f}${'string'===typeof d&&0<d.length?`?${d}`:''}`,void 0!==c?olympe.Fa.Rc.gk.Pp:olympe.Fa.Rc.gk.GET,c&&JSON.stringify(c));cd(b,{[olympe.Fa.Rc.Headers.Ey]:'application/json'});ed(b,null!=e?e:olympe.Fa.Rc.ResponseType.JSON);return al(a.C,b)}
1479
- function ym(a,b){return q(function*(){const c=b.headers.graphId,d=b.data;let e,f;return(null!=(f=null==(e=a.Pa)?void 0:tb(e,d))?f:olympe.oa.stream.sz.transform(b.data)).pipeThrough(new TransformStream({transform:(g,k)=>{a.V.debug(`Received ${g.length} operations for patch ${c}`);k.enqueue(yh(g,a.ja(),null,c))}}))})}
1480
- function Cm(a,b,c){return q(function*(){const d=b.pi;let e;if(c instanceof olympe.oa.stream.lo){e=new olympe.dc.db.Rf(d);try{for(const f=ia(c);;){const g=yield f.next();if(g.done)break;a.T.C(g.value.p,d).Wf(e)}}catch(f){a.V.error(`Error while reading the stream: ${f}`),e=new olympe.dc.db.Rf(d)}}else e=a.T.C(b.p,d);return ph(e,b.ct)})}
1462
+ class Ql{constructor(a,b,c,d){this.V=a;this.D=b;this.C=0;this.O=c.subscribe(d).subscribe({next:e=>{olympe.Y.de.publish(b,e).catch(f=>a.error(`Error occurred while publishing a data notification: ${f}`))},error:e=>a.error(`Error occurred while trying to subscribe to topic ${b} for a datasource: ${e}`)})}subscribe(){this.C++;this.V.debug(`Data subscription ${this.D} has ${this.C} subscribers`);return this}}olympe.dc.sources.CK.Aa=[olympe.dc.sources.Ly];const Sl={gM:10,VF:11,LG:12,kK:13,QUERY_RESULT:14,dH:15,nG:16,no:17,lK:18,mG:19,gw:20};function Tl(a,b){const c=new olympe.dc.transaction.Xk,d=new olympe.dc.transaction.Xk;b.forEach(e=>{const f=new Map(Array.from(Object.entries(e.p).map(([k,l])=>[k,a.C(l)]))),g=e.v?d:c;g.yf(e.t,e.s,f,e.m);e.r.forEach(k=>g.Qb(k.r,k.o,k.d))});a.ca.lh(yh(zh(d),olympe.dc.Jc.SELF),{persist:!1});a.ca.lh(yh(zh(c),olympe.dc.Jc.SELF))}
1463
+ olympe.dc.sources.Mf=class extends olympe.Y.Mf{constructor(a){super();this.ca=a;this.db=a.view;this.O=new Map}fb(a){a=super.fb(a);if(0<this.O.size){const b=Array.from(this.O.values());this.O.clear();return Object.assign(Ge(Sl.gM,a),{i:b})}return a}W(a){return(null==a?void 0:a.t)===Sl.gM&&Array.isArray(null==a?void 0:a.i)?(Tl(this,a.i),this.C(a.v)):this.C(a)}D(a){switch(!0){case a instanceof olympe.dm.File:var b=Sl.LG;{const c=a.ka(),d={t:c};if(!this.O.has(c)&&(this.R(c),!this.db.Bl(c))){const e=a.get(olympe.dm.File.urlProp);
1464
+ if(e.startsWith('blob:')||e.startsWith('stream:'))a=olympe.dc.rN().Pa(a),this.O.get(c).p[olympe.dm.File.urlProp.ka()]='stream://'+c,d.s=this.D(a)}a=d}return Ge(b,a);case a instanceof olympe.dc.CloudObject:return Ge(Sl.VF,this.R(a.ka()));case a instanceof olympe.dc.nb:return Ge(Sl.kK,a.fb());case a instanceof olympe.dc.xc:return Ge(Sl.QUERY_RESULT,a.fb(this.R.bind(this)));case a instanceof olympe.dc.db.Rf:return b=new olympe.dc.transaction.Xk,a.Wf(b),Ge(Sl.dH,{i:a.ja(),p:zh(b)});case a instanceof olympe.dc.Request:return Ge(Sl.nG,
1465
+ {r:a.getType(),o:a.origin,d:a.Yf(),u:a.Lg(),c:this.D(a.Pe())});case a instanceof olympe.dc.transaction.rw:return Ge(Sl.no,{r:a.fs(),p:this.D(a.Zf())});case a instanceof olympe.dc.query.vi:return Ge(Sl.lK,a.fb());case a instanceof olympe.dc.$q:return Ge(Sl.mG,a.fb());case a instanceof olympe.dc.Kf:return Ge(Sl.gw,this.R(a.ka()));default:return super.D(a)}}C(a){if(null===a||'object'!==typeof a)return super.C(a);const {t:b,v:c}=a;switch(b){case Sl.LG:var d=c.t;c.s&&(a=this.C(c.s),olympe.dc.rN().Oa(d,
1466
+ a));return olympe.dc.CloudObject.get(d);case Sl.VF:return olympe.dc.CloudObject.get(c);case Sl.kK:return d=c.p.map(olympe.dc.query.wb.UC.C),a=c.e,new olympe.dc.nb(c.b,c.s,d,d.length-1,new Set(c.r),{max:a.m,offset:a.o,Mi:a.s,Hl:a.rm});case Sl.QUERY_RESULT:return Ck(c);case Sl.dH:return(new olympe.dc.transaction.cw).C(c.p,c.i);case Sl.nG:return a=null!=(d=this.C(c.c))?d:void 0,th(new olympe.dc.Request(c.r,c.d,a,c.u),c.o);case Sl.no:return d=this.C(c.p),new olympe.dc.transaction.rw(d,c.r);case Sl.lK:return olympe.dc.query.vi.C(c);
1467
+ case Sl.mG:return olympe.dc.$q.C(c);case Sl.gw:return new olympe.dc.Kf(c);default:return super.C(a)}}R(a){if(this.O.has(a))return a;if(!this.db.tc(a))throw new olympe.dc.WJ(a);const b={};this.db.be(a).forEach((d,e)=>{b[e]=this.D(d)});var c=[];for(const [d,e,f]of cj(this.db,a))this.O.has(f)&&c.push(e===olympe.dc.Ib.DESTINATION?{r:d,o:a,d:f}:{r:d,o:f,d:a});c={t:a,m:this.db.model(a),s:this.db.source(a),p:b,r:c};this.db.Bl(a)||(c.v=!0);this.O.set(a,c);return a}};const Ul=olympe.dc.Request.C.cr,Vl=olympe.dc.Request.C.no,Wl=olympe.dc.Request.C.Mt,Xl=olympe.dc.Request.C.wv,Yl=olympe.dc.Request.C.zF,Zl=olympe.dc.Request.C.tK,$l=olympe.dc.Request.C.Ct,am=olympe.dc.Request.C.zz,bm=olympe.dc.Request.C.cH,cm=olympe.dc.Request.C.TQ,dm=olympe.dc.Request.C.UQ,em=olympe.dc.Request.C.VQ,fm=olympe.dc.Request.C.Yq,gm=olympe.dc.Request.C.Zq,hm=olympe.dc.Request.C.Hr,im=olympe.dc.Request.C.Ry,jm=olympe.dc.Request.C.GU,km=olympe.dc.Request.C.KT,lm=olympe.dc.Request.C.YG,mm=
1468
+ olympe.dc.Request.C.xv,nm=olympe.dc.Request.C.gQ,om=olympe.dc.Request.C.Vf;function pm(a){return qm(a,olympe.dc.Request.C.cr).then(b=>{b=b.data.p;const c=yh(b,a.ja());a.V.C()&&a.V.debug('< Get Context result',b);a.V.T()&&a.V.log('< Get Context result has',b.length,'operations');return c})}function rm(a,b){const c=new olympe.dc.transaction.Xk({mk:!1,bu:!1}),d=b.Zf(),e=b.C;d.Wf(c);return sm(a,Vl,{i:d.ja(),r:b.fs(),p:zh(c),bd:e?!0:void 0}).then(f=>f.ct)}
1469
+ function tm(a,b){const c=b.Zf(),d=new olympe.dc.transaction.Xk({XA:!0,mk:!1,bu:!1});c.Wf(d);b=b.C?'bd=true':'';return qm(a,Wl,zh(d),b,olympe.Fa.Rc.ResponseType.Lz).then(e=>{try{let f;return null!=(f=JSON.parse(e.data).ct)?f:Date.now()}catch(f){return Date.now()}}).finally(()=>{um(a,im,{id:c.ja(),finalize:olympe.dc.transaction.po.C.Yv})})}
1470
+ function vm(a,b){const c=new olympe.dc.transaction.Xk({mk:!1,bu:!1}),d=b.Zf();d.Wf(c);return sm(a,Xl,{i:d.ja(),r:b.fs(),p:zh(c)},!1).catch(e=>a.V.error(`Error while publishing burst transaction: ${e}`))}function wm(a,b){const c=new olympe.dc.transaction.Xk({mk:!1,bu:!1});b=b.Zf();b.Wf(c);return sm(a,mm,{i:b.ja(),p:zh(c)}).then(d=>d.ct)}
1471
+ function xm(a,b){const c=encodeURI(eb(olympe.oa.Dj(),JSON.stringify(ym(a,b))));a.V.C()&&a.V.debug(`Static GraphDef query ${b} sent to orchestrator`);return qm(a,$l,void 0,`query=${c}&v=${a.version}`,olympe.Fa.Rc.ResponseType.el).then(d=>zm(a,d))}function Am(a,b){const c=b.ja();a.V.C()&&a.V.debug(`Query (${c}) sent to orchestrator: ${b}`);const d=ym(a,b);return a.za.C(()=>qm(a,bm,d,void 0,olympe.Fa.Rc.ResponseType.el)).then(e=>zm(a,e))}
1472
+ function Bm(a,b){if(!ie(a.Na))return a.V.error(`Server is disconnected, backup of instance ${b} is canceled.`),Promise.reject('Server is disconnected');b=ym(a,olympe.dc.nb.from(b));b.f=olympe.dc.Te.tG;b=bd(a.C.le(olympe.dc.Jc.SERVER,Yl),olympe.Fa.Rc.gk.Pp,JSON.stringify(b),olympe.Fa.Rc.ResponseType.Pt);cd(b,{[olympe.Fa.Rc.Headers.Ey]:olympe.Fa.Rc.eG.JSON});return bl(a.C,b).then(c=>c.data)}
1473
+ function Cm(a,b,c,d){if(!ie(a.Na))return a.V.error('Server is disconnected, restore of instance is canceled.'),Promise.reject('Server is disconnected');const e=a.C.le(olympe.dc.Jc.SERVER,Zl);b=bd(e+`?debug=${c}&optional=${d}`,olympe.Fa.Rc.gk.Pp,b);cd(b,{[olympe.Fa.Rc.Headers.Ey]:olympe.Fa.Rc.eG.dV});return bl(a.C,b).then(f=>f.data)}
1474
+ function sm(a,b,c,d=!0){const e=olympe.Y.xj.Xq,f={c:b};Object.assign(f,c);if(d)return new Promise((g,k)=>{le(a.Na,e,f,(l,m)=>{l?k(l):g(m)})});le(a.Na,e,f);return Promise.resolve()}
1475
+ function ym(a,b){var c=Wj(b);b={i:b.ja(),b:[b.D],m:!0,v:!0};if(c[0]instanceof olympe.dc.query.wb.ph)Object.assign(b,{f:c[0].af,q:[]});else{const d=(k,l)=>{k.every(m=>!m.Rb(l))&&k.push(l);return k},e=new Map;for(let k=c.length-1;0<=k;k--){const l=c[k],m=l.C;let n;const p=d(null!=(n=e.get(m))?n:[],l);if(l instanceof olympe.dc.query.wb.Mk&&l.O){let r;null==(r=e.get(l.ja()))||r.forEach(t=>d(p,t))}e.set(m,p)}let f,g;c=null!=(g=e.get(null==(f=c[0])?void 0:f.C))?g:[];Object.assign(b,{f:olympe.dc.Te.NONE,
1476
+ q:c.map(a.ca.bind(a,e))})}return b}function um(a,b,c){b=th(new olympe.dc.Request(b,olympe.dc.Jc.SELF,c),a.ja());let d;null==(d=a.kf)||d.ai(b)}
1477
+ function qm(a,b,c,d,e){const f=a.C.le(a.ja(),b);if('string'!==typeof f)return Promise.reject(`ServerProvider: no url for type ${b}`);b=bd(`${f}${'string'===typeof d&&0<d.length?`?${d}`:''}`,void 0!==c?olympe.Fa.Rc.gk.Pp:olympe.Fa.Rc.gk.GET,c&&JSON.stringify(c));cd(b,{[olympe.Fa.Rc.Headers.Ey]:'application/json'});ed(b,null!=e?e:olympe.Fa.Rc.ResponseType.JSON);return bl(a.C,b)}
1478
+ function zm(a,b){return q(function*(){const c=b.headers.graphId,d=b.data;let e,f;return(null!=(f=null==(e=a.Pa)?void 0:tb(e,d))?f:olympe.oa.stream.sz.transform(b.data)).pipeThrough(new TransformStream({transform:(g,k)=>{a.V.debug(`Received ${g.length} operations for patch ${c}`);k.enqueue(yh(g,a.ja(),null,c))}}))})}
1479
+ function Dm(a,b,c){return q(function*(){const d=b.pi;let e;if(c instanceof olympe.oa.stream.lo){e=new olympe.dc.db.Rf(d);try{for(const f=ia(c);;){const g=yield f.next();if(g.done)break;a.T.C(g.value.p,d).Wf(e)}}catch(f){a.V.error(`Error while reading the stream: ${f}`),e=new olympe.dc.db.Rf(d)}}else e=a.T.C(b.p,d);return ph(e,b.ct)})}
1481
1480
  olympe.dc.sources.gL=class extends olympe.dc.sources.KB{constructor(a,b,c,d,e,f,g){super(a,c);this.Na=b;this.C=d;this.T=new olympe.dc.transaction.cw(this.ja());this.O=new Map;this.R=new Set;this.version=e||'unknown';this.Pa=g?new olympe.oa.stream.$U:null;this.za=new olympe.oa.promise.kL(f);olympe.j.$a(this.D.Io(),()=>{this.O.forEach((k,l)=>{k.error(new olympe.Y.errors.Zv('Connection to server has been recovered',l))})})}ja(){return olympe.dc.Jc.SERVER}W(a){var b=a.getType();const c=a.Pe(),d=vh(a);
1482
- switch(b){case nm:return a=olympe.dm.DataSource.Vf.we,b=olympe.dm.DataSource.Vf.Dt,Promise.resolve(ie(this.Na)?{s:b}:{s:a,r:'Disconnected'});case Tl:return om(this);case Ul:return qm(this,c);case Vl:return sm(this,c);case Wl:return um(this,c);case lm:return vm(this,c);case Zl:return d.get(olympe.dc.nb.C.DH)?wm(this,c):zm(this,c);case Xl:return Am(this,c);case Yl:return Bm(this,c.C3,c.debug,c.optional);case im:case jm:case km:case mm:return rm(this,b,{});case fm:return this.C.downloadFileContent(a);
1483
- case em:return this.C.deleteFileContent(a);case gm:return this.C.uploadFileContent(a);default:return Promise.reject(`ServerProvider: Message of type ${b} not supported yet`)}}$(a,b){if(a.getType()===$l){const c=a.Pe(),d=c.ja();return(new rxjs.Observable(e=>{const f=xm(this,c);this.R.delete(d);this.O.set(d,e);rm(this,bm,f).catch(g=>e.error(g))})).pipe(qb(olympe.Y.errors.Zv,(e,f)=>{this.V.debug(`Subscribe to topic ${e.ja()} now that we are back online, after waiting for ${f}ms`);b()}),rxjs.operators.finalize(()=>
1484
- {this.R.add(d);rm(this,cm,{i:d}).catch(e=>{this.V.warn(`Fail to unsubscribe to graphdef ${d}: ${e}`)}).finally(()=>{this.R.has(d)&&this.O.delete(d);this.R.delete(d)})}))}return rxjs.throwError(()=>Error(`Subscription of type ${a.getType()} is not supported`))}init(a){super.init(a);ge(this.Na,olympe.Y.xj.Xq,this.ma.bind(this));return this}destroy(){return q(function*(){})}ma(a,b){const c=olympe.dc.Request.C.GF,d=olympe.dc.Request.C.KC,e=a.c;if(e===olympe.dc.Request.C.jG)Cm(this,a,b).then(f=>{tm(this,
1485
- e,f)});else if(e===c)b=this.T.C(a.p,a.i),b=ph(b,a.ct),tm(this,e,{rollback:b,error:a.error});else if(e===dm){const f=a.i;Cm(this,a,b).then(g=>{let k;null==(k=this.O.get(f))||k.next(g)})}else e===d&&tm(this,hm,{id:a.i,finalize:olympe.dc.transaction.po.C.KC,error:0<a.s?a.error:null})}ca(a,b){if(b instanceof olympe.dc.query.wb.Ht){const c=b.relation;let d;b=null!=(d=a.get(b.ja()))?d:[];return{t:c.ka(),d:c.zc()===olympe.dc.Ib.ORIGIN?1:2,v:!0,r:c.recursive,q:b.map(this.ca.bind(this,a))}}return{}}};
1486
- olympe.dc.sources.gL.Aa=[olympe.dc.sources.Ly];function Dm(a,b,c){const d=new olympe.j.ee(`Source solver ${b.ka()}`);b.oc(olympe.dm.ii.O.fe()).oc(olympe.dm.ii.D).Zi().back().oc(olympe.dm.ii.C).Zi().observe(d,{Xg:c,jg:!0}).subscribe(e=>{e.lu().forEach(([f,g])=>{a.D.set(f.ka(),g.ja())});e.uu().forEach(([f])=>{a.D.delete(f)})});b.oc(olympe.dm.fd.O).observe(d,{Xg:c,jg:!0}).subscribe(e=>{let f,g;a.O=null!=(g=null==(f=e.Vd())?void 0:f.ja())?g:null});d.onDestroy(()=>{a.D.clear();a.O=null})}
1481
+ switch(b){case om:return a=olympe.dm.DataSource.Vf.we,b=olympe.dm.DataSource.Vf.Dt,Promise.resolve(ie(this.Na)?{s:b}:{s:a,r:'Disconnected'});case Ul:return pm(this);case Vl:return rm(this,c);case Wl:return tm(this,c);case Xl:return vm(this,c);case mm:return wm(this,c);case $l:return d.get(olympe.dc.nb.C.DH)?xm(this,c):Am(this,c);case Yl:return Bm(this,c);case Zl:return Cm(this,c.C3,c.debug,c.optional);case jm:case km:case lm:case nm:return sm(this,b,{});case gm:return this.C.downloadFileContent(a);
1482
+ case fm:return this.C.deleteFileContent(a);case hm:return this.C.uploadFileContent(a);default:return Promise.reject(`ServerProvider: Message of type ${b} not supported yet`)}}$(a,b){if(a.getType()===am){const c=a.Pe(),d=c.ja();return(new rxjs.Observable(e=>{const f=ym(this,c);this.R.delete(d);this.O.set(d,e);sm(this,cm,f).catch(g=>e.error(g))})).pipe(qb(olympe.Y.errors.Zv,(e,f)=>{this.V.debug(`Subscribe to topic ${e.ja()} now that we are back online, after waiting for ${f}ms`);b()}),rxjs.operators.finalize(()=>
1483
+ {this.R.add(d);sm(this,dm,{i:d}).catch(e=>{this.V.warn(`Fail to unsubscribe to graphdef ${d}: ${e}`)}).finally(()=>{this.R.has(d)&&this.O.delete(d);this.R.delete(d)})}))}return rxjs.throwError(()=>Error(`Subscription of type ${a.getType()} is not supported`))}init(a){super.init(a);ge(this.Na,olympe.Y.xj.Xq,this.ma.bind(this));return this}destroy(){return q(function*(){})}ma(a,b){const c=olympe.dc.Request.C.GF,d=olympe.dc.Request.C.KC,e=a.c;if(e===olympe.dc.Request.C.jG)Dm(this,a,b).then(f=>{um(this,
1484
+ e,f)});else if(e===c)b=this.T.C(a.p,a.i),b=ph(b,a.ct),um(this,e,{rollback:b,error:a.error});else if(e===em){const f=a.i;Dm(this,a,b).then(g=>{let k;null==(k=this.O.get(f))||k.next(g)})}else e===d&&um(this,im,{id:a.i,finalize:olympe.dc.transaction.po.C.KC,error:0<a.s?a.error:null})}ca(a,b){if(b instanceof olympe.dc.query.wb.Ht){const c=b.relation;let d;b=null!=(d=a.get(b.ja()))?d:[];return{t:c.ka(),d:c.zc()===olympe.dc.Ib.ORIGIN?1:2,v:!0,r:c.recursive,q:b.map(this.ca.bind(this,a))}}return{}}};
1485
+ olympe.dc.sources.gL.Aa=[olympe.dc.sources.Ly];function Em(a,b,c){const d=new olympe.j.ee(`Source solver ${b.ka()}`);b.oc(olympe.dm.ii.O.fe()).oc(olympe.dm.ii.D).Zi().back().oc(olympe.dm.ii.C).Zi().observe(d,{Xg:c,jg:!0}).subscribe(e=>{e.lu().forEach(([f,g])=>{a.D.set(f.ka(),g.ja())});e.uu().forEach(([f])=>{a.D.delete(f)})});b.oc(olympe.dm.fd.O).observe(d,{Xg:c,jg:!0}).subscribe(e=>{let f,g;a.O=null!=(g=null==(f=e.Vd())?void 0:f.ja())?g:null});d.onDestroy(()=>{a.D.clear();a.O=null})}
1487
1486
  olympe.dc.sources.Jz=class{constructor(a,b,c){this.db=a;this.C=b;this.T=c;this.D=new Map;this.O=null;this.R=!1}fromModel(a){a=olympe.dc.Ya(a);return this.D.has(a)?this.D.get(a):this.O&&this.W(a)?this.O:this.T}Em(a){let b;return null!=(b=this.db.source(a))?b:this.T}Sd(a){return a===this.C?olympe.dc.CloudObject.get(this.C):a===olympe.dc.Jc.SERVER?olympe.dc.CloudObject.get(olympe.dm.DataSource.SERVER):this.db.tc(a)&&this.db.me(a,olympe.dm.DataSource)?olympe.dc.CloudObject.get(a):null}W(){return!1}init(){if(!this.R){this.R=
1488
1487
  !0;var a=new olympe.dc.Tc;Z(a.create(olympe.dm.DataSource,this.C).ne(this.C),olympe.dm.DataSource.Yt,!0);a.Qb(olympe.dm.DataSource.qx,this.C,this.C);a.Kd(()=>{olympe.dc.nb.from(this.C).observe(olympe.j.Eo()).subscribe(()=>{})})}}};olympe.dc.sources.ba={Vb:'dc.sources.Logger',kC:'dc.sources.HTTPService',sR:'dc.sources.IOService',rK:'dc.sources.RemoteProvider',LK:'dc.sources.ServerProvider',E0:'dc.sources.OfflineProvider',dl:'dc.sources.SourceSolver',cl:'dc.sources.Serializer',kG:'dc.sources.cache.Cache',lG:'dc.sources.cache.DATABASE',HB:'dc.sources.cache.Logger'};
1489
1488
  olympe.dc.sources.pa={qt:'data.httpHost',Jp:'data.httpPort',Lv:'data.httpSSL',iC:'data.httpBasePath',SC:'data.pollingFrequency',am:'data.communicationMode',ZC:'data.restrictedUse',VERSION:'version.version',bL:'data.streamWorker',VJ:'data.queryConcurrencyLimit'};olympe.dc.sources.tt={wT:'olympe.internal.data.',qt:'olympe.internal.data.httpHost',Jp:'olympe.internal.data.httpPort',Lv:'olympe.internal.data.httpSSL'};
@@ -1492,188 +1491,188 @@ olympe.dc.sources.tt.Jp,[olympe.dc.sources.tt.qt,olympe.dc.sources.pa.Jp],(e,f)=
1492
1491
  Ua(a,olympe.Y.ba.cl,olympe.dc.sources.ba.cl);B(a,olympe.dc.sources.ba.kC,olympe.dc.sources.cR,olympe.dc.sources.ba.Vb,olympe.Fa.ba.rD,olympe.Y.ba.jC,olympe.xa.ba.Ob,olympe.dc.sources.ba.dl,olympe.Y.ba.cl,new olympe.sa.zb(olympe.Y.pa.CB));B(a,olympe.dc.sources.ba.sR,olympe.dc.sources.CH,olympe.dc.sources.ba.Vb,olympe.dc.ba.tr,olympe.Fa.ba.Ob,olympe.xa.ba.Ob);B(a,olympe.dc.sources.ba.rK,olympe.dc.sources.CK,olympe.dc.sources.ba.Vb,new olympe.sa.zb(olympe.dc.pa.yr),olympe.dc.sources.ba.kC,olympe.Y.ba.bm,
1493
1492
  olympe.dc.ba.Zs,olympe.dc.sources.ba.dl);B(a,olympe.dc.sources.ba.LK,olympe.dc.sources.gL,olympe.dc.sources.ba.Vb,olympe.Y.ba.Jt,olympe.Y.ba.bm,olympe.dc.sources.ba.kC,new olympe.sa.zb(olympe.dc.sources.pa.VERSION),new olympe.sa.zb(olympe.dc.sources.pa.VJ),new olympe.sa.zb(olympe.dc.sources.pa.bL));B(a,olympe.dc.sources.ba.dl,olympe.dc.sources.Jz,olympe.dc.ba.Zs,new olympe.sa.zb(olympe.dc.pa.yr),new olympe.sa.zb(olympe.dc.pa.SB));C(a,olympe.dc.sources.ba.HB,[olympe.gb.ba.Ob],e=>e.Vg('datacache'));
1494
1493
  B(a,olympe.dc.sources.ba.kG,olympe.dc.sources.cache.Cache,olympe.dc.sources.ba.HB,olympe.dc.ba.tr,olympe.dc.sources.ba.lG,olympe.dc.db.ba.Ob,olympe.Fa.ba.Ob,olympe.Y.ba.bm,olympe.Bc.ba.fz,olympe.oa.ba.Uq,new olympe.sa.zb(olympe.Fa.pa.SJ),new olympe.sa.zb(olympe.dc.sources.pa.VERSION));B(a,olympe.dc.sources.ba.lG,olympe.dc.sources.cache.qz,olympe.Bc.ba.Ar,olympe.dc.sources.ba.HB,olympe.Bc.ba.dz)},'olympe.dc.sources');
1495
- olympe.sa.run([olympe.dc.sources.ba.dl,olympe.dc.sources.ba.kG],(a,b)=>{olympe.dc.Kj=()=>a;olympe.dc.sources.Ej=()=>b});olympe.dc.sources.cache={};olympe.dc.sources.cache.errors={};olympe.dc.sources.cache.errors.iD=class extends Error{constructor(a){super(a)}};olympe.dc.sources.cache.errors.rQ=class extends olympe.dc.sources.cache.errors.iD{};olympe.dc.sources.cache.errors.EU=class extends olympe.dc.sources.cache.errors.iD{};olympe.dc.sources.cache.errors.QU=class extends olympe.dc.sources.cache.errors.iD{};function Em(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a}switch(a.t){case 1:return new Date(a.d);case 2:return olympe.j.Color.ke(a);case 17:return new olympe.dc.Kf(a.v);case 13:return(new olympe.dc.transaction.cw).C(a.v,a.i);default:throw Error(`Impossible to deserialize the following value: ${a}`);}}
1494
+ olympe.sa.run([olympe.dc.sources.ba.dl,olympe.dc.sources.ba.kG],(a,b)=>{olympe.dc.Kj=()=>a;olympe.dc.sources.Ej=()=>b});olympe.dc.sources.cache={};olympe.dc.sources.cache.errors={};olympe.dc.sources.cache.errors.iD=class extends Error{constructor(a){super(a)}};olympe.dc.sources.cache.errors.rQ=class extends olympe.dc.sources.cache.errors.iD{};olympe.dc.sources.cache.errors.EU=class extends olympe.dc.sources.cache.errors.iD{};olympe.dc.sources.cache.errors.QU=class extends olympe.dc.sources.cache.errors.iD{};function Fm(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a}switch(a.t){case 1:return new Date(a.d);case 2:return olympe.j.Color.ke(a);case 17:return new olympe.dc.Kf(a.v);case 13:return(new olympe.dc.transaction.cw).C(a.v,a.i);default:throw Error(`Impossible to deserialize the following value: ${a}`);}}
1496
1495
  olympe.dc.sources.cache.rH=class{fb(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a;case a instanceof olympe.j.ac:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.j.Color:return Object.assign({t:2},a.toJSON());case a instanceof olympe.dc.Kf:return{t:17,v:a.ka()};case a instanceof olympe.dc.db.Rf:const b=new olympe.dc.transaction.Xk;a.Wf(b);
1497
- return{t:13,i:a.ja(),v:zh(b)};default:throw Error(`Impossible to serialize the following value: ${a}`);}}};function xl(a,b,c){return q(function*(){Fm(a,'queries',b);yield a.init();const d=a.D.has(c)?a.D.get(c):new Set;d.has(b)||(d.add(b),a.D.set(c,d),a.T.next(Gm(a)));return Hm(a.C,b,c)})}function yl(a,b){return q(function*(){yield a.init();a.V.debug(`Cache: subtract pending transaction operations from ${b.ja()}`);b.T(a.O)})}
1498
- function zl(a,b,c,d,e=!1){(()=>q(function*(){a.V.debug(`Cache: handle query ${b} graph patch: ${d.ja()}`);try{const f=null===b?[]:Array.from(a.D.entries()).filter(([,k])=>k.has(b)).map(([k])=>k),g=1===f.length&&'__code-as-data__'===f[0];if(null===b||!g||a.ca){a.V.debug('Cache: persist graph patch',d.ja());if(e&&b){const k=new Set(Array.from(d.xg()).filter(l=>!l.$h()).map(l=>l.tag()));yield Im(a.C,[b],k)}yield Jm(a.C,d,0<f.length?b:null);Km(a,d,c).catch(k=>{a.V.error(`Cache: Failed to download files of a graph patch: ${k}`)})}}catch(f){a.V.error(`Cache: Failed to handle graph patch ${d.ja()} with message: ${f}`),
1499
- a.Eb.next(f)}finally{b&&Lm(a,'queries',b)}}))().then(()=>{})}function Al(a,b,c,d,e=!1){return q(function*(){yield yl(a,d);zl(a,b,c,d,e)})}function Mm(){var a=olympe.dc.sources.Ej();a.ca=!0;a.Oa=!0}function Fm(a,b,c){const d=a.status.getValue();b in d||(d[b]={total:0,processed:0,values:new Set});d[b].total+=1;d[b].values.add(c);d.processing=!0;a.status.next(d)}
1500
- function Lm(a,b,c){const d=a.status.getValue();let e,f;null!=(f=null==(e=d[b])?void 0:e.values)&&f.delete(c)&&(d[b].processed+=1,0===d[b].values.size&&(delete d[b],('queries'===b?'files':'queries')in d||(d.processing=!1)),a.status.next(d))}function Nm(a){return q(function*(){a.O=new olympe.dc.db.Rf;const b=yield Om(a.C);for(const c of b)c.Wf(a.O);a.da.next(0<b.length)})}
1501
- function Km(a,b,c){return q(function*(){const d=Pm(b),e=[];for(const g of d){const k=g.tag();if(!(yield Qm(a.C,k)))if(Fm(a,'files',k),!1===g.Ac(olympe.dm.File.C.ka())&&g.Ac(olympe.dm.File.urlProp.ka())){var f=g.Ac(olympe.dm.File.urlProp.ka());f=bd(f);ed(f,olympe.Fa.Rc.ResponseType.AB);e.push(a.qc.C(f).then(l=>{l=l.jh();if(200>l||300<=l)throw Error(`Failed to download file ${g}. Response code ${l}`);}).finally(()=>Lm(a,'files',k)))}else{let l;const m=null!=(l=g.Ac(olympe.dm.File.mimeTypeProp.ka()))?
1502
- l:'application/octet-stream';f={tag:k,model:g.Qe(),mimeType:m};const n=new olympe.dc.Request(olympe.dc.Request.C.Zq,c,f);f=a.Pb.C(()=>oh(a.kf,n).then(p=>Rm(a.C,k,p,m))).finally(()=>Lm(a,'files',k));e.push(f)}}yield Promise.allSettled(e).then(g=>{g.forEach((k,l)=>{if('rejected'===k.status){let m;a.V.warn(`Cache: File content for ${null==(m=d[l])?void 0:m.tag()} was not found`)}})})})}
1503
- function Pm(a){const b=[olympe.dc.Ya(olympe.dm.File)];if(olympe.dc.CloudObject.Mw(olympe.dm.File))b.push(...olympe.dc.nb.from(olympe.dm.File).Yp(olympe.dc.CloudObject.extendedByRel).zf().keys());else for(const c of b){let d,e;b.push(...(null!=(e=null==(d=a.ih(c))?void 0:d.pc(olympe.dc.CloudObject.extendedByRel,f=>f))?e:[]))}return b.reduce((c,d)=>{let e,f;d=Array.from(null!=(f=null==(e=a.ih(d))?void 0:e.pc(olympe.dc.CloudObject.instancesRel,g=>g))?f:[]).map(g=>a.ih(g));return c.concat(d)},[])}
1504
- function Sm(a,b){return Array.from(a.D.values()).some(c=>c.has(b))}function Gm(a){return Array.from(a.D.keys()).filter(b=>'__code-as-data__'!==b)}function Tm(a,b){return q(function*(){yield a.init();if(b){var c,d=Array.from(null!=(c=a.D.get(b))?c:[]);a.D.delete(b);var e=Array.from(a.D.values()).reduce((f,g)=>{g.forEach(k=>f.add(k));return f},new Set);yield Um(a.C,b);a.T.next(Gm(a));c=d.filter(f=>!e.has(f));yield Im(a.C,c)}else yield Promise.all(Gm(a).map(f=>Tm(a,f)))})}
1505
- function Vm(a){if(!(2>a.length))for(let b=a.length-1;0<b;b--)for(let c=b-1;0<=c;c--)a[c].T(a[b])}
1506
- function Wm(a,b,c){return q(function*(){var d=olympe.dc.Request.C.no;const e=olympe.dc.Request.C.Yq,f=olympe.dc.Request.C.Hr;a.V.debug('Sync Cache: Applying transaction patch to destination',c,b.ja());const g=Pm(b);a.V.debug(`Sync Cache: Found ${g.length} files to send`);yield Promise.all(g.map(k=>q(function*(){const l=k.tag();var m=k.Qe();if(k.$h())m=new olympe.dc.Request(e,c,{tag:l,model:m});else{const n=yield Xm(a.C,l);m=new olympe.dc.Request(f,c,{tag:l,model:m,content:n.content,mimeType:n.C})}if(!xd(a.Ka))throw Error('Lost connection, stop syncing');
1496
+ return{t:13,i:a.ja(),v:zh(b)};default:throw Error(`Impossible to serialize the following value: ${a}`);}}};function yl(a,b,c){return q(function*(){Gm(a,'queries',b);yield a.init();const d=a.D.has(c)?a.D.get(c):new Set;d.has(b)||(d.add(b),a.D.set(c,d),a.T.next(Hm(a)));return Im(a.C,b,c)})}function zl(a,b){return q(function*(){yield a.init();a.V.debug(`Cache: subtract pending transaction operations from ${b.ja()}`);b.T(a.O)})}
1497
+ function Al(a,b,c,d,e=!1){(()=>q(function*(){a.V.debug(`Cache: handle query ${b} graph patch: ${d.ja()}`);try{const f=null===b?[]:Array.from(a.D.entries()).filter(([,k])=>k.has(b)).map(([k])=>k),g=1===f.length&&'__code-as-data__'===f[0];if(null===b||!g||a.ca){a.V.debug('Cache: persist graph patch',d.ja());if(e&&b){const k=new Set(Array.from(d.xg()).filter(l=>!l.$h()).map(l=>l.tag()));yield Jm(a.C,[b],k)}yield Km(a.C,d,0<f.length?b:null);Lm(a,d,c).catch(k=>{a.V.error(`Cache: Failed to download files of a graph patch: ${k}`)})}}catch(f){a.V.error(`Cache: Failed to handle graph patch ${d.ja()} with message: ${f}`),
1498
+ a.Eb.next(f)}finally{b&&Mm(a,'queries',b)}}))().then(()=>{})}function Bl(a,b,c,d,e=!1){return q(function*(){yield zl(a,d);Al(a,b,c,d,e)})}function Nm(){var a=olympe.dc.sources.Ej();a.ca=!0;a.Oa=!0}function Gm(a,b,c){const d=a.status.getValue();b in d||(d[b]={total:0,processed:0,values:new Set});d[b].total+=1;d[b].values.add(c);d.processing=!0;a.status.next(d)}
1499
+ function Mm(a,b,c){const d=a.status.getValue();let e,f;null!=(f=null==(e=d[b])?void 0:e.values)&&f.delete(c)&&(d[b].processed+=1,0===d[b].values.size&&(delete d[b],('queries'===b?'files':'queries')in d||(d.processing=!1)),a.status.next(d))}function Om(a){return q(function*(){a.O=new olympe.dc.db.Rf;const b=yield Pm(a.C);for(const c of b)c.Wf(a.O);a.da.next(0<b.length)})}
1500
+ function Lm(a,b,c){return q(function*(){const d=Qm(b),e=[];for(const g of d){const k=g.tag();if(!(yield Rm(a.C,k)))if(Gm(a,'files',k),!1===g.Ac(olympe.dm.File.C.ka())&&g.Ac(olympe.dm.File.urlProp.ka())){var f=g.Ac(olympe.dm.File.urlProp.ka());f=bd(f);ed(f,olympe.Fa.Rc.ResponseType.AB);e.push(a.qc.C(f).then(l=>{l=l.jh();if(200>l||300<=l)throw Error(`Failed to download file ${g}. Response code ${l}`);}).finally(()=>Mm(a,'files',k)))}else{let l;const m=null!=(l=g.Ac(olympe.dm.File.mimeTypeProp.ka()))?
1501
+ l:'application/octet-stream';f={tag:k,model:g.Qe(),mimeType:m};const n=new olympe.dc.Request(olympe.dc.Request.C.Zq,c,f);f=a.Pb.C(()=>oh(a.kf,n).then(p=>Sm(a.C,k,p,m))).finally(()=>Mm(a,'files',k));e.push(f)}}yield Promise.allSettled(e).then(g=>{g.forEach((k,l)=>{if('rejected'===k.status){let m;a.V.warn(`Cache: File content for ${null==(m=d[l])?void 0:m.tag()} was not found`)}})})})}
1502
+ function Qm(a){const b=[olympe.dc.Ya(olympe.dm.File)];if(olympe.dc.CloudObject.Mw(olympe.dm.File))b.push(...olympe.dc.nb.from(olympe.dm.File).Yp(olympe.dc.CloudObject.extendedByRel).zf().keys());else for(const c of b){let d,e;b.push(...(null!=(e=null==(d=a.ih(c))?void 0:d.pc(olympe.dc.CloudObject.extendedByRel,f=>f))?e:[]))}return b.reduce((c,d)=>{let e,f;d=Array.from(null!=(f=null==(e=a.ih(d))?void 0:e.pc(olympe.dc.CloudObject.instancesRel,g=>g))?f:[]).map(g=>a.ih(g));return c.concat(d)},[])}
1503
+ function Tm(a,b){return Array.from(a.D.values()).some(c=>c.has(b))}function Hm(a){return Array.from(a.D.keys()).filter(b=>'__code-as-data__'!==b)}function Um(a,b){return q(function*(){yield a.init();if(b){var c,d=Array.from(null!=(c=a.D.get(b))?c:[]);a.D.delete(b);var e=Array.from(a.D.values()).reduce((f,g)=>{g.forEach(k=>f.add(k));return f},new Set);yield Vm(a.C,b);a.T.next(Hm(a));c=d.filter(f=>!e.has(f));yield Jm(a.C,c)}else yield Promise.all(Hm(a).map(f=>Um(a,f)))})}
1504
+ function Wm(a){if(!(2>a.length))for(let b=a.length-1;0<b;b--)for(let c=b-1;0<=c;c--)a[c].T(a[b])}
1505
+ function Xm(a,b,c){return q(function*(){var d=olympe.dc.Request.C.no;const e=olympe.dc.Request.C.Yq,f=olympe.dc.Request.C.Hr;a.V.debug('Sync Cache: Applying transaction patch to destination',c,b.ja());const g=Qm(b);a.V.debug(`Sync Cache: Found ${g.length} files to send`);yield Promise.all(g.map(k=>q(function*(){const l=k.tag();var m=k.Qe();if(k.$h())m=new olympe.dc.Request(e,c,{tag:l,model:m});else{const n=yield Ym(a.C,l);m=new olympe.dc.Request(f,c,{tag:l,model:m,content:n.content,mimeType:n.C})}if(!xd(a.Ka))throw Error('Lost connection, stop syncing');
1507
1506
  m=yield oh(a.kf,m);b.oh(l,new Map([[olympe.dm.File.urlProp.ka(),m]]))})));d=new olympe.dc.Request(d,c,new olympe.dc.transaction.rw(b,!1));if(!xd(a.Ka))throw Error('Lost connection, stop syncing');yield oh(a.kf,d)})}
1508
- function Ym(a,b,c){return c instanceof olympe.Y.errors.Nz||c instanceof olympe.Y.errors.cG?(a.V.error('Sync Cache: Timeout or Connection error',c),new olympe.dc.sources.cache.errors.rQ('The connection has been lost. It can happen when the application loose connectivity or when the remote server is not responding correctly',c.message)):c instanceof olympe.Y.errors.BK?(a.V.error(`Sync Cache: transaction has been rejected by ${b} data source`,c),new olympe.dc.sources.cache.errors.EU('The transaction has been rejected by the datasource',
1507
+ function Zm(a,b,c){return c instanceof olympe.Y.errors.Nz||c instanceof olympe.Y.errors.cG?(a.V.error('Sync Cache: Timeout or Connection error',c),new olympe.dc.sources.cache.errors.rQ('The connection has been lost. It can happen when the application loose connectivity or when the remote server is not responding correctly',c.message)):c instanceof olympe.Y.errors.BK?(a.V.error(`Sync Cache: transaction has been rejected by ${b} data source`,c),new olympe.dc.sources.cache.errors.EU('The transaction has been rejected by the datasource',
1509
1508
  c.message)):new olympe.dc.sources.cache.errors.QU('Synchronisation error',c.message)}
1510
- function Zm(){var a=olympe.dc.sources.Ej();if(a.W)return rxjs.throwError(()=>Error('Another synchronisation is in progress'));a.W=!0;a.V.info('Sync Cache: Start synchronising transactions');const b=new rxjs.BehaviorSubject([null,null]);(()=>q(function*(){yield a.init();const c=yield $m(a.C);let d=0;const e=Array.from(c.values()).reduce((f,g)=>f+g.length,0);0<e&&b.next([e,d]);for(const [f,g]of c){Vm(g);for(const k of g){a.V.debug(`Sync Cache: Processing patch ${d+1}/${e} (${k.ja()})`);try{yield Wm(a,
1511
- k,f),yield an(a.C,k)}catch(l){throw Ym(a,f,l);}d+=1;b.next([e,d])}}a.R=null}))().then(()=>{a.W=!1;b.complete()}).catch(c=>{b.error(c.message)}).finally(()=>{Nm(a).finally(()=>{a.W=!1})});return b.asObservable()}
1512
- function bn(){const a=olympe.dc.sources.Ej();return q(function*(){var b=new Set;const c={files:[],patches:[],version:a.version};var d=Pm(a.O);for(const e of d)b.has(e.tag())||(d=yield Xm(a.C,e.tag()),c.files.push({t:e.tag(),m:d.C,c:a.za.C(d.content)}),b.add(e.tag()));b=yield cn(a.C);c.patches.push(...b);return JSON.stringify(c)})}
1513
- function dn(a){const b=olympe.dc.sources.Ej();return q(function*(){let c;try{c=JSON.parse(a)}catch(e){throw Error('Invalid pending changes, must be a JSON string');}var d=c.files;if(!Array.isArray(c.patches)||!Array.isArray(d))throw Error('Invalid pending changes, must contain a `patches` array and a `files` array');for(const e of c.files)d=b.za.D(e.c),yield Rm(b.C,e.t,d,e.m);yield en(b.C,c.patches);yield Nm(b);b.Pa.lh(ph(b.O))})}
1514
- function fn(){const a=olympe.dc.sources.Ej();return q(function*(){yield gn(a.C);yield Nm(a)})}
1509
+ function $m(){var a=olympe.dc.sources.Ej();if(a.W)return rxjs.throwError(()=>Error('Another synchronisation is in progress'));a.W=!0;a.V.info('Sync Cache: Start synchronising transactions');const b=new rxjs.BehaviorSubject([null,null]);(()=>q(function*(){yield a.init();const c=yield an(a.C);let d=0;const e=Array.from(c.values()).reduce((f,g)=>f+g.length,0);0<e&&b.next([e,d]);for(const [f,g]of c){Wm(g);for(const k of g){a.V.debug(`Sync Cache: Processing patch ${d+1}/${e} (${k.ja()})`);try{yield Xm(a,
1510
+ k,f),yield bn(a.C,k)}catch(l){throw Zm(a,f,l);}d+=1;b.next([e,d])}}a.R=null}))().then(()=>{a.W=!1;b.complete()}).catch(c=>{b.error(c.message)}).finally(()=>{Om(a).finally(()=>{a.W=!1})});return b.asObservable()}
1511
+ function cn(){const a=olympe.dc.sources.Ej();return q(function*(){var b=new Set;const c={files:[],patches:[],version:a.version};var d=Qm(a.O);for(const e of d)b.has(e.tag())||(d=yield Ym(a.C,e.tag()),c.files.push({t:e.tag(),m:d.C,c:a.za.C(d.content)}),b.add(e.tag()));b=yield dn(a.C);c.patches.push(...b);return JSON.stringify(c)})}
1512
+ function en(a){const b=olympe.dc.sources.Ej();return q(function*(){let c;try{c=JSON.parse(a)}catch(e){throw Error('Invalid pending changes, must be a JSON string');}var d=c.files;if(!Array.isArray(c.patches)||!Array.isArray(d))throw Error('Invalid pending changes, must contain a `patches` array and a `files` array');for(const e of c.files)d=b.za.D(e.c),yield Sm(b.C,e.t,d,e.m);yield fn(b.C,c.patches);yield Om(b);b.Pa.lh(ph(b.O))})}
1513
+ function gn(){const a=olympe.dc.sources.Ej();return q(function*(){yield hn(a.C);yield Om(a)})}
1515
1514
  olympe.dc.sources.cache.Cache=class{constructor(a,b,c,d,e,f,g,k,l,m){this.V=a;this.kf=b;this.C=c;this.Pa=d;this.qc=e;this.Ka=f;this.Ha=g;this.za=k;this.version=m;this.ca=this.version!==this.Ha.get('__code-as-data-version__');this.sb=this.Oa=!1;this.D=new Map;this.T=new rxjs.BehaviorSubject([]);this.R=null;this.da=new rxjs.BehaviorSubject(!1);this.O=new olympe.dc.db.Rf;this.xb=this.ob=!1;this.ma=[];this.$=0;this.kc=new rxjs.BehaviorSubject(!1);this.status=new rxjs.BehaviorSubject({processing:!1});
1516
- this.W=!1;this.Eb=new rxjs.Subject;this.Pb=new olympe.oa.promise.kL(l)}jh(){return this.status.asObservable()}init(){const a=this;return q(function*(){if(!a.ob)if(a.xb)yield new Promise(b=>{a.ma.push(b)});else{a.xb=!0;(yield hn(a.C)).forEach(b=>{a.D.set(b.name,new Set(b.Ki))});a.T.next(Gm(a));yield Nm(a);a.Pa.lh(ph(a.O));for(const b of a.ma)b();a.ob=!0;a.ma=[]}})}executeQuery(a){const b=this;return q(function*(){yield b.init();return Sm(b,a.ja())&&Vj(a).some(c=>c instanceof olympe.dc.query.wb.ph)?
1517
- jn(b.C,a).then(olympe.oa.stream.HM):b.C.executeQuery(a).then(olympe.oa.stream.HM)})}applyTransaction(a,b){const c=this;return q(function*(){c.V.debug('Cache: apply transaction',a,b);yield c.init();const d=a.Zf(),e=Array.from(d.je.keys());let f,g;const k=Array.from(null!=(g=null==(f=c.R)?void 0:f.C.je.keys())?g:[]);let l;b!==(null==(l=c.R)?void 0:l.D)||e.some(m=>!k.includes(m))?(yield kn(c.C,d,b),c.R=new olympe.dc.sources.cache.pQ(d,b),c.da.next(!0)):(d.Wf(c.R.C),yield kn(c.C,c.R.C,b));d.Wf(c.O);yield Jm(c.C,
1518
- d,'local-transaction')})}uploadFileContent(a,b,c){const d=this;return q(function*(){yield d.init();yield Rm(d.C,a,b,c);return`offline://${a}`})}downloadFileContent(a){const b=this;return q(function*(){yield b.init();return Xm(b.C,a).then(c=>c.content)})}deleteFileContent(a){const b=this;return q(function*(){yield b.init();yield ln(b.C,[a])})}};olympe.dc.sources.cache.pQ=class{constructor(a,b){this.C=a;this.D=b}};olympe.dc.sources.cache.Cache.D='__code-as-data-version__';
1519
- olympe.dc.sources.cache.Cache.C='__code-as-data__';function hn(a){return q(function*(){return(yield a.db.O('buckets')).map(b=>olympe.dc.sources.cache.bw.ke(b))})}function Om(a){return q(function*(){return(yield a.db.O('pending-transactions')).map(b=>{b=olympe.dc.sources.cache.zt.ke(b);return Em(b.C)})})}
1520
- function Hm(a,b,c){return q(function*(){a.V.debug(`Offline DB: Adding query ${b} in bucket ${c}`);return a.db.C(()=>q(function*(){let d;const e=null!=(d=olympe.dc.sources.cache.bw.ke(yield a.db.get('buckets',c,{ud:!1})))?d:new olympe.dc.sources.cache.bw(c,[]);e.Ki.includes(b)||e.Ki.push(b);yield a.db.set('buckets',e.toJSON(),void 0,{ud:!1})}),{Bd:'addQueryIdInBucket',Nj:!0})})}
1521
- function Im(a,b,c=new Set){return q(function*(){return a.db.C(()=>q(function*(){var d=b.map(l=>a.db.da('instances','queryIds',l,{ud:!1})),e=yield Promise.all(d);d=new Map;const f=new Map,g=new Set(b);for(var k of e)for(const l of k.map(m=>olympe.dc.sources.cache.kk.ke(m)))e=l.tag,c.has(e)||d.has(e)||f.has(e)||(l.Ki=l.Ki.filter(m=>!g.has(m)),0===l.Ki.length?d.set(e,l):f.set(e,l.toJSON()));k=Array.from(d.keys());yield a.db.$('instances',f,{ud:!1});yield Promise.all([a.db.W('instances',k,{ud:!1}),ln(a,
1522
- k,{ud:!1})]);yield mn(a,d)}),{Bd:'releaseQueryId',Nj:!0})})}
1523
- function Jm(a,b,c){a.V.debug(`Offline DB: Apply patch ${b.ja()} on local offline db`);const d=Array.from(b.je.keys()),e=new olympe.dc.sources.cache.sH(a.V,c);return a.db.C(()=>a.db.T('instances',d,{ud:!1,pq:olympe.dc.sources.cache.kk.ke}).then(f=>{e.C=f;e.R.clear();b.Wf(e)}).then(()=>{const f=e.$;if(null===c&&0<f.size){const g=e.xg();return a.db.O('buckets',{ud:!1}).then(k=>{const l=k.map(olympe.dc.sources.cache.bw.ke).reduce((m,n)=>{'__code-as-data__'!==n.name&&n.Ki.forEach(p=>m.add(p));return m},
1524
- new Set);f.forEach(m=>{g.get(m).Ki.push(...l)})})}return Promise.resolve()}).then(()=>{const f=e.xg();return a.db.$('instances',f,{ud:!1,pq:g=>g.toJSON()})}).then(()=>q(function*(){const f=Array.from(e.R);if(0<f.length){const g=yield a.db.T('instances',f,{ud:!1,pq:olympe.dc.sources.cache.kk.ke});yield Promise.all([a.db.W('instances',f,{ud:!1}),ln(a,f,{ud:!1})]);yield mn(a,g)}})),{Bd:'Persist Patch',Nj:!0}).then(()=>{null===c&&(b.je.forEach((f,g)=>a.C.add(g)),a.O().then(()=>{}))})}
1525
- function Qm(a,b){return new Promise((c,d)=>{null!==a.files?c(a.files.has(b)):a.D.push(e=>{let f;return e?d(e):c(!(null==(f=a.files)||!f.has(b)))})})}function Rm(a,b,c,d){c=new olympe.dc.sources.cache.QC(b,c,d);a.files.add(b);return a.db.set('files',c.toJSON()).then(()=>{}).catch(e=>{a.files.delete(b);throw e;})}function Um(a,b){return q(function*(){return a.db.remove('buckets',b).then(()=>{})})}
1526
- function $m(a){return q(function*(){return(yield a.db.O('pending-transactions')).reduce((b,c)=>{c=olympe.dc.sources.cache.zt.ke(c);const d=c.D;let e;const f=null!=(e=b.get(d))?e:[];f.push(Em(c.C));b.set(d,f);return b},new Map)})}function an(a,b){return q(function*(){return a.db.remove('pending-transactions',b.ja()).then(()=>{})})}
1527
- function Xm(a,b){return q(function*(){const c=yield a.db.get('files',b);if(!c)throw Error(`File ${b} not found in offline cache database`);return olympe.dc.sources.cache.QC.ke(c)})}function cn(a){return q(function*(){return a.db.O('pending-transactions')})}function en(a,b){return q(function*(){const c=new Map;for(const d of b){const e=olympe.dc.sources.cache.zt.ke(d);e&&c.set(e.C.i,d)}yield a.db.$('pending-transactions',c)})}
1528
- function gn(a){return q(function*(){return a.db.clear('pending-transactions').then(()=>{})})}
1529
- function jn(a,b){return q(function*(){const c=b.Sd();a.V.debug(`Offline DB: Executing query ${b.ja()} by ID with source ${c}`);const d=olympe.dc.query.vi.Pw(b);var e=(yield a.db.da('instances','queryIds',b.ja())).map(f=>olympe.dc.sources.cache.kk.ke(f));for(const f of e){if(f.source!==c)continue;e=olympe.dc.sources.cache.qz.De(f);const g=nn(f.Ji);d.create(f.tag,e,g);for(const k of f.md)if(e=k.match(/^([a-z0-9]*)(<|>)([a-z0-9]*)$/)){const [,l,m,n]=e;e='<'===m;l===olympe.dc.Lf.sh&&!0===e||d.Qb(l,e?
1530
- n:f.tag,e?f.tag:n)}}a.V.C()&&a.V.debug(`Offline DB: Data result for query ${b.ja()}`,d.Zf().je.size,'instances',Array.from(d.Zf().Xh()).length,'relations');return d})}function kn(a,b,c){b=a.T.fb(b);a.V.debug(`save transaction in destination '${c}'`,JSON.stringify(b));return a.db.set('pending-transactions',(new olympe.dc.sources.cache.zt(c,b,Date.now())).toJSON())}function on(a){return q(function*(){return a.db.za('pending-transactions')})}
1531
- function ln(a,b,c){return q(function*(){b.forEach(d=>a.files.delete(d));yield a.db.W('files',b,c)})}
1532
- function mn(a,b){var c={ud:!1};return q(function*(){return 0===b.size?Promise.resolve():a.db.C(()=>q(function*(){var d=olympe.dc.Ib.ORIGIN;const e=olympe.dc.Ib.DESTINATION;a.V.debug(`Offline DB: Removing related relations of ${b.size} deleted instances`);var f=new Map;for(const g of b.values()){let k,l;for(const m of null!=(l=null==(k=g)?void 0:k.md)?l:[]){const n=m.substring(21);if(!b.has(n)){const p=`${m.substring(0,20)}${m.charAt(20)===d?e:d}${g.tag}`;let r;const t=null!=(r=f.get(n))?r:new Set;
1533
- t.add(p);f.set(n,t)}}}d=yield a.db.T('instances',Array.from(f.keys()),{ud:!1,pq:olympe.dc.sources.cache.kk.ke});for(const [g,k]of f.entries())(f=d.get(g))?f.md=f.md.filter(l=>!k.has(l)):(a.V.warn(`Instance ${g} not found when trying to remove related relations`),d.delete(g));yield a.db.$('instances',d,{ud:!1,pq:g=>g.toJSON()})}),{Bd:'removeRelatedRelations',ud:null==c?void 0:c.ud,Nj:!0})})}function nn(a){return Object.entries(a).reduce((b,[c,d])=>b.set(c,Em(d)),new Map)}
1515
+ this.W=!1;this.Eb=new rxjs.Subject;this.Pb=new olympe.oa.promise.kL(l)}jh(){return this.status.asObservable()}init(){const a=this;return q(function*(){if(!a.ob)if(a.xb)yield new Promise(b=>{a.ma.push(b)});else{a.xb=!0;(yield jn(a.C)).forEach(b=>{a.D.set(b.name,new Set(b.Ki))});a.T.next(Hm(a));yield Om(a);a.Pa.lh(ph(a.O));for(const b of a.ma)b();a.ob=!0;a.ma=[]}})}executeQuery(a){const b=this;return q(function*(){yield b.init();return Tm(b,a.ja())&&Wj(a).some(c=>c instanceof olympe.dc.query.wb.ph)?
1516
+ kn(b.C,a).then(olympe.oa.stream.HM):b.C.executeQuery(a).then(olympe.oa.stream.HM)})}applyTransaction(a,b){const c=this;return q(function*(){c.V.debug('Cache: apply transaction',a,b);yield c.init();const d=a.Zf(),e=Array.from(d.je.keys());let f,g;const k=Array.from(null!=(g=null==(f=c.R)?void 0:f.C.je.keys())?g:[]);let l;b!==(null==(l=c.R)?void 0:l.D)||e.some(m=>!k.includes(m))?(yield ln(c.C,d,b),c.R=new olympe.dc.sources.cache.pQ(d,b),c.da.next(!0)):(d.Wf(c.R.C),yield ln(c.C,c.R.C,b));d.Wf(c.O);yield Km(c.C,
1517
+ d,'local-transaction')})}uploadFileContent(a,b,c){const d=this;return q(function*(){yield d.init();yield Sm(d.C,a,b,c);return`offline://${a}`})}downloadFileContent(a){const b=this;return q(function*(){yield b.init();return Ym(b.C,a).then(c=>c.content)})}deleteFileContent(a){const b=this;return q(function*(){yield b.init();yield mn(b.C,[a])})}};olympe.dc.sources.cache.pQ=class{constructor(a,b){this.C=a;this.D=b}};olympe.dc.sources.cache.Cache.D='__code-as-data-version__';
1518
+ olympe.dc.sources.cache.Cache.C='__code-as-data__';function jn(a){return q(function*(){return(yield a.db.O('buckets')).map(b=>olympe.dc.sources.cache.bw.ke(b))})}function Pm(a){return q(function*(){return(yield a.db.O('pending-transactions')).map(b=>{b=olympe.dc.sources.cache.zt.ke(b);return Fm(b.C)})})}
1519
+ function Im(a,b,c){return q(function*(){a.V.debug(`Offline DB: Adding query ${b} in bucket ${c}`);return a.db.C(()=>q(function*(){let d;const e=null!=(d=olympe.dc.sources.cache.bw.ke(yield a.db.get('buckets',c,{ud:!1})))?d:new olympe.dc.sources.cache.bw(c,[]);e.Ki.includes(b)||e.Ki.push(b);yield a.db.set('buckets',e.toJSON(),void 0,{ud:!1})}),{Bd:'addQueryIdInBucket',Nj:!0})})}
1520
+ function Jm(a,b,c=new Set){return q(function*(){return a.db.C(()=>q(function*(){var d=b.map(l=>a.db.da('instances','queryIds',l,{ud:!1})),e=yield Promise.all(d);d=new Map;const f=new Map,g=new Set(b);for(var k of e)for(const l of k.map(m=>olympe.dc.sources.cache.kk.ke(m)))e=l.tag,c.has(e)||d.has(e)||f.has(e)||(l.Ki=l.Ki.filter(m=>!g.has(m)),0===l.Ki.length?d.set(e,l):f.set(e,l.toJSON()));k=Array.from(d.keys());yield a.db.$('instances',f,{ud:!1});yield Promise.all([a.db.W('instances',k,{ud:!1}),mn(a,
1521
+ k,{ud:!1})]);yield nn(a,d)}),{Bd:'releaseQueryId',Nj:!0})})}
1522
+ function Km(a,b,c){a.V.debug(`Offline DB: Apply patch ${b.ja()} on local offline db`);const d=Array.from(b.je.keys()),e=new olympe.dc.sources.cache.sH(a.V,c);return a.db.C(()=>a.db.T('instances',d,{ud:!1,pq:olympe.dc.sources.cache.kk.ke}).then(f=>{e.C=f;e.R.clear();b.Wf(e)}).then(()=>{const f=e.$;if(null===c&&0<f.size){const g=e.xg();return a.db.O('buckets',{ud:!1}).then(k=>{const l=k.map(olympe.dc.sources.cache.bw.ke).reduce((m,n)=>{'__code-as-data__'!==n.name&&n.Ki.forEach(p=>m.add(p));return m},
1523
+ new Set);f.forEach(m=>{g.get(m).Ki.push(...l)})})}return Promise.resolve()}).then(()=>{const f=e.xg();return a.db.$('instances',f,{ud:!1,pq:g=>g.toJSON()})}).then(()=>q(function*(){const f=Array.from(e.R);if(0<f.length){const g=yield a.db.T('instances',f,{ud:!1,pq:olympe.dc.sources.cache.kk.ke});yield Promise.all([a.db.W('instances',f,{ud:!1}),mn(a,f,{ud:!1})]);yield nn(a,g)}})),{Bd:'Persist Patch',Nj:!0}).then(()=>{null===c&&(b.je.forEach((f,g)=>a.C.add(g)),a.O().then(()=>{}))})}
1524
+ function Rm(a,b){return new Promise((c,d)=>{null!==a.files?c(a.files.has(b)):a.D.push(e=>{let f;return e?d(e):c(!(null==(f=a.files)||!f.has(b)))})})}function Sm(a,b,c,d){c=new olympe.dc.sources.cache.QC(b,c,d);a.files.add(b);return a.db.set('files',c.toJSON()).then(()=>{}).catch(e=>{a.files.delete(b);throw e;})}function Vm(a,b){return q(function*(){return a.db.remove('buckets',b).then(()=>{})})}
1525
+ function an(a){return q(function*(){return(yield a.db.O('pending-transactions')).reduce((b,c)=>{c=olympe.dc.sources.cache.zt.ke(c);const d=c.D;let e;const f=null!=(e=b.get(d))?e:[];f.push(Fm(c.C));b.set(d,f);return b},new Map)})}function bn(a,b){return q(function*(){return a.db.remove('pending-transactions',b.ja()).then(()=>{})})}
1526
+ function Ym(a,b){return q(function*(){const c=yield a.db.get('files',b);if(!c)throw Error(`File ${b} not found in offline cache database`);return olympe.dc.sources.cache.QC.ke(c)})}function dn(a){return q(function*(){return a.db.O('pending-transactions')})}function fn(a,b){return q(function*(){const c=new Map;for(const d of b){const e=olympe.dc.sources.cache.zt.ke(d);e&&c.set(e.C.i,d)}yield a.db.$('pending-transactions',c)})}
1527
+ function hn(a){return q(function*(){return a.db.clear('pending-transactions').then(()=>{})})}
1528
+ function kn(a,b){return q(function*(){const c=b.Sd();a.V.debug(`Offline DB: Executing query ${b.ja()} by ID with source ${c}`);const d=olympe.dc.query.vi.Pw(b);var e=(yield a.db.da('instances','queryIds',b.ja())).map(f=>olympe.dc.sources.cache.kk.ke(f));for(const f of e){if(f.source!==c)continue;e=olympe.dc.sources.cache.qz.De(f);const g=on(f.Ji);d.create(f.tag,e,g);for(const k of f.md)if(e=k.match(/^([a-z0-9]*)(<|>)([a-z0-9]*)$/)){const [,l,m,n]=e;e='<'===m;l===olympe.dc.Lf.sh&&!0===e||d.Qb(l,e?
1529
+ n:f.tag,e?f.tag:n)}}a.V.C()&&a.V.debug(`Offline DB: Data result for query ${b.ja()}`,d.Zf().je.size,'instances',Array.from(d.Zf().Xh()).length,'relations');return d})}function ln(a,b,c){b=a.T.fb(b);a.V.debug(`save transaction in destination '${c}'`,JSON.stringify(b));return a.db.set('pending-transactions',(new olympe.dc.sources.cache.zt(c,b,Date.now())).toJSON())}function pn(a){return q(function*(){return a.db.za('pending-transactions')})}
1530
+ function mn(a,b,c){return q(function*(){b.forEach(d=>a.files.delete(d));yield a.db.W('files',b,c)})}
1531
+ function nn(a,b){var c={ud:!1};return q(function*(){return 0===b.size?Promise.resolve():a.db.C(()=>q(function*(){var d=olympe.dc.Ib.ORIGIN;const e=olympe.dc.Ib.DESTINATION;a.V.debug(`Offline DB: Removing related relations of ${b.size} deleted instances`);var f=new Map;for(const g of b.values()){let k,l;for(const m of null!=(l=null==(k=g)?void 0:k.md)?l:[]){const n=m.substring(21);if(!b.has(n)){const p=`${m.substring(0,20)}${m.charAt(20)===d?e:d}${g.tag}`;let r;const t=null!=(r=f.get(n))?r:new Set;
1532
+ t.add(p);f.set(n,t)}}}d=yield a.db.T('instances',Array.from(f.keys()),{ud:!1,pq:olympe.dc.sources.cache.kk.ke});for(const [g,k]of f.entries())(f=d.get(g))?f.md=f.md.filter(l=>!k.has(l)):(a.V.warn(`Instance ${g} not found when trying to remove related relations`),d.delete(g));yield a.db.$('instances',d,{ud:!1,pq:g=>g.toJSON()})}),{Bd:'removeRelatedRelations',ud:null==c?void 0:c.ud,Nj:!0})})}function on(a){return Object.entries(a).reduce((b,[c,d])=>b.set(c,Fm(d)),new Map)}
1534
1533
  olympe.dc.sources.cache.qz=class{constructor(a,b,c){this.R=`Olympe_Cache_${a}`;this.V=b;this.T=new olympe.dc.sources.cache.rH;this.db=c.D(this.R,1,d=>{var e=(m,n)=>{d.objectStoreNames.contains(m)&&d.deleteObjectStore(m);return d.createObjectStore(m,null!=n?n:void 0)};const f=e('instances',{keyPath:'tag'});f.createIndex('relations','relations',{multiEntry:!0});f.createIndex('queryIds','queryIds',{multiEntry:!0});const g=e('buckets',{keyPath:'name'});g.createIndex('queryIds','queryIds',{multiEntry:!0});
1535
1534
  const k=e('pending-transactions',{keyPath:'patch.i'});k.createIndex('destination','destination');const l=e('failed-transactions',{keyPath:'timestamp'});e=e('files',{keyPath:'tag'});return Promise.all([f,g,k,l,e].map(m=>new Promise((n,p)=>{m.transaction.oncomplete=()=>n();m.transaction.onerror=()=>p(m.transaction.error)}))).then(()=>{})});this.C=new Set;this.D=[];this.files=null;this.db.Pa('files').then(d=>{this.files=new Set(d);this.D.forEach(e=>e(null))}).catch(d=>{this.D.forEach(e=>e(d))});this.O=
1536
- olympe.oa.Promise.dA(()=>{const d=this;return q(function*(){if(!(0===d.C.size||0<(yield on(d))))if(0<d.db.Ka())d.O().then(()=>{}),d.V.debug('Offline DB GC: Postponing round while the stack is busy');else{d.V.debug(`Offline DB GC: Round with ${d.C.size} candidates`);var e=Date.now();yield d.db.C(()=>{const f=new Map;return d.db.T('instances',Array.from(d.C),{ud:!1}).then(g=>{for(const k of g.values()){g=olympe.dc.sources.cache.kk.ke(k);let l;0===(null==(l=g)?void 0:l.Ki.length)&&(d.V.debug(`Offline DB GC: Garbage collecting ${g.tag}`),
1537
- f.set(g.tag,g))}}).then(()=>q(function*(){if(0<f.size){const g=Array.from(f.keys());yield Promise.all([d.db.W('instances',g,{ud:!1}),ln(d,g,{ud:!1})]);yield mn(d,f)}}))},{Bd:'garbageCollector',Nj:!0}).then(()=>{});d.V.debug(`Offline DB GC: has taken ${Date.now()-e}ms to run`)}})},5E3)}static De(a){const b=new RegExp(`^(${olympe.dc.Lf.sh})>([a-z0-9]*)$`);for(const c of a.md)if(a=c.match(b))return a[2];return null}executeQuery(a){const b=this;return q(function*(){const c=Date.now();b.V.debug(`Offline DB: Executing query ${a.ja()} with source ${a.Sd()}`);
1538
- const d=olympe.dc.query.vi.Pw(a),e=a.Sd();var f=yield b.db.get('instances',a.D),g=olympe.dc.sources.cache.kk.ke(f);if(!g)return d;f=new Map;const k=new Set([g.tag]);d.create(g.tag,olympe.dc.sources.cache.qz.De(g),nn(g.Ji));for(const p of Vj(a))if(p instanceof olympe.dc.query.wb.Ht){var l=p.relation;g=l.zc()===olympe.dc.Ib.ORIGIN;const r=l.ka(),t=l.fe();l=new Set;f.set(p.ja(),l);const u=[f.has(p.C)?new Set(f.get(p.C)):new Set([a.D])];for(const v of u){const w=new Map;var m=yield Promise.all(Array.from(v).map(x=>
1535
+ olympe.oa.Promise.dA(()=>{const d=this;return q(function*(){if(!(0===d.C.size||0<(yield pn(d))))if(0<d.db.Ka())d.O().then(()=>{}),d.V.debug('Offline DB GC: Postponing round while the stack is busy');else{d.V.debug(`Offline DB GC: Round with ${d.C.size} candidates`);var e=Date.now();yield d.db.C(()=>{const f=new Map;return d.db.T('instances',Array.from(d.C),{ud:!1}).then(g=>{for(const k of g.values()){g=olympe.dc.sources.cache.kk.ke(k);let l;0===(null==(l=g)?void 0:l.Ki.length)&&(d.V.debug(`Offline DB GC: Garbage collecting ${g.tag}`),
1536
+ f.set(g.tag,g))}}).then(()=>q(function*(){if(0<f.size){const g=Array.from(f.keys());yield Promise.all([d.db.W('instances',g,{ud:!1}),mn(d,g,{ud:!1})]);yield nn(d,f)}}))},{Bd:'garbageCollector',Nj:!0}).then(()=>{});d.V.debug(`Offline DB GC: has taken ${Date.now()-e}ms to run`)}})},5E3)}static De(a){const b=new RegExp(`^(${olympe.dc.Lf.sh})>([a-z0-9]*)$`);for(const c of a.md)if(a=c.match(b))return a[2];return null}executeQuery(a){const b=this;return q(function*(){const c=Date.now();b.V.debug(`Offline DB: Executing query ${a.ja()} with source ${a.Sd()}`);
1537
+ const d=olympe.dc.query.vi.Pw(a),e=a.Sd();var f=yield b.db.get('instances',a.D),g=olympe.dc.sources.cache.kk.ke(f);if(!g)return d;f=new Map;const k=new Set([g.tag]);d.create(g.tag,olympe.dc.sources.cache.qz.De(g),on(g.Ji));for(const p of Wj(a))if(p instanceof olympe.dc.query.wb.Ht){var l=p.relation;g=l.zc()===olympe.dc.Ib.ORIGIN;const r=l.ka(),t=l.fe();l=new Set;f.set(p.ja(),l);const u=[f.has(p.C)?new Set(f.get(p.C)):new Set([a.D])];for(const v of u){const w=new Map;var m=yield Promise.all(Array.from(v).map(x=>
1539
1538
  {if(!k.has(x))return b.V.warn(`Offline DB: Instance ${x} not found while processing query part, this should not happen`),Promise.resolve([]);const y=`${t.ka()}${t.zc()}${x}`;return b.db.da('instances','relations',y,{ud:!0}).then(A=>A.map(H=>olympe.dc.sources.cache.kk.ke(H))).then(A=>{w.set(x,A)})})).then(()=>w);for(const [x,y]of m){p instanceof olympe.dc.query.wb.Mk&&p.O&&l.add(x);for(const A of y)if(m=A.tag,A.source===e){if(p instanceof olympe.dc.query.wb.Mk&&!l.has(m)){var n=u[u.length-1];n||(n=
1540
- new Set,u.push(n));n.add(m)}l.add(m);k.has(m)||(k.add(m),n=olympe.dc.sources.cache.qz.De(A),d.create(m,n,nn(A.Ji)));r===olympe.dc.Lf.sh&&!0===g||d.Qb(r,g?m:x,g?x:m)}}}}else p instanceof olympe.dc.query.wb.ph&&b.V.warn(`Offline DB: Trying to execute a query ${a.ja()} on the Cache DB that contains a FollowRule part. This is not supported and designed not to happen.`);b.V.C()&&(b.V.debug(`Offline DB: Data result for query ${a.ja()}`,d.Zf().je.size,'instances',Array.from(d.Zf().Xh()).length,'relations'),
1539
+ new Set,u.push(n));n.add(m)}l.add(m);k.has(m)||(k.add(m),n=olympe.dc.sources.cache.qz.De(A),d.create(m,n,on(A.Ji)));r===olympe.dc.Lf.sh&&!0===g||d.Qb(r,g?m:x,g?x:m)}}}}else p instanceof olympe.dc.query.wb.ph&&b.V.warn(`Offline DB: Trying to execute a query ${a.ja()} on the Cache DB that contains a FollowRule part. This is not supported and designed not to happen.`);b.V.C()&&(b.V.debug(`Offline DB: Data result for query ${a.ja()}`,d.Zf().je.size,'instances',Array.from(d.Zf().Xh()).length,'relations'),
1541
1540
  b.V.debug(`Offline DB: Data result for query ${a.ja()} took ${Date.now()-c}ms to be executed`));return d})}};olympe.dc.sources.cache.bw=class{constructor(a,b){this.name=a;this.Ki=b}static ke(a){return a?new olympe.dc.sources.cache.bw(a.name,a.queryIds):null}toJSON(){return{name:this.name,queryIds:this.Ki}}};
1542
1541
  olympe.dc.sources.cache.kk=class{constructor(a,b,c,d,e){this.tag=a;this.source=b;this.Ji=null!=c?c:{};this.md=null!=d?d:[];this.Ki=null!=e?e:[]}static ke(a){return a?new olympe.dc.sources.cache.kk(a.tag,a.source,a.props,a.relations,a.queryIds):null}toJSON(){return{tag:this.tag,source:this.source,props:this.Ji,relations:this.md,queryIds:this.Ki}}};
1543
1542
  olympe.dc.sources.cache.zt=class{constructor(a,b,c){this.D=a;this.C=b;this.timestamp=c}static ke(a){return a?new olympe.dc.sources.cache.zt(a.destination,a.patch,a.timestamp):null}toJSON(){return{destination:this.D,patch:this.C,timestamp:this.timestamp}}};
1544
1543
  olympe.dc.sources.cache.pT=class extends olympe.dc.sources.cache.zt{constructor(a,b,c,d){super(a,b,c);this.error=d}static ke(a){return a?new olympe.dc.sources.cache.pT(a.destination,a.patch,a.timestamp,a.error):null}toJSON(){return{destination:this.D,patch:this.C,timestamp:this.timestamp,error:this.error}}};
1545
- olympe.dc.sources.cache.QC=class{constructor(a,b,c){this.tag=a;this.content=b;this.C=c}static ke(a){return a?new olympe.dc.sources.cache.QC(a.tag,a.content,a.mimetype):null}toJSON(){return{tag:this.tag,content:this.content,mimetype:this.C}}};function pn(a,b){let c=a.W.get(b);c||(c=new Set(a.C.get(b).md),a.W.set(b,c));return c}
1544
+ olympe.dc.sources.cache.QC=class{constructor(a,b,c){this.tag=a;this.content=b;this.C=c}static ke(a){return a?new olympe.dc.sources.cache.QC(a.tag,a.content,a.mimetype):null}toJSON(){return{tag:this.tag,content:this.content,mimetype:this.C}}};function qn(a,b){let c=a.W.get(b);c||(c=new Set(a.C.get(b).md),a.W.set(b,c));return c}
1546
1545
  olympe.dc.sources.cache.sH=class{constructor(a,b){this.V=a;this.O=b;this.C=new Map;this.R=new Set;this.$=new Set;this.T=new olympe.dc.sources.cache.rH;this.W=new Map}xg(){this.R.forEach(a=>this.C.delete(a));Array.from(this.C.entries()).forEach(([a,b])=>{b||this.C.delete(a)});return this.C}yf(a,b,c){const d=this.C.get(a);d||this.$.add(a);var e;c=Array.from(null!=c?c:[]).reduce((k,l)=>{k[l[0]]=this.T.fb(l[1]);return k},null!=(e=null==d?void 0:d.Ji)?e:{});let f;e=null!=(f=null==d?void 0:d.Ki)?f:[];null===
1547
1546
  this.O||e.includes(this.O)||e.push(this.O);let g;b=new olympe.dc.sources.cache.kk(a,b,c,null!=(g=null==d?void 0:d.md)?g:[],e);this.C.set(a,b)}oh(a,b){const c=this.C.get(a);if(c){var d;c.Ji=Array.from(b).reduce((e,[f,g])=>{null===g?delete e[f]:e[f]=this.T.fb(g);return e},null!=(d=c.Ji)?d:{})}else this.V.warn(`Trying to update an instance (${a}) which do not exists in the cache database: ignoring.`)}D(a){this.R.add(a)}Qb(a,b,c){var d;const e=null!=(d=this.C.get(b))?d:new olympe.dc.sources.cache.kk(b,
1548
- 'unknown',{},[],[]);var f;d=null!=(f=this.C.get(c))?f:new olympe.dc.sources.cache.kk(c,'unknown',{},[],[]);b=`${a}${olympe.dc.Ib.ORIGIN}${b}`;f=(g,k)=>{this.C.set(g.tag,g);const l=pn(this,g.tag);l.has(k)||(g.md.push(k),l.add(k));null===this.O||g.Ki.includes(this.O)||g.Ki.push(this.O)};f(e,`${a}${olympe.dc.Ib.DESTINATION}${c}`);f(d,b)}Xf(a,b,c){const d=this.C.get(b),e=this.C.get(c);c=`${a}${olympe.dc.Ib.DESTINATION}${c}`;a=`${a}${olympe.dc.Ib.ORIGIN}${b}`;b=(f,g)=>{const k=pn(this,f.tag);if(k.has(g)){const l=
1549
- f.md.indexOf(g);f.md.splice(l,1);k.delete(g)}};d&&b(d,c);e&&b(e,a)}};olympe.dc.sources.cache.sH.Aa=[olympe.dc.Ut];olympe.dc.transaction={};olympe.dc.yv=class a{constructor(b,c){this.id=null!=b?b:olympe.oa.bf();this.D=new olympe.j.ee('BurstTransaction#'+this.id,c);this.Oa=qn(this);this.W=!1;this.D.onDestroy(()=>this.T());this.$=new Set;this.O=new Map;this.R=new Set;this.C=null;let d;this.Ha=null!=(d=olympe.sa.getParameter(olympe.dc.transaction.pa.FF))?d:30;this.ma=[]}static C(b,c){return`${b},${c}`}sb(b){for(const c of this.ma)c(b);this.stop()}Pa(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.da(this.R);0<b.size&&rn(this,
1547
+ 'unknown',{},[],[]);var f;d=null!=(f=this.C.get(c))?f:new olympe.dc.sources.cache.kk(c,'unknown',{},[],[]);b=`${a}${olympe.dc.Ib.ORIGIN}${b}`;f=(g,k)=>{this.C.set(g.tag,g);const l=qn(this,g.tag);l.has(k)||(g.md.push(k),l.add(k));null===this.O||g.Ki.includes(this.O)||g.Ki.push(this.O)};f(e,`${a}${olympe.dc.Ib.DESTINATION}${c}`);f(d,b)}Xf(a,b,c){const d=this.C.get(b),e=this.C.get(c);c=`${a}${olympe.dc.Ib.DESTINATION}${c}`;a=`${a}${olympe.dc.Ib.ORIGIN}${b}`;b=(f,g)=>{const k=qn(this,f.tag);if(k.has(g)){const l=
1548
+ f.md.indexOf(g);f.md.splice(l,1);k.delete(g)}};d&&b(d,c);e&&b(e,a)}};olympe.dc.sources.cache.sH.Aa=[olympe.dc.Ut];olympe.dc.transaction={};olympe.dc.yv=class a{constructor(b,c){this.id=null!=b?b:olympe.oa.bf();this.D=new olympe.j.ee('BurstTransaction#'+this.id,c);this.Oa=rn(this);this.W=!1;this.D.onDestroy(()=>this.T());this.$=new Set;this.O=new Map;this.R=new Set;this.C=null;let d;this.Ha=null!=(d=olympe.sa.getParameter(olympe.dc.transaction.pa.FF))?d:30;this.ma=[]}static C(b,c){return`${b},${c}`}sb(b){for(const c of this.ma)c(b);this.stop()}Pa(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.da(this.R);0<b.size&&sn(this,
1550
1549
  b,!1);this.R.clear()}da(b){const c=new Map;b.forEach(d=>{const e=d.split(',');let f=c.get(e[0]);void 0===f&&(f=new Map,c.set(e[0],f));f.set(e[1],this.O.get(d))});return c}ca(b,c,d){this.za(b,c,d);this.Oa(b,c,d);null===this.C&&(this.C=setTimeout(this.Pa.bind(this),this.Ha))}za(b,c,d){b=a.C(b,c);this.O.set(b,d);this.R.add(b)}Ka(b,c){return this.O.get(a.C(b,c))}push(b,c){const d=olympe.dc.Ya(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.Ya(f),this.Ka(d,e)!==g&&this.ca(d,e,g.valueOf())});this.$.add(b)}complete(){return new Promise((b,
1551
1550
  c)=>{this.T((d,e)=>{for(const f of this.$)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.Ya(b),f=olympe.dc.Ya(c);void 0===e||void 0===f?olympe.gb.Cb('dc').error('Burst transaction: instance tag or property tag is undefined'):(this.D.run(()=>{olympe.j.Fl([d],g=>{this.W=!0;if(g instanceof olympe.dc.Kf)olympe.gb.Cb('dc').error('Cannot send complex property values in burst transactions');else{var k;this.ca(e,f,null!=(k=null==g?void 0:g.valueOf())?k:null)}})}),this.D.Ve(()=>{this.T()}))}stop(){this.D.destroy();
1552
- this.ma.length=0}getContext(){return this.D}ja(){return this.id}fs(){return!1}T(b){if(this.W){this.W=!1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.R.clear();const c=this.da(new Set(this.O.keys()));rn(this,c,!0,b)}else null==b||b(!0)}toString(){return'Burst transaction #'+this.id}};olympe.dc.yv.prototype.complete=olympe.dc.yv.prototype.complete;olympe.dc.yv.prototype.push=olympe.dc.yv.prototype.push;olympe.dc.eh=class{C(){}toString(){}};olympe.dc.eh.C=1;olympe.dc.eh.D=2;olympe.dc.eh.R=3;olympe.dc.eh.O=4;olympe.dc.eh.T=5;olympe.dc.transaction.cw=class a{constructor(b){this.O=null!=b?b:olympe.dc.Jc.SERVER}static C(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;let f=typeof e;20<b.length&&b.startsWith('fd')&&(b=olympe.dc.li.sj+b.substring(2));'object'===f&&(f=e&&e.c?String(e.c):'untyped');switch(f){case '1':case '2':case '3':throw Error('Complex format for primitive types not supported.');case 'string':case 'boolean':case 'number':c.set(b,e);break;case '4':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d,e.h,e.m,
1551
+ this.ma.length=0}getContext(){return this.D}ja(){return this.id}fs(){return!1}T(b){if(this.W){this.W=!1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.R.clear();const c=this.da(new Set(this.O.keys()));sn(this,c,!0,b)}else null==b||b(!0)}toString(){return'Burst transaction #'+this.id}};olympe.dc.yv.prototype.complete=olympe.dc.yv.prototype.complete;olympe.dc.yv.prototype.push=olympe.dc.yv.prototype.push;olympe.dc.eh=class{C(){}toString(){}};olympe.dc.eh.C=1;olympe.dc.eh.D=2;olympe.dc.eh.R=3;olympe.dc.eh.O=4;olympe.dc.eh.T=5;olympe.dc.transaction.cw=class a{constructor(b){this.O=null!=b?b:olympe.dc.Jc.SERVER}static C(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;let f=typeof e;20<b.length&&b.startsWith('fd')&&(b=olympe.dc.li.sj+b.substring(2));'object'===f&&(f=e&&e.c?String(e.c):'untyped');switch(f){case '1':case '2':case '3':throw Error('Complex format for primitive types not supported.');case 'string':case 'boolean':case 'number':c.set(b,e);break;case '4':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d,e.h,e.m,
1553
1552
  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&&e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.j.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Kf(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}C(b,c){return this.D(b,new olympe.dc.db.Rf(c))}D(b,c){for(const d of b)switch(d.o){case olympe.dc.eh.C:b=a.C(d.p||{});let e;c.yf(d.t,null!=(e=d.s)?e:this.O,b,d.m);break;case olympe.dc.eh.D:c.oh(d.t,
1554
- a.C(d.p),d.m);break;case olympe.dc.eh.R:c.D(d.t,d.f,d.m);break;case olympe.dc.eh.O:c.Qb(d.m,d.l,d.r,d.lm,d.rm);break;case olympe.dc.eh.T:c.Xf(d.m,d.l,d.r,d.lm,d.rm);break;default:throw Error('Undefined patch operation: '+d.o);}return c}};function sn(a,b){let c;return null!=(c=a.sources.get(b))?c:a.R.Em(b)}function tn(a,b){let c,d,e;return null!=(e=null!=(d=null==(c=a.C.ih(b))?void 0:c.Qe())?d:a.db.model(b))?e:null}function un(a,b){let c;return null!=(c=a.O.get(b))?c:a.db.Bl(b)||!a.db.tc(b)}function vn(a,b){0===a.O.size?a.O=b:b.forEach((c,d)=>a.O.set(d,c))}function wn(a){return Array.from(a.C.xg()).filter(b=>!b.$h()).map(b=>b.tag())}function xn(a){return Array.from(a.C.xg()).filter(b=>b.$h()).map(b=>b.tag())}
1555
- function yn(a,b,c,d){d(a.C);c&&!a.T&&b!==olympe.dc.Jc.SELF&&(c=a.D.get(b),c||(c=new olympe.dc.db.Rf(a.id),a.D.set(b,c)),d(c))}function zn(a,b,c){const d=sn(a,b),e=un(a,b),f=tn(a,b);yn(a,d,e,g=>{g.D(b,c,f)})}
1556
- olympe.dc.transaction.BT=class{constructor(a,b,c){this.id=null!=c?c:olympe.oa.bf();this.R=b;this.db=a;this.D=new Map;this.C=new olympe.dc.db.Rf(this.id);this.sources=new Map;this.O=new Map;this.T=!1}Fi(){return 0===this.C.je.size}Qc(){return this.D.size}yf(a,b,c,d){let e;const f=null!=(e=null!=c?c:this.sources.get(a))?e:this.R.fromModel(b);c=un(this,a);this.sources.set(a,f);yn(this,f,c,g=>{g.yf(a,f,d,b)})}oh(a,b){const c=sn(this,a),d=un(this,a),e=tn(this,a);yn(this,c,d,f=>{f.oh(a,null!=b?b:new Map,
1557
- e)})}Qb(a,b,c){const d=sn(this,b),e=sn(this,c);var f=un(this,b)&&un(this,c)&&d!==olympe.dc.Jc.SELF&&e!==olympe.dc.Jc.SELF;f&&d!==e&&a!==olympe.dc.Lf.sh&&(f=g=>{let k;return null!=(k=olympe.dc.eb().name(g))?k:g},olympe.gb.Cb('dc').warn(`Try to create a relation between 2 objects that have different locations: \n ${f(b)} (${b})-[${f(a)} (${a})]->${f(c)} (${c}), originSrc: ${f(d)} (${d}), destinationSrc: ${f(e)} (${e})`),f=!1);yn(this,d,f,g=>{g.Qb(a,b,c,tn(this,b),tn(this,c))})}Xf(a,b,c){const d=sn(this,
1558
- b),e=sn(this,c);let f=un(this,b)&&un(this,c)&&d!==olympe.dc.Jc.SELF&&e!==olympe.dc.Jc.SELF;f&&d!==e&&a!==olympe.dc.Lf.sh&&(olympe.gb.Cb('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);yn(this,d,f,g=>{g.Xf(a,b,c,tn(this,b),tn(this,c))})}};function An(a,b,c){const d=Object.create(null);if(!b)return d;for(const f of Array.from(b.keys()).sort()){let g=f;var e=b.get(f);if(g===olympe.dc.HH.RK)if(e===olympe.dc.Jc.SELF)d[g]=olympe.dc.eb().ja();else{if(e===olympe.dc.Jc.SERVER)continue}else g.startsWith(olympe.dc.li.sj)&&(g='fd'+g.substring(1));e=a.W(e);c&&e instanceof Object&&8===e.c?a.T.set(g,e):d[g]=e}return d}function Bn(a){if(0===a.T.size)return null;const b=Object.create(null);a.T.forEach((c,d)=>{b[d]=c});a.T.clear();return b}
1559
- class Cn{constructor(){this.T=new Map}W(a){return a instanceof olympe.j.kb||a instanceof olympe.j.ia||a instanceof olympe.j.aa?a.valueOf():a instanceof Date||a instanceof olympe.j.ac?(a=a instanceof olympe.j.ac?a.valueOf():a,{c:4,y:a.getUTCFullYear(),M:a.getUTCMonth()+1,d:a.getUTCDate(),h:a.getUTCHours(),m:a.getUTCMinutes(),s:a.getUTCSeconds(),S:a.getUTCMilliseconds(),z:0}):a instanceof olympe.j.Color?{c:7,r:a.Al().valueOf(),g:a.zl().valueOf(),b:a.ol().valueOf(),a:a.nl().valueOf()}:a&&'function'===
1553
+ a.C(d.p),d.m);break;case olympe.dc.eh.R:c.D(d.t,d.f,d.m);break;case olympe.dc.eh.O:c.Qb(d.m,d.l,d.r,d.lm,d.rm);break;case olympe.dc.eh.T:c.Xf(d.m,d.l,d.r,d.lm,d.rm);break;default:throw Error('Undefined patch operation: '+d.o);}return c}};function tn(a,b){let c;return null!=(c=a.sources.get(b))?c:a.R.Em(b)}function un(a,b){let c,d,e;return null!=(e=null!=(d=null==(c=a.C.ih(b))?void 0:c.Qe())?d:a.db.model(b))?e:null}function vn(a,b){let c;return null!=(c=a.O.get(b))?c:a.db.Bl(b)||!a.db.tc(b)}function wn(a,b){0===a.O.size?a.O=b:b.forEach((c,d)=>a.O.set(d,c))}function xn(a){return Array.from(a.C.xg()).filter(b=>!b.$h()).map(b=>b.tag())}function yn(a){return Array.from(a.C.xg()).filter(b=>b.$h()).map(b=>b.tag())}
1554
+ function zn(a,b,c,d){d(a.C);c&&!a.T&&b!==olympe.dc.Jc.SELF&&(c=a.D.get(b),c||(c=new olympe.dc.db.Rf(a.id),a.D.set(b,c)),d(c))}function An(a,b,c){const d=tn(a,b),e=vn(a,b),f=un(a,b);zn(a,d,e,g=>{g.D(b,c,f)})}
1555
+ olympe.dc.transaction.BT=class{constructor(a,b,c){this.id=null!=c?c:olympe.oa.bf();this.R=b;this.db=a;this.D=new Map;this.C=new olympe.dc.db.Rf(this.id);this.sources=new Map;this.O=new Map;this.T=!1}Fi(){return 0===this.C.je.size}Qc(){return this.D.size}yf(a,b,c,d){let e;const f=null!=(e=null!=c?c:this.sources.get(a))?e:this.R.fromModel(b);c=vn(this,a);this.sources.set(a,f);zn(this,f,c,g=>{g.yf(a,f,d,b)})}oh(a,b){const c=tn(this,a),d=vn(this,a),e=un(this,a);zn(this,c,d,f=>{f.oh(a,null!=b?b:new Map,
1556
+ e)})}Qb(a,b,c){const d=tn(this,b),e=tn(this,c);var f=vn(this,b)&&vn(this,c)&&d!==olympe.dc.Jc.SELF&&e!==olympe.dc.Jc.SELF;f&&d!==e&&a!==olympe.dc.Lf.sh&&(f=g=>{let k;return null!=(k=olympe.dc.eb().name(g))?k:g},olympe.gb.Cb('dc').warn(`Try to create a relation between 2 objects that have different locations: \n ${f(b)} (${b})-[${f(a)} (${a})]->${f(c)} (${c}), originSrc: ${f(d)} (${d}), destinationSrc: ${f(e)} (${e})`),f=!1);zn(this,d,f,g=>{g.Qb(a,b,c,un(this,b),un(this,c))})}Xf(a,b,c){const d=tn(this,
1557
+ b),e=tn(this,c);let f=vn(this,b)&&vn(this,c)&&d!==olympe.dc.Jc.SELF&&e!==olympe.dc.Jc.SELF;f&&d!==e&&a!==olympe.dc.Lf.sh&&(olympe.gb.Cb('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);zn(this,d,f,g=>{g.Xf(a,b,c,un(this,b),un(this,c))})}};function Bn(a,b,c){const d=Object.create(null);if(!b)return d;for(const f of Array.from(b.keys()).sort()){let g=f;var e=b.get(f);if(g===olympe.dc.HH.RK)if(e===olympe.dc.Jc.SELF)d[g]=olympe.dc.eb().ja();else{if(e===olympe.dc.Jc.SERVER)continue}else g.startsWith(olympe.dc.li.sj)&&(g='fd'+g.substring(1));e=a.W(e);c&&e instanceof Object&&8===e.c?a.T.set(g,e):d[g]=e}return d}function Cn(a){if(0===a.T.size)return null;const b=Object.create(null);a.T.forEach((c,d)=>{b[d]=c});a.T.clear();return b}
1558
+ class Dn{constructor(){this.T=new Map}W(a){return a instanceof olympe.j.kb||a instanceof olympe.j.ia||a instanceof olympe.j.aa?a.valueOf():a instanceof Date||a instanceof olympe.j.ac?(a=a instanceof olympe.j.ac?a.valueOf():a,{c:4,y:a.getUTCFullYear(),M:a.getUTCMonth()+1,d:a.getUTCDate(),h:a.getUTCHours(),m:a.getUTCMinutes(),s:a.getUTCSeconds(),S:a.getUTCMilliseconds(),z:0}):a instanceof olympe.j.Color?{c:7,r:a.Al().valueOf(),g:a.zl().valueOf(),b:a.ol().valueOf(),a:a.nl().valueOf()}:a&&'function'===
1560
1559
  typeof a.ka?{c:8,t:a.ka()}:a}}function zh(a){const b=a.R.concat(a.O).concat(a.T).concat(a.C).concat(a.W);a.T=[];a.O=[];a.C=[];a.W=[];a.R=[];return b}
1561
- olympe.dc.transaction.Xk=class{constructor({XA:a=!1,bu:b=!0,mk:c=!0}={}){this.T=[];this.O=[];this.C=[];this.W=[];this.R=[];this.XA=null!=a?a:!1;this.mk=null!=c?c:!0;this.bu=null!=b?b:!0;this.$=olympe.j?new Cn:new class extends Cn{W(d){return d&&'function'===typeof d.ka?{c:8,t:d.ka()}:d}}}flush(){return JSON.stringify(zh(this))}yf(a,b,c,d=null){c=An(this.$,null!=c?c:null,this.XA);c={o:olympe.dc.eh.C,t:a,p:c};this.bu&&(c.s=b);this.mk&&d&&(c.m=d);this.T.push(c);this.XA&&(b=Bn(this.$))&&this.C.push({o:olympe.dc.eh.D,
1562
- t:a,p:b})}oh(a,b,c=null){b=An(this.$,b||null,!1);a={o:olympe.dc.eh.D,t:a,p:b};this.mk&&c&&(a.m=c);this.C.push(a)}D(a,b,c=null){a={o:olympe.dc.eh.R,t:a,f:b};this.mk&&c&&(a.m=c);this.O.push(a)}Qb(a,b,c,d=null,e=null){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);a={o:olympe.dc.eh.O,m:a,l:b,r:c};this.mk&&d&&(a.lm=d);this.mk&&
1563
- e&&(a.rm=e);this.W.push(a)}Xf(a,b,c,d=null,e=null){if(!a)throw Error('Cannot delete relation of undefined type');if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');a={o:olympe.dc.eh.T,m:a,l:b,r:c};this.mk&&d&&(a.lm=d);this.mk&&e&&(a.rm=e);this.R.push(a)}};olympe.dc.transaction.Xk.Aa=[olympe.dc.Ut];function Dn(a){var b=new olympe.dc.Tc;b.$=a;return b}function En(a,b){b instanceof olympe.dc.Tc&&b.D.forEach((c,d)=>a.D.set(d,c));a.$b.push(b);return b}function Fn(){var a=new olympe.dc.Tc;a.da=!0;return a}
1564
- function Gn(a,b,c,d){c=a.create(null!=c?c:olympe.dc.CloudObject,void 0);if('string'===typeof b)b=b||'',Z(c,olympe.dc.CloudObject.nameProp.ka(),b);else for(const [f,g]of Object.entries(b))Z(c,f,g);b=c.ka();d=null!=d?d:olympe.dc.CloudObject;const e=olympe.dc.CloudObject.extendRel.ka();En(a,new olympe.dc.transaction.$b.vG(e,b));En(a,new olympe.dc.transaction.$b.OB(e,b,d));return c}
1565
- function Hn(a,b){if(a.R)throw Error('Operation not permitted: this transaction has already been executed');a.R=!0;const c=[d=>{a.R=d},...a.ca,null!=b?b:()=>{}];return(d,e)=>{c.forEach(f=>f(d,e))}}
1566
- olympe.dc.Tc=class{constructor(a){this.id=null!=a?a:olympe.oa.bf();this.$b=[];this.O=new Map;this.da=!1;this.$=!0;this.D=new Map;this.ca=[];this.R=this.T=!1;this.W=[...olympe.dc.kx().ca]}ja(){return this.id}model(a){let b;return null!=(b=this.O.get(olympe.dc.Ya(a)))?b:olympe.dc.eb().model(a)}C(a){this.da&&(a.T=!0);vn(a,this.D);for(const b of this.$b)b.C(a);try{this.W.forEach(b=>b(a))}catch(b){throw Error(`Transaction compilation error: ${b.message}`);}}create(a,b){b=En(this,new olympe.dc.transaction.$b.hG(a,
1567
- b));const c=b.ka();this.O.set(c,olympe.dc.Ya(a));let d;this.persist(c,null!=(d=this.D.get(c))?d:this.$);return b}persist(a,b=!0){const c=olympe.dc.Ya(a);var d=olympe.dc.eb();this.D.set(c,b);if(b){let f;b=null!=(f=this.O.get(c))?f:d.model(c);if(null===b)throw Error(`Try to persist an instance that does not exist: ${c}`);var e;d=null!=(e=d.source(a))?e:olympe.dc.Kj().fromModel(b);En(this,new olympe.dc.transaction.$b.CT(c,d))}else{if((e=d.tc(c))&&d.Bl(c))throw Error(`Try to remove persistence of an instance already persisted: ${c}`);
1568
- if(!e&&!this.O.has(c))throw Error(`Try to remove persistence of an instance that does not exist and is not part of the transaction: ${c}`);}return this}delete(a,b=olympe.dc.Te.Qg){En(this,new olympe.dc.transaction.$b.wG(a,b))}update(a,b,c){return En(this,new olympe.dc.transaction.$b.SU(a,b,c))}Qb(a,b,c){En(this,new olympe.dc.transaction.$b.OB(a,b,c))}Xf(a,b,c){En(this,new olympe.dc.transaction.$b.DQ(a,b,c))}JD(a,b){En(this,new olympe.dc.transaction.$b.vG(a,b))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,
1560
+ olympe.dc.transaction.Xk=class{constructor({XA:a=!1,bu:b=!0,mk:c=!0}={}){this.T=[];this.O=[];this.C=[];this.W=[];this.R=[];this.XA=null!=a?a:!1;this.mk=null!=c?c:!0;this.bu=null!=b?b:!0;this.$=olympe.j?new Dn:new class extends Dn{W(d){return d&&'function'===typeof d.ka?{c:8,t:d.ka()}:d}}}flush(){return JSON.stringify(zh(this))}yf(a,b,c,d=null){c=Bn(this.$,null!=c?c:null,this.XA);c={o:olympe.dc.eh.C,t:a,p:c};this.bu&&(c.s=b);this.mk&&d&&(c.m=d);this.T.push(c);this.XA&&(b=Cn(this.$))&&this.C.push({o:olympe.dc.eh.D,
1561
+ t:a,p:b})}oh(a,b,c=null){b=Bn(this.$,b||null,!1);a={o:olympe.dc.eh.D,t:a,p:b};this.mk&&c&&(a.m=c);this.C.push(a)}D(a,b,c=null){a={o:olympe.dc.eh.R,t:a,f:b};this.mk&&c&&(a.m=c);this.O.push(a)}Qb(a,b,c,d=null,e=null){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);a={o:olympe.dc.eh.O,m:a,l:b,r:c};this.mk&&d&&(a.lm=d);this.mk&&
1562
+ e&&(a.rm=e);this.W.push(a)}Xf(a,b,c,d=null,e=null){if(!a)throw Error('Cannot delete relation of undefined type');if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');a={o:olympe.dc.eh.T,m:a,l:b,r:c};this.mk&&d&&(a.lm=d);this.mk&&e&&(a.rm=e);this.R.push(a)}};olympe.dc.transaction.Xk.Aa=[olympe.dc.Ut];function En(a){var b=new olympe.dc.Tc;b.$=a;return b}function Fn(a,b){b instanceof olympe.dc.Tc&&b.D.forEach((c,d)=>a.D.set(d,c));a.$b.push(b);return b}function Gn(){var a=new olympe.dc.Tc;a.da=!0;return a}
1563
+ function Hn(a,b,c,d){c=a.create(null!=c?c:olympe.dc.CloudObject,void 0);if('string'===typeof b)b=b||'',Z(c,olympe.dc.CloudObject.nameProp.ka(),b);else for(const [f,g]of Object.entries(b))Z(c,f,g);b=c.ka();d=null!=d?d:olympe.dc.CloudObject;const e=olympe.dc.CloudObject.extendRel.ka();Fn(a,new olympe.dc.transaction.$b.vG(e,b));Fn(a,new olympe.dc.transaction.$b.OB(e,b,d));return c}
1564
+ function In(a,b){if(a.R)throw Error('Operation not permitted: this transaction has already been executed');a.R=!0;const c=[d=>{a.R=d},...a.ca,null!=b?b:()=>{}];return(d,e)=>{c.forEach(f=>f(d,e))}}
1565
+ olympe.dc.Tc=class{constructor(a){this.id=null!=a?a:olympe.oa.bf();this.$b=[];this.O=new Map;this.da=!1;this.$=!0;this.D=new Map;this.ca=[];this.R=this.T=!1;this.W=[...olympe.dc.kx().ca]}ja(){return this.id}model(a){let b;return null!=(b=this.O.get(olympe.dc.Ya(a)))?b:olympe.dc.eb().model(a)}C(a){this.da&&(a.T=!0);wn(a,this.D);for(const b of this.$b)b.C(a);try{this.W.forEach(b=>b(a))}catch(b){throw Error(`Transaction compilation error: ${b.message}`);}}create(a,b){b=Fn(this,new olympe.dc.transaction.$b.hG(a,
1566
+ b));const c=b.ka();this.O.set(c,olympe.dc.Ya(a));let d;this.persist(c,null!=(d=this.D.get(c))?d:this.$);return b}persist(a,b=!0){const c=olympe.dc.Ya(a);var d=olympe.dc.eb();this.D.set(c,b);if(b){let f;b=null!=(f=this.O.get(c))?f:d.model(c);if(null===b)throw Error(`Try to persist an instance that does not exist: ${c}`);var e;d=null!=(e=d.source(a))?e:olympe.dc.Kj().fromModel(b);Fn(this,new olympe.dc.transaction.$b.CT(c,d))}else{if((e=d.tc(c))&&d.Bl(c))throw Error(`Try to remove persistence of an instance already persisted: ${c}`);
1567
+ if(!e&&!this.O.has(c))throw Error(`Try to remove persistence of an instance that does not exist and is not part of the transaction: ${c}`);}return this}delete(a,b=olympe.dc.Te.Qg){Fn(this,new olympe.dc.transaction.$b.wG(a,b))}update(a,b,c){return Fn(this,new olympe.dc.transaction.$b.SU(a,b,c))}Qb(a,b,c){Fn(this,new olympe.dc.transaction.$b.OB(a,b,c))}Xf(a,b,c){Fn(this,new olympe.dc.transaction.$b.DQ(a,b,c))}JD(a,b){Fn(this,new olympe.dc.transaction.$b.vG(a,b))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,
1569
1568
  f);Z(d,olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.li.sj+d.ka(),e);this.Qb(olympe.dc.CloudObject.propertyRel,a,d);this.Qb(olympe.dm.Property.typeRel,d,b);this.Qb(olympe.dc.CloudObject.containsRel,a,d);return d}zM(a,b,c='',{K2:d=olympe.dm.Relation.R.iT,V2:e=olympe.dm.Relation.C.LT,Q2:f=olympe.dm.Relation.C.VP,v3:g=olympe.dm.Relation.C.uH,F2:k=olympe.dm.xB.NONE,s3:l=olympe.dm.Relation.T|k}={},m=olympe.oa.bf()){c=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(this.create(olympe.dm.Relation,m),olympe.dc.CloudObject.nameProp,
1570
- c||''),olympe.dm.Relation.D,d),olympe.dm.Relation.O,l),olympe.dm.Relation.da,e),olympe.dm.Relation.za,e),olympe.dm.Relation.ca,e),olympe.dm.Relation.$,f),olympe.dm.Relation.ma,g),olympe.dm.Relation.Pa,olympe.dm.Relation.C.uH),olympe.dm.Relation.W,k);this.Qb(olympe.dc.CloudObject.px,a,c);this.Qb(olympe.dm.Relation.destinationModelRel,c,b);this.Qb(olympe.dc.CloudObject.containsRel,a,c);return c}fs(){return!1}AD(a){this.ca.push(olympe.j.yb().re(a))}Kd(a,b){In(olympe.dc.kx(),this,Hn(this,a),b)}KD(a){a=
1571
- Hn(this,a);Jn(olympe.dc.kx(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Tc.Aa=[olympe.dc.eh];function qn(a){var b=olympe.dc.kx();const c=a.ja();b.R.set(c,a);return(d,e,f)=>{const g=new olympe.dc.db.Rf(c);g.oh(d,(new Map).set(e,f),b.db.model(d));b.C.lh(ph(g,Infinity))}}
1572
- function rn(a,b,c,d){var e=olympe.dc.kx();const f=olympe.dc.Request.C.wv,g=olympe.dc.Request.C.xv,k=a.ja();a=a.fs();const l=new Map;for(const m of b.keys()){const n=e.db.source(m);if(n===olympe.dc.Jc.SELF||!e.db.Bl(m))continue;let p=l.get(n);p||(p=new olympe.dc.db.Rf(k),l.set(n,p));p.oh(m,b.get(m),e.db.model(m))}for(const [m,n]of l)b=new olympe.dc.Request(c?g:f,m,new olympe.dc.transaction.rw(n,a)),b=oh(e.kf,b).catch(p=>null==d?void 0:d(!1,`${p}`)),c&&b.then(p=>{e.C.lh(ph(n,p));null==d||d(!0)})}
1573
- function In(a,b,c,d){if(d){const e=b.ja();a.D.set(e,c);Jn(a,b,(f,g)=>{f||(a.D.delete(e),c(f,g))},!1)}else Jn(a,b,c,!1)}function Kn(a){const b=olympe.dc.Request.C.Ry;xh(a.kf,olympe.dc.Request.C.GF,c=>{var d=c.Pe();c=d.rollback;d=d.error;const e=c.ja(),f=a.R.get(e);void 0!==f&&(a.R.delete(e),f.sb(d));a.C.lh(c);a.V.warn(`Burst update (id=${e}) has been refused and is rolled back. Error: ${d}`)});xh(a.kf,b,c=>{c=c.Pe();Ln(a,c.id,c.finalize,c.error)})}
1574
- function Mn(a,b,c){if(!c)throw Error('Transaction compiler id is required');a.za.has(c)||a.ca.push(b);return a}
1575
- function Jn(a,b,c,d=!1){const e=b.ja(),f=new olympe.dc.transaction.BT(a.db,a.ma,e);try{b.C(f)}catch(r){if(r instanceof olympe.dc.PJ){r.C.then(()=>Jn(a,b,c,d));return}c(!1,r.message);return}if(f.Fi()){c(!0);var g;null==(g=a.D.get(e))||g(!0);a.D.delete(e)}else{a.O.set(e,[]);var k=wn(f);a.C.nk(k,olympe.dc.db.Instance.C.TRANSACTION);g=k.filter(r=>un(f,r));var l=xn(f).filter(r=>a.db.Bl(r)&&a.db.me(r,olympe.dm.File)&&a.db.source(r)!==olympe.dc.Jc.SERVER).map(r=>[r,a.db.model(r),a.db.source(r)]),m=xi(a.C,
1576
- f.C,g),n=olympe.j.yb().re((r,t)=>c(null!==r,t)),p=[m,n];Nn(a,f,g).then(r=>{p.splice(1,0,r);On(a,e,k,f.Qc()+1);return Pn(a,f.D,d,b.fs(),b.T)}).then(r=>Promise.allSettled(l.map(([t,u,v])=>a.T.za(t,u,v))).then(t=>{t.forEach(u=>{'rejected'===u.status&&a.V.warn('Some binary files have not been deleted after the transaction:',u.reason)});return r})).then(r=>{p.forEach(t=>t(r));Ln(a,e,olympe.dc.transaction.po.C.Yv)}).catch(r=>{a.V.error(r);p.forEach(t=>t(null,`${r}`));Qn(a,e)})}}
1577
- function Nn(a,b,c){const d=b.C,e=olympe.dm.File.urlProp.ka();c=c.filter(n=>{let p;return a.db.me(n,olympe.dm.File)&&void 0!==(null==(p=d.ih(n))?void 0:p.Ac(e))}).map(olympe.dc.CloudObject.get);if(0===c.length)return Promise.resolve(()=>{});const f=olympe.dm.File.C.ka(),g=olympe.dm.File.modificationDateProp.ka(),k=Array.from(b.D.values()),l=[],m=olympe.oa.Dj();return Promise.all(c.map(n=>{const p=n.get(e);if(p.startsWith('blob:'))return m.O(p).then(r=>new Promise((t,u)=>{if(null===r)URL.revokeObjectURL(p),
1569
+ c||''),olympe.dm.Relation.D,d),olympe.dm.Relation.O,l),olympe.dm.Relation.da,e),olympe.dm.Relation.za,e),olympe.dm.Relation.ca,e),olympe.dm.Relation.$,f),olympe.dm.Relation.ma,g),olympe.dm.Relation.Pa,olympe.dm.Relation.C.uH),olympe.dm.Relation.W,k);this.Qb(olympe.dc.CloudObject.px,a,c);this.Qb(olympe.dm.Relation.destinationModelRel,c,b);this.Qb(olympe.dc.CloudObject.containsRel,a,c);return c}fs(){return!1}AD(a){this.ca.push(olympe.j.yb().re(a))}Kd(a,b){Jn(olympe.dc.kx(),this,In(this,a),b)}KD(a){a=
1570
+ In(this,a);Kn(olympe.dc.kx(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Tc.Aa=[olympe.dc.eh];function rn(a){var b=olympe.dc.kx();const c=a.ja();b.R.set(c,a);return(d,e,f)=>{const g=new olympe.dc.db.Rf(c);g.oh(d,(new Map).set(e,f),b.db.model(d));b.C.lh(ph(g,Infinity))}}
1571
+ function sn(a,b,c,d){var e=olympe.dc.kx();const f=olympe.dc.Request.C.wv,g=olympe.dc.Request.C.xv,k=a.ja();a=a.fs();const l=new Map;for(const m of b.keys()){const n=e.db.source(m);if(n===olympe.dc.Jc.SELF||!e.db.Bl(m))continue;let p=l.get(n);p||(p=new olympe.dc.db.Rf(k),l.set(n,p));p.oh(m,b.get(m),e.db.model(m))}for(const [m,n]of l)b=new olympe.dc.Request(c?g:f,m,new olympe.dc.transaction.rw(n,a)),b=oh(e.kf,b).catch(p=>null==d?void 0:d(!1,`${p}`)),c&&b.then(p=>{e.C.lh(ph(n,p));null==d||d(!0)})}
1572
+ function Jn(a,b,c,d){if(d){const e=b.ja();a.D.set(e,c);Kn(a,b,(f,g)=>{f||(a.D.delete(e),c(f,g))},!1)}else Kn(a,b,c,!1)}function Ln(a){const b=olympe.dc.Request.C.Ry;xh(a.kf,olympe.dc.Request.C.GF,c=>{var d=c.Pe();c=d.rollback;d=d.error;const e=c.ja(),f=a.R.get(e);void 0!==f&&(a.R.delete(e),f.sb(d));a.C.lh(c);a.V.warn(`Burst update (id=${e}) has been refused and is rolled back. Error: ${d}`)});xh(a.kf,b,c=>{c=c.Pe();Mn(a,c.id,c.finalize,c.error)})}
1573
+ function Nn(a,b,c){if(!c)throw Error('Transaction compiler id is required');a.za.has(c)||a.ca.push(b);return a}
1574
+ function Kn(a,b,c,d=!1){const e=b.ja(),f=new olympe.dc.transaction.BT(a.db,a.ma,e);try{b.C(f)}catch(r){if(r instanceof olympe.dc.PJ){r.C.then(()=>Kn(a,b,c,d));return}c(!1,r.message);return}if(f.Fi()){c(!0);var g;null==(g=a.D.get(e))||g(!0);a.D.delete(e)}else{a.O.set(e,[]);var k=xn(f);a.C.nk(k,olympe.dc.db.Instance.C.TRANSACTION);g=k.filter(r=>vn(f,r));var l=yn(f).filter(r=>a.db.Bl(r)&&a.db.me(r,olympe.dm.File)&&a.db.source(r)!==olympe.dc.Jc.SERVER).map(r=>[r,a.db.model(r),a.db.source(r)]),m=xi(a.C,
1575
+ f.C,g),n=olympe.j.yb().re((r,t)=>c(null!==r,t)),p=[m,n];On(a,f,g).then(r=>{p.splice(1,0,r);Pn(a,e,k,f.Qc()+1);return Qn(a,f.D,d,b.fs(),b.T)}).then(r=>Promise.allSettled(l.map(([t,u,v])=>a.T.za(t,u,v))).then(t=>{t.forEach(u=>{'rejected'===u.status&&a.V.warn('Some binary files have not been deleted after the transaction:',u.reason)});return r})).then(r=>{p.forEach(t=>t(r));Mn(a,e,olympe.dc.transaction.po.C.Yv)}).catch(r=>{a.V.error(r);p.forEach(t=>t(null,`${r}`));Rn(a,e)})}}
1576
+ function On(a,b,c){const d=b.C,e=olympe.dm.File.urlProp.ka();c=c.filter(n=>{let p;return a.db.me(n,olympe.dm.File)&&void 0!==(null==(p=d.ih(n))?void 0:p.Ac(e))}).map(olympe.dc.CloudObject.get);if(0===c.length)return Promise.resolve(()=>{});const f=olympe.dm.File.C.ka(),g=olympe.dm.File.modificationDateProp.ka(),k=Array.from(b.D.values()),l=[],m=olympe.oa.Dj();return Promise.all(c.map(n=>{const p=n.get(e);if(p.startsWith('blob:'))return m.O(p).then(r=>new Promise((t,u)=>{if(null===r)URL.revokeObjectURL(p),
1578
1577
  t();else{var v=n.ka(),w,x=null!=(w=n.get(olympe.dm.File.mimeTypeProp))?w:'application/data';a.T.ma(v,r,x,y=>{const A=k.reduce((H,G)=>H||G.ih(v),null);null!==A&&(y=(new Map).set(e,y).set(f,!0).set(g,new Date),A.Yz(y),l.push([v,y]));URL.revokeObjectURL(p);t()},u)}}));2048<p.length&&a.V.error('Trying to create a file with an URL longer than 2048. It likely is a data url and should be an object url. File tag:',n.ka());return Promise.resolve([])})).then(()=>{const n=l.reduce((p,[r,t])=>{p.oh(r,t);return p},
1579
- new olympe.dc.db.Rf);return xi(a.C,n)})}function On(a,b,c,d){const e=olympe.j.Eo(),f=new olympe.async.wz(e);0<a.W&&f.FP(a.W);const g=olympe.dc.transaction.po.C.cT;let k=!0;const l=a.O.get(b);for(let m=0;m<d;m++)f.add((n,p)=>{l.push(e.re((r,t)=>{k&&(k=r!==g);t?p(t):n()}))});rd(f,(m,n)=>{m||a.V.warn(`An error occurred while processing the notification of transaction (${b}): ${n}.`);k&&a.C.detach(c,olympe.dc.db.Instance.C.TRANSACTION);Qn(a,b)});f.start()}
1580
- function Pn(a,b,c,d,e){if(c&&olympe.j.Qa(a.da.D)!==olympe.xa.Cc.C.Mn)return Promise.reject('Cannot persist with batch transactions API if not authenticated (aka: `Transaction.executeAsLarge()`).');const f=c?olympe.dc.Request.C.Mt:olympe.dc.Request.C.no;return Promise.all(Array.from(b).map(([g,k])=>{g=new olympe.dc.Request(f,g,new olympe.dc.transaction.rw(k,d,e));return oh(a.kf,g)})).then(g=>g[0])}function Ln(a,b,c,d){let e,f;null==(f=null==(e=a.O.get(b))?void 0:e.pop())||f(c,null!=d?d:null)}
1581
- function Qn(a,b){var c;null==(c=a.O.get(b))||c.forEach(d=>{d(olympe.dc.transaction.po.C.Yv,null)});a.O.delete(b);if(0===a.O.size){for(const d of a.$)d();a.$=[]}a.D.has(b)&&(c=a.D.get(b),a.D.delete(b),c(!0))}
1582
- olympe.dc.transaction.po=class{constructor(a,b,c,d,e,f,g){this.V=a;this.C=b;this.db=b.view;this.kf=c;this.ma=d;this.T=e;this.da=f;this.W=g.get('notificationTimeout');this.ca=[];let k;this.za=new Set(null!=(k=g.get('disabledCompilers'))?k:[]);this.R=new olympe.oa.Nt(g.get('burstHoldTime'));this.O=new Map;this.$=[];this.D=new Map;this.Pa=new olympe.oa.promise.mw;Kn(this)}tk(a){this.Pa.C(()=>oh(this.kf,new olympe.dc.Request(olympe.dc.Request.C.YG,olympe.dc.Jc.SERVER)).then(b=>{a(b.ids,b.undo_stack_size,
1578
+ new olympe.dc.db.Rf);return xi(a.C,n)})}function Pn(a,b,c,d){const e=olympe.j.Eo(),f=new olympe.async.wz(e);0<a.W&&f.FP(a.W);const g=olympe.dc.transaction.po.C.cT;let k=!0;const l=a.O.get(b);for(let m=0;m<d;m++)f.add((n,p)=>{l.push(e.re((r,t)=>{k&&(k=r!==g);t?p(t):n()}))});rd(f,(m,n)=>{m||a.V.warn(`An error occurred while processing the notification of transaction (${b}): ${n}.`);k&&a.C.detach(c,olympe.dc.db.Instance.C.TRANSACTION);Rn(a,b)});f.start()}
1579
+ function Qn(a,b,c,d,e){if(c&&olympe.j.Qa(a.da.D)!==olympe.xa.Cc.C.Mn)return Promise.reject('Cannot persist with batch transactions API if not authenticated (aka: `Transaction.executeAsLarge()`).');const f=c?olympe.dc.Request.C.Mt:olympe.dc.Request.C.no;return Promise.all(Array.from(b).map(([g,k])=>{g=new olympe.dc.Request(f,g,new olympe.dc.transaction.rw(k,d,e));return oh(a.kf,g)})).then(g=>g[0])}function Mn(a,b,c,d){let e,f;null==(f=null==(e=a.O.get(b))?void 0:e.pop())||f(c,null!=d?d:null)}
1580
+ function Rn(a,b){var c;null==(c=a.O.get(b))||c.forEach(d=>{d(olympe.dc.transaction.po.C.Yv,null)});a.O.delete(b);if(0===a.O.size){for(const d of a.$)d();a.$=[]}a.D.has(b)&&(c=a.D.get(b),a.D.delete(b),c(!0))}
1581
+ olympe.dc.transaction.po=class{constructor(a,b,c,d,e,f,g){this.V=a;this.C=b;this.db=b.view;this.kf=c;this.ma=d;this.T=e;this.da=f;this.W=g.get('notificationTimeout');this.ca=[];let k;this.za=new Set(null!=(k=g.get('disabledCompilers'))?k:[]);this.R=new olympe.oa.Nt(g.get('burstHoldTime'));this.O=new Map;this.$=[];this.D=new Map;this.Pa=new olympe.oa.promise.mw;Ln(this)}tk(a){this.Pa.C(()=>oh(this.kf,new olympe.dc.Request(olympe.dc.Request.C.YG,olympe.dc.Jc.SERVER)).then(b=>{a(b.ids,b.undo_stack_size,
1583
1582
  b.redo_stack_size)}).catch(b=>this.V.error('Failed to process get stack request',b))).then(()=>{})}};olympe.dc.transaction.po.C={KC:0,Yv:1,cT:2};olympe.dc.transaction.rw=class{constructor(a,b=!1,c=!1){this.D=a;this.O=b;this.C=c}fs(){return this.O}Zf(){return this.D}};olympe.dc.transaction.ba={Vb:'dc.transaction.Logger',Ob:'dc.transaction.Manager'};olympe.dc.transaction.pa={MJ:'dc.transaction.timeout',FF:'dc.transaction.burstInterval',UB:'dc.transaction.disabledCompilers'};
1584
1583
  olympe.sa.$e(function(a){E(a,olympe.dc.transaction.pa.MJ,9E4);E(a,olympe.dc.transaction.pa.FF,30);E(a,olympe.dc.transaction.pa.UB,[]);C(a,olympe.dc.transaction.ba.Vb,[olympe.gb.ba.Ob],b=>b.Vg('dc'));C(a,'olympe.dc.transaction.Config',[new olympe.sa.zb(olympe.dc.transaction.pa.MJ),new olympe.sa.zb(olympe.dc.transaction.pa.UB),new olympe.sa.zb(olympe.dc.db.pa.JB)],(b,c,d)=>new Map([['notificationTimeout',b],['disabledCompilers',c],['burstHoldTime',d]]));B(a,olympe.dc.transaction.ba.Ob,olympe.dc.transaction.po,
1585
- olympe.dc.transaction.ba.Vb,olympe.dc.db.ba.Ob,olympe.dc.ba.tr,olympe.dc.sources.ba.dl,olympe.dc.ba.Py,olympe.xa.ba.Ob,'olympe.dc.transaction.Config')},'olympe.dc.transaction');olympe.dc.transaction.$b={};function Rn(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Qa(e));return c}olympe.dc.transaction.$b.Tq=class{constructor(){this.eb=olympe.dc.eb()}C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Qa(a){a=olympe.j.Qa(a);return void 0===a||null===a?null:olympe.j.CO(a)?a.valueOf():a}};olympe.dc.transaction.$b.Tq.Aa=[olympe.dc.eh];olympe.dc.transaction.$b.sF=class extends olympe.dc.transaction.$b.Tq{constructor(a,b){super();this.relation=a instanceof olympe.dc.Oc.Relation?a:new olympe.dc.Oc.Relation(olympe.dc.Ya(a));this.origin=this.eb.tc(b)?olympe.dc.CloudObject.get(b):b}getType(){return this.relation.ka()}zc(){return this.relation.zc()}C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}};function Z(a,b,c){a.Ji.set(olympe.dc.Ya(b),c);return a}olympe.dc.transaction.$b.hG=class extends olympe.dc.transaction.$b.Tq{constructor(a,b){super();let c;this.tag=null!=(c=b&&olympe.dc.Ya(b))?c:olympe.oa.Rr();this.model=olympe.dc.Ya(a);this.source=null;this.Ji=new Map}ka(){return this.tag}De(){return this.model}ne(a){this.source=a;return this}C(a){const b=this.De(),c=this.ka();if(!b)throw Error('OperationError: Cannot create instance, model tag is undefined');a.yf(c,b,this.source,Rn(this,this.Ji))}toString(){return`CreateInstance(${this.De()}, ${this.ka()})`}};
1584
+ olympe.dc.transaction.ba.Vb,olympe.dc.db.ba.Ob,olympe.dc.ba.tr,olympe.dc.sources.ba.dl,olympe.dc.ba.Py,olympe.xa.ba.Ob,'olympe.dc.transaction.Config')},'olympe.dc.transaction');olympe.dc.transaction.$b={};function Sn(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Qa(e));return c}olympe.dc.transaction.$b.Tq=class{constructor(){this.eb=olympe.dc.eb()}C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Qa(a){a=olympe.j.Qa(a);return void 0===a||null===a?null:olympe.j.CO(a)?a.valueOf():a}};olympe.dc.transaction.$b.Tq.Aa=[olympe.dc.eh];olympe.dc.transaction.$b.sF=class extends olympe.dc.transaction.$b.Tq{constructor(a,b){super();this.relation=a instanceof olympe.dc.Oc.Relation?a:new olympe.dc.Oc.Relation(olympe.dc.Ya(a));this.origin=this.eb.tc(b)?olympe.dc.CloudObject.get(b):b}getType(){return this.relation.ka()}zc(){return this.relation.zc()}C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}};function Z(a,b,c){a.Ji.set(olympe.dc.Ya(b),c);return a}olympe.dc.transaction.$b.hG=class extends olympe.dc.transaction.$b.Tq{constructor(a,b){super();let c;this.tag=null!=(c=b&&olympe.dc.Ya(b))?c:olympe.oa.Rr();this.model=olympe.dc.Ya(a);this.source=null;this.Ji=new Map}ka(){return this.tag}De(){return this.model}ne(a){this.source=a;return this}C(a){const b=this.De(),c=this.ka();if(!b)throw Error('OperationError: Cannot create instance, model tag is undefined');a.yf(c,b,this.source,Sn(this,this.Ji))}toString(){return`CreateInstance(${this.De()}, ${this.ka()})`}};
1586
1585
  olympe.dc.transaction.$b.hG.Aa=[olympe.dc.Ok];olympe.dc.transaction.$b.OB=class extends olympe.dc.transaction.$b.sF{constructor(a,b,c){super(a,b);this.D=this.eb.tc(c)?olympe.dc.CloudObject.get(c):c}C(a){const b=this.getType();if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.Lf.sh)throw Error('OperationError: Cannot create the instance -> model relation');if(!this.origin)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
1587
1586
  if(!this.D)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.relation.zc()===olympe.dc.Ib.DESTINATION?a.Qb(b,olympe.dc.Ya(this.origin),olympe.dc.Ya(this.D)):a.Qb(b,olympe.dc.Ya(this.D),olympe.dc.Ya(this.origin))}toString(){return`CreateRelation('${this.relation.zc()}${this.relation.ka()}, ${olympe.dc.Ya(this.origin)}, ${olympe.dc.Ya(this.D)})`}};olympe.dc.transaction.$b.k_=class extends olympe.dc.transaction.$b.Tq{constructor(a,b=olympe.dc.Te.Qg){super();this.model=a instanceof olympe.dc.CloudObject?a:olympe.dc.CloudObject.get(a);this.af=b}C(a){for(const b of this.eb.xg(this.model))b!==olympe.dc.Ya(this.model)&&(new olympe.dc.transaction.$b.wG(b,this.af)).C(a)}toString(){return`DeleteAllInstances(${this.model.ka()}, ${this.af})`}};olympe.dc.transaction.$b.vG=class extends olympe.dc.transaction.$b.sF{C(a){const b=this.getType();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.Lf.sh)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.Ya(this.origin);if(!this.origin)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=this.zc(),e=this.eb.pc(c,this.relation);for(const f of e)d===olympe.dc.Ib.DESTINATION?
1588
- a.Xf(b,c,f):a.Xf(b,f,c)}toString(){return`DeleteAllRelations(${this.zc()}${this.getType()})`}};olympe.dc.transaction.$b.wG=class extends olympe.dc.transaction.$b.Tq{constructor(a,b=olympe.dc.Te.Qg){super();this.tag=this.eb.tc(a)?olympe.dc.CloudObject.get(a):a;this.af=b}ka(){return olympe.dc.Ya(this.tag)}C(a){const b=this.ka();if(void 0===b)throw Error('OperationError: Cannot delete instance, tag is undefined');this.eb.tc(b)&&zn(a,b,this.af)}toString(){return'DeleteInstance('+this.ka()+', '+this.af+')'}};olympe.dc.transaction.$b.DQ=class extends olympe.dc.transaction.$b.OB{C(a){const b=this.relation.ka();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.Lf.sh)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.Ya(this.origin);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=olympe.dc.Ya(this.D);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
1589
- this.relation.zc()===olympe.dc.Ib.DESTINATION?a.Xf(b,c,d):a.Xf(b,d,c)}toString(){return'DeleteRelation('+this.relation.zc()+this.relation.ka()+', '+olympe.dc.Ya(this.origin)+', '+olympe.dc.Ya(this.D)+')'}};olympe.dc.transaction.$b.SU=class extends olympe.dc.transaction.$b.Tq{constructor(a,b,c){super();this.tag=this.eb.tc(a)?olympe.dc.CloudObject.get(a):a;this.Ji=new Map;void 0!==b&&this.Ji.set(olympe.dc.Ya(b),c)}ka(){return olympe.dc.Ya(this.tag)}C(a){const b=this.ka();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');var c;if(!(null!=(c=a.C.ih(b))&&c.O()||this.eb.tc(b)))throw Error('OperationError: Instance #'+b+' not found so it cannot be updated');c=Rn(this,this.Ji);
1590
- for(const [e,f]of c){var d=this.eb.Ac(b,e,!0);d instanceof olympe.dc.Kf&&zn(a,d.ka(),olympe.dc.Te.Qg);f instanceof olympe.dc.Kf&&!un(a,f.ka())&&(d=new olympe.dc.Tc,d.persist(f.ka()),d.C(a))}a.oh(b,c)}toString(){return'UpdateInstance('+this.ka()+', '+Rn(this,this.Ji)+')'}};olympe.dc.transaction.$b.CT=class a extends olympe.dc.transaction.$b.Tq{constructor(b,c){super();this.tag=b;this.source=c}C(b){const c=olympe.dc.eb();if(un(b,this.tag)&&c.tc(this.tag)&&!c.Bl(this.tag)){const e=c.be(this.tag,!0);var d;let f;null==(f=null==(d=b.C.ih(this.tag))?void 0:d.be())||f.forEach((g,k)=>{e.set(k,g)});for(const g of e.values())g instanceof olympe.dc.Kf&&c.tc(g.ka())&&(new a(g.ka(),this.source)).C(b);d=c.model(this.tag);b.yf(this.tag,d,this.source,e);for(const [g,k,l]of cj(c,this.tag))un(b,
1587
+ a.Xf(b,c,f):a.Xf(b,f,c)}toString(){return`DeleteAllRelations(${this.zc()}${this.getType()})`}};olympe.dc.transaction.$b.wG=class extends olympe.dc.transaction.$b.Tq{constructor(a,b=olympe.dc.Te.Qg){super();this.tag=this.eb.tc(a)?olympe.dc.CloudObject.get(a):a;this.af=b}ka(){return olympe.dc.Ya(this.tag)}C(a){const b=this.ka();if(void 0===b)throw Error('OperationError: Cannot delete instance, tag is undefined');this.eb.tc(b)&&An(a,b,this.af)}toString(){return'DeleteInstance('+this.ka()+', '+this.af+')'}};olympe.dc.transaction.$b.DQ=class extends olympe.dc.transaction.$b.OB{C(a){const b=this.relation.ka();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.Lf.sh)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.Ya(this.origin);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=olympe.dc.Ya(this.D);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
1588
+ this.relation.zc()===olympe.dc.Ib.DESTINATION?a.Xf(b,c,d):a.Xf(b,d,c)}toString(){return'DeleteRelation('+this.relation.zc()+this.relation.ka()+', '+olympe.dc.Ya(this.origin)+', '+olympe.dc.Ya(this.D)+')'}};olympe.dc.transaction.$b.SU=class extends olympe.dc.transaction.$b.Tq{constructor(a,b,c){super();this.tag=this.eb.tc(a)?olympe.dc.CloudObject.get(a):a;this.Ji=new Map;void 0!==b&&this.Ji.set(olympe.dc.Ya(b),c)}ka(){return olympe.dc.Ya(this.tag)}C(a){const b=this.ka();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');var c;if(!(null!=(c=a.C.ih(b))&&c.O()||this.eb.tc(b)))throw Error('OperationError: Instance #'+b+' not found so it cannot be updated');c=Sn(this,this.Ji);
1589
+ for(const [e,f]of c){var d=this.eb.Ac(b,e,!0);d instanceof olympe.dc.Kf&&An(a,d.ka(),olympe.dc.Te.Qg);f instanceof olympe.dc.Kf&&!vn(a,f.ka())&&(d=new olympe.dc.Tc,d.persist(f.ka()),d.C(a))}a.oh(b,c)}toString(){return'UpdateInstance('+this.ka()+', '+Sn(this,this.Ji)+')'}};olympe.dc.transaction.$b.CT=class a extends olympe.dc.transaction.$b.Tq{constructor(b,c){super();this.tag=b;this.source=c}C(b){const c=olympe.dc.eb();if(vn(b,this.tag)&&c.tc(this.tag)&&!c.Bl(this.tag)){const e=c.be(this.tag,!0);var d;let f;null==(f=null==(d=b.C.ih(this.tag))?void 0:d.be())||f.forEach((g,k)=>{e.set(k,g)});for(const g of e.values())g instanceof olympe.dc.Kf&&c.tc(g.ka())&&(new a(g.ka(),this.source)).C(b);d=c.model(this.tag);b.yf(this.tag,d,this.source,e);for(const [g,k,l]of cj(c,this.tag))vn(b,
1591
1590
  l)&&(k===olympe.dc.Ib.ORIGIN?b.Qb(g,l,this.tag):b.Qb(g,this.tag,l))}}toString(){return`PersistOperation: tag - ${this.tag}, src - ${this.source}`}};olympe.dc.Ya=function(a){let b=null;if('string'===typeof a)return a;if('function'===typeof(null==a?void 0:a.ka)&&(null==a||!a.Gh))b=a.ka();else if('function'===typeof a){let d;b=null!=(d=olympe.dc.Ja.De(a))?d:''}else if(olympe.j.Mg(a)){let d;b=olympe.dc.Ya(null==(d=olympe.j.Qa(a))?void 0:d.valueOf())}let c;return null!=(c=b)?c:''};z('olympe.dc.instanceToTag',olympe.dc.Ya);olympe.dc.eb=function(){return olympe.dc.iN().view};olympe.dc.register=function(a,b){olympe.dc.Ja.C(a,b)};
1592
1591
  olympe.dc.defineProperty=function(a){return new olympe.dc.Oc.Property(a)};olympe.dc.zM=function(a,b=olympe.dc.Ib.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.Ib.DESTINATION){const e=olympe.dc.Ib.DESTINATION;return b===olympe.dc.Ib.ORIGIN||b===e?new olympe.dc.Oc.Relation(a,b):new olympe.dc.Oc.Relation(a,d,b,c)};olympe.dc.OV=function(a){return a.fe()};olympe.dc.Ad={};olympe.dc.Ad.HD=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.j.ic(a):a instanceof olympe.j.kb?a:null;olympe.dc.Ad.ED=a=>'boolean'===typeof a||a instanceof Boolean?olympe.j.hc(a):a instanceof olympe.j.ia?a:null;olympe.dc.Ad.GD=a=>'number'===typeof a||a instanceof Number?olympe.j.Ba(a):'string'===typeof a||a instanceof String?olympe.j.Ba(Number.parseFloat(a.valueOf())):a instanceof olympe.j.aa?a:null;
1593
1592
  olympe.dc.Ad.FD=a=>'number'===typeof a||a instanceof Number?vc(a.valueOf()):'string'===typeof a||a instanceof String?rc(a.valueOf()):a instanceof Date?uc(a):a instanceof olympe.j.ac?a:null;olympe.dc.Ad.uM=function(a){return a instanceof olympe.j.Color?a:'string'===typeof a||a instanceof String?Ec(a.valueOf()):null};olympe.dc.Ad.vM=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Kf?mh(a):null;olympe.dc.Ad.Hw=a=>a instanceof olympe.dc.Kf?mh(a):a;
1594
- olympe.dc.Ad.ug=a=>{a=a instanceof olympe.dc.Kf?mh(a):a;let b;return null!=(b=a instanceof olympe.dc.CloudObject?a.ug():a)?b:null};olympe.dc.Ad.lW=a=>{switch(a){case olympe.j.ia:return olympe.dc.Ad.ED;case olympe.j.kb:return olympe.dc.Ad.HD;case olympe.j.aa:return olympe.dc.Ad.GD;case olympe.j.ac:return olympe.dc.Ad.FD;case olympe.j.Color:return olympe.dc.Ad.uM;case olympe.dc.CloudObject:return olympe.dc.Ad.vM;default:return olympe.dc.Ad.Hw}};olympe.dc.bg={};olympe.dc.Qn=class{bb(){}O(){}compare(){}R(){}fb(){}toString(){}};function Sn(a){let b=null;for(a=[...a.Ra];null===b&&0<a.length;)b=a.pop().Ee();return b}function Tn(a,b){a.W()||(a=`Calling "${b}" on subscription with id ${a.ja()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback. You can also consider to use Queries API instead of ListDefs (which are deprecated)',olympe.gb.Cb('dc').warn(a))}
1595
- olympe.dc.Kb=class{constructor(a,b,c){void 0===a||null===a?olympe.gb.Cb('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.D=olympe.j.Xa([a],olympe.dc.Ya,String),this.Ra=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Sn(this),this.C=null,this.jg=void 0)}rk(){return olympe.dc.rk()}Kd(){if(null===this.C){const a=olympe.dc.bg.XW();this.C=Un(a,this,this.jg);null!==this.valueType&&this.C.mi(this.valueType);olympe.j.yb().Ve(()=>
1593
+ olympe.dc.Ad.ug=a=>{a=a instanceof olympe.dc.Kf?mh(a):a;let b;return null!=(b=a instanceof olympe.dc.CloudObject?a.ug():a)?b:null};olympe.dc.Ad.lW=a=>{switch(a){case olympe.j.ia:return olympe.dc.Ad.ED;case olympe.j.kb:return olympe.dc.Ad.HD;case olympe.j.aa:return olympe.dc.Ad.GD;case olympe.j.ac:return olympe.dc.Ad.FD;case olympe.j.Color:return olympe.dc.Ad.uM;case olympe.dc.CloudObject:return olympe.dc.Ad.vM;default:return olympe.dc.Ad.Hw}};olympe.dc.bg={};olympe.dc.Qn=class{bb(){}O(){}compare(){}R(){}fb(){}toString(){}};function Tn(a){let b=null;for(a=[...a.Ra];null===b&&0<a.length;)b=a.pop().Ee();return b}function Un(a,b){a.W()||(a=`Calling "${b}" on subscription with id ${a.ja()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback. You can also consider to use Queries API instead of ListDefs (which are deprecated)',olympe.gb.Cb('dc').warn(a))}
1594
+ olympe.dc.Kb=class{constructor(a,b,c){void 0===a||null===a?olympe.gb.Cb('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.D=olympe.j.Xa([a],olympe.dc.Ya,String),this.Ra=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Tn(this),this.C=null,this.jg=void 0)}rk(){return olympe.dc.rk()}Kd(){if(null===this.C){const a=olympe.dc.bg.XW();this.C=Vn(a,this,this.jg);null!==this.valueType&&this.C.mi(this.valueType);olympe.j.yb().Ve(()=>
1596
1595
  {var b=this.C.ja();a.V.debug('QueryMGR: [ID:',b,'] - Unregistered');const c=a.C.get(b);if(null==c)var d=0;else 0<c.counter&&c.counter--,d=0===c.counter;d&&(c.getSubscription().kc(),a.C.delete(b));this.C=null})}return this}getSubscription(){null===this.C&&this.Kd();return this.C}mi(a){this.valueType=a;null!==this.C&&this.C.mi(this.valueType)}Ee(){return null!==this.C?this.C.Ee():null===this.valueType?olympe.dc.CloudObject:this.valueType}Cj(){return this.D}AC(){return this.Ra}Ii(a,b){return this.getSubscription().Ii(a,
1597
- b)}PA(a){this.getSubscription().PA(a)}lS(){return this.getSubscription().Pb()}kS(){return this.getSubscription().W()}get(a){return this.getSubscription().get(a)}qu(){return this.getSubscription().qu()}Fj(a){const b=this.getSubscription();Tn(b,'getCurrent');return b.Fj(a)}has(a){return this.getSubscription().has(a)}Ei(a){const b=this.getSubscription();Tn(b,'hasCurrent');return b.Ei(a)}Hh(a){return this.getSubscription().Hh(a)}dY(a){return this.Hh(a).asObservable()}ql(a){const b=this.getSubscription();
1598
- Tn(b,'getCurrentAt');return b.ql(a)}Um(a){return this.getSubscription().Um(a)}rl(a){const b=this.getSubscription();Tn(b,'getCurrentKeyAt');return b.rl(a)}gf(a){return this.getSubscription().gf(a)}iY(a){return this.gf(a).asObservable()}Hm(a){const b=this.getSubscription();Tn(b,'getCurrentRank');return b.Hm(a)}Vd(){return this.getSubscription().Vd()}eY(){return this.Vd().asObservable()}Sm(){return this.getSubscription().Sm()}Qc(){return this.getSubscription().Qc()}jY(){return this.Qc().asObservable()}aj(){const a=
1599
- this.getSubscription();Tn(a,'getCurrentSize');return a.aj()}forEach(a,b){this.getSubscription().forEach(a,b)}yi(a){const b=this.getSubscription();Tn(b,'forEachCurrentValue');return b.yi(a)}Ow(a,b,c,d){a=new olympe.dc.Ra.wt(a,b);(new olympe.dc.Kb(this.D,[...this.Ra,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.Ra];
1600
- for(const c of b){if(void 0===c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.Oc.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.C)break;a.push(c)}b=new olympe.dc.Kb(this.D,a);b.jg=this.jg;b.mi(Sn(b)||this.valueType||Object);return b}jy(a){return this.transform(new olympe.dc.Ra.ro(a))}filter(a){return this.transform(new olympe.dc.Ra.Qf(a))}Mr(){const a=new olympe.dc.Mp(this.D,
1596
+ b)}PA(a){this.getSubscription().PA(a)}lS(){return this.getSubscription().Pb()}kS(){return this.getSubscription().W()}get(a){return this.getSubscription().get(a)}qu(){return this.getSubscription().qu()}Fj(a){const b=this.getSubscription();Un(b,'getCurrent');return b.Fj(a)}has(a){return this.getSubscription().has(a)}Ei(a){const b=this.getSubscription();Un(b,'hasCurrent');return b.Ei(a)}Hh(a){return this.getSubscription().Hh(a)}dY(a){return this.Hh(a).asObservable()}ql(a){const b=this.getSubscription();
1597
+ Un(b,'getCurrentAt');return b.ql(a)}Um(a){return this.getSubscription().Um(a)}rl(a){const b=this.getSubscription();Un(b,'getCurrentKeyAt');return b.rl(a)}gf(a){return this.getSubscription().gf(a)}iY(a){return this.gf(a).asObservable()}Hm(a){const b=this.getSubscription();Un(b,'getCurrentRank');return b.Hm(a)}Vd(){return this.getSubscription().Vd()}eY(){return this.Vd().asObservable()}Sm(){return this.getSubscription().Sm()}Qc(){return this.getSubscription().Qc()}jY(){return this.Qc().asObservable()}aj(){const a=
1598
+ this.getSubscription();Un(a,'getCurrentSize');return a.aj()}forEach(a,b){this.getSubscription().forEach(a,b)}yi(a){const b=this.getSubscription();Un(b,'forEachCurrentValue');return b.yi(a)}Ow(a,b,c,d){a=new olympe.dc.Ra.wt(a,b);(new olympe.dc.Kb(this.D,[...this.Ra,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.Ra];
1599
+ for(const c of b){if(void 0===c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.Oc.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.C)break;a.push(c)}b=new olympe.dc.Kb(this.D,a);b.jg=this.jg;b.mi(Tn(b)||this.valueType||Object);return b}jy(a){return this.transform(new olympe.dc.Ra.ro(a))}filter(a){return this.transform(new olympe.dc.Ra.Qf(a))}Mr(){const a=new olympe.dc.Mp(this.D,
1601
1600
  null===this.valueType?void 0:this.valueType);'boolean'===typeof this.jg&&(a.jg=this.jg);let b=this.Ra;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.Ra;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.j.Qa(this.D)+a+')'}jS(){return this.getSubscription().jr()}og(){return olympe.j.Xa([this.Qc()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.ql(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.j.ic(b+']')},olympe.j.kb)}};
1602
1601
  olympe.dc.Kb.prototype.filter=olympe.dc.Kb.prototype.filter;olympe.dc.Kb.prototype.union=olympe.dc.Kb.prototype.jy;olympe.dc.Kb.prototype.transform=olympe.dc.Kb.prototype.transform;olympe.dc.Kb.prototype.forEachCurrentValue=olympe.dc.Kb.prototype.yi;olympe.dc.Kb.prototype.forEach=olympe.dc.Kb.prototype.forEach;olympe.dc.Kb.prototype.getCurrentSize=olympe.dc.Kb.prototype.aj;olympe.dc.Kb.prototype.observeSize=olympe.dc.Kb.prototype.jY;olympe.dc.Kb.prototype.observeFirst=olympe.dc.Kb.prototype.eY;
1603
1602
  olympe.dc.Kb.prototype.getCurrentRank=olympe.dc.Kb.prototype.Hm;olympe.dc.Kb.prototype.observeRank=olympe.dc.Kb.prototype.iY;olympe.dc.Kb.prototype.getCurrentAt=olympe.dc.Kb.prototype.ql;olympe.dc.Kb.prototype.observeAt=olympe.dc.Kb.prototype.dY;olympe.dc.Kb.prototype.offReady=olympe.dc.Kb.prototype.PA;olympe.dc.Kb.prototype.onReady=olympe.dc.Kb.prototype.Ii;olympe.dc.Kb.prototype.getBaseTag=olympe.dc.Kb.prototype.Cj;olympe.dc.Kb.Aa=[olympe.j.Ug];h=olympe.dc.Kb.prototype;h.rk.K=olympe.j.J.O;
1604
1603
  h.Kd.K=olympe.j.J.C([]);h.getSubscription.K=new olympe.j.J(()=>olympe.dc.bg.Subscription,[]);h.mi.K=new olympe.j.J(()=>{},[]);h.Cj.K=new olympe.j.J(()=>String,[]);h.AC.K=new olympe.j.J(()=>Array,[]);h.Ii.K=new olympe.j.J(()=>String,[]);h.PA.K=new olympe.j.J(()=>{},[]);h.lS.K=olympe.j.J.T;h.kS.K=olympe.j.J.O;h.get.K=new olympe.j.J(()=>olympe.dc.CloudObject,[],'valueType');h.qu.K=new olympe.j.J(()=>Array,[]);h.Fj.K=olympe.j.J.O;h.has.K=olympe.j.J.T;h.Ei.K=olympe.j.J.O;
1605
1604
  h.Hh.K=new olympe.j.J(()=>olympe.dc.CloudObject,[],'valueType');h.ql.K=olympe.j.J.O;h.Um.K=new olympe.j.J(()=>String,[]);h.rl.K=olympe.j.J.O;h.gf.K=olympe.j.J.D;h.Hm.K=olympe.j.J.O;h.Vd.K=new olympe.j.J(()=>olympe.dc.CloudObject,[],'valueType');h.Sm.K=new olympe.j.J(()=>String,[]);h.Qc.K=olympe.j.J.D;h.aj.K=olympe.j.J.O;h.forEach.K=new olympe.j.J(()=>{},[]);h.yi.K=olympe.j.J.O;h.Ow.K=new olympe.j.J(()=>{},[]);h.transform.K=new olympe.j.J(()=>olympe.dc.Kb,[]);
1606
- h.jy.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.filter.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.Mr.K=new olympe.j.J(()=>olympe.dc.Mp,[]);h.toString.K=olympe.j.J.O;h.jS.K=olympe.j.J.O;h.og.K=olympe.j.J.R;const Vn={AZ:'append',$B:'filter_not',NG:'filter_and',OG:'filter_or'};function Wn(a,b){a=Xn(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.cd.tF(a,b)).D}
1607
- olympe.dc.Mp=class{constructor(a,b){this.C=Xn(a);this.V=olympe.gb.Cb('dc.query');this.valueType=void 0===b?olympe.dc.CloudObject:b;this.Ra=[];this.$b=[];this.jg=void 0}ek(){const a=new olympe.dc.Kb(this.C,this.Ra,this.valueType);'boolean'===typeof this.jg&&(a.jg=this.jg);return a}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Yn('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.Oc.Property)throw new Yn('transform','Properties cannot be used as transformer, unlike relations '+
1608
- d);if(!d||'function'!==typeof d.C)throw new Yn('transform','one of the argument is not a Transformer '+d);const e=d.Ee();null!==e&&(this.valueType=e);this.Ra.push(d)}return this}jy(a){this.Ra.push(new olympe.dc.Ra.ro(a));return this}tZ(a){this.Ra.push(new olympe.dc.Ra.ro(Xn(a)));return this}mS(a){this.valueType=a;return this}oc(a){this.Ra.push(a);this.valueType=a.Ee()||olympe.dc.CloudObject;return this}GM(){var a=[olympe.dc.CloudObject.containsRel,olympe.dc.CloudObject.containsRel];for(const b of a)this.Ra.push(b),
1605
+ h.jy.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.filter.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.Mr.K=new olympe.j.J(()=>olympe.dc.Mp,[]);h.toString.K=olympe.j.J.O;h.jS.K=olympe.j.J.O;h.og.K=olympe.j.J.R;const Wn={AZ:'append',$B:'filter_not',NG:'filter_and',OG:'filter_or'};function Xn(a,b){a=Yn(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.cd.tF(a,b)).D}
1606
+ olympe.dc.Mp=class{constructor(a,b){this.C=Yn(a);this.V=olympe.gb.Cb('dc.query');this.valueType=void 0===b?olympe.dc.CloudObject:b;this.Ra=[];this.$b=[];this.jg=void 0}ek(){const a=new olympe.dc.Kb(this.C,this.Ra,this.valueType);'boolean'===typeof this.jg&&(a.jg=this.jg);return a}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Zn('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.Oc.Property)throw new Zn('transform','Properties cannot be used as transformer, unlike relations '+
1607
+ d);if(!d||'function'!==typeof d.C)throw new Zn('transform','one of the argument is not a Transformer '+d);const e=d.Ee();null!==e&&(this.valueType=e);this.Ra.push(d)}return this}jy(a){this.Ra.push(new olympe.dc.Ra.ro(a));return this}tZ(a){this.Ra.push(new olympe.dc.Ra.ro(Yn(a)));return this}mS(a){this.valueType=a;return this}oc(a){this.Ra.push(a);this.valueType=a.Ee()||olympe.dc.CloudObject;return this}GM(){var a=[olympe.dc.CloudObject.containsRel,olympe.dc.CloudObject.containsRel];for(const b of a)this.Ra.push(b),
1609
1608
  this.valueType=b.Ee()||olympe.dc.CloudObject;return this}FM(a){var b=olympe.dc.CloudObject.extendRel;a=new olympe.dc.Ra.zj(b,b.zc(),olympe.dc.Ra.$C.wH,a);this.Ra.push(a);this.valueType=a.Ee()||olympe.dc.CloudObject;return this}bW(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.ka());void 0===c&&(c=e.zc())}a=new olympe.dc.Ra.iz(b,c);this.Ra.push(a);this.valueType=a.Ee()||olympe.dc.CloudObject;return this}kJ(){this.oc(olympe.dc.CloudObject.instancesRel);return this}Dm(a){var b=
1610
- this.$b.pop();b===Vn.$B&&(a=new olympe.dc.Ca.ik(a),b=this.$b.pop());switch(b){case Vn.NG:b=this.Ra.pop().D;b instanceof olympe.dc.Ca.Ni?(b=b.Ca,b.push(a),a=new olympe.dc.Ca.Ni(...b)):a=new olympe.dc.Ca.Ni(b,a);b=this.$b.pop();break;case Vn.OG:b=this.Ra.pop().D,b instanceof olympe.dc.Ca.Wk?(b=b.Ca,b.push(a),a=new olympe.dc.Ca.Wk(...b)):a=new olympe.dc.Ca.Wk(b,a),b=this.$b.pop()}b===Vn.$B&&(a=new olympe.dc.Ca.ik(a),this.$b.pop());this.Ra.push(new olympe.dc.Ra.Qf(a));return this}YV(a,b,c){return this.Dm(new olympe.dc.Ca.Lk(Wn(a,
1611
- c),new olympe.dc.cd.gm(b)))}contains(a,b,c=!1,d){return this.Dm(new olympe.dc.Ca.Sn(Wn(a,d),new olympe.dc.cd.gm(b),c))}me(a){if(!(a instanceof Array))throw new Yn('instanceOf','Provided argument "models" must be an array.');const b=[];for(let c=0;c<a.length;c++)b.push(Xn(a[c]));return this.Dm(new olympe.dc.Ca.Pv(b))}JA(a){return this.Dm(new olympe.dc.Ca.Lk(new olympe.dc.cd.pw,new olympe.dc.cd.gm(Xn(a))))}ZV(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<
1612
- a.length){this.Re().JA(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().Re().JA(a[b])}return this}AX(a,b){if(!(a instanceof Array))throw new Yn('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];a.forEach(e=>{c.push(e);d.push(e.zc())});return this.Dm(new olympe.dc.Ca.rt(c,d,b))}HA(a,b,c){a=Wn(a,c);return this.Dm(new olympe.dc.Ca.Vy(a,new olympe.dc.cd.gm(b)))}ey(a,b,c){a=Wn(a,c);return this.Dm(new olympe.dc.Ca.Iz(a,new olympe.dc.cd.gm(b)))}YX(a,b,c,d){a=Wn(a,d);return this.Dm(new olympe.dc.Ca.mo(a,
1613
- b,c))}filter(a){const b=new class extends olympe.dc.Ca.Sq{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Dm(b)}Re(){this.$b.push(Vn.$B);return this}and(){this.Ra[this.Ra.length-1]instanceof olympe.dc.Ra.Qf&&this.$b.push(Vn.NG);return this}or(){this.Ra[this.Ra.length-1]instanceof olympe.dc.Ra.Qf&&this.$b.push(Vn.OG);return this}lv(a,b,c){a=Xn(a);let d=null;switch(olympe.dc.eb().Wd(a,olympe.dm.Property.typeRel)){case olympe.dm.String.U.ka():d=new olympe.dc.tg.String(new olympe.dc.cd.nw(a,
1609
+ this.$b.pop();b===Wn.$B&&(a=new olympe.dc.Ca.ik(a),b=this.$b.pop());switch(b){case Wn.NG:b=this.Ra.pop().D;b instanceof olympe.dc.Ca.Ni?(b=b.Ca,b.push(a),a=new olympe.dc.Ca.Ni(...b)):a=new olympe.dc.Ca.Ni(b,a);b=this.$b.pop();break;case Wn.OG:b=this.Ra.pop().D,b instanceof olympe.dc.Ca.Wk?(b=b.Ca,b.push(a),a=new olympe.dc.Ca.Wk(...b)):a=new olympe.dc.Ca.Wk(b,a),b=this.$b.pop()}b===Wn.$B&&(a=new olympe.dc.Ca.ik(a),this.$b.pop());this.Ra.push(new olympe.dc.Ra.Qf(a));return this}YV(a,b,c){return this.Dm(new olympe.dc.Ca.Lk(Xn(a,
1610
+ c),new olympe.dc.cd.gm(b)))}contains(a,b,c=!1,d){return this.Dm(new olympe.dc.Ca.Sn(Xn(a,d),new olympe.dc.cd.gm(b),c))}me(a){if(!(a instanceof Array))throw new Zn('instanceOf','Provided argument "models" must be an array.');const b=[];for(let c=0;c<a.length;c++)b.push(Yn(a[c]));return this.Dm(new olympe.dc.Ca.Pv(b))}JA(a){return this.Dm(new olympe.dc.Ca.Lk(new olympe.dc.cd.pw,new olympe.dc.cd.gm(Yn(a))))}ZV(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<
1611
+ a.length){this.Re().JA(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().Re().JA(a[b])}return this}AX(a,b){if(!(a instanceof Array))throw new Zn('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];a.forEach(e=>{c.push(e);d.push(e.zc())});return this.Dm(new olympe.dc.Ca.rt(c,d,b))}HA(a,b,c){a=Xn(a,c);return this.Dm(new olympe.dc.Ca.Vy(a,new olympe.dc.cd.gm(b)))}ey(a,b,c){a=Xn(a,c);return this.Dm(new olympe.dc.Ca.Iz(a,new olympe.dc.cd.gm(b)))}YX(a,b,c,d){a=Xn(a,d);return this.Dm(new olympe.dc.Ca.mo(a,
1612
+ b,c))}filter(a){const b=new class extends olympe.dc.Ca.Sq{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Dm(b)}Re(){this.$b.push(Wn.$B);return this}and(){this.Ra[this.Ra.length-1]instanceof olympe.dc.Ra.Qf&&this.$b.push(Wn.NG);return this}or(){this.Ra[this.Ra.length-1]instanceof olympe.dc.Ra.Qf&&this.$b.push(Wn.OG);return this}lv(a,b,c){a=Yn(a);let d=null;switch(olympe.dc.eb().Wd(a,olympe.dm.Property.typeRel)){case olympe.dm.String.U.ka():d=new olympe.dc.tg.String(new olympe.dc.cd.nw(a,
1614
1613
  c));break;case olympe.dm.Number.U.ka():d=new olympe.dc.tg.Number(new olympe.dc.cd.$v(a,c));break;case olympe.dm.DateTime.U.ka():d=new olympe.dc.tg.DateTime(new olympe.dc.cd.Bv(a,c))}c=d;null!==c&&this.Ra.push(new olympe.dc.Ra.Cr(c,b));return this}sort(a,b,c){const d=new class extends olympe.dc.tg.Sq{O(e,f){return a(olympe.dc.CloudObject.get(f))}compare(e,f){return b(e,f).valueOf()}};this.Ra.push(new olympe.dc.Ra.Cr(d,c));return this}SV(){this.Ra.push(new olympe.dc.Ra.Cv);return this}bn(a,b){this.Ra.push(new olympe.dc.Ra.wt(a,
1615
- b));return this}};class Yn extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}function Xn(a){return'string'===typeof a||a instanceof olympe.j.kb?a:'function'===typeof a?olympe.dc.Ja.De(a):olympe.j.Zb(a)?a.Vt===olympe.j.kb?a:olympe.j.Xa([a],b=>olympe.j.ic(olympe.dc.Ya(b)),olympe.j.kb):a.ka()}h=olympe.dc.Mp.prototype;h.ek.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.transform.K=olympe.j.J.C([]);h.jy.K=olympe.j.J.C([]);h.tZ.K=olympe.j.J.C([]);h.mS.K=olympe.j.J.C([]);h.oc.K=olympe.j.J.C([]);
1614
+ b));return this}};class Zn extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}function Yn(a){return'string'===typeof a||a instanceof olympe.j.kb?a:'function'===typeof a?olympe.dc.Ja.De(a):olympe.j.Zb(a)?a.Vt===olympe.j.kb?a:olympe.j.Xa([a],b=>olympe.j.ic(olympe.dc.Ya(b)),olympe.j.kb):a.ka()}h=olympe.dc.Mp.prototype;h.ek.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.transform.K=olympe.j.J.C([]);h.jy.K=olympe.j.J.C([]);h.tZ.K=olympe.j.J.C([]);h.mS.K=olympe.j.J.C([]);h.oc.K=olympe.j.J.C([]);
1616
1615
  h.GM.K=olympe.j.J.C([]);h.FM.K=olympe.j.J.C([]);h.bW.K=olympe.j.J.C([]);h.kJ.K=olympe.j.J.C([]);h.Dm.K=olympe.j.J.C([]);h.YV.K=olympe.j.J.C([]);h.contains.K=olympe.j.J.C([]);h.me.K=olympe.j.J.C([]);h.JA.K=olympe.j.J.C([]);h.ZV.K=olympe.j.J.C([]);h.AX.K=olympe.j.J.C([]);h.HA.K=olympe.j.J.C([]);h.ey.K=olympe.j.J.C([]);h.YX.K=olympe.j.J.C([]);h.filter.K=olympe.j.J.C([]);h.Re.K=olympe.j.J.C([]);h.and.K=olympe.j.J.C([]);h.or.K=olympe.j.J.C([]);h.lv.K=olympe.j.J.C([]);h.sort.K=olympe.j.J.C([]);h.SV.K=olympe.j.J.C([]);
1617
- h.bn.K=olympe.j.J.C([]);function Un(a,b,c){const d=b.Cj();var e=new olympe.dc.query.AT;let f;f=d;olympe.j.Zb(f)&&(f=e.add(d));b=(b=b.AC())?Array.isArray(b)?b:[b]:null;e=olympe.dc.bg.Subscription.O(f,b,e);let g,k,l=null!=(k=null==(g=a.C.get(e))?void 0:g.getSubscription())?k:null;null===l&&(a.V.debug('QueryMGR: new',a.D?'local':'remote','subscription "',e,'": #',`${f},`,b),l=new olympe.dc.bg.Subscription(e,d,b,a.O));l.getContext().run(()=>a.process(l,c));return l}
1618
- function Zn(a,b){if(b.W())a.V.debug('ListProcessor: [ID:',b.ja(),'] - Subscription already booted, ignoring');else{a.V.debug('ListProcessor: [ID:',b.ja(),'] - Booting subscription');var c=new olympe.dc.dg.lL(a.db,a.V),d=b.ja();olympe.j.Wa([b.Cj()],e=>{const f=olympe.dc.Ya(e);a.V.debug('ListProcessor: [ID:',b.ja(),'] - Booting with baseTag',f);b.Hg()||b.cf();qh(a.db,f,$n(a,b,c),d);olympe.j.yb().Ve(()=>nh(a.db,f,d));a.db.tc(f.valueOf())||ao(c);b.W()||(ao(c),b.Eb([]))})}}
1619
- function bo(a,b,c,d,e){const f=[b.Cj()],g=m=>m instanceof olympe.dc.Ra.ro;let k;const l=(null!=(k=b.bs())?k:[]).filter(g);for(const m of l){f.push(m.Cj());let n;l.push(...(null!=(n=m.bs())?n:[]).filter(g))}olympe.j.Wa(f,()=>{const m=b.Yc(c);co(a,m,b.ja(),d,e)})}
1620
- function co(a,b,c,d,e){a.V.debug('CoverageProcessor: [ID:',c,'] - checking coverage of remote query over',b.length,'paths.');const f=olympe.j.yb(),g=new olympe.async.wz(f);b.forEach(k=>{g.add((l,m)=>{let n=!1;pk(a.R,k,f,olympe.dc.Jc.SELF,olympe.dc.nb.Jf.cm,{jg:e}).subscribe(rxjs.Subscriber.create(()=>{n||(n=!0,f.run(l))},p=>f.run(()=>m(`The query ${c} is not covered by an existing graphdef, `+`and the specific graphdef id ${k.ja()} has encountered an error: ${p}`))))})});rd(g,(k,l)=>d(l));g.start()}
1621
- function $n(a,b,c){const d=new olympe.dc.dg.vy;let e=!1;const f=olympe.j.yb(),g=b.bs(),k=[];k[g?g.length:0]=(l,m,n,p)=>{f.$f()||f.lc()||(l?b.Ei(n)?a.V.warn('Adding the same index twice (should never happen) for sub #',b.ja(),', index #',n,', tag #',m):(a.V.debug('ListProcessor: [ID:',b.ja(),'] - Adding Instance',m,'to the subscription'),b.ld(n,m)):(a.V.debug('ListProcessor: [ID:',b.ja(),'] - Removing Instance',m,'from the subscription'),b.Yh(n)),e||(eo(c,()=>{p.Up();ao(c)}),f.run(()=>p.rk().Nq(b.Eb.bind(b))),
1622
- e=!0),fo(c,n))};if(null!==g)for(let l=g.length-1;0<=l;l--)k[l]=g[l].C(f,c,k[l+1]);return(l,m)=>{const n=b.ja();c.register(n,null);const p=d.C(l,m,n,null);if(null!==p)k[0](l,m,n,go(p,l,m,n))}}
1623
- olympe.dc.bg.NS=class{constructor(a,b,c,d,e,f){this.V=a;this.db=b;this.D=f||e;this.R=d;this.C=new Map;this.O=new olympe.j.ee('Legacy ListDef processor')}process(a,b){const c=a.ja();var d=this.C.get(c);d||(d=new olympe.dc.bg.xU(a),this.C.set(c,d));d.counter++;ho(d)?this.V.debug('ListProcessor: [ID:',c,'] - id already processed'):(this.V.debug('ListProcessor: [ID:',c,'] - NOT processed yet.'),d=a.vg(),b||this.D&&d===olympe.dc.Jc.SERVER||d===olympe.dc.Jc.SELF?(this.V.debug('QueryMGR: [ID:',c,'] - Local subscription, no need for coverage check, booting subscription '),
1624
- Zn(this,a)):bo(this,a,d,e=>{e?this.V.error(e):Zn(this,a)},b))}};function io(a){return olympe.j.Zb(a)?'Node#'+a.Tb.ja():String(a)}function jo(a,b){return olympe.j.Zb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
1616
+ h.bn.K=olympe.j.J.C([]);function Vn(a,b,c){const d=b.Cj();var e=new olympe.dc.query.AT;let f;f=d;olympe.j.Zb(f)&&(f=e.add(d));b=(b=b.AC())?Array.isArray(b)?b:[b]:null;e=olympe.dc.bg.Subscription.O(f,b,e);let g,k,l=null!=(k=null==(g=a.C.get(e))?void 0:g.getSubscription())?k:null;null===l&&(a.V.debug('QueryMGR: new',a.D?'local':'remote','subscription "',e,'": #',`${f},`,b),l=new olympe.dc.bg.Subscription(e,d,b,a.O));l.getContext().run(()=>a.process(l,c));return l}
1617
+ function $n(a,b){if(b.W())a.V.debug('ListProcessor: [ID:',b.ja(),'] - Subscription already booted, ignoring');else{a.V.debug('ListProcessor: [ID:',b.ja(),'] - Booting subscription');var c=new olympe.dc.dg.lL(a.db,a.V),d=b.ja();olympe.j.Wa([b.Cj()],e=>{const f=olympe.dc.Ya(e);a.V.debug('ListProcessor: [ID:',b.ja(),'] - Booting with baseTag',f);b.Hg()||b.cf();qh(a.db,f,ao(a,b,c),d);olympe.j.yb().Ve(()=>nh(a.db,f,d));a.db.tc(f.valueOf())||bo(c);b.W()||(bo(c),b.Eb([]))})}}
1618
+ function co(a,b,c,d,e){const f=[b.Cj()],g=m=>m instanceof olympe.dc.Ra.ro;let k;const l=(null!=(k=b.bs())?k:[]).filter(g);for(const m of l){f.push(m.Cj());let n;l.push(...(null!=(n=m.bs())?n:[]).filter(g))}olympe.j.Wa(f,()=>{const m=b.Yc(c);eo(a,m,b.ja(),d,e)})}
1619
+ function eo(a,b,c,d,e){a.V.debug('CoverageProcessor: [ID:',c,'] - checking coverage of remote query over',b.length,'paths.');const f=olympe.j.yb(),g=new olympe.async.wz(f);b.forEach(k=>{g.add((l,m)=>{let n=!1;qk(a.R,k,f,olympe.dc.Jc.SELF,olympe.dc.nb.Jf.cm,{jg:e}).subscribe(rxjs.Subscriber.create(()=>{n||(n=!0,f.run(l))},p=>f.run(()=>m(`The query ${c} is not covered by an existing graphdef, `+`and the specific graphdef id ${k.ja()} has encountered an error: ${p}`))))})});rd(g,(k,l)=>d(l));g.start()}
1620
+ function ao(a,b,c){const d=new olympe.dc.dg.vy;let e=!1;const f=olympe.j.yb(),g=b.bs(),k=[];k[g?g.length:0]=(l,m,n,p)=>{f.$f()||f.lc()||(l?b.Ei(n)?a.V.warn('Adding the same index twice (should never happen) for sub #',b.ja(),', index #',n,', tag #',m):(a.V.debug('ListProcessor: [ID:',b.ja(),'] - Adding Instance',m,'to the subscription'),b.ld(n,m)):(a.V.debug('ListProcessor: [ID:',b.ja(),'] - Removing Instance',m,'from the subscription'),b.Yh(n)),e||(fo(c,()=>{p.Up();bo(c)}),f.run(()=>p.rk().Nq(b.Eb.bind(b))),
1621
+ e=!0),go(c,n))};if(null!==g)for(let l=g.length-1;0<=l;l--)k[l]=g[l].C(f,c,k[l+1]);return(l,m)=>{const n=b.ja();c.register(n,null);const p=d.C(l,m,n,null);if(null!==p)k[0](l,m,n,ho(p,l,m,n))}}
1622
+ olympe.dc.bg.NS=class{constructor(a,b,c,d,e,f){this.V=a;this.db=b;this.D=f||e;this.R=d;this.C=new Map;this.O=new olympe.j.ee('Legacy ListDef processor')}process(a,b){const c=a.ja();var d=this.C.get(c);d||(d=new olympe.dc.bg.xU(a),this.C.set(c,d));d.counter++;io(d)?this.V.debug('ListProcessor: [ID:',c,'] - id already processed'):(this.V.debug('ListProcessor: [ID:',c,'] - NOT processed yet.'),d=a.vg(),b||this.D&&d===olympe.dc.Jc.SERVER||d===olympe.dc.Jc.SELF?(this.V.debug('QueryMGR: [ID:',c,'] - Local subscription, no need for coverage check, booting subscription '),
1623
+ $n(this,a)):co(this,a,d,e=>{e?this.V.error(e):$n(this,a)},b))}};function jo(a){return olympe.j.Zb(a)?'Node#'+a.Tb.ja():String(a)}function ko(a,b){return olympe.j.Zb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
1625
1624
  olympe.dc.query.AT=class{constructor(){this.uid=0;this.values=null}add(a){let b;b=olympe.j.Zb(a)?'n'+a.Tb.ja():'p'+ ++this.uid;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.Yb=class{bb(){}C(){}D(){}fb(){}toString(){}};olympe.dc.bg.Subscription=class a extends olympe.j.py{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.j.ee('context subscription '+b,e));this.id=b;this.qc=c;this.Ra=d||null;this.O=this.T.run(()=>olympe.j.la(olympe.dc.bg.Subscription.C.INIT));this.xb=!1;this.ca=this.ob=null}static O(b,c,d){let e;try{e=b;if(c)for(let f=0,g=c.length;f<g;f++)e+='|'+c[f].fb(d);else e+='|null';e=olympe.oa.Xd(e)}catch(f){e=olympe.oa.bf()}return e}ja(){return this.id}Cj(){return this.qc}bs(){return this.Ra}vg(){const b=
1626
1625
  olympe.dc.Kj(),c=olympe.j.Qa(this.Cj());let d;return olympe.dc.CloudObject.instancesRel.Rb(null==(d=this.Ra)?void 0:d[0])?b.fromModel(c):b.Em(c)}Hg(){const b=olympe.j.Qa(this.O);return b&&b.valueOf()>=olympe.dc.bg.Subscription.C.cL}cf(){if(this.O.Tb.lc())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.ob;this.ob=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);K(this.O,olympe.j.la(olympe.dc.bg.Subscription.C.cL))}Pb(){return olympe.j.Xa([this.O],
1627
1626
  ()=>{},olympe.j.ia)}W(){const b=F(this.O);return b&&b.valueOf()>=olympe.dc.bg.Subscription.C.Dt}Ii(b,c){this.W()?b(this):(null===this.ca&&(this.ca=new Map),void 0===c&&(c=olympe.oa.bf()),this.ca.set(c,olympe.j.yb().re(b)));return c||''}PA(b){null!==this.ca&&b&&this.ca.delete(b)}sb(){const b=olympe.dc.bg.Subscription.C.Dt;if(!this.O.Tb.lc()&&olympe.j.Qa(this.O)!==b&&(this.uo(),K(this.O,b),null!==this.ca)){for(const c of this.ca.values())c(this);this.ca=null}}onDestroy(b){this.T.onDestroy(b)}kc(){this.T.destroy()}Eb(b){if(!this.O.Tb.lc()){for(let c=
1628
1627
  0,d=b.length;c<d;c++)this.Wz(b[c],c);if(this.W())this.uo();else{this.xb=b=!0;for(let c in this.D)if(Object.prototype.hasOwnProperty.call(this.D,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.sb()}}}ld(b,c){if(!this.O.Tb.lc()&&(this.Vz(b,olympe.dc.CloudObject.get(c)),b=this.W(),this.xb&&!b)){b=!0;for(let d in this.D)if(Object.prototype.hasOwnProperty.call(this.D,d)&&!Object.prototype.hasOwnProperty.call(this.values,d)){b=!1;break}b&&this.sb()}}Yh(b){this.O.Tb.lc()||(this.wD(b),
1629
1628
  this.uw(b,!this.W()))}jr(){return this.W()?super.jr():'Subscription is not ready!'}Yc(b){const c=olympe.j.Qa(this.Cj());return olympe.dc.bg.Subscription.D(c,b,this.bs())}static D(b,c,d){var e=olympe.dc.nb.from(b,c).Zi();if(null===d)return[e];b=[];b.push(e);for(let f=0,g=d.length;f<g;f++)if(e=d[f],e instanceof olympe.dc.Ra.um){const k=olympe.dc.query.Relation.from(e);b=b.map(l=>l.oc(k,!0))}else if(e instanceof olympe.dc.Ra.zj){const k=olympe.dc.query.Relation.from(e);b=b.map(l=>l.Yp(k,!0,!0))}else if(e instanceof
1630
- olympe.dc.Ra.ro)e=a.D(olympe.j.Qa(e.Cj()),c,e.bs()),b.push(...e);else if(e instanceof olympe.dc.Ra.Qf||e instanceof olympe.dc.Ra.Cr){const k=e.O();b=b.map(l=>{for(const m of k){for(const n of m)l=n.recursive?l.Yp(n,!0,!0):l.oc(n,!0);l=l.back(m.length)}return l})}return b}};olympe.dc.bg.Subscription.C={INIT:0,cL:1,Dt:2};olympe.dc.bg.Subscription.prototype.jr.K=olympe.j.J.O;function ho(a){const b=a.C;a.C=!0;return b}olympe.dc.bg.xU=class{constructor(a){this.counter=0;this.C=!1;this.D=a}getSubscription(){return this.D}};olympe.dc.qo=class{bb(){}Ee(){}C(){}fb(){}toString(){}};olympe.dc.iK=class{O(){}};olympe.dc.Rz=class{bb(){}getValue(){}C(){}fb(){}toString(){}};olympe.dc.tg={};let ko=0;olympe.dc.tg.Sq=class{constructor(){this.id=ko++}bb(){return'CustomLocalComparator#'+ko}R(){return[]}O(){throw Error('GetComparedValue function was not implemented.');}compare(){throw Error('Compare function was not implemented.');}fb(){return`{"c":"${this.bb()}"}`}toString(){return this.bb()+'()'}};olympe.dc.tg.Sq.Aa=[olympe.dc.Qn];olympe.dc.tg.DateTime=class{constructor(a){this.C=a}bb(){return Lh(olympe.dc.tg.DateTime)}R(){return this.C.C()}O(a,b){return this.C.getValue(a,b)}compare(a,b){if(!a)return b?-1:0;if(!b)return 1;a=a.getTime();b=b.getTime();return a!==b?a>b?1:-1:0}fb(a){return'{"c":"'+this.bb()+'",a:['+this.C.fb(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};X('olympe.dc.comparators.DateTime',olympe.dc.tg.DateTime);olympe.dc.tg.DateTime.Aa=[olympe.dc.Qn];olympe.dc.tg.Number=class{constructor(a){this.C=a}bb(){return Lh(olympe.dc.tg.Number)}R(){return this.C.C()}O(a,b){return this.C.getValue(a,b)}compare(a,b){return a!==b?a>b?1:-1:0}fb(a){return`{"c":"${this.bb()}",a:[${this.C.fb(a)}]}`}toString(){return`Number(${this.C.toString()})`}};X('olympe.dc.comparators.Number',olympe.dc.tg.Number);olympe.dc.tg.Number.Aa=[olympe.dc.Qn];olympe.dc.tg.String=class{constructor(a){this.C=a}bb(){return Lh(olympe.dc.tg.String)}R(){return this.C.C()}O(a,b){return olympe.j.Xa([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.j.kb)}compare(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}fb(a){return`{"c":"${this.bb()}",a:[${this.C.fb(a)}]}`}toString(){return`String(${this.C.toString()})`}};X('olympe.dc.comparators.String',olympe.dc.tg.String);olympe.dc.tg.String.Aa=[olympe.dc.Qn];olympe.dc.Ca={};let lo=0;olympe.dc.Ca.Sq=class{constructor(){this.id=lo++}bb(){return'CustomLocalPredicate#'+this.id}D(){return[]}C(){throw Error('Test function was not implemented.');}fb(){return`{"c":"${this.bb()}"}`}toString(){return this.bb()+'()'}};olympe.dc.Ca.Sq.Aa=[olympe.dc.Yb];olympe.dc.Ca.yB=class{constructor(a,b){this.O=a;this.R=b}bb(){}D(){return[this.O.C(),this.R.C()]}C(a,b){return a.run(()=>olympe.j.Xa([this.O.getValue(a,b),this.R.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return olympe.j.hc(this.T('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d)))},olympe.j.ia))}T(){}fb(a){return'{"c":"'+this.bb()+'","a":['+this.O.fb(a)+','+this.R.fb(a)+']}'}toString(){return this.bb().replace(/^.+\./,'')+'('+this.O.toString()+','+this.R.toString()+')'}};
1629
+ olympe.dc.Ra.ro)e=a.D(olympe.j.Qa(e.Cj()),c,e.bs()),b.push(...e);else if(e instanceof olympe.dc.Ra.Qf||e instanceof olympe.dc.Ra.Cr){const k=e.O();b=b.map(l=>{for(const m of k){for(const n of m)l=n.recursive?l.Yp(n,!0,!0):l.oc(n,!0);l=l.back(m.length)}return l})}return b}};olympe.dc.bg.Subscription.C={INIT:0,cL:1,Dt:2};olympe.dc.bg.Subscription.prototype.jr.K=olympe.j.J.O;function io(a){const b=a.C;a.C=!0;return b}olympe.dc.bg.xU=class{constructor(a){this.counter=0;this.C=!1;this.D=a}getSubscription(){return this.D}};olympe.dc.qo=class{bb(){}Ee(){}C(){}fb(){}toString(){}};olympe.dc.iK=class{O(){}};olympe.dc.Rz=class{bb(){}getValue(){}C(){}fb(){}toString(){}};olympe.dc.tg={};let lo=0;olympe.dc.tg.Sq=class{constructor(){this.id=lo++}bb(){return'CustomLocalComparator#'+lo}R(){return[]}O(){throw Error('GetComparedValue function was not implemented.');}compare(){throw Error('Compare function was not implemented.');}fb(){return`{"c":"${this.bb()}"}`}toString(){return this.bb()+'()'}};olympe.dc.tg.Sq.Aa=[olympe.dc.Qn];olympe.dc.tg.DateTime=class{constructor(a){this.C=a}bb(){return Lh(olympe.dc.tg.DateTime)}R(){return this.C.C()}O(a,b){return this.C.getValue(a,b)}compare(a,b){if(!a)return b?-1:0;if(!b)return 1;a=a.getTime();b=b.getTime();return a!==b?a>b?1:-1:0}fb(a){return'{"c":"'+this.bb()+'",a:['+this.C.fb(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};X('olympe.dc.comparators.DateTime',olympe.dc.tg.DateTime);olympe.dc.tg.DateTime.Aa=[olympe.dc.Qn];olympe.dc.tg.Number=class{constructor(a){this.C=a}bb(){return Lh(olympe.dc.tg.Number)}R(){return this.C.C()}O(a,b){return this.C.getValue(a,b)}compare(a,b){return a!==b?a>b?1:-1:0}fb(a){return`{"c":"${this.bb()}",a:[${this.C.fb(a)}]}`}toString(){return`Number(${this.C.toString()})`}};X('olympe.dc.comparators.Number',olympe.dc.tg.Number);olympe.dc.tg.Number.Aa=[olympe.dc.Qn];olympe.dc.tg.String=class{constructor(a){this.C=a}bb(){return Lh(olympe.dc.tg.String)}R(){return this.C.C()}O(a,b){return olympe.j.Xa([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.j.kb)}compare(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}fb(a){return`{"c":"${this.bb()}",a:[${this.C.fb(a)}]}`}toString(){return`String(${this.C.toString()})`}};X('olympe.dc.comparators.String',olympe.dc.tg.String);olympe.dc.tg.String.Aa=[olympe.dc.Qn];olympe.dc.Ca={};let mo=0;olympe.dc.Ca.Sq=class{constructor(){this.id=mo++}bb(){return'CustomLocalPredicate#'+this.id}D(){return[]}C(){throw Error('Test function was not implemented.');}fb(){return`{"c":"${this.bb()}"}`}toString(){return this.bb()+'()'}};olympe.dc.Ca.Sq.Aa=[olympe.dc.Yb];olympe.dc.Ca.yB=class{constructor(a,b){this.O=a;this.R=b}bb(){}D(){return[this.O.C(),this.R.C()]}C(a,b){return a.run(()=>olympe.j.Xa([this.O.getValue(a,b),this.R.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return olympe.j.hc(this.T('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d)))},olympe.j.ia))}T(){}fb(a){return'{"c":"'+this.bb()+'","a":['+this.O.fb(a)+','+this.R.fb(a)+']}'}toString(){return this.bb().replace(/^.+\./,'')+'('+this.O.toString()+','+this.R.toString()+')'}};
1631
1630
  olympe.dc.Ca.yB.Aa=[olympe.dc.Yb];olympe.dc.Ca.Ni=class{constructor(a){this.Ca=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.Ca=this.Ca.concat(arguments[c]):this.Ca.push(arguments[c])}bb(){return Lh(olympe.dc.Ca.Ni)}D(){return this.Ca.reduce((a,b)=>a.concat(b.D()),[])}C(a,b){return a.run(()=>olympe.j.Xa(this.Ca.map(c=>c.C(a,b)),(...c)=>olympe.j.hc(c.every(d=>d.valueOf())),olympe.j.ia))}fb(a){const b=this.Ca.map(c=>c.fb(a));return'{"c":"'+this.bb()+'","a":['+b.join(',')+']}'}toString(){return'And('+this.Ca.map(a=>
1632
1631
  a.toString()).join(',')+')'}};X('olympe.dc.predicates.And',olympe.dc.Ca.Ni);olympe.dc.Ca.Ni.Aa=[olympe.dc.Yb];olympe.dc.Ca.FB=class{constructor(a,b){this.Oj=a;this.value=b}C(a,b){return a.run(()=>olympe.j.Xa([this.Oj,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return olympe.j.hc((Number(c)&Number(d.valueOf()))===Number(c))},olympe.j.ia))}bb(){return Lh(olympe.dc.Ca.FB)}D(){return[this.value.C()]}fb(a){const b=olympe.j.Zb(this.Oj)?F(this.Oj).valueOf():this.Oj.valueOf();return'{"c":"'+this.bb()+'","a":['+b+','+this.value.fb(a)+']}'}toString(){const a=olympe.j.Zb(this.Oj)?F(this.Oj).valueOf():this.Oj.valueOf();
1633
- return this.bb().replace(/^.+\./,'')+'('+a.toString()+','+this.value.toString()+')'}};X('olympe.dc.predicates.BitMask',olympe.dc.Ca.FB);olympe.dc.Ca.FB.Aa=[olympe.dc.Yb];olympe.dc.Ca.Sn=class{constructor(a,b,c){this.source=a;this.value=b;this.O=c?c:!1}bb(){return Lh(olympe.dc.Ca.Sn)}D(){return[this.source.C(),this.value.C()]}Sd(){return this.source}getValue(){return this.value}C(a,b){return a.run(()=>olympe.j.Xa([this.source.getValue(a,b),this.value.getValue(a,b),this.O],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.j.hc(c.includes(d))},olympe.j.ia))}fb(a){const b=this.source.fb(a),c=this.value.fb(a);a=jo(a,this.O);
1634
- return'{"c":"'+this.bb()+'","a":['+b+','+c+','+a+']}'}toString(){const a=io(this.O);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};X('olympe.dc.predicates.Contains',olympe.dc.Ca.Sn);olympe.dc.Ca.Sn.Aa=[olympe.dc.Yb];olympe.dc.Ca.Lk=class{constructor(a,b){this.O=a;this.R=b}bb(){return Lh(olympe.dc.Ca.Lk)}D(){return[this.O.C(),this.R.C()]}C(a,b){return a.run(()=>olympe.j.Xa([this.O.getValue(a,b),this.R.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Se?c.Se(d):'object'===typeof d&&void 0!==d.Se?d.Se(c):olympe.j.hc(c.valueOf()===d.valueOf()),olympe.j.ia,'Test equal predicate'))}fb(a){return'{"c":"'+this.bb()+'","a":['+this.O.fb(a)+','+this.R.fb(a)+']}'}toString(){return'Equals('+this.O.toString()+','+this.R.toString()+
1635
- ')'}};X('olympe.dc.predicates.Equals',olympe.dc.Ca.Lk);olympe.dc.Ca.Lk.Aa=[olympe.dc.Yb];olympe.dc.Ca.HQ=class extends olympe.dc.Ca.Lk{constructor(a,b){super(a,new olympe.dc.cd.gm(b))}};olympe.dc.Ca.HQ.Aa=[olympe.dc.Yb];olympe.dc.Ca.Vy=class extends olympe.dc.Ca.yB{constructor(a,b){super(a,b)}bb(){return Lh(olympe.dc.Ca.Vy)}T(a,b){return a>b}};X('olympe.dc.predicates.Greater',olympe.dc.Ca.Vy);olympe.dc.Ca.rt=class{constructor(a,b,c){this.md=[];this.O=c instanceof Array?c:void 0!==c?[olympe.dc.Ya(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Ra.zj?this.md.push(new mo(c.ka(),c.zc(),c.O,c.D)):this.md.push(new mo(olympe.dc.Ya(c),b[d],1,1))}bb(){return Lh(olympe.dc.Ca.rt)}D(){return[this.md.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=a.run(()=>M(olympe.j.Za(Boolean),!1)),d=olympe.oa.bf(),e=olympe.dc.eb();let f=0;a=(k,l)=>{0!==this.O.length&&
1636
- !this.O.includes(l)||c.getContext().lc()||c.getContext().$f()||(f+=k?1:-1,c.update(0<f))};const g=this.md;for(let k=g.length-1;0<=k;k--)a=no(g[k],e,a,d+k);qh(e,b,a,d);c.getContext().onDestroy(()=>{nh(e,b,d)});return c.wa()}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(this.md.map(a=>a.fb()))+(0!==this.O.length?',"'+this.O.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.O.length?'#'+this.O.toString()+', ':'')+this.md.map(a=>a.fb())+')'}};X('olympe.dc.predicates.HasRelated',olympe.dc.Ca.rt);
1637
- function no(a,b,c,d){const e=Object.create(null);d+=olympe.oa.pk();const f=(g,k,l)=>{l>=a.D&&c(g,k);if(!(0<=a.C&&l>=a.C)){var m=d+l;g?e[k]||(e[k]=!0,Ui(b,k,a,(n,p)=>{f(n,p,l+1)},m)):(delete e[k],b.D(k,a,m))}};return(g,k)=>f(g,k,0)}class mo extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.C=d}fb(){return`${this.ka()}, ${this.zc()}, ${this.D}, ${this.C}`}}olympe.dc.Ca.rt.Aa=[olympe.dc.Yb];olympe.dc.Ca.mC=class{constructor(a,b,c){this.md=[];this.O=void 0!==c?c.map(olympe.dc.Ya):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Ra.zj?this.md.push(new oo(c.ka(),c.zc(),c.O,c.D)):this.md.push(new oo(olympe.dc.Ya(c),b[d],1,1))}bb(){return Lh(olympe.dc.Ca.mC)}D(){return[this.md.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=a.run(()=>M(olympe.j.Za(Boolean),!1)),d=olympe.dc.eb(),e=olympe.oa.pk();let f=(l,m,n)=>{m&&(null===this.O||this.O.includes(n))&&
1638
- l(1)};const g=this.md;for(let l=g.length-1;0<=l;l--)f=po(g[l],d,f,e+l);let k=0;qh(d,b,f.bind(null,l=>{c.getContext().$f()||c.getContext().lc()||(k+=l,c.update(0<k))}),e);a.onDestroy(()=>nh(d,b,e));return c.wa()}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(this.md.map(a=>a.fb()))+(null!==this.O?',"'+this.O.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.O?'#['+this.O.toString()+'], ':'')+this.md.map(a=>a.fb())+')'}};X('olympe.dc.predicates.HasRelatedTree',olympe.dc.Ca.mC);
1639
- function po(a,b,c,d){const e=a.O,f=a.T,g=new Set,k=(m,n,p)=>{f.has(n)?f.get(n).set(d+p,m):f.set(n,(new Map).set(d+p,m))},l=(m,n,p,r,t)=>{const u=olympe.oa.pk();if(r){const v=p+t,w=x=>{const y=f.get(t);if(g.has(v))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${p} and ${t}`);void 0!==y&&null!==y&&(g.add(v),e.set(t,(e.get(t)||0)+x),Array.from(y.values()).forEach(A=>A(x)));g.delete(v)};k(m,t,p);e.has(t)?m(e.get(t)):(n>=a.D&&
1640
- c(x=>{e.set(t,(e.get(t)||0)+x);m(x)},r,t),(0>a.C||n<=a.C)&&t!==p&&Ui(b,t,a,l.bind(a,w,n+1,t),u))}else m(-e.get(t)),f.get(t).delete(d+p),0===f.get(t).size&&(e.delete(t),f.delete(t),b.D(t,a,u))};return(m,n,p)=>l(m,0,'origin',n,p)}class oo extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.C=d;this.T=new Map;this.O=new Map}fb(){return`${this.ka()}, ${this.zc()}, ${this.D}, ${this.C}`}}olympe.dc.Ca.mC.Aa=[olympe.dc.Yb];olympe.dc.Ca.Pv=class{constructor(a){this.O=new Set;a instanceof Array?a.forEach(b=>{this.O.add(olympe.dc.Ya(b))}):this.O.add(olympe.dc.Ya(a))}bb(){return Lh(olympe.dc.Ca.Pv)}D(){return[]}C(a,b){const c=a.run(()=>M(olympe.j.Za(olympe.j.ia),olympe.j.ia.pb)),d=olympe.dc.eb();let e=[];const f=()=>{e.forEach(k=>{d.D(k.tag,k.relation,k.id)});e=[]},g=(k,l)=>{if(k)if(l===olympe.dc.Ya(olympe.dc.CloudObject))c.update(olympe.j.hc(this.O.has(l))),f();else{for(const m of e)if(m.tag===l)throw Error(`You should never extend a model to itself (${l})`);
1641
- this.O.has(l)?(c.update(olympe.j.ia.C),f()):(k=new qo(l,olympe.dc.CloudObject.extendRel),e.push(k),Ui(d,k.tag,k.relation,g,k.id))}};a=new qo(b,olympe.dc.CloudObject.modelRel);e.push(a);Ui(d,a.tag,a.relation,g,a.id);c.getContext().onDestroy(f);return c.wa()}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(Array.from(this.O))+']}'}toString(){return'InstanceOf('+Array.from(this.O).join(', ')+')'}};class qo{constructor(a,b){this.tag=a;this.relation=b;this.id=olympe.oa.pk()}}
1632
+ return this.bb().replace(/^.+\./,'')+'('+a.toString()+','+this.value.toString()+')'}};X('olympe.dc.predicates.BitMask',olympe.dc.Ca.FB);olympe.dc.Ca.FB.Aa=[olympe.dc.Yb];olympe.dc.Ca.Sn=class{constructor(a,b,c){this.source=a;this.value=b;this.O=c?c:!1}bb(){return Lh(olympe.dc.Ca.Sn)}D(){return[this.source.C(),this.value.C()]}Sd(){return this.source}getValue(){return this.value}C(a,b){return a.run(()=>olympe.j.Xa([this.source.getValue(a,b),this.value.getValue(a,b),this.O],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.j.hc(c.includes(d))},olympe.j.ia))}fb(a){const b=this.source.fb(a),c=this.value.fb(a);a=ko(a,this.O);
1633
+ return'{"c":"'+this.bb()+'","a":['+b+','+c+','+a+']}'}toString(){const a=jo(this.O);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};X('olympe.dc.predicates.Contains',olympe.dc.Ca.Sn);olympe.dc.Ca.Sn.Aa=[olympe.dc.Yb];olympe.dc.Ca.Lk=class{constructor(a,b){this.O=a;this.R=b}bb(){return Lh(olympe.dc.Ca.Lk)}D(){return[this.O.C(),this.R.C()]}C(a,b){return a.run(()=>olympe.j.Xa([this.O.getValue(a,b),this.R.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Se?c.Se(d):'object'===typeof d&&void 0!==d.Se?d.Se(c):olympe.j.hc(c.valueOf()===d.valueOf()),olympe.j.ia,'Test equal predicate'))}fb(a){return'{"c":"'+this.bb()+'","a":['+this.O.fb(a)+','+this.R.fb(a)+']}'}toString(){return'Equals('+this.O.toString()+','+this.R.toString()+
1634
+ ')'}};X('olympe.dc.predicates.Equals',olympe.dc.Ca.Lk);olympe.dc.Ca.Lk.Aa=[olympe.dc.Yb];olympe.dc.Ca.HQ=class extends olympe.dc.Ca.Lk{constructor(a,b){super(a,new olympe.dc.cd.gm(b))}};olympe.dc.Ca.HQ.Aa=[olympe.dc.Yb];olympe.dc.Ca.Vy=class extends olympe.dc.Ca.yB{constructor(a,b){super(a,b)}bb(){return Lh(olympe.dc.Ca.Vy)}T(a,b){return a>b}};X('olympe.dc.predicates.Greater',olympe.dc.Ca.Vy);olympe.dc.Ca.rt=class{constructor(a,b,c){this.md=[];this.O=c instanceof Array?c:void 0!==c?[olympe.dc.Ya(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Ra.zj?this.md.push(new no(c.ka(),c.zc(),c.O,c.D)):this.md.push(new no(olympe.dc.Ya(c),b[d],1,1))}bb(){return Lh(olympe.dc.Ca.rt)}D(){return[this.md.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=a.run(()=>M(olympe.j.Za(Boolean),!1)),d=olympe.oa.bf(),e=olympe.dc.eb();let f=0;a=(k,l)=>{0!==this.O.length&&
1635
+ !this.O.includes(l)||c.getContext().lc()||c.getContext().$f()||(f+=k?1:-1,c.update(0<f))};const g=this.md;for(let k=g.length-1;0<=k;k--)a=oo(g[k],e,a,d+k);qh(e,b,a,d);c.getContext().onDestroy(()=>{nh(e,b,d)});return c.wa()}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(this.md.map(a=>a.fb()))+(0!==this.O.length?',"'+this.O.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.O.length?'#'+this.O.toString()+', ':'')+this.md.map(a=>a.fb())+')'}};X('olympe.dc.predicates.HasRelated',olympe.dc.Ca.rt);
1636
+ function oo(a,b,c,d){const e=Object.create(null);d+=olympe.oa.pk();const f=(g,k,l)=>{l>=a.D&&c(g,k);if(!(0<=a.C&&l>=a.C)){var m=d+l;g?e[k]||(e[k]=!0,Ui(b,k,a,(n,p)=>{f(n,p,l+1)},m)):(delete e[k],b.D(k,a,m))}};return(g,k)=>f(g,k,0)}class no extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.C=d}fb(){return`${this.ka()}, ${this.zc()}, ${this.D}, ${this.C}`}}olympe.dc.Ca.rt.Aa=[olympe.dc.Yb];olympe.dc.Ca.mC=class{constructor(a,b,c){this.md=[];this.O=void 0!==c?c.map(olympe.dc.Ya):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Ra.zj?this.md.push(new po(c.ka(),c.zc(),c.O,c.D)):this.md.push(new po(olympe.dc.Ya(c),b[d],1,1))}bb(){return Lh(olympe.dc.Ca.mC)}D(){return[this.md.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=a.run(()=>M(olympe.j.Za(Boolean),!1)),d=olympe.dc.eb(),e=olympe.oa.pk();let f=(l,m,n)=>{m&&(null===this.O||this.O.includes(n))&&
1637
+ l(1)};const g=this.md;for(let l=g.length-1;0<=l;l--)f=qo(g[l],d,f,e+l);let k=0;qh(d,b,f.bind(null,l=>{c.getContext().$f()||c.getContext().lc()||(k+=l,c.update(0<k))}),e);a.onDestroy(()=>nh(d,b,e));return c.wa()}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(this.md.map(a=>a.fb()))+(null!==this.O?',"'+this.O.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.O?'#['+this.O.toString()+'], ':'')+this.md.map(a=>a.fb())+')'}};X('olympe.dc.predicates.HasRelatedTree',olympe.dc.Ca.mC);
1638
+ function qo(a,b,c,d){const e=a.O,f=a.T,g=new Set,k=(m,n,p)=>{f.has(n)?f.get(n).set(d+p,m):f.set(n,(new Map).set(d+p,m))},l=(m,n,p,r,t)=>{const u=olympe.oa.pk();if(r){const v=p+t,w=x=>{const y=f.get(t);if(g.has(v))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${p} and ${t}`);void 0!==y&&null!==y&&(g.add(v),e.set(t,(e.get(t)||0)+x),Array.from(y.values()).forEach(A=>A(x)));g.delete(v)};k(m,t,p);e.has(t)?m(e.get(t)):(n>=a.D&&
1639
+ c(x=>{e.set(t,(e.get(t)||0)+x);m(x)},r,t),(0>a.C||n<=a.C)&&t!==p&&Ui(b,t,a,l.bind(a,w,n+1,t),u))}else m(-e.get(t)),f.get(t).delete(d+p),0===f.get(t).size&&(e.delete(t),f.delete(t),b.D(t,a,u))};return(m,n,p)=>l(m,0,'origin',n,p)}class po extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.C=d;this.T=new Map;this.O=new Map}fb(){return`${this.ka()}, ${this.zc()}, ${this.D}, ${this.C}`}}olympe.dc.Ca.mC.Aa=[olympe.dc.Yb];olympe.dc.Ca.Pv=class{constructor(a){this.O=new Set;a instanceof Array?a.forEach(b=>{this.O.add(olympe.dc.Ya(b))}):this.O.add(olympe.dc.Ya(a))}bb(){return Lh(olympe.dc.Ca.Pv)}D(){return[]}C(a,b){const c=a.run(()=>M(olympe.j.Za(olympe.j.ia),olympe.j.ia.pb)),d=olympe.dc.eb();let e=[];const f=()=>{e.forEach(k=>{d.D(k.tag,k.relation,k.id)});e=[]},g=(k,l)=>{if(k)if(l===olympe.dc.Ya(olympe.dc.CloudObject))c.update(olympe.j.hc(this.O.has(l))),f();else{for(const m of e)if(m.tag===l)throw Error(`You should never extend a model to itself (${l})`);
1640
+ this.O.has(l)?(c.update(olympe.j.ia.C),f()):(k=new ro(l,olympe.dc.CloudObject.extendRel),e.push(k),Ui(d,k.tag,k.relation,g,k.id))}};a=new ro(b,olympe.dc.CloudObject.modelRel);e.push(a);Ui(d,a.tag,a.relation,g,a.id);c.getContext().onDestroy(f);return c.wa()}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(Array.from(this.O))+']}'}toString(){return'InstanceOf('+Array.from(this.O).join(', ')+')'}};class ro{constructor(a,b){this.tag=a;this.relation=b;this.id=olympe.oa.pk()}}
1642
1641
  X('olympe.dc.predicates.InstanceOf',olympe.dc.Ca.Pv);olympe.dc.Ca.Pv.Aa=[olympe.dc.Yb];olympe.dc.Ca.ik=class{constructor(a){this.O=a}bb(){return Lh(olympe.dc.Ca.ik)}D(){return this.O.D()}C(a,b){return a.run(()=>olympe.j.Xa([this.O.C(a,b)],c=>olympe.j.hc(!c.valueOf()),olympe.j.ia))}fb(a){return`{"c":"${this.bb()}","a":[${this.O.fb(a)}]}`}toString(){return'Not('+this.O.toString()+')'}};X('olympe.dc.predicates.Not',olympe.dc.Ca.ik);olympe.dc.Ca.ik.Aa=[olympe.dc.Yb];olympe.dc.Ca.Wk=class{constructor(a){this.Ca=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.Ca=this.Ca.concat(arguments[c]):this.Ca.push(arguments[c])}bb(){return Lh(olympe.dc.Ca.Wk)}D(){return this.Ca.reduce((a,b)=>a.concat(b.D()),[])}C(a,b){return a.run(()=>olympe.j.Xa(this.Ca.map(c=>c.C(a,b)),(...c)=>olympe.j.hc(c.some(d=>d.valueOf())),olympe.j.ia))}fb(a){const b=this.Ca.map(c=>c.fb(a));return'{"c":"'+this.bb()+'","a":['+b.join(',')+']}'}toString(){return'Or('+this.Ca.map(a=>
1643
- a.toString()).join(',')+')'}};X('olympe.dc.predicates.Or',olympe.dc.Ca.Wk);olympe.dc.Ca.Wk.Aa=[olympe.dc.Yb];olympe.dc.Ca.mo=class{constructor(a,b,c){this.source=a;this.R=b;this.O=void 0===c?!0:c}bb(){return Lh(olympe.dc.Ca.mo)}D(){return[this.source.C()]}Sd(){return this.source}C(a,b){return a.run(()=>olympe.j.Xa([this.source.getValue(a,b),this.R,this.O],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.j.hc((new RegExp(d)).test(c))},olympe.j.ia))}fb(a){const b=this.source.fb(a),c=jo(a,this.R);a=jo(a,this.O);return'{"c":"'+this.bb()+'","a":['+b+','+c+','+
1644
- a+']}'}toString(){const a=io(this.O);return'Regex('+this.source.toString()+','+this.R+','+a+')'}};X('olympe.dc.predicates.Regex',olympe.dc.Ca.mo);olympe.dc.Ca.mo.Aa=[olympe.dc.Yb];olympe.dc.Ca.Iz=class extends olympe.dc.Ca.yB{constructor(a,b){super(a,b)}bb(){return Lh(olympe.dc.Ca.Iz)}T(a,b){return a<b}};X('olympe.dc.predicates.Smaller',olympe.dc.Ca.Iz);olympe.dc.dg={};olympe.dc.dg.vy=class{constructor(){this.W=this.item=this.R=this.D=null}T(){return null!==this.D}$(a){if(null!==this.D)throw Error('Manager already activated (depth='+this.D+')');this.D=a;this.O()}C(a,b,c){b=this.item;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.dg.Ny(this),this.R=c,this.item=b):this.item=this.R=null;return b}O(){if(null===this.D)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.W){const a=
1645
- [];null!==this.item&&(0<=this.D?ro(so(this.item,this.D),a):a.push(this.R));this.W(a)}}Nq(a){this.W=a}};olympe.dc.dg.vy.Aa=[olympe.dc.dg.Cc];function go(a,b,c,d){b?a.T[d]=c:delete a.T[d];null===a.D&&(a.D=new olympe.dc.dg.Ny(a.Na,a));return a.D}function so(a,b){for(let c=0;c<b;c++)if(null!==a.D)a=a.D;else break;return a}function ro(a,b){a=a.T;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.dg.Ny=class{constructor(a,b){this.Na=a;this.parent=b||null;this.depth=b?b.depth+1:0;this.T=Object.create(null);this.D=null}rk(){return this.Na}Up(){this.Na.T()?this.Na.O():this.Na.$(this.depth-1)}};class to extends olympe.dc.dg.Ny{constructor(a,b,c){super(a);this.R=b;this.tag=c;this.$=this.W=this.O=!1;this.C=null}}
1646
- function uo(a,b,c,d,e){const f=Object.create(null),g=a.ma,k=a.R;let l,m,n;a.da=!0;m=0;for(n=g.length;m<n;m++)f[g[m]]=null;g.length=0;m=c;for(n=Math.min(b.length,d);m<n;m++)l=b[m],c=k[l],void 0!==c&&(delete f[l],g.push(l),c.O||(c.O=!0,e(!0,c.tag,c.R,c)));for(l in f)Object.prototype.hasOwnProperty.call(f,l)&&(c=k[l],c.O&&(c.O=!1,e(!1,c.tag,c.R,c)),c.W&&(c.C=null,delete k[l]),delete f[l]);a.da=!1;null!==a.D&&a.O()}
1647
- olympe.dc.dg.IC=class{constructor(){this.R={};this.ma=[];this.D=null;this.da=!1;this.W=[];this.ca=null}T(){return null!==this.D}$(a){if(null!==this.D)throw Error('Manager already activated (depth='+this.D+')');this.D=a;this.O()}O(){if(null===this.D)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.da){var a=this.ma,b=a.length,c=this.R,d;for(d=this.W.length=0;d<b;d++){var e=c[a[d]];if(0>this.D)this.W.push(e.R);else{if(!e.$){var f=e,g=this.D;f.$=!0;f.C=so(f,g)}null!==
1648
- e.C&&ro(e.C,this.W)}}this.ca&&this.ca(this.W)}}Nq(a){this.ca=a}C(a,b,c){let d=this.R[c];a?void 0===d?(d=new to(this,c,b),this.R[c]=d):(d.tag=b,d.W=!1):void 0!==d&&(d.W=!0);return d}};olympe.dc.dg.IC.Aa=[olympe.dc.dg.Cc];olympe.dc.dg.Cc=class{constructor(){}C(){}T(){}$(){}O(){}Nq(){}};function vo(a,b){olympe.j.Mg(a.value)?(a.C=olympe.j.cg(a.value,b),Sb(a.C)||b()):b()}function wo(a,b){if(olympe.j.Mg(a.value)){const c=olympe.j.yb(),d=a.R;olympe.j.Wa([a.value],e=>{d!==e.valueOf()&&(c.run(()=>vo(a,b)),olympe.j.yb().destroy())})}}
1649
- class xo extends olympe.dc.dg.Ny{constructor(a,b,c){super(a);this.$=b;this.value=c;this.R=this.Qa();this.position=this.C=null;this.W=!1;this.O=null}Qa(){const a=olympe.j.Qa(this.value);return a?a.valueOf():a}destroy(){this.C&&(this.C.destroy(),this.C=null);this.O=this.value=null}lc(){return null===this.value}}
1650
- function yo(a,b){if(!b.lc()){var c=a.D;var d=a.ma,e=b.Qa(),f=0;let g=c.length,k=0,l;for(null!==b.position&&--g;g>f;){k=Math.floor((f+g)/2);l=d(c[k].R,e);if(0===l||2>g-f){0>l&&null!==b.position&&b.position<=k&&(l=d(c[g].R,e));k=0>l?g:k;break}0>l?f=k:g=k}c=k;b.R=b.Qa();if(c!==b.position){d=a.D;e=d.length;f=b.position;null===f&&(f=e);if(c<f)for(e=f;e>c;e--)d[e]=d[e-1],d[e].position=e;else for(e=f;e<c;e++)d[e]=d[e+1],d[e].position=e;d[c]=b;d[c].position=c;b.W&&a.O()}}}
1651
- function zo(a){const b=a.ma;a.D.sort((c,d)=>b(c.Qa(),d.Qa()))}
1652
- olympe.dc.dg.iL=class{constructor(a){this.ma=a;this.R=null;this.D=[];this.W=[];this.ca=null;this.da=new Map}C(a,b,c,d){b='$'+c;const e=this.D;let f;if(a)f=new xo(this,c,d),this.da.set(b,f),this.T()?vo(f,()=>yo(this,f)):(f.position=e.length,e.push(f));else{f=this.da.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.da.delete(b);null!==f.position&&(this.T()?this.remove(f):delete e[f.position]);f.destroy()}return f}T(){return null!==this.R}$(a){if(null!==this.R)throw Error('Manager already activated (depth='+
1653
- this.R+')');this.R=a;zo(this);for(let b=0,c=this.D.length;b<c;b++){const d=this.D[b];d.position=b;wo(d,()=>yo(this,d))}this.O()}O(){if(null===this.R)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.D.length;this.W.length=0;for(let d=0;d<a;d++){let e=this.D[d];if(!e.W){var b=e,c=this.R;b.W=!0;b.O=so(b,c)}0>this.R?this.W.push(e.$):e.O&&ro(e.O,this.W)}this.ca&&this.ca(this.W)}Nq(a){this.ca=a}remove(a){const b=this.D,c=b.length-1;if(null!==a.position){for(a=
1654
- a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.dg.iL.Aa=[olympe.dc.dg.Cc];function ao(a){if(!a.D){for(let b in a.O)Ao(a.O[b]);a.D=!0}a.R=null;a.T=null}function eo(a,b,c){a.O[c||'root'].R=b}function fo(a,b,c){a.O[c||'root'].Up(b)}function Bo(a,b,c,d){const e=a.T,f=b+d+c;let g=e[f];void 0===g&&(g=ej(a.db,b,c,d),e[f]=g);return g}function Co(a,b){a.D||a.C.Up(b)}function Do(a,b,c,d,e){if(!a.D){let f=Bo(a,c,d,e||olympe.dc.Ib.DESTINATION);e||(f+=Bo(a,c,d,olympe.dc.Ib.ORIGIN));0===f&&Co(a,b)}}
1655
- function Eo(a,b){const c=a.O[b];void 0!==c?(a.V&&a.V.debug('Set current block to',b,null!==c.parent?'parent = '+c.parent.ja():''),a.C=c):a.V&&a.V.error('Try to set a block that does not exists:',b)}function Fo(a){const b=String(++a.W),c=a.C;a.O[b]=new Go(b,c);Ho(c,b);c.D||(c.D=()=>Eo(a,c.ja()));return b}function Io(a,b){const c=a.C;a.C.D=()=>{Eo(a,c.ja());b()}}function Jo(a,b){Ao(b?a.O[b]:a.C)}
1656
- olympe.dc.dg.lL=class{constructor(a,b){this.db=a;this.V=b||null;this.R=Object.create(null);this.T=Object.create(null);this.D=!1;this.W=0;this.C=new Go('root');this.O=Object.create(null);this.O.root=this.C}register(a,b,c,d,e){this.D||(null!==b&&c&&d&&e?(c=Bo(this,c,d,e),d=this.R[b]||0,this.R[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function Ho(a,b){null===a.children&&(a.children=Object.create(null));a.children[b]=!1}function Ao(a){a.O=!0;null!==a.parent&&a.parent.notify(a.id)}
1657
- class Go{constructor(a,b){this.id=a;this.parent=b||null;this.C=this.R=this.D=this.children=null;this.O=!1}ja(){return this.id}Up(a){const b=this.R;if(this.O||this.C===a||null===a)b&&b(),!b&&Ao(this)}notify(a){const b=this.D,c=this.children;if(this.O)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.cd={};function Ko(a,b,c,d){const e=olympe.dc.eb(),f=new olympe.dc.dg.vy,g=new olympe.dc.dg.lL(e);let k=!1;const l=Object.create(null),m=r=>{if(0<r.length)for(const t in l)r[0]===t&&d(l[t])};let n=(r,t,u,v)=>{a.$f()||a.lc()||(k||(eo(g,()=>{v.Up();ao(g)}),v.rk().Nq(m),k=!0),r?l[u]=t:delete l[u],fo(g,u))};if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].C(a,g,n);const p=olympe.oa.bf();qh(e,b,(r,t)=>{g.register(p,null);const u=f.C(r,b,p,null);n(r,t,p,go(u,r,b,p))},p);a.onDestroy(()=>{nh(e,b,p)});e.tc(b)||ao(g)}
1658
- function Lo(a,b,c){const d=c.getContext(),e=olympe.dc.eb(),f=a.O(),g=Pi(e,b,a.R,d.re(k=>{null!==k&&(k=f(k));null===k?c.clear():c.update(k)}));d.onDestroy(()=>Qi(e,b,a.R,g))}
1642
+ a.toString()).join(',')+')'}};X('olympe.dc.predicates.Or',olympe.dc.Ca.Wk);olympe.dc.Ca.Wk.Aa=[olympe.dc.Yb];olympe.dc.Ca.mo=class{constructor(a,b,c){this.source=a;this.R=b;this.O=void 0===c?!0:c}bb(){return Lh(olympe.dc.Ca.mo)}D(){return[this.source.C()]}Sd(){return this.source}C(a,b){return a.run(()=>olympe.j.Xa([this.source.getValue(a,b),this.R,this.O],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.j.hc((new RegExp(d)).test(c))},olympe.j.ia))}fb(a){const b=this.source.fb(a),c=ko(a,this.R);a=ko(a,this.O);return'{"c":"'+this.bb()+'","a":['+b+','+c+','+
1643
+ a+']}'}toString(){const a=jo(this.O);return'Regex('+this.source.toString()+','+this.R+','+a+')'}};X('olympe.dc.predicates.Regex',olympe.dc.Ca.mo);olympe.dc.Ca.mo.Aa=[olympe.dc.Yb];olympe.dc.Ca.Iz=class extends olympe.dc.Ca.yB{constructor(a,b){super(a,b)}bb(){return Lh(olympe.dc.Ca.Iz)}T(a,b){return a<b}};X('olympe.dc.predicates.Smaller',olympe.dc.Ca.Iz);olympe.dc.dg={};olympe.dc.dg.vy=class{constructor(){this.W=this.item=this.R=this.D=null}T(){return null!==this.D}$(a){if(null!==this.D)throw Error('Manager already activated (depth='+this.D+')');this.D=a;this.O()}C(a,b,c){b=this.item;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.dg.Ny(this),this.R=c,this.item=b):this.item=this.R=null;return b}O(){if(null===this.D)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.W){const a=
1644
+ [];null!==this.item&&(0<=this.D?so(to(this.item,this.D),a):a.push(this.R));this.W(a)}}Nq(a){this.W=a}};olympe.dc.dg.vy.Aa=[olympe.dc.dg.Cc];function ho(a,b,c,d){b?a.T[d]=c:delete a.T[d];null===a.D&&(a.D=new olympe.dc.dg.Ny(a.Na,a));return a.D}function to(a,b){for(let c=0;c<b;c++)if(null!==a.D)a=a.D;else break;return a}function so(a,b){a=a.T;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.dg.Ny=class{constructor(a,b){this.Na=a;this.parent=b||null;this.depth=b?b.depth+1:0;this.T=Object.create(null);this.D=null}rk(){return this.Na}Up(){this.Na.T()?this.Na.O():this.Na.$(this.depth-1)}};class uo extends olympe.dc.dg.Ny{constructor(a,b,c){super(a);this.R=b;this.tag=c;this.$=this.W=this.O=!1;this.C=null}}
1645
+ function vo(a,b,c,d,e){const f=Object.create(null),g=a.ma,k=a.R;let l,m,n;a.da=!0;m=0;for(n=g.length;m<n;m++)f[g[m]]=null;g.length=0;m=c;for(n=Math.min(b.length,d);m<n;m++)l=b[m],c=k[l],void 0!==c&&(delete f[l],g.push(l),c.O||(c.O=!0,e(!0,c.tag,c.R,c)));for(l in f)Object.prototype.hasOwnProperty.call(f,l)&&(c=k[l],c.O&&(c.O=!1,e(!1,c.tag,c.R,c)),c.W&&(c.C=null,delete k[l]),delete f[l]);a.da=!1;null!==a.D&&a.O()}
1646
+ olympe.dc.dg.IC=class{constructor(){this.R={};this.ma=[];this.D=null;this.da=!1;this.W=[];this.ca=null}T(){return null!==this.D}$(a){if(null!==this.D)throw Error('Manager already activated (depth='+this.D+')');this.D=a;this.O()}O(){if(null===this.D)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.da){var a=this.ma,b=a.length,c=this.R,d;for(d=this.W.length=0;d<b;d++){var e=c[a[d]];if(0>this.D)this.W.push(e.R);else{if(!e.$){var f=e,g=this.D;f.$=!0;f.C=to(f,g)}null!==
1647
+ e.C&&so(e.C,this.W)}}this.ca&&this.ca(this.W)}}Nq(a){this.ca=a}C(a,b,c){let d=this.R[c];a?void 0===d?(d=new uo(this,c,b),this.R[c]=d):(d.tag=b,d.W=!1):void 0!==d&&(d.W=!0);return d}};olympe.dc.dg.IC.Aa=[olympe.dc.dg.Cc];olympe.dc.dg.Cc=class{constructor(){}C(){}T(){}$(){}O(){}Nq(){}};function wo(a,b){olympe.j.Mg(a.value)?(a.C=olympe.j.cg(a.value,b),Sb(a.C)||b()):b()}function xo(a,b){if(olympe.j.Mg(a.value)){const c=olympe.j.yb(),d=a.R;olympe.j.Wa([a.value],e=>{d!==e.valueOf()&&(c.run(()=>wo(a,b)),olympe.j.yb().destroy())})}}
1648
+ class yo extends olympe.dc.dg.Ny{constructor(a,b,c){super(a);this.$=b;this.value=c;this.R=this.Qa();this.position=this.C=null;this.W=!1;this.O=null}Qa(){const a=olympe.j.Qa(this.value);return a?a.valueOf():a}destroy(){this.C&&(this.C.destroy(),this.C=null);this.O=this.value=null}lc(){return null===this.value}}
1649
+ function zo(a,b){if(!b.lc()){var c=a.D;var d=a.ma,e=b.Qa(),f=0;let g=c.length,k=0,l;for(null!==b.position&&--g;g>f;){k=Math.floor((f+g)/2);l=d(c[k].R,e);if(0===l||2>g-f){0>l&&null!==b.position&&b.position<=k&&(l=d(c[g].R,e));k=0>l?g:k;break}0>l?f=k:g=k}c=k;b.R=b.Qa();if(c!==b.position){d=a.D;e=d.length;f=b.position;null===f&&(f=e);if(c<f)for(e=f;e>c;e--)d[e]=d[e-1],d[e].position=e;else for(e=f;e<c;e++)d[e]=d[e+1],d[e].position=e;d[c]=b;d[c].position=c;b.W&&a.O()}}}
1650
+ function Ao(a){const b=a.ma;a.D.sort((c,d)=>b(c.Qa(),d.Qa()))}
1651
+ olympe.dc.dg.iL=class{constructor(a){this.ma=a;this.R=null;this.D=[];this.W=[];this.ca=null;this.da=new Map}C(a,b,c,d){b='$'+c;const e=this.D;let f;if(a)f=new yo(this,c,d),this.da.set(b,f),this.T()?wo(f,()=>zo(this,f)):(f.position=e.length,e.push(f));else{f=this.da.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.da.delete(b);null!==f.position&&(this.T()?this.remove(f):delete e[f.position]);f.destroy()}return f}T(){return null!==this.R}$(a){if(null!==this.R)throw Error('Manager already activated (depth='+
1652
+ this.R+')');this.R=a;Ao(this);for(let b=0,c=this.D.length;b<c;b++){const d=this.D[b];d.position=b;xo(d,()=>zo(this,d))}this.O()}O(){if(null===this.R)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.D.length;this.W.length=0;for(let d=0;d<a;d++){let e=this.D[d];if(!e.W){var b=e,c=this.R;b.W=!0;b.O=to(b,c)}0>this.R?this.W.push(e.$):e.O&&so(e.O,this.W)}this.ca&&this.ca(this.W)}Nq(a){this.ca=a}remove(a){const b=this.D,c=b.length-1;if(null!==a.position){for(a=
1653
+ a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.dg.iL.Aa=[olympe.dc.dg.Cc];function bo(a){if(!a.D){for(let b in a.O)Bo(a.O[b]);a.D=!0}a.R=null;a.T=null}function fo(a,b,c){a.O[c||'root'].R=b}function go(a,b,c){a.O[c||'root'].Up(b)}function Co(a,b,c,d){const e=a.T,f=b+d+c;let g=e[f];void 0===g&&(g=ej(a.db,b,c,d),e[f]=g);return g}function Do(a,b){a.D||a.C.Up(b)}function Eo(a,b,c,d,e){if(!a.D){let f=Co(a,c,d,e||olympe.dc.Ib.DESTINATION);e||(f+=Co(a,c,d,olympe.dc.Ib.ORIGIN));0===f&&Do(a,b)}}
1654
+ function Fo(a,b){const c=a.O[b];void 0!==c?(a.V&&a.V.debug('Set current block to',b,null!==c.parent?'parent = '+c.parent.ja():''),a.C=c):a.V&&a.V.error('Try to set a block that does not exists:',b)}function Go(a){const b=String(++a.W),c=a.C;a.O[b]=new Ho(b,c);Io(c,b);c.D||(c.D=()=>Fo(a,c.ja()));return b}function Jo(a,b){const c=a.C;a.C.D=()=>{Fo(a,c.ja());b()}}function Ko(a,b){Bo(b?a.O[b]:a.C)}
1655
+ olympe.dc.dg.lL=class{constructor(a,b){this.db=a;this.V=b||null;this.R=Object.create(null);this.T=Object.create(null);this.D=!1;this.W=0;this.C=new Ho('root');this.O=Object.create(null);this.O.root=this.C}register(a,b,c,d,e){this.D||(null!==b&&c&&d&&e?(c=Co(this,c,d,e),d=this.R[b]||0,this.R[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function Io(a,b){null===a.children&&(a.children=Object.create(null));a.children[b]=!1}function Bo(a){a.O=!0;null!==a.parent&&a.parent.notify(a.id)}
1656
+ class Ho{constructor(a,b){this.id=a;this.parent=b||null;this.C=this.R=this.D=this.children=null;this.O=!1}ja(){return this.id}Up(a){const b=this.R;if(this.O||this.C===a||null===a)b&&b(),!b&&Bo(this)}notify(a){const b=this.D,c=this.children;if(this.O)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.cd={};function Lo(a,b,c,d){const e=olympe.dc.eb(),f=new olympe.dc.dg.vy,g=new olympe.dc.dg.lL(e);let k=!1;const l=Object.create(null),m=r=>{if(0<r.length)for(const t in l)r[0]===t&&d(l[t])};let n=(r,t,u,v)=>{a.$f()||a.lc()||(k||(fo(g,()=>{v.Up();bo(g)}),v.rk().Nq(m),k=!0),r?l[u]=t:delete l[u],go(g,u))};if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].C(a,g,n);const p=olympe.oa.bf();qh(e,b,(r,t)=>{g.register(p,null);const u=f.C(r,b,p,null);n(r,t,p,ho(u,r,b,p))},p);a.onDestroy(()=>{nh(e,b,p)});e.tc(b)||bo(g)}
1657
+ function Mo(a,b,c){const d=c.getContext(),e=olympe.dc.eb(),f=a.O(),g=Pi(e,b,a.R,d.re(k=>{null!==k&&(k=f(k));null===k?c.clear():c.update(k)}));d.onDestroy(()=>Qi(e,b,a.R,g))}
1659
1658
  olympe.dc.cd.vv=class{constructor(a,b,c){this.R=a&&a.ka?a.ka():a;this.Ra=b&&b.filter(d=>d instanceof olympe.dc.Ra.um||d instanceof olympe.dc.Ra.zj)||null;this.D=c||null;this.defaultValue=null}bb(){}Ee(){}O(){}C(){return(this.Ra||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}kj(a){this.defaultValue=a;return this}bs(){return this.Ra}Cj(){return this.D}getValue(a,b){const c=a.run(()=>olympe.j.Za(this.Ee()||Object,'AbstractProperty valueType'));null!==this.defaultValue&&M(c,this.defaultValue);
1660
- b=this.D||b;null!==this.Ra?Ko(a,b,this.Ra,d=>{Lo(this,d,c)}):Lo(this,b,c);return c.wa()}fb(a){const b=jo(a,this.R),c=jo(a,this.D);let d='null';this.Ra&&(d=this.Ra.map(function(e){return e.fb(a)}).join(','));return`{"c":"${this.bb()}","a":["${b}",${d},${c}]}`}toString(){const a=io(this.R),b=this.D?','+io(this.D):'';let c='';this.Ra&&(c=','+this.Ra.join(','));return this.bb().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.cd.vv.Aa=[olympe.dc.Rz];olympe.dc.cd.tF=class{constructor(a,b){if(olympe.j.Mg(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.ka();var d=olympe.dc.eb();const e=d.Wd(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.iq(e,olympe.dc.CloudObject.extendRel,olympe.dm.$k);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.U.ka():d=new olympe.dc.cd.nw(c,b);break;case olympe.dm.Number.U.ka():d=new olympe.dc.cd.$v(c,
1661
- b);break;case olympe.dm.Boolean.U.ka():d=new olympe.dc.cd.yy(c,b);break;case olympe.dm.DateTime.U.ka():d=new olympe.dc.cd.Bv(c,b)}this.D=d}bb(){return this.D.bb()}C(){return this.D.C()}getValue(a,b){return this.D.getValue(a,b)}fb(a){return this.D.fb(a)}toString(){return this.D.toString()}};olympe.dc.cd.tF.Aa=[olympe.dc.Rz];olympe.dc.cd.yy=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.yy)}O(){return olympe.dc.Ad.ED}Ee(){return olympe.j.ia}};X('olympe.dc.valuedefs.BooleanProperty',olympe.dc.cd.yy);olympe.dc.cd.gm=class{constructor(a){this.value=a}bb(){return Lh(olympe.dc.cd.gm)}C(){return[]}getValue(){return this.value}fb(a){a=jo(a,this.value);return`{"c":"${this.bb()}","a":[${a}]}`}toString(){return`Constant(${io(this.value)})`}};X('olympe.dc.valuedefs.Constant',olympe.dc.cd.gm);olympe.dc.cd.gm.Aa=[olympe.dc.Rz];olympe.dc.cd.Bv=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.Bv)}O(){return olympe.dc.Ad.FD}Ee(){return olympe.j.ac}};X('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.cd.Bv);olympe.dc.cd.$v=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.$v)}O(){return olympe.dc.Ad.GD}Ee(){return olympe.j.aa}};X('olympe.dc.valuedefs.NumberProperty',olympe.dc.cd.$v);olympe.dc.cd.nw=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.nw)}O(){return olympe.dc.Ad.HD}Ee(){return olympe.j.kb}};X('olympe.dc.valuedefs.StringProperty',olympe.dc.cd.nw);olympe.dc.cd.pw=class{bb(){return Lh(olympe.dc.cd.pw)}C(){return[]}getValue(a,b){return b}fb(){return'{"c":"'+this.bb()+'","a":[]}'}toString(){return'Tag()'}};X('olympe.dc.valuedefs.Tag',olympe.dc.cd.pw);olympe.dc.cd.pw.Aa=[olympe.dc.Rz];olympe.dc.Ra={};olympe.dc.Ra.Cv=class{Ee(){return null}bb(){return Lh(olympe.dc.Ra.Cv)}C(a,b,c){const d={};return function(e,f,g,k){e?void 0===d[f]?(d[f]=1,b.C.C!==g||b.D||(b.C.C=f),c(!0,f,f,go(k,!0,f,f))):(d[f]++,Co(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,go(k,!1,f,f)))}}fb(){return'{"c":"'+this.bb()+'"}'}toString(){return'Distinct()'}};X('olympe.dc.transformers.Distinct',olympe.dc.Ra.Cv);olympe.dc.Ra.Cv.Aa=[olympe.dc.qo];olympe.dc.Ra.Qf=class{constructor(a){this.D=a}Ee(){return null}bb(){return Lh(olympe.dc.Ra.Qf)}O(){return this.D.D()}C(a,b,c){function d(f,g,k,l){l=l.valueOf();!1===l&&Co(b,g);l!==!!e[g]&&(e[g]=l,c(l,f,g,go(k,l,f,g)))}const e={};return(f,g,k,l)=>{const m='@'+k;if(f){let n=this.D.C(a,g);olympe.j.Zb(n)&&(n=n.Tb);olympe.j.$m(n)?(b.D||void 0!==olympe.j.Qa(n)||Co(b,k),e[m]=n,a.run(()=>{olympe.j.Wa([n],p=>{d(g,k,l,p)},'filterResultHandler')})):d(g,k,l,n)}else void 0!==e[m]&&(e[m].destroy(),delete e[m]),
1662
- d(g,k,l,!1),delete e[k]}}fb(a){return'{"c":"'+this.bb()+'","a":['+this.D.fb(a)+']}'}toString(){return'Filter('+this.D.toString()+')'}};X('olympe.dc.transformers.Filter',olympe.dc.Ra.Qf);olympe.dc.Ra.Qf.Aa=[olympe.dc.qo,olympe.dc.iK];olympe.dc.Ra.bC=class{constructor(a,b,c,d){this.rel=new olympe.dc.Oc.Relation(olympe.dc.Ya(a),c||olympe.dc.Ib.DESTINATION);this.D=new olympe.dc.Oc.Relation(olympe.dc.Ya(b),d||olympe.dc.Ib.DESTINATION)}Ee(){return Kh(this.rel)}bb(){return Lh(olympe.dc.Ra.bC)}C(a,b,c){const d=olympe.dc.eb(),e={},f=this.rel.ka(),g=this.rel.zc(),k=this.D.ka(),l=this.D.zc();let m=null,n=null;const p=(t,u,v,w,x,y)=>{if(x){if(x=()=>{const A=olympe.oa.Xd(v+g+(f+'_'+t)+y,20),H=go(u,!0,y,A);m=t;n=()=>{c(!1,y,A,go(u,!1,y,A))};
1663
- b.register(A,v,w,f,g);c(!0,y,A,H)},x.wO=t,e[w]=x,null===m||t<m)n&&n(),x()}else if(m===t){n();e[w]=!0;x=Infinity;let A=null;for(let H=Object.keys(e),G=H.length,R=0;R<G;R++){let fa=e[H[R]];fa.wO<x&&(x=fa.wO,A=fa)}A&&A()}},r=(t,u,v,w,x)=>{w?e[x]||(e[x]=!0,Do(b,v,x,f,g),Do(b,v,x,k,l),Ui(d,x,this.rel,p.bind(this,t,u,v,x),v+'_val'),Ui(d,x,this.D,r.bind(this,t+1,u,v),v+'_follow')):(d.D(x,this.D,v+'_follow'),d.D(x,this.rel,v+'_val'),delete e[x])};return(t,u,v,w)=>r(0,w,v,t,u)}fb(){return'{"c":"'+this.bb()+
1664
- '","a":["'+this.rel.toString()+'","'+this.D.toString()+'"]}'}toString(){return'FirstRelated('+this.rel.toString()+', '+this.D.toString()+')'}};X('olympe.dc.transformers.FirstRelated',olympe.dc.Ra.bC);olympe.dc.Ra.bC.Aa=[olympe.dc.qo];olympe.dc.Ra.wt=class{constructor(a,b){this.start=a;this.D=b}Ee(){return null}bb(){return Lh(olympe.dc.Ra.wt)}C(a,b,c){const d=new olympe.dc.dg.IC;let e,f,g,k=!1;const l=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.D||(b.C.C=e[0>n-1?0:Math.min(e.length,n)-1]);uo(d,e,f,n,c)}};a.run(()=>olympe.j.Wa([this.start,this.D],(n,p)=>{f=n.valueOf();g=p.valueOf();l()}));Io(b,l);const m=Fo(b);Eo(b,m);return(n,p,r,t)=>{k||(t.rk().Nq(u=>{e=u;Jo(b,m)}),eo(b,()=>t.Up(),m),k=!0);d.C(n,p,r,null);fo(b,r,m)}}fb(a){return'{"c":"'+
1665
- this.bb()+'","a":['+jo(a,this.start)+','+jo(a,this.D)+']}'}toString(){return`Limit(${olympe.j.Qa(this.start)},${olympe.j.Qa(this.D)})`}};X('olympe.dc.transformers.Limit',olympe.dc.Ra.wt);olympe.dc.Ra.wt.Aa=[olympe.dc.qo];function Mo(a){return a.md.map(b=>b.ka())}
1666
- olympe.dc.Ra.iz=class{constructor(a,b){this.direction=b||olympe.dc.Ib.DESTINATION;this.md=a.map(c=>new olympe.dc.Oc.Relation(c,this.direction))}Ee(){return olympe.dc.CloudObject}bb(){return Lh(olympe.dc.Ra.iz)}zc(){return this.direction}C(a,b,c){const d=olympe.dc.eb(),e=(f,g,k,l)=>Ui(d,f,l,(m,n)=>{var p=l.ka();p=olympe.oa.Xd(g+l.zc()+p+n,20);const r=go(k,m,n,p);m&&b.register(p,g,f,l.ka(),l.zc());c(m,n,p,r)},g);return(f,g,k,l)=>{f?this.md.forEach(m=>{Do(b,k,g,m.ka(),m.zc());e(g,k,l,m)}):this.md.forEach(m=>
1667
- {d.D(g,m,k)})}}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(Mo(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.zc()+'['+Mo(this).join(',')+'])'}};X('olympe.dc.transformers.MultiRelated',olympe.dc.Ra.iz);olympe.dc.Ra.iz.Aa=[olympe.dc.qo];olympe.dc.Ra.zj=class extends olympe.dc.Oc.Relation{constructor(a,b=olympe.dc.Ib.DESTINATION,c=1,d=-1){super(a,b);this.O=c;this.D=d}Ee(){return Kh(this)}bb(){return Lh(olympe.dc.Ra.zj)}C(a,b,c){const d=olympe.dc.eb(),e=Object.create(null),f=olympe.dc.Ib.ORIGIN,g=olympe.dc.Ib.DESTINATION,k=this.ka(),l=this.zc(),m=(p,r,t)=>{if(!(0<=this.D&&p>=this.D)){var u=d.pc(t,this);p+=1;for(let v=0,w=u.length;v<w;v++){if(void 0!==e[u[v]]||t===u[v])continue;const x=olympe.oa.Xd(r+l+(k+'_'+p)+u[v],20);b.register(x,
1668
- r,t,k,l||g);null===l&&b.register(x,r,t,k,f)}}},n=(p,r,t,u,v,w)=>{v&&!b.D&&m(p,u,w);p>=this.O?c(v,w,u,go(t,v,w,u)):Do(b,u,w,k,l);0<=this.D&&p>=this.D||(v?e[w]||(e[w]=!0,Ui(d,w,this,(x,y)=>{const A=p+1,H=olympe.oa.Xd(u+l+(k+'_'+A)+y,20);n(A,w,t,H,x,y)},u)):(d.D(w,this,u),delete e[w]))};return(p,r,t,u)=>n(0,null,u,t,p,r)}fb(){return'{"c":"'+this.bb()+'","a":["'+this.ka()+'","'+this.zc()+'",'+this.O+','+this.D+']}'}toString(){return'RecursiveRelated('+this.zc()+this.ka()+'['+this.O+'..'+this.D+'])'}};
1669
- X('olympe.dc.transformers.RecursiveRelated',olympe.dc.Ra.zj);olympe.dc.Ra.zj.Aa=[olympe.dc.qo];olympe.dc.Ra.um=class extends olympe.dc.Oc.Relation{constructor(a,b){super(a,b||olympe.dc.Ib.DESTINATION)}Ee(){return Kh(this)}bb(){return Lh(olympe.dc.Ra.um)}fe(){return new olympe.dc.Ra.um(this.tag,this.direction===olympe.dc.Ib.DESTINATION?olympe.dc.Ib.ORIGIN:olympe.dc.Ib.DESTINATION)}C(a,b,c){const d=olympe.dc.eb(),e=this.ka(),f=this.zc();return(g,k,l,m)=>{Do(b,l,k,e,f);g?Ui(d,k,this,(n,p)=>{const r=olympe.oa.Xd(l+f+e+p,20),t=go(m,n,p,r);n&&b.register(r,l,k,e,f);c(n,p,r,t)},l):d.D(k,this,l)}}fb(){return'{"c":"'+
1659
+ b=this.D||b;null!==this.Ra?Lo(a,b,this.Ra,d=>{Mo(this,d,c)}):Mo(this,b,c);return c.wa()}fb(a){const b=ko(a,this.R),c=ko(a,this.D);let d='null';this.Ra&&(d=this.Ra.map(function(e){return e.fb(a)}).join(','));return`{"c":"${this.bb()}","a":["${b}",${d},${c}]}`}toString(){const a=jo(this.R),b=this.D?','+jo(this.D):'';let c='';this.Ra&&(c=','+this.Ra.join(','));return this.bb().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.cd.vv.Aa=[olympe.dc.Rz];olympe.dc.cd.tF=class{constructor(a,b){if(olympe.j.Mg(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.ka();var d=olympe.dc.eb();const e=d.Wd(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.iq(e,olympe.dc.CloudObject.extendRel,olympe.dm.$k);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.U.ka():d=new olympe.dc.cd.nw(c,b);break;case olympe.dm.Number.U.ka():d=new olympe.dc.cd.$v(c,
1660
+ b);break;case olympe.dm.Boolean.U.ka():d=new olympe.dc.cd.yy(c,b);break;case olympe.dm.DateTime.U.ka():d=new olympe.dc.cd.Bv(c,b)}this.D=d}bb(){return this.D.bb()}C(){return this.D.C()}getValue(a,b){return this.D.getValue(a,b)}fb(a){return this.D.fb(a)}toString(){return this.D.toString()}};olympe.dc.cd.tF.Aa=[olympe.dc.Rz];olympe.dc.cd.yy=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.yy)}O(){return olympe.dc.Ad.ED}Ee(){return olympe.j.ia}};X('olympe.dc.valuedefs.BooleanProperty',olympe.dc.cd.yy);olympe.dc.cd.gm=class{constructor(a){this.value=a}bb(){return Lh(olympe.dc.cd.gm)}C(){return[]}getValue(){return this.value}fb(a){a=ko(a,this.value);return`{"c":"${this.bb()}","a":[${a}]}`}toString(){return`Constant(${jo(this.value)})`}};X('olympe.dc.valuedefs.Constant',olympe.dc.cd.gm);olympe.dc.cd.gm.Aa=[olympe.dc.Rz];olympe.dc.cd.Bv=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.Bv)}O(){return olympe.dc.Ad.FD}Ee(){return olympe.j.ac}};X('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.cd.Bv);olympe.dc.cd.$v=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.$v)}O(){return olympe.dc.Ad.GD}Ee(){return olympe.j.aa}};X('olympe.dc.valuedefs.NumberProperty',olympe.dc.cd.$v);olympe.dc.cd.nw=class extends olympe.dc.cd.vv{constructor(a,b,c){super(a,b,c)}bb(){return Lh(olympe.dc.cd.nw)}O(){return olympe.dc.Ad.HD}Ee(){return olympe.j.kb}};X('olympe.dc.valuedefs.StringProperty',olympe.dc.cd.nw);olympe.dc.cd.pw=class{bb(){return Lh(olympe.dc.cd.pw)}C(){return[]}getValue(a,b){return b}fb(){return'{"c":"'+this.bb()+'","a":[]}'}toString(){return'Tag()'}};X('olympe.dc.valuedefs.Tag',olympe.dc.cd.pw);olympe.dc.cd.pw.Aa=[olympe.dc.Rz];olympe.dc.Ra={};olympe.dc.Ra.Cv=class{Ee(){return null}bb(){return Lh(olympe.dc.Ra.Cv)}C(a,b,c){const d={};return function(e,f,g,k){e?void 0===d[f]?(d[f]=1,b.C.C!==g||b.D||(b.C.C=f),c(!0,f,f,ho(k,!0,f,f))):(d[f]++,Do(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,ho(k,!1,f,f)))}}fb(){return'{"c":"'+this.bb()+'"}'}toString(){return'Distinct()'}};X('olympe.dc.transformers.Distinct',olympe.dc.Ra.Cv);olympe.dc.Ra.Cv.Aa=[olympe.dc.qo];olympe.dc.Ra.Qf=class{constructor(a){this.D=a}Ee(){return null}bb(){return Lh(olympe.dc.Ra.Qf)}O(){return this.D.D()}C(a,b,c){function d(f,g,k,l){l=l.valueOf();!1===l&&Do(b,g);l!==!!e[g]&&(e[g]=l,c(l,f,g,ho(k,l,f,g)))}const e={};return(f,g,k,l)=>{const m='@'+k;if(f){let n=this.D.C(a,g);olympe.j.Zb(n)&&(n=n.Tb);olympe.j.$m(n)?(b.D||void 0!==olympe.j.Qa(n)||Do(b,k),e[m]=n,a.run(()=>{olympe.j.Wa([n],p=>{d(g,k,l,p)},'filterResultHandler')})):d(g,k,l,n)}else void 0!==e[m]&&(e[m].destroy(),delete e[m]),
1661
+ d(g,k,l,!1),delete e[k]}}fb(a){return'{"c":"'+this.bb()+'","a":['+this.D.fb(a)+']}'}toString(){return'Filter('+this.D.toString()+')'}};X('olympe.dc.transformers.Filter',olympe.dc.Ra.Qf);olympe.dc.Ra.Qf.Aa=[olympe.dc.qo,olympe.dc.iK];olympe.dc.Ra.bC=class{constructor(a,b,c,d){this.rel=new olympe.dc.Oc.Relation(olympe.dc.Ya(a),c||olympe.dc.Ib.DESTINATION);this.D=new olympe.dc.Oc.Relation(olympe.dc.Ya(b),d||olympe.dc.Ib.DESTINATION)}Ee(){return Kh(this.rel)}bb(){return Lh(olympe.dc.Ra.bC)}C(a,b,c){const d=olympe.dc.eb(),e={},f=this.rel.ka(),g=this.rel.zc(),k=this.D.ka(),l=this.D.zc();let m=null,n=null;const p=(t,u,v,w,x,y)=>{if(x){if(x=()=>{const A=olympe.oa.Xd(v+g+(f+'_'+t)+y,20),H=ho(u,!0,y,A);m=t;n=()=>{c(!1,y,A,ho(u,!1,y,A))};
1662
+ b.register(A,v,w,f,g);c(!0,y,A,H)},x.wO=t,e[w]=x,null===m||t<m)n&&n(),x()}else if(m===t){n();e[w]=!0;x=Infinity;let A=null;for(let H=Object.keys(e),G=H.length,R=0;R<G;R++){let fa=e[H[R]];fa.wO<x&&(x=fa.wO,A=fa)}A&&A()}},r=(t,u,v,w,x)=>{w?e[x]||(e[x]=!0,Eo(b,v,x,f,g),Eo(b,v,x,k,l),Ui(d,x,this.rel,p.bind(this,t,u,v,x),v+'_val'),Ui(d,x,this.D,r.bind(this,t+1,u,v),v+'_follow')):(d.D(x,this.D,v+'_follow'),d.D(x,this.rel,v+'_val'),delete e[x])};return(t,u,v,w)=>r(0,w,v,t,u)}fb(){return'{"c":"'+this.bb()+
1663
+ '","a":["'+this.rel.toString()+'","'+this.D.toString()+'"]}'}toString(){return'FirstRelated('+this.rel.toString()+', '+this.D.toString()+')'}};X('olympe.dc.transformers.FirstRelated',olympe.dc.Ra.bC);olympe.dc.Ra.bC.Aa=[olympe.dc.qo];olympe.dc.Ra.wt=class{constructor(a,b){this.start=a;this.D=b}Ee(){return null}bb(){return Lh(olympe.dc.Ra.wt)}C(a,b,c){const d=new olympe.dc.dg.IC;let e,f,g,k=!1;const l=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.D||(b.C.C=e[0>n-1?0:Math.min(e.length,n)-1]);vo(d,e,f,n,c)}};a.run(()=>olympe.j.Wa([this.start,this.D],(n,p)=>{f=n.valueOf();g=p.valueOf();l()}));Jo(b,l);const m=Go(b);Fo(b,m);return(n,p,r,t)=>{k||(t.rk().Nq(u=>{e=u;Ko(b,m)}),fo(b,()=>t.Up(),m),k=!0);d.C(n,p,r,null);go(b,r,m)}}fb(a){return'{"c":"'+
1664
+ this.bb()+'","a":['+ko(a,this.start)+','+ko(a,this.D)+']}'}toString(){return`Limit(${olympe.j.Qa(this.start)},${olympe.j.Qa(this.D)})`}};X('olympe.dc.transformers.Limit',olympe.dc.Ra.wt);olympe.dc.Ra.wt.Aa=[olympe.dc.qo];function No(a){return a.md.map(b=>b.ka())}
1665
+ olympe.dc.Ra.iz=class{constructor(a,b){this.direction=b||olympe.dc.Ib.DESTINATION;this.md=a.map(c=>new olympe.dc.Oc.Relation(c,this.direction))}Ee(){return olympe.dc.CloudObject}bb(){return Lh(olympe.dc.Ra.iz)}zc(){return this.direction}C(a,b,c){const d=olympe.dc.eb(),e=(f,g,k,l)=>Ui(d,f,l,(m,n)=>{var p=l.ka();p=olympe.oa.Xd(g+l.zc()+p+n,20);const r=ho(k,m,n,p);m&&b.register(p,g,f,l.ka(),l.zc());c(m,n,p,r)},g);return(f,g,k,l)=>{f?this.md.forEach(m=>{Eo(b,k,g,m.ka(),m.zc());e(g,k,l,m)}):this.md.forEach(m=>
1666
+ {d.D(g,m,k)})}}fb(){return'{"c":"'+this.bb()+'","a":['+JSON.stringify(No(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.zc()+'['+No(this).join(',')+'])'}};X('olympe.dc.transformers.MultiRelated',olympe.dc.Ra.iz);olympe.dc.Ra.iz.Aa=[olympe.dc.qo];olympe.dc.Ra.zj=class extends olympe.dc.Oc.Relation{constructor(a,b=olympe.dc.Ib.DESTINATION,c=1,d=-1){super(a,b);this.O=c;this.D=d}Ee(){return Kh(this)}bb(){return Lh(olympe.dc.Ra.zj)}C(a,b,c){const d=olympe.dc.eb(),e=Object.create(null),f=olympe.dc.Ib.ORIGIN,g=olympe.dc.Ib.DESTINATION,k=this.ka(),l=this.zc(),m=(p,r,t)=>{if(!(0<=this.D&&p>=this.D)){var u=d.pc(t,this);p+=1;for(let v=0,w=u.length;v<w;v++){if(void 0!==e[u[v]]||t===u[v])continue;const x=olympe.oa.Xd(r+l+(k+'_'+p)+u[v],20);b.register(x,
1667
+ r,t,k,l||g);null===l&&b.register(x,r,t,k,f)}}},n=(p,r,t,u,v,w)=>{v&&!b.D&&m(p,u,w);p>=this.O?c(v,w,u,ho(t,v,w,u)):Eo(b,u,w,k,l);0<=this.D&&p>=this.D||(v?e[w]||(e[w]=!0,Ui(d,w,this,(x,y)=>{const A=p+1,H=olympe.oa.Xd(u+l+(k+'_'+A)+y,20);n(A,w,t,H,x,y)},u)):(d.D(w,this,u),delete e[w]))};return(p,r,t,u)=>n(0,null,u,t,p,r)}fb(){return'{"c":"'+this.bb()+'","a":["'+this.ka()+'","'+this.zc()+'",'+this.O+','+this.D+']}'}toString(){return'RecursiveRelated('+this.zc()+this.ka()+'['+this.O+'..'+this.D+'])'}};
1668
+ X('olympe.dc.transformers.RecursiveRelated',olympe.dc.Ra.zj);olympe.dc.Ra.zj.Aa=[olympe.dc.qo];olympe.dc.Ra.um=class extends olympe.dc.Oc.Relation{constructor(a,b){super(a,b||olympe.dc.Ib.DESTINATION)}Ee(){return Kh(this)}bb(){return Lh(olympe.dc.Ra.um)}fe(){return new olympe.dc.Ra.um(this.tag,this.direction===olympe.dc.Ib.DESTINATION?olympe.dc.Ib.ORIGIN:olympe.dc.Ib.DESTINATION)}C(a,b,c){const d=olympe.dc.eb(),e=this.ka(),f=this.zc();return(g,k,l,m)=>{Eo(b,l,k,e,f);g?Ui(d,k,this,(n,p)=>{const r=olympe.oa.Xd(l+f+e+p,20),t=ho(m,n,p,r);n&&b.register(r,l,k,e,f);c(n,p,r,t)},l):d.D(k,this,l)}}fb(){return'{"c":"'+
1670
1669
  this.bb()+'","a":["'+this.ka()+'","'+this.zc()+'"]}'}toString(){return'Related('+this.zc()+this.ka()+')'}};X('olympe.dc.transformers.Related',olympe.dc.Ra.um);olympe.dc.Ra.um.Aa=[olympe.dc.qo];olympe.dc.Ra.Cr=class{constructor(a,b){this.Oe=a;this.D=void 0===b?!0:!!b}Ee(){return null}bb(){return Lh(olympe.dc.Ra.Cr)}Ur(){return this.Oe}O(){return[this.Oe.R()]}C(a,b,c){const d=new olympe.dc.dg.iL(a.re(this.D?this.Oe.compare.bind(this.Oe):(e,f)=>this.Oe.compare(f,e)));return(e,f,g)=>{var k=e?this.Oe.O(a,f):void 0;k=d.C(e,f,g,k);c(e,f,g,k)}}fb(a){return'{"c":"'+this.bb()+'","a":['+this.Oe.fb(a)+','+JSON.stringify(this.D)+']}'}toString(){return'Sort('+this.Oe.toString()+','+JSON.stringify(this.D)+
1671
- ')'}};X('olympe.dc.transformers.Sort',olympe.dc.Ra.Cr);olympe.dc.Ra.Cr.Aa=[olympe.dc.qo,olympe.dc.iK];function No(a,b,c,d,e,f){function g(n,p){if(m)for(var r=m.length-1;0<=r;r--)f=m[r].C(b,e,f);e.register(k,null);r=d.C(n,p,c,null);f(n,p,k,go(r,n,p,k))}const k=olympe.oa.bf(),l=olympe.dc.eb(),m=a.Ra;b.run(()=>olympe.j.Wa([a.D],n=>{Oo(l,n,g,k);void 0===l.model(n)&&ao(e)}))}function Oo(a,b,c,d){const e=b&&b.valueOf();e&&(qh(a,e,c,d),olympe.j.yb().Ve(()=>nh(a,e,d)))}
1672
- olympe.dc.Ra.ro=class{constructor(a,b){this.Ra=this.D=null;a instanceof olympe.dc.Kb?(this.D=a.Cj(),this.Ra=a.AC()):(this.D=a,b&&(this.Ra=b))}Ee(){return null}bb(){return Lh(olympe.dc.Ra.ro)||''}bs(){return this.Ra}Cj(){return this.D}C(a,b,c){const d=new olympe.dc.dg.IC,e=new olympe.dc.dg.vy;let f=[],g=[],k=!1,l=!1;const m=Fo(b),n=Fo(b);Io(b,()=>{const p=f.concat(g);0<p.length?b.D||(b.C.C=p[p.length-1]):Jo(b);uo(d,p,0,p.length,c)});Eo(b,n);No(this,a,this.D,e,b,(p,r,t,u)=>{const v=olympe.j.yb();v.$f()||
1673
- v.lc()||(l||(u.rk().Nq(w=>{g=w;Jo(b,n)}),eo(b,()=>u.Up(),n),l=!0),d.C(p,r,t),fo(b,t,n))});Eo(b,m);return(p,r,t,u)=>{k||(u.rk().Nq(v=>{f=v;Jo(b,m)}),eo(b,()=>u.Up(),m),k=!0);d.C(p,r,t,m);fo(b,t,m)}}fb(a){const b=this.Ra?'['+this.Ra.map(c=>c.fb(a)).join(',')+']':'null';return'{"c":"'+this.bb()+'","a":['+jo(a,this.D)+','+b+']}'}toString(){const a=olympe.j.Zb(this.D)?'N:'+this.D.Tb.ja():this.D.valueOf(),b=this.Ra?','+this.Ra.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
1674
- X('olympe.dc.transformers.Union',olympe.dc.Ra.ro);olympe.dc.Ra.ro.Aa=[olympe.dc.qo];olympe.dc.Ra.$C={T_:1,lR:-1,wH:0};olympe.dc.Ra.z1={BZ:!0,b_:!1};olympe.dc.bg.ba={oJ:'dc.legacy.listdefProcessor'};olympe.dc.bg.pa={nJ:'dc.legacy.listdefsCovered'};olympe.sa.$e(a=>{E(a,olympe.dc.bg.pa.nJ,!1);B(a,olympe.dc.bg.ba.oJ,olympe.dc.bg.NS,olympe.dc.query.ba.Vb,olympe.dc.ba.Zs,olympe.dc.transaction.ba.Ob,olympe.dc.query.ba.fw,new olympe.sa.zb(olympe.dc.pa.Kt),new olympe.sa.zb(olympe.dc.bg.pa.nJ))});olympe.sa.run([olympe.dc.bg.ba.oJ],a=>{olympe.dc.bg.XW=()=>a});function Po(a){const b=olympe.dc.eb(),c=new Map;b.Yw(a).forEach(d=>{b.pc(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}
1670
+ ')'}};X('olympe.dc.transformers.Sort',olympe.dc.Ra.Cr);olympe.dc.Ra.Cr.Aa=[olympe.dc.qo,olympe.dc.iK];function Oo(a,b,c,d,e,f){function g(n,p){if(m)for(var r=m.length-1;0<=r;r--)f=m[r].C(b,e,f);e.register(k,null);r=d.C(n,p,c,null);f(n,p,k,ho(r,n,p,k))}const k=olympe.oa.bf(),l=olympe.dc.eb(),m=a.Ra;b.run(()=>olympe.j.Wa([a.D],n=>{Po(l,n,g,k);void 0===l.model(n)&&bo(e)}))}function Po(a,b,c,d){const e=b&&b.valueOf();e&&(qh(a,e,c,d),olympe.j.yb().Ve(()=>nh(a,e,d)))}
1671
+ olympe.dc.Ra.ro=class{constructor(a,b){this.Ra=this.D=null;a instanceof olympe.dc.Kb?(this.D=a.Cj(),this.Ra=a.AC()):(this.D=a,b&&(this.Ra=b))}Ee(){return null}bb(){return Lh(olympe.dc.Ra.ro)||''}bs(){return this.Ra}Cj(){return this.D}C(a,b,c){const d=new olympe.dc.dg.IC,e=new olympe.dc.dg.vy;let f=[],g=[],k=!1,l=!1;const m=Go(b),n=Go(b);Jo(b,()=>{const p=f.concat(g);0<p.length?b.D||(b.C.C=p[p.length-1]):Ko(b);vo(d,p,0,p.length,c)});Fo(b,n);Oo(this,a,this.D,e,b,(p,r,t,u)=>{const v=olympe.j.yb();v.$f()||
1672
+ v.lc()||(l||(u.rk().Nq(w=>{g=w;Ko(b,n)}),fo(b,()=>u.Up(),n),l=!0),d.C(p,r,t),go(b,t,n))});Fo(b,m);return(p,r,t,u)=>{k||(u.rk().Nq(v=>{f=v;Ko(b,m)}),fo(b,()=>u.Up(),m),k=!0);d.C(p,r,t,m);go(b,t,m)}}fb(a){const b=this.Ra?'['+this.Ra.map(c=>c.fb(a)).join(',')+']':'null';return'{"c":"'+this.bb()+'","a":['+ko(a,this.D)+','+b+']}'}toString(){const a=olympe.j.Zb(this.D)?'N:'+this.D.Tb.ja():this.D.valueOf(),b=this.Ra?','+this.Ra.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
1673
+ X('olympe.dc.transformers.Union',olympe.dc.Ra.ro);olympe.dc.Ra.ro.Aa=[olympe.dc.qo];olympe.dc.Ra.$C={T_:1,lR:-1,wH:0};olympe.dc.Ra.z1={BZ:!0,b_:!1};olympe.dc.bg.ba={oJ:'dc.legacy.listdefProcessor'};olympe.dc.bg.pa={nJ:'dc.legacy.listdefsCovered'};olympe.sa.$e(a=>{E(a,olympe.dc.bg.pa.nJ,!1);B(a,olympe.dc.bg.ba.oJ,olympe.dc.bg.NS,olympe.dc.query.ba.Vb,olympe.dc.ba.Zs,olympe.dc.transaction.ba.Ob,olympe.dc.query.ba.fw,new olympe.sa.zb(olympe.dc.pa.Kt),new olympe.sa.zb(olympe.dc.bg.pa.nJ))});olympe.sa.run([olympe.dc.bg.ba.oJ],a=>{olympe.dc.bg.XW=()=>a});function Qo(a){const b=olympe.dc.eb(),c=new Map;b.Yw(a).forEach(d=>{b.pc(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}
1675
1674
  olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.eb();Object.defineProperty(this,'db',{enumerable:!1});this.model=null}static yf(a,b,c,...d){b=olympe.dc.Ya(b);var e=sh(b);if(e=e&&e.C)return e(a,c,...d);a=a.create(b);void 0!==c&&null!==c&&Z(a,olympe.dc.CloudObject.nameProp,c);return a.ka()}static get(a){if(a instanceof olympe.dc.CloudObject)var b=a;else{b=olympe.dc.DN();a=olympe.dc.Ya(a);var c=b.db.model(a);c=rh(b,c);if(null===c)throw new olympe.dc.WJ(a);c=c.instantiate(a,
1676
- b.D);b.C.nk([a],olympe.dc.db.Instance.C.yH);b.Oc.register(c,a);b=c}return b}static Mw(a){return olympe.dc.eb().tc(olympe.dc.Ya(a))}static NV(a,b,c){const d=olympe.dc.eb();let e=null;const f=l=>{null===e&&(e=Po(b||this));return e.has(l)?e.get(l):null},g=Dn(!1),k=g.create(null!=b?b:this);void 0!==c&&k.ne(c);a.forEach((l,m)=>{d.tc(olympe.dc.Ya(m))?Z(k,m,l):(m=f(m))&&Z(k,m,l)});g.Kd((l,m)=>{l||olympe.gb.Cb('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${m}`)});return this.get(k)}static qM(){return this.get(this)}static KA(a){return olympe.dc.nb.KA(a)}static be(){return olympe.dc.eb().pc(this,
1675
+ b.D);b.C.nk([a],olympe.dc.db.Instance.C.yH);b.Oc.register(c,a);b=c}return b}static Mw(a){return olympe.dc.eb().tc(olympe.dc.Ya(a))}static NV(a,b,c){const d=olympe.dc.eb();let e=null;const f=l=>{null===e&&(e=Qo(b||this));return e.has(l)?e.get(l):null},g=En(!1),k=g.create(null!=b?b:this);void 0!==c&&k.ne(c);a.forEach((l,m)=>{d.tc(olympe.dc.Ya(m))?Z(k,m,l):(m=f(m))&&Z(k,m,l)});g.Kd((l,m)=>{l||olympe.gb.Cb('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${m}`)});return this.get(k)}static qM(){return this.get(this)}static KA(a){return olympe.dc.nb.KA(a)}static be(){return olympe.dc.eb().pc(this,
1677
1676
  olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.Oc.Property(a))}static Xh(){const a=olympe.dc.eb();return a.pc(this,olympe.dc.CloudObject.px).map(b=>new olympe.dc.Oc.Relation(b)).concat(a.pc(this,olympe.dc.CloudObject.BM).map(b=>new olympe.dc.Oc.Relation(b,olympe.dc.Ib.ORIGIN)))}static ih(a){return olympe.dc.CloudObject.get(a)}static EN(a){var b=rh(olympe.dc.DN(),olympe.dc.Ya(a));b=b&&b.D;return new olympe.dc.Kb(olympe.dc.Ya(a),olympe.dc.CloudObject.instancesRel,b)}ka(){return this.tag}name(){return this.db.name(this)}bb(){return this.Rd(olympe.dc.CloudObject.nameProp)}Qe(){this.model||
1678
1677
  (this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.nb.from(this)}Bl(){return this.db.Bl(this)}Sd(){return this.db.source(this)}TW(){return this.db.zu(this)?olympe.dc.Kj().fromModel(this):null}nN(){return olympe.j.Xa([this.bb()],a=>olympe.j.ic(a),olympe.j.kb,'getDisplayName',olympe.j.ic('('+this.toString()+')'))}De(){return this.model?this.model.ka():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.se?a.se():a;return new rxjs.Observable(e=>
1679
1678
  {const f=olympe.dc.Ad.ug(this.db.Ac(this.tag,b));c||null!==f||e.next(f);const g=Pi(this.db,this.tag,b,k=>{e.next(olympe.dc.Ad.ug(k))});d.Ve(()=>{e.complete();Qi(this.db,this.tag,b,g)});return()=>Qi(this.db,this.tag,b,g)})}gY(a){const b='function'===typeof a.se?a.se():a;return new rxjs.Observable(c=>{const d=Ri(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.Oc.Property(e),null]):c.next([new olympe.dc.Oc.Property(e),f])});b.Ve(()=>{c.complete();Si(this.db,this.tag,d)});return()=>
@@ -1700,11 +1699,11 @@ z('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.D=olympe.d
1700
1699
  olympe.dm.User.SAMLnameIdProp=olympe.dm.User.U.fa('ff023000000000000036');z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.O=Y(olympe.dm.User.U,olympe.dm.Xi.C);olympe.dm.User.$=olympe.dm.User.U.tb('ff022000000000000002');olympe.dm.User.C=Hh('014831d95fd7d12b8568','ADMIN_USER');olympe.dm.User.R=Hh('0163d9653067b6237f62','GUEST_USER');h=olympe.dm.User.prototype;h.LW.K=olympe.j.J.R;h.bb.K=olympe.j.J.R;h.VD.K=olympe.j.J.R;h.oS.K=olympe.j.J.R;h.nS.K=olympe.j.J.R;h.nX.K=olympe.j.J.R;
1701
1700
  h.yX.K=olympe.j.J.R;h.lX.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.dm.hm=class extends olympe.dc.CloudObject{R(){return this.Vw()}Oa(){return this.Rd(olympe.dm.hm.Ka)}};olympe.dm.hm.U=olympe.dc.Ja.C('01621fb84e3300000000',olympe.dm.hm);olympe.dm.hm.Ka=olympe.dm.hm.U.fa('01609de3f292e3c2c6ff');olympe.dm.hm.prototype.R.K=new olympe.j.J(()=>olympe.j.Ug,[]);olympe.dm.hm.prototype.Oa.K=olympe.j.J.R;olympe.dm.BrickMetadata=class extends olympe.dm.hm{zX(){return this.Rd(olympe.dm.BrickMetadata.Pb)}jh(){return this.Rd(olympe.dm.BrickMetadata.Ha)}getType(){return this.Rd(olympe.dm.BrickMetadata.W)}MX(){return this.Vm(olympe.dm.BrickMetadata.ob)}Di(){return null}qW(){return this.pc(olympe.sc.ui.Ze.Comment.C.fe(),olympe.sc.ui.Ze.Comment)}ae(){return this.ml(olympe.dm.BrickMetadata.ma).zf().ae()}};olympe.dm.BrickMetadata.U=Nh(olympe.dc.Ja.C('01621fb84e3500000000',olympe.dm.BrickMetadata));
1702
1701
  olympe.dm.BrickMetadata.Pb=olympe.dm.BrickMetadata.U.fa('01621fb84e320000f001');olympe.dm.BrickMetadata.Ha=olympe.dm.BrickMetadata.U.fa('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.W=olympe.dm.BrickMetadata.U.fa('01703376c4a81c0e9d00');olympe.dm.BrickMetadata.ob=olympe.dm.BrickMetadata.U.fa('01703376c4a81c0eaea5');olympe.dm.BrickMetadata.ma=olympe.dm.BrickMetadata.U.tb('0161ae97622bb21f335b');olympe.dm.BrickMetadata.ld={V0:'private',Y0:'public'};
1703
- olympe.dm.BrickMetadata.lk={p_:'experimental',o1:'stable',a_:'deprecated'};olympe.dm.BrickMetadata.kc={NZ:'business',D1:'technical'};h=olympe.dm.BrickMetadata.prototype;h.zX.K=olympe.j.J.R;h.jh.K=olympe.j.J.R;h.getType.K=olympe.j.J.R;h.MX.K=olympe.j.J.T;h.Di.K=new olympe.j.J(()=>String,[]);h.qW.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.ae.K=olympe.j.J.W;function dl(a,b){b=b.startsWith('data.')?b.substring(5):b;let c,d;return null!=(d=null!=(c=olympe.sa.getParameter(`${'data.'}${a}.${b}`))?c:olympe.sa.getParameter(`${'data.'}${b}`))?d:olympe.sa.getParameter(`${olympe.dc.sources.tt.wT}${b}`)}
1704
- function rl(a,b){const c=a.query().oc(olympe.dm.ii.C.fe()).oc(olympe.dm.ii.D);a=a.query().oc(olympe.dm.fd.O.fe()).Yp(olympe.dm.fd.C,!0).oc(olympe.sc.qg.C.fe());const d=e=>e.Zi().Yp(olympe.dc.CloudObject.extendRel,!0).oc(olympe.dc.CloudObject.px,!0).oc(olympe.dm.Relation.destinationModelRel).back(2).oc(olympe.dc.CloudObject.propertyRel,!0).oc(olympe.dm.Property.typeRel).observe(b);return rxjs.combineLatest([d(c),d(a)]).pipe(rxjs.operators.map(([e,...f])=>e.concat(...f)))}
1705
- function Ql(a,b){return a.observe(b,olympe.dm.DataSource.xM).pipe(rxjs.operators.map(()=>a.yo(olympe.dc.sources.pa.am)),rxjs.operators.distinctUntilChanged())}
1702
+ olympe.dm.BrickMetadata.lk={p_:'experimental',o1:'stable',a_:'deprecated'};olympe.dm.BrickMetadata.kc={NZ:'business',D1:'technical'};h=olympe.dm.BrickMetadata.prototype;h.zX.K=olympe.j.J.R;h.jh.K=olympe.j.J.R;h.getType.K=olympe.j.J.R;h.MX.K=olympe.j.J.T;h.Di.K=new olympe.j.J(()=>String,[]);h.qW.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.ae.K=olympe.j.J.W;function el(a,b){b=b.startsWith('data.')?b.substring(5):b;let c,d;return null!=(d=null!=(c=olympe.sa.getParameter(`${'data.'}${a}.${b}`))?c:olympe.sa.getParameter(`${'data.'}${b}`))?d:olympe.sa.getParameter(`${olympe.dc.sources.tt.wT}${b}`)}
1703
+ function sl(a,b){const c=a.query().oc(olympe.dm.ii.C.fe()).oc(olympe.dm.ii.D);a=a.query().oc(olympe.dm.fd.O.fe()).Yp(olympe.dm.fd.C,!0).oc(olympe.sc.qg.C.fe());const d=e=>e.Zi().Yp(olympe.dc.CloudObject.extendRel,!0).oc(olympe.dc.CloudObject.px,!0).oc(olympe.dm.Relation.destinationModelRel).back(2).oc(olympe.dc.CloudObject.propertyRel,!0).oc(olympe.dm.Property.typeRel).observe(b);return rxjs.combineLatest([d(c),d(a)]).pipe(rxjs.operators.map(([e,...f])=>e.concat(...f)))}
1704
+ function Rl(a,b){return a.observe(b,olympe.dm.DataSource.xM).pipe(rxjs.operators.map(()=>a.yo(olympe.dc.sources.pa.am)),rxjs.operators.distinctUntilChanged())}
1706
1705
  olympe.dm.DataSource=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.kf=c;this.yM=new Map([[olympe.dc.sources.pa.SC,olympe.dm.DataSource.sY],[olympe.dc.sources.pa.am,olympe.dm.DataSource.xM],[olympe.dc.sources.pa.ZC,olympe.dm.DataSource.BY]])}ja(){return this.tag===olympe.dm.DataSource.SERVER?olympe.dc.Jc.SERVER:this.tag}yo(a){const b=a.startsWith('data.')?a.split('.')[1]:a,c=`${'data.'}${b}`;let d,e;return null!=(e=null!=(d=olympe.sa.getParameter(`${'data.'}${this.name().toLowerCase().replace(/\W/g,
1707
- '_')}.${b}`))?d:dl(this.ka(),a))?e:this.yM.has(c)?this.get(this.yM.get(c)):null}jh(){const a=this;return q(function*(){const b=olympe.dm.DataSource.Vf.yQ,c=olympe.dm.DataSource.Vf.we,d=new olympe.dc.Request(olympe.dc.Request.C.Vf,a.ja());return oh(a.kf,d).then(e=>{let f;const g=null!=(f=null==e?void 0:e.s)?f:c;(e=null==e?void 0:e.r)&&olympe.gb.Cb('dc').warn(`Source ${a.name()} (${a.ja()}) has encountered issues: ${e}`);return g}).catch(e=>{const f=olympe.Y.errors.OJ;return e instanceof olympe.Y.errors.Nz||
1706
+ '_')}.${b}`))?d:el(this.ka(),a))?e:this.yM.has(c)?this.get(this.yM.get(c)):null}jh(){const a=this;return q(function*(){const b=olympe.dm.DataSource.Vf.yQ,c=olympe.dm.DataSource.Vf.we,d=new olympe.dc.Request(olympe.dc.Request.C.Vf,a.ja());return oh(a.kf,d).then(e=>{let f;const g=null!=(f=null==e?void 0:e.s)?f:c;(e=null==e?void 0:e.r)&&olympe.gb.Cb('dc').warn(`Source ${a.name()} (${a.ja()}) has encountered issues: ${e}`);return g}).catch(e=>{const f=olympe.Y.errors.OJ;return e instanceof olympe.Y.errors.Nz||
1708
1707
  e instanceof f?b:c})})}init(){const a=this;return q(function*(){if(a.constructor===olympe.dm.DataSource)throw Error(`Data source ${a.name()} (${a.tag}) has no implementation (is the file missing ?)`);})}destroy(){return q(function*(){})}healthCheck(){return q(function*(){})}executeQuery(a){return q(function*(){return olympe.dc.query.vi.Pw(a)})}applyTransaction(){return q(function*(){})}uploadFileContent(){return q(function*(){throw Error('Should not try to upload files with SELF source');})}downloadFileContent(){return q(function*(){throw Error('Should not try to download files with SELF source');
1709
1708
  })}deleteFileContent(){return q(function*(){})}};olympe.dm.DataSource.prototype.deleteFileContent=olympe.dm.DataSource.prototype.deleteFileContent;olympe.dm.DataSource.prototype.downloadFileContent=olympe.dm.DataSource.prototype.downloadFileContent;olympe.dm.DataSource.prototype.uploadFileContent=olympe.dm.DataSource.prototype.uploadFileContent;olympe.dm.DataSource.prototype.applyTransaction=olympe.dm.DataSource.prototype.applyTransaction;olympe.dm.DataSource.prototype.executeQuery=olympe.dm.DataSource.prototype.executeQuery;
1710
1709
  olympe.dm.DataSource.prototype.healthCheck=olympe.dm.DataSource.prototype.healthCheck;olympe.dm.DataSource.prototype.destroy=olympe.dm.DataSource.prototype.destroy;olympe.dm.DataSource.prototype.init=olympe.dm.DataSource.prototype.init;olympe.dm.DataSource.prototype.getConfig=olympe.dm.DataSource.prototype.yo;olympe.dm.DataSource.prototype.getId=olympe.dm.DataSource.prototype.ja;olympe.dm.DataSource.U=olympe.dc.Ja.C('ff021000000000000060',olympe.dm.DataSource,olympe.dc.ba.tr);
@@ -1728,97 +1727,97 @@ olympe.dm.fd.qc=Hh('100000000000000000dd','PRIMORDIAL');olympe.dm.fd.prototype.C
1728
1727
  z('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);olympe.dm.Property.typeRel=Y(olympe.dm.Property.U,olympe.dc.CloudObject.typeRel);z('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.C.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.getType.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.D.K=olympe.j.J.O;olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}WW(){return olympe.j.kb.EMPTY}kW(){return this.yg(olympe.dm.Relation.D)}gX(){return this.yg(olympe.dm.Relation.O)}jN(){return this.pc(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Vd()}NN(){return this.pc(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Vd()}og(){return this.NN().bb().concat(['-',this.bb(),'->',this.jN().bb()])}};olympe.dm.Relation.U=olympe.dc.Ja.C('ff021000000000000006',olympe.dm.Relation);
1729
1728
  olympe.dm.Relation.O=olympe.dm.Relation.U.fa('ff023000000000000030');olympe.dm.Relation.D=olympe.dm.Relation.U.fa('ff023000000000000034');olympe.dm.Relation.da=olympe.dm.Relation.U.fa(olympe.dc.Te.tG);olympe.dm.Relation.$=olympe.dm.Relation.U.fa(olympe.dc.Te.Qg);olympe.dm.Relation.ma=olympe.dm.Relation.U.fa(olympe.dc.Te.Wi);olympe.dm.Relation.za=olympe.dm.Relation.U.fa(olympe.dc.Te.jU);olympe.dm.Relation.ca=olympe.dm.Relation.U.fa(olympe.dc.Te.zQ);olympe.dm.Relation.Pa=olympe.dm.Relation.U.fa(olympe.dc.Te.KU);
1730
1729
  olympe.dm.Relation.W=olympe.dm.Relation.U.fa('ff023000000000000031');olympe.dm.Relation.originModelRel=Y(olympe.dm.Relation.U,olympe.dc.CloudObject.px);z('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=Y(olympe.dm.Relation.U,olympe.dc.CloudObject.BM);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dm.Relation.C={uH:0,VP:5,LT:1,g1:4,yL:2,vK:8,o_:10,d1:6,e1:9,sj:6,f1:9};
1731
- olympe.dm.Relation.R={F0:3,iT:4,r0:5,q0:6};olympe.dm.Relation.T=olympe.dm.xB.mT+olympe.dm.xB.wQ;h=olympe.dm.Relation.prototype;h.WW.K=olympe.j.J.R;h.kW.K=olympe.j.J.D;h.gX.K=olympe.j.J.D;h.jN.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.NN.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);function Qo(a){a=olympe.dc.Ya(a);if(olympe.dc.eb().Xm(a,olympe.dm.String))return olympe.dm.String.valueProp;switch(a){case olympe.dm.Number.U.ka():return olympe.dm.Number.valueProp;case olympe.dm.Boolean.U.ka():return olympe.dm.Boolean.valueProp;case olympe.dm.DateTime.U.ka():return olympe.dm.DateTime.valueProp;case olympe.dm.Color.U.ka():return olympe.dm.Color.valueProp;default:throw Error('Unknown primitive model: '+a);}}olympe.dm.$k=class extends olympe.dc.CloudObject{getValue(){}};
1730
+ olympe.dm.Relation.R={F0:3,iT:4,r0:5,q0:6};olympe.dm.Relation.T=olympe.dm.xB.mT+olympe.dm.xB.wQ;h=olympe.dm.Relation.prototype;h.WW.K=olympe.j.J.R;h.kW.K=olympe.j.J.D;h.gX.K=olympe.j.J.D;h.jN.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.NN.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);function Ro(a){a=olympe.dc.Ya(a);if(olympe.dc.eb().Xm(a,olympe.dm.String))return olympe.dm.String.valueProp;switch(a){case olympe.dm.Number.U.ka():return olympe.dm.Number.valueProp;case olympe.dm.Boolean.U.ka():return olympe.dm.Boolean.valueProp;case olympe.dm.DateTime.U.ka():return olympe.dm.DateTime.valueProp;case olympe.dm.Color.U.ka():return olympe.dm.Color.valueProp;default:throw Error('Unknown primitive model: '+a);}}olympe.dm.$k=class extends olympe.dc.CloudObject{getValue(){}};
1732
1731
  olympe.dm.$k.U=olympe.dc.Ja.C('ff021000000000000019',olympe.dm.$k);olympe.dm.String=class extends olympe.dm.$k{getValue(){return this.Rd(olympe.dm.String.valueProp)}ug(){return this.get(olympe.dm.String.valueProp)}toString(){let a;return null!=(a=this.get(olympe.dm.String.valueProp))?a:''}};olympe.dm.String.U=olympe.dc.Ja.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.U.fa('ff023000000000000026');z('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.j.J.R;
1733
1732
  olympe.dm.String.prototype.toString.K=olympe.j.J.O;olympe.dm.Boolean=class extends olympe.dm.$k{getValue(){return this.Vm(olympe.dm.Boolean.valueProp)}ug(){return this.get(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.U=olympe.dc.Ja.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.U.fa('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.j.J.T;olympe.dm.Color=class extends olympe.dm.$k{getValue(){return this.VN()}ug(){return this.get(olympe.dm.Color.valueProp)}};olympe.dm.Color.U=olympe.dc.Ja.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.U.fa('ff023000000000000032');z('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.j.J(()=>olympe.j.Color,[]);olympe.dm.DateTime=class extends olympe.dm.$k{getValue(){return this.gx(olympe.dm.DateTime.valueProp)}ug(){return this.get(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.U=olympe.dc.Ja.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.U.fa('ff023000000000000029');z('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.j.J(()=>olympe.j.ac,[]);olympe.dm.Enum=class extends olympe.dm.String{bb(){return olympe.j.Xa([super.bb(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.j.kb)}gf(){return this.yg(olympe.dm.Enum.rankProp)}};olympe.dm.Enum.U=olympe.dc.Ja.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.U.fa('017a7690c915975ea995');olympe.dm.Enum.prototype.gf.K=olympe.j.J.D;olympe.dm.yp=class extends olympe.dm.BrickMetadata{wX(){return this.oc(olympe.dc.CloudObject.instancesRel).lv(olympe.dm.Enum.rankProp,olympe.dc.query.uz.ASC).zf()}static create(a,b){b=a.create(olympe.dm.yp,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Qb(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.yp.create=olympe.dm.yp.create;olympe.dm.yp.prototype.getValues=olympe.dm.yp.prototype.wX;olympe.dm.yp.U=olympe.dc.Ja.C('017a768f966fc08ebb98',olympe.dm.yp);olympe.dm.Number=class extends olympe.dm.$k{getValue(){return this.yg(olympe.dm.Number.valueProp)}ug(){return this.get(olympe.dm.Number.valueProp)}};olympe.dm.Number.U=olympe.dc.Ja.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.U.fa('ff023000000000000028');z('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.j.J.D;olympe.sc={};olympe.sc.ba={Vb:'sc.Logger',hw:'sc.RootContext',cl:'sc.Serializer'};olympe.sc.pa={Zl:'sc.app',tp:'sc.debug',mF:'sc.autostartProfiler',oG:'sc.debugger',VB:'sc.disableTheme',PRODUCTION:'sc.production',jT:'sc.onstartTimeout',qK:'sc.remoteActionTimeout'};
1734
1733
  olympe.sa.$e(a=>{E(a,olympe.sc.pa.Zl,'');E(a,olympe.sc.pa.tp,!1);E(a,olympe.sc.pa.VB,!0);E(a,olympe.sc.pa.PRODUCTION,!1);E(a,olympe.sc.pa.jT,2E4);E(a,olympe.sc.pa.qK,3E4);E(a,olympe.sc.pa.mF,!1);C(a,olympe.sc.ba.Vb,[olympe.gb.ba.Ob],b=>b.Vg('sc'));B(a,olympe.sc.ba.cl,olympe.sc.Mf,olympe.dc.db.ba.Ob);Ua(a,olympe.dc.sources.ba.cl,olympe.sc.ba.cl);C(a,olympe.sc.ba.hw,[new olympe.sa.zb(olympe.sc.pa.PRODUCTION)],b=>{const c=new olympe.sc.sp('root','root',null);olympe.sc.uE=c;c.set(olympe.sc.Hb.C.PRODUCTION,
1735
1734
  b);return new olympe.sc.Hb(c)})},'olympe.sc');olympe.sa.run([olympe.sc.ba.hw,new olympe.sa.zb(olympe.Y.pa.IB)],(a,b)=>{olympe.Jj().ctx=a;olympe.Jj().oVersion=()=>b});olympe.sc.LA=()=>null!==olympe.dc.eb().Wd(void 0,olympe.sc.Runnable.W.fe());olympe.sc.M2=(a,b,c,d)=>{c=Z(Z(a.create(olympe.sc.Ch),olympe.sc.Ch.C,c||null),olympe.sc.Ch.O,d||null);a.Qb(olympe.sc.Ch.D,c,b);a.Qb(olympe.dc.CloudObject.containsRel,b,c);return c.ka()};olympe.sc.Hw=(a,b)=>{a=olympe.dc.Ad.lW(b)(a);return a instanceof olympe.sc.ri?a.C():a};
1736
1735
  olympe.sc.d3=function(a){const b=olympe.dc.CloudObject.containsRel.fe();var c=olympe.dc.Ya(a);if(void 0===c)return[];a=olympe.dc.eb();const d=[];let e=[];const f=new Set;for(;!a.me(c,olympe.dm.Ye);){f.add(c);const g=a.Wd(c,b);if(null===g)return olympe.gb.Cb('sc').warn(`Object ${c} has no container`),[];a.me(c,olympe.sc.logic.jd)||g===a.Wd(c,olympe.sc.Runnable.W.fe())||d.push(c);c=g;if(f.has(c))throw Error(`Instance ${c} (${a.name(c)}) is part of a cyclic contain pattern`);}e.push(c);e=e.concat(a.iq(e[0],
1737
1736
  olympe.dm.Ye.Oa));e=e.concat(a.iq(e[e.length-1],olympe.dm.fh.ca.fe()));e=e.concat(a.iq(e[e.length-1],olympe.dm.fh.$.fe()));return[...d,...e].reverse()};olympe.sc.JW=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.Xn:a.startsWith('video/')?olympe.sc.St:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.Fg:olympe.dm.File};
1738
- olympe.sc.c3=a=>a instanceof olympe.sc.Xn?'image/*':a instanceof olympe.sc.St?'video/*':a instanceof olympe.sc.Fg?'font/*,application/font-woff':null;olympe.sc.$c={};function Ro(a,b){var c=olympe.sc.Hb,d=a.C;a=a.se();b=olympe.dc.Ya(b);let e,f=null==(e=d.children)?void 0:e.get(b);if(!f){f=d.wo(a,void 0,b);for(d=f.getParent();d&&d.ca&&!d.id.startsWith('_');)d=d.getParent();let g;null==(g=d)||So(g,b,f)}return new c(f)}function To(a,b){let c,d;return(a=null!=(d=null==(c=a.C.children)?void 0:c.get(olympe.dc.Ya(b)))?d:null)?new olympe.sc.Hb(a):null}function Uo(a){let b;return null!=(b=a.Qa(olympe.sc.Hb.C.EDITION))?b:!1}
1739
- function Vo(a){let b;return null!=(b=a.Qa(olympe.sc.Hb.C.PRODUCTION))?b:!1}
1737
+ olympe.sc.c3=a=>a instanceof olympe.sc.Xn?'image/*':a instanceof olympe.sc.St?'video/*':a instanceof olympe.sc.Fg?'font/*,application/font-woff':null;olympe.sc.$c={};function So(a,b){var c=olympe.sc.Hb,d=a.C;a=a.se();b=olympe.dc.Ya(b);let e,f=null==(e=d.children)?void 0:e.get(b);if(!f){f=d.wo(a,void 0,b);for(d=f.getParent();d&&d.ca&&!d.id.startsWith('_');)d=d.getParent();let g;null==(g=d)||To(g,b,f)}return new c(f)}function Uo(a,b){let c,d;return(a=null!=(d=null==(c=a.C.children)?void 0:c.get(olympe.dc.Ya(b)))?d:null)?new olympe.sc.Hb(a):null}function Vo(a){let b;return null!=(b=a.Qa(olympe.sc.Hb.C.EDITION))?b:!1}
1738
+ function Wo(a){let b;return null!=(b=a.Qa(olympe.sc.Hb.C.PRODUCTION))?b:!1}
1740
1739
  olympe.sc.Hb=class{constructor(a=olympe.sc.uE){this.C=a;this.V=olympe.gb.Cb('sc');this.parent=null}ja(){return this.C.ja()}getParent(){if(null===this.parent){const a=this.C.getParent();this.parent=null===a?null:new olympe.sc.Hb(a)}return this.parent}pW(a){const b=olympe.dc.eb();let c=this.getParent();if(!c)return this;const d=e=>{e=e.Fm();if('string'!==typeof e)return!1;const f=b.model(e);return f&&b.Ac(f,olympe.sc.yc.da)||a.modelTag&&!b.me(e,a.modelTag)?!1:!0};for(;c&&!d(c);){const e=c.getParent();
1741
1740
  if(!e)break;c=e}return c}Fm(){return this.C.Fm()}se(){return this.C.se()}set(a,b){this.C.set(a,b);return this}Qq(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}wa(a,b,c=!1){const d=olympe.dc.Ya(a),e=olympe.j.Za(null!=b?b:Object,`Get context value flow source of ${d}`);e.getContext().onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.C.ja():void 0));return e.wa()}get(a,b=!1){a=this.Qa(a,b);return void 0!==a?a:null}has(a,b=!1){return this.C.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>
1742
- {const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.C.ja(),!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=Wo(this.C,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.js(a.unsubscribe.bind(a));return this}CY(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.wo(`Runner ${a.name()}`);a.run(b);return b}qB(a,b=!0,c=!1){return new Promise((d,e)=>{this.observe(a,b,c).pipe(rxjs.operators.first()).subscribe(rxjs.Subscriber.create(d,
1741
+ {const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.C.ja(),!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=Xo(this.C,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.js(a.unsubscribe.bind(a));return this}CY(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.wo(`Runner ${a.name()}`);a.run(b);return b}qB(a,b=!0,c=!1){return new Promise((d,e)=>{this.observe(a,b,c).pipe(rxjs.operators.first()).subscribe(rxjs.Subscriber.create(d,
1743
1742
  f=>{let g=`An error occurred while calling \`waitFor(${olympe.dc.Ya(a)})\``+`on the context ${this.ja()}:\nStack: ${this.tk()}\n${f}`;f instanceof rxjs.EmptyError&&(g=`The context ${this.ja()} has been destroyed while a Promise `+`created from a call to \`waitFor(${olympe.dc.Ya(a)})\` `+`has never received any value:\nStack: ${this.tk()}`);e(Error(g))}))})}throw(a){var b=a instanceof Error?a.message:String(a);if(a instanceof Error){var c;const d=(null==(c=a.tk)?void 0:c.call(a))||this.tk();let e,
1744
- f;c=null!=(f=null==(e=a.eN)?void 0:e.call(a))?f:0;b=Xo(b,c,d);b.stack=a.stack}else b=Xo(b,0,this.tk());Yo(this.C,b);return this}mP(a){this.set(olympe.sc.Hb.C.rp,a);return this}Qa(a,b=!0){return this.C.Qa(a,b)}on(a,b,c,d=!0){return this.C.on(a,b,c,d)}wo(a){return new olympe.sc.Hb(this.C.wo(this.se(),a))}QA(a,b){return this.C.QA(a,c=>{b(new olympe.sc.Hb(c))})}dX(a){a=Zo(this.C,a);return a===this.C?this:a&&new olympe.sc.Hb(a)}destroy(){this.C.destroy()}js(a,b){return this.C.js(a,b)}OA(a){this.C.OA(a)}onDestroy(a){return this.lc()?
1745
- (a(),'noId'):this.se().onDestroy(a)}Lo(a){this.lc()||this.se().Lo(a)}clear(){this.C.clear()}lc(){return this.se().lc()||this.se().$f()}Ac(a){a=$o(this.C,a);return null!==a?new olympe.sc.ui.fm(a,this):null}lA(a){a=$o(this.C,a);return null!==a?new olympe.sc.ui.NB(a,this):null}fY(...a){return rxjs.combineLatest(a.map(b=>{b=$o(this.C,b);return null!==b?this.observe(b):rxjs.of(null)}))}Rb(a){return(null==a?void 0:a.constructor)!==this.constructor?!1:this.C===a.C}tk(){const a=olympe.dc.eb();let b;try{const c=
1743
+ f;c=null!=(f=null==(e=a.eN)?void 0:e.call(a))?f:0;b=Yo(b,c,d);b.stack=a.stack}else b=Yo(b,0,this.tk());Zo(this.C,b);return this}mP(a){this.set(olympe.sc.Hb.C.rp,a);return this}Qa(a,b=!0){return this.C.Qa(a,b)}on(a,b,c,d=!0){return this.C.on(a,b,c,d)}wo(a){return new olympe.sc.Hb(this.C.wo(this.se(),a))}QA(a,b){return this.C.QA(a,c=>{b(new olympe.sc.Hb(c))})}dX(a){a=$o(this.C,a);return a===this.C?this:a&&new olympe.sc.Hb(a)}destroy(){this.C.destroy()}js(a,b){return this.C.js(a,b)}OA(a){this.C.OA(a)}onDestroy(a){return this.lc()?
1744
+ (a(),'noId'):this.se().onDestroy(a)}Lo(a){this.lc()||this.se().Lo(a)}clear(){this.C.clear()}lc(){return this.se().lc()||this.se().$f()}Ac(a){a=ap(this.C,a);return null!==a?new olympe.sc.ui.fm(a,this):null}lA(a){a=ap(this.C,a);return null!==a?new olympe.sc.ui.NB(a,this):null}fY(...a){return rxjs.combineLatest(a.map(b=>{b=ap(this.C,b);return null!==b?this.observe(b):rxjs.of(null)}))}Rb(a){return(null==a?void 0:a.constructor)!==this.constructor?!1:this.C===a.C}tk(){const a=olympe.dc.eb();let b;try{const c=
1746
1745
  [this];let d=this.getParent();for(;null!==d&&d.C!==olympe.sc.uE;)c.push(d),d=d.getParent();b='> '+c.map(e=>{const f=e.Fm();return null!==f?(e=a.model(f),`${a.name(f)||e&&a.name(e)||f} (${e})`):e.ja()}).join('\n> ')}catch(c){b=`No stack available for context ${this.ja()}: ${c}`,this.V.warn(b)}return b}};olympe.sc.Hb.prototype.observeMany=olympe.sc.Hb.prototype.fY;olympe.sc.Hb.prototype.getEvent=olympe.sc.Hb.prototype.lA;olympe.sc.Hb.prototype.getProperty=olympe.sc.Hb.prototype.Ac;
1747
1746
  olympe.sc.Hb.prototype.isDestroyed=olympe.sc.Hb.prototype.lc;olympe.sc.Hb.prototype.clear=olympe.sc.Hb.prototype.clear;olympe.sc.Hb.prototype.offDestroy=olympe.sc.Hb.prototype.Lo;olympe.sc.Hb.prototype.onDestroy=olympe.sc.Hb.prototype.onDestroy;olympe.sc.Hb.prototype.offClear=olympe.sc.Hb.prototype.OA;olympe.sc.Hb.prototype.onClear=olympe.sc.Hb.prototype.js;olympe.sc.Hb.prototype.destroy=olympe.sc.Hb.prototype.destroy;olympe.sc.Hb.prototype.getOtherContext=olympe.sc.Hb.prototype.dX;
1748
1747
  olympe.sc.Hb.prototype.onContext=olympe.sc.Hb.prototype.QA;olympe.sc.Hb.prototype.createChild=olympe.sc.Hb.prototype.wo;olympe.sc.Hb.prototype.setParentElement=olympe.sc.Hb.prototype.mP;olympe.sc.Hb.prototype['throw']=olympe.sc.Hb.prototype.throw;olympe.sc.Hb.prototype.waitFor=olympe.sc.Hb.prototype.qB;olympe.sc.Hb.prototype.runner=olympe.sc.Hb.prototype.CY;olympe.sc.Hb.prototype.repeat=olympe.sc.Hb.prototype.repeat;olympe.sc.Hb.prototype.observe=olympe.sc.Hb.prototype.observe;
1749
1748
  olympe.sc.Hb.prototype.has=olympe.sc.Hb.prototype.has;olympe.sc.Hb.prototype.get=olympe.sc.Hb.prototype.get;olympe.sc.Hb.prototype.remove=olympe.sc.Hb.prototype.remove;olympe.sc.Hb.prototype.trigger=olympe.sc.Hb.prototype.Qq;olympe.sc.Hb.prototype.set=olympe.sc.Hb.prototype.set;olympe.sc.Hb.prototype.getClosest=olympe.sc.Hb.prototype.pW;olympe.sc.Hb.prototype.getParent=olympe.sc.Hb.prototype.getParent;
1750
- olympe.sc.Hb.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',rp:'__htmlContainer',vp:'__dockableElement',wB:'__appHasStarted'};olympe.sc.RU=class extends olympe.sc.Hb{constructor(a){super(a);this.D=new olympe.j.ee('SC Update Context',super.se());const b=a.js(()=>{b&&a.OA(b);this.D.destroy()})}se(){return this.D}js(a,b){return this.se().onDestroy(a,null!=b?b:olympe.oa.bf())}};let ap=0;function Wo(a,b){b=olympe.dc.Ya(b);let c,d,e,f;return null!=(f=null!=(e=null==(c=a.W)?void 0:c.get('I#'+b))?e:null==(d=a.W)?void 0:d.get('IO#'+b))?f:b}function Yo(a,b){if(null===a.parent)a.V.error(`An error occurred in a brick: ${b.toString()}`);else if(a.$){var c=bp(olympe.dc.CloudObject.get(a.$));null!==c&&cp(a,c).some(d=>{let e,f;return 0<(null==(e=a.D)?void 0:null==(f=e.get(d))?void 0:f.size)})&&!a.O.has('$'+c)?a.set(c,b):Yo(a.parent,b)}else Yo(a.parent,b)}
1751
- function Zo(a,b){if(b===a.id||a.R.has(b)||!b)return a;for(a=a.parent;a;){if(b===a.ja()||a.R.has(b))return a;const c=dp(a.children,b);if(c)return c;a=a.getParent()}return null}function ep(a,b,c=0){null===a.$c&&(a.$c=new Map);a.$c.has(b.ja())||(a.$c.set(b.ja(),{WA:b,depth:c}),fp(a,d=>{(-1===b.O||c<b.O)&&ep(d,b,c+1)}),a.onDestroy(()=>{gp(a,b.ja())}));return b.ja()}
1752
- function gp(a,b){if(null===a.$c||!a.$c.has(b))return!1;const {WA:c,depth:d}=a.$c.get(b);fp(a,f=>{gp(f,b)});0===d&&c.D();const e=a.$c.delete(b);0===a.$c.size&&(a.$c=null);return e}function $o(a,b){let c;return(null==(c=a.W)?void 0:c.get('IO#'+b))||null}
1753
- function hp(a){a.C.Ve(()=>{fp(a,c=>c.destroy())});a.C.onDestroy(()=>{void 0!==a.Qa(olympe.sc.Hb.C.TRANSACTION,!1)&&a.V.warn(`The context ${a.ja()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`);a.clear();let c;if(null!=(c=a.parent)){let d;null==(d=c.children)||d.delete(a.ja());let e;0===(null==(e=c.children)?void 0:e.size)&&(c.children=null)}a.R.clear()});let b;null==(b=a.parent)||ip(b,a)}
1754
- function dp(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.ca&&!c.id.startsWith('_')&&(a=dp(c.children,b)))return a;return null}function jp(a,b,...c){if(null!==a.$c)for(const {WA:d,depth:e}of a.$c.values())d.process(a,b,e,...c)}function kp(a,b){a.$=olympe.dc.Ya(b);a.ca=b.kg().LA();b.da().forEach(c=>{a.id===c||a.R.has(c)||(a.R.add(c),So(a,c,a))});a.W=b.W();jp(a,olympe.sc.$c.ig.C.INIT)}
1755
- function lp(a){a.da=!0;let b;null==(b=a.children)||b.forEach(c=>{lp(c)})}function mp(a){a.da=!1;let b;null==(b=a.children)||b.forEach(c=>{mp(c)})}function cp(a,b){return['*',a.id,...a.R].map(c=>`${'@'}${c}.${b}`)}function np(a,b,c,d){c.forEach(f=>{let g,k;null==(g=a.D)||null==(k=g.get(f))||k.forEach(l=>{l(d)})});let e;null==(e=a.children)||e.forEach(f=>{!f.da&&f.data.has(b)||np(f,b,c,d)})}
1756
- function op(a,b,c){a.D||(a.D=new Map);let d=a.D.get(b);void 0===d&&(d=new Map,a.D.set(b,d));ap++;const e=ap;d.set(e,c);return()=>{const f=a.D.get(b);f&&(f.delete(e),0===f.size&&a.D.delete(b))}}function So(a,b,c){a.O.add(b);let d,e;null==(d=a.D)||null==(e=d.get('&'+b))||e.forEach(f=>{f(c)});fp(a,f=>{f.O.has(b)||So(f,b,c)});a.O.delete(b)}function fp(a,b){let c;null==(c=a.children)||c.forEach(b)}function pp(a,b){a.data.forEach((c,d)=>b(c,d.slice(1)))}
1757
- function qp(a){var b=olympe.sc.$c.ig.D.Rp;const c=[];if(null!==a.$c)for(const {WA:d}of a.$c.values())d.getType()===b&&(c.push(d.ja()),d.D(),gp(a,d.ja()))}function ip(a,b){null===a.children&&(a.children=new Map);a.children.set(b.id,b)}
1758
- olympe.sc.sp=class{constructor(a,b='no name',c=olympe.sc.uE){this.id=a;this.Bd=b;this.R=new Set;this.parent=c;this.C=new olympe.j.ee('SC Context');this.data=new Map;this.$=this.T=this.children=this.D=null;this.ca=!1;this.O=new Set;this.da=!1;this.W=null;this.V=olympe.gb.Cb('sc');this.$c=null;hp(this)}ja(){return this.id}getParent(){return this.parent}Fm(){return this.$}set(a,b){if(!this.C.$f()&&!this.C.lc()){const g=olympe.dc.Ya(a);var c,d;let k,l;a=null!=(l=null!=(k=null==(c=this.W)?void 0:c.get('O#'+
1759
- g))?k:null==(d=this.W)?void 0:d.get('IO#'+g))?l:g;c='$'+a;var e;d=null!=(e=this.data.get(c))?e:null;b=null!=b?b:null;if(e=!this.O.has(c)){a:{if('function'===typeof(null==b?void 0:b.Rb))try{var f=b.Rb(d);break a}catch(m){f=!1;break a}f=b===d}e=!f}e&&(null===b?this.data.delete(c):this.data.set(c,b),null!==this.$c&&0<this.$c.size&&jp(this,olympe.sc.$c.ig.C.zr,a,b),f=cp(this,a),this.O.add(c),np(this,c,f,b),this.O.delete(c))}}on(a,b,c,d=!0){if(this.C.lc()||this.C.$f())return()=>{};const e=Wo(this,a),f=
1760
- c?olympe.dc.Ya(c):'*';a=op(this,'@'+f+'.'+e,b);c=c?(c=Zo(this,f))?c.Qa(e,!1):void 0:this.Qa(e);void 0!==c&&b(c);if(d)olympe.j.yb().onDestroy(a);return a}has(a,b=!1){a='$'+Wo(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}wo(a,b,c){const d=null!=c?c:'_'+olympe.oa.bf();if(a.lc()||a.$f())throw Error(`Try to create new child context in a destroyed context ${a.ja()}, probably because \`runner()\` is called on a destroyed context`);const e=a.run(()=>
1761
- new olympe.sc.sp(d,b,this));null!==this.$c&&0<this.$c.size&&this.$c.forEach(({WA:f,depth:g})=>{(-1===f.O||g<f.O)&&ep(e,f,g+1)});return e}QA(a,b){const c=Zo(this,a);if(c)return b(c),()=>{};const d=op(this,'&'+a,e=>{let f;null==(f=d)||f();b(e)});return d}Qa(a,b=!0){a='$'+Wo(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.C.$f()||this.C.lc()||(jp(this,olympe.sc.$c.ig.C.Iy),this.C.destroy(),jp(this,olympe.sc.$c.ig.C.tj))}js(a,
1762
- b){if(this.C.lc())a();else return ap++,b=null!=b?b:String(ap),null===this.T&&(this.T=new Map),this.T.set(b,a),b;return b||'noId'}OA(a){null!==this.T&&this.T.delete(a)}onDestroy(a){return this.lc()?(a(),'noId'):this.C.onDestroy(a)}clear(){if(!this.C.lc()){jp(this,olympe.sc.$c.ig.C.zy);let a;null==(a=this.T)||a.forEach(b=>b());jp(this,olympe.sc.$c.ig.C.Ay)}}lc(){return this.C.lc()}se(){return this.C}};olympe.sc.sp.prototype.getParent=olympe.sc.sp.prototype.getParent;
1763
- olympe.sc.sp.C={pC:'I#',OC:'O#',pR:'IO#'};function rp(a,b,c){return(c=c.Fm())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.$c.ig=class{constructor(a=-1){this.id=olympe.oa.Rr();this.active=!0;this.O=a}D(){this.active=!1}ja(){return this.id}getType(){}process(){}};olympe.sc.$c.ig.C={INIT:'INIT',zr:'SET',zy:'CLEAR',Ay:'CLEARED',Iy:'DESTROY',tj:'DESTROYED'};olympe.sc.$c.ig.D={Rp:'REMOTE',ES:'LOCAL',ho:'PROFILER'};olympe.sc.uj=class a{constructor(){this.D=this.R=this.T=null;this.W=new Map;this.O=new Map;this.C=new olympe.oa.nD(1E4);jb(this.C,b=>{qp(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.W.get(f);switch(e.t){case olympe.sc.uj.C.rT:c=this.O.get(e.f);b.ai(c).catch(m=>{d.error('Unable to reply with paths: ',m)});break;case olympe.sc.uj.C.sT:const k=f+c,l=(m,n,p=0)=>{pp(m,(r,t)=>{let u;r instanceof olympe.dc.CloudObject?u=a.O(r):u=r;let v;r=null!=(v=m.Fm())?v:'';0<r.length&&(r+='.');n.push([`${p}.${r}${t}`,
1764
- u])})};b.jE(k).then(()=>{const m=[];l(g,m,0);fp(g,p=>{l(p,m,1)});olympe.Y.de.publish(k,{t:olympe.sc.uj.C.oR,v:m,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.$c.QT(k);ep(g,n);this.C.has(g)?ib(this.C,g):this.C.add(g)}).catch(m=>{d.error('Error notifying on a contextId : ',m)});break;case olympe.sc.uj.C.uT:void 0!==g&&this.C.has(g)&&ib(this.C,g);break;case olympe.sc.uj.C.wp:void 0!==g&&(this.C.delete(g),qp(g))}}da(b,c,d){this.T=new olympe.Y.de('discovery_debug_id',
1749
+ olympe.sc.Hb.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',rp:'__htmlContainer',vp:'__dockableElement',wB:'__appHasStarted'};olympe.sc.RU=class extends olympe.sc.Hb{constructor(a){super(a);this.D=new olympe.j.ee('SC Update Context',super.se());const b=a.js(()=>{b&&a.OA(b);this.D.destroy()})}se(){return this.D}js(a,b){return this.se().onDestroy(a,null!=b?b:olympe.oa.bf())}};let bp=0;function Xo(a,b){b=olympe.dc.Ya(b);let c,d,e,f;return null!=(f=null!=(e=null==(c=a.W)?void 0:c.get('I#'+b))?e:null==(d=a.W)?void 0:d.get('IO#'+b))?f:b}function Zo(a,b){if(null===a.parent)a.V.error(`An error occurred in a brick: ${b.toString()}`);else if(a.$){var c=cp(olympe.dc.CloudObject.get(a.$));null!==c&&dp(a,c).some(d=>{let e,f;return 0<(null==(e=a.D)?void 0:null==(f=e.get(d))?void 0:f.size)})&&!a.O.has('$'+c)?a.set(c,b):Zo(a.parent,b)}else Zo(a.parent,b)}
1750
+ function $o(a,b){if(b===a.id||a.R.has(b)||!b)return a;for(a=a.parent;a;){if(b===a.ja()||a.R.has(b))return a;const c=ep(a.children,b);if(c)return c;a=a.getParent()}return null}function fp(a,b,c=0){null===a.$c&&(a.$c=new Map);a.$c.has(b.ja())||(a.$c.set(b.ja(),{WA:b,depth:c}),gp(a,d=>{(-1===b.O||c<b.O)&&fp(d,b,c+1)}),a.onDestroy(()=>{hp(a,b.ja())}));return b.ja()}
1751
+ function hp(a,b){if(null===a.$c||!a.$c.has(b))return!1;const {WA:c,depth:d}=a.$c.get(b);gp(a,f=>{hp(f,b)});0===d&&c.D();const e=a.$c.delete(b);0===a.$c.size&&(a.$c=null);return e}function ap(a,b){let c;return(null==(c=a.W)?void 0:c.get('IO#'+b))||null}
1752
+ function ip(a){a.C.Ve(()=>{gp(a,c=>c.destroy())});a.C.onDestroy(()=>{void 0!==a.Qa(olympe.sc.Hb.C.TRANSACTION,!1)&&a.V.warn(`The context ${a.ja()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`);a.clear();let c;if(null!=(c=a.parent)){let d;null==(d=c.children)||d.delete(a.ja());let e;0===(null==(e=c.children)?void 0:e.size)&&(c.children=null)}a.R.clear()});let b;null==(b=a.parent)||jp(b,a)}
1753
+ function ep(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.ca&&!c.id.startsWith('_')&&(a=ep(c.children,b)))return a;return null}function kp(a,b,...c){if(null!==a.$c)for(const {WA:d,depth:e}of a.$c.values())d.process(a,b,e,...c)}function lp(a,b){a.$=olympe.dc.Ya(b);a.ca=b.kg().LA();b.da().forEach(c=>{a.id===c||a.R.has(c)||(a.R.add(c),To(a,c,a))});a.W=b.W();kp(a,olympe.sc.$c.ig.C.INIT)}
1754
+ function mp(a){a.da=!0;let b;null==(b=a.children)||b.forEach(c=>{mp(c)})}function np(a){a.da=!1;let b;null==(b=a.children)||b.forEach(c=>{np(c)})}function dp(a,b){return['*',a.id,...a.R].map(c=>`${'@'}${c}.${b}`)}function op(a,b,c,d){c.forEach(f=>{let g,k;null==(g=a.D)||null==(k=g.get(f))||k.forEach(l=>{l(d)})});let e;null==(e=a.children)||e.forEach(f=>{!f.da&&f.data.has(b)||op(f,b,c,d)})}
1755
+ function pp(a,b,c){a.D||(a.D=new Map);let d=a.D.get(b);void 0===d&&(d=new Map,a.D.set(b,d));bp++;const e=bp;d.set(e,c);return()=>{const f=a.D.get(b);f&&(f.delete(e),0===f.size&&a.D.delete(b))}}function To(a,b,c){a.O.add(b);let d,e;null==(d=a.D)||null==(e=d.get('&'+b))||e.forEach(f=>{f(c)});gp(a,f=>{f.O.has(b)||To(f,b,c)});a.O.delete(b)}function gp(a,b){let c;null==(c=a.children)||c.forEach(b)}function qp(a,b){a.data.forEach((c,d)=>b(c,d.slice(1)))}
1756
+ function rp(a){var b=olympe.sc.$c.ig.D.Rp;const c=[];if(null!==a.$c)for(const {WA:d}of a.$c.values())d.getType()===b&&(c.push(d.ja()),d.D(),hp(a,d.ja()))}function jp(a,b){null===a.children&&(a.children=new Map);a.children.set(b.id,b)}
1757
+ olympe.sc.sp=class{constructor(a,b='no name',c=olympe.sc.uE){this.id=a;this.Bd=b;this.R=new Set;this.parent=c;this.C=new olympe.j.ee('SC Context');this.data=new Map;this.$=this.T=this.children=this.D=null;this.ca=!1;this.O=new Set;this.da=!1;this.W=null;this.V=olympe.gb.Cb('sc');this.$c=null;ip(this)}ja(){return this.id}getParent(){return this.parent}Fm(){return this.$}set(a,b){if(!this.C.$f()&&!this.C.lc()){const g=olympe.dc.Ya(a);var c,d;let k,l;a=null!=(l=null!=(k=null==(c=this.W)?void 0:c.get('O#'+
1758
+ g))?k:null==(d=this.W)?void 0:d.get('IO#'+g))?l:g;c='$'+a;var e;d=null!=(e=this.data.get(c))?e:null;b=null!=b?b:null;if(e=!this.O.has(c)){a:{if('function'===typeof(null==b?void 0:b.Rb))try{var f=b.Rb(d);break a}catch(m){f=!1;break a}f=b===d}e=!f}e&&(null===b?this.data.delete(c):this.data.set(c,b),null!==this.$c&&0<this.$c.size&&kp(this,olympe.sc.$c.ig.C.zr,a,b),f=dp(this,a),this.O.add(c),op(this,c,f,b),this.O.delete(c))}}on(a,b,c,d=!0){if(this.C.lc()||this.C.$f())return()=>{};const e=Xo(this,a),f=
1759
+ c?olympe.dc.Ya(c):'*';a=pp(this,'@'+f+'.'+e,b);c=c?(c=$o(this,f))?c.Qa(e,!1):void 0:this.Qa(e);void 0!==c&&b(c);if(d)olympe.j.yb().onDestroy(a);return a}has(a,b=!1){a='$'+Xo(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}wo(a,b,c){const d=null!=c?c:'_'+olympe.oa.bf();if(a.lc()||a.$f())throw Error(`Try to create new child context in a destroyed context ${a.ja()}, probably because \`runner()\` is called on a destroyed context`);const e=a.run(()=>
1760
+ new olympe.sc.sp(d,b,this));null!==this.$c&&0<this.$c.size&&this.$c.forEach(({WA:f,depth:g})=>{(-1===f.O||g<f.O)&&fp(e,f,g+1)});return e}QA(a,b){const c=$o(this,a);if(c)return b(c),()=>{};const d=pp(this,'&'+a,e=>{let f;null==(f=d)||f();b(e)});return d}Qa(a,b=!0){a='$'+Xo(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.C.$f()||this.C.lc()||(kp(this,olympe.sc.$c.ig.C.Iy),this.C.destroy(),kp(this,olympe.sc.$c.ig.C.tj))}js(a,
1761
+ b){if(this.C.lc())a();else return bp++,b=null!=b?b:String(bp),null===this.T&&(this.T=new Map),this.T.set(b,a),b;return b||'noId'}OA(a){null!==this.T&&this.T.delete(a)}onDestroy(a){return this.lc()?(a(),'noId'):this.C.onDestroy(a)}clear(){if(!this.C.lc()){kp(this,olympe.sc.$c.ig.C.zy);let a;null==(a=this.T)||a.forEach(b=>b());kp(this,olympe.sc.$c.ig.C.Ay)}}lc(){return this.C.lc()}se(){return this.C}};olympe.sc.sp.prototype.getParent=olympe.sc.sp.prototype.getParent;
1762
+ olympe.sc.sp.C={pC:'I#',OC:'O#',pR:'IO#'};function sp(a,b,c){return(c=c.Fm())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.$c.ig=class{constructor(a=-1){this.id=olympe.oa.Rr();this.active=!0;this.O=a}D(){this.active=!1}ja(){return this.id}getType(){}process(){}};olympe.sc.$c.ig.C={INIT:'INIT',zr:'SET',zy:'CLEAR',Ay:'CLEARED',Iy:'DESTROY',tj:'DESTROYED'};olympe.sc.$c.ig.D={Rp:'REMOTE',ES:'LOCAL',ho:'PROFILER'};olympe.sc.uj=class a{constructor(){this.D=this.R=this.T=null;this.W=new Map;this.O=new Map;this.C=new olympe.oa.nD(1E4);jb(this.C,b=>{rp(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.W.get(f);switch(e.t){case olympe.sc.uj.C.rT:c=this.O.get(e.f);b.ai(c).catch(m=>{d.error('Unable to reply with paths: ',m)});break;case olympe.sc.uj.C.sT:const k=f+c,l=(m,n,p=0)=>{qp(m,(r,t)=>{let u;r instanceof olympe.dc.CloudObject?u=a.O(r):u=r;let v;r=null!=(v=m.Fm())?v:'';0<r.length&&(r+='.');n.push([`${p}.${r}${t}`,
1763
+ u])})};b.jE(k).then(()=>{const m=[];l(g,m,0);gp(g,p=>{l(p,m,1)});olympe.Y.de.publish(k,{t:olympe.sc.uj.C.oR,v:m,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.$c.QT(k);fp(g,n);this.C.has(g)?ib(this.C,g):this.C.add(g)}).catch(m=>{d.error('Error notifying on a contextId : ',m)});break;case olympe.sc.uj.C.uT:void 0!==g&&this.C.has(g)&&ib(this.C,g);break;case olympe.sc.uj.C.wp:void 0!==g&&(this.C.delete(g),rp(g))}}da(b,c,d){this.T=new olympe.Y.de('discovery_debug_id',
1765
1764
  c);this.T.Bu().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.uj.C.xQ){e=f.i;f=f.f;if(!this.O.has(f)){const g=this.ca(f,c,b);if(0!==g.length)this.O.set(f,g);else return}null===this.D&&(this.D=olympe.oa.Rr(),f=new olympe.j.ee(this.D,c.se()),this.R=new olympe.Y.de(this.D,f),this.R.Bu().subscribe(g=>{this.$(g,b,d)}));olympe.Y.de.publish(e,{t:olympe.sc.uj.C.KP,n:olympe.sa.getParameter(olympe.sc.pa.oG)||'no name',a:b,s:this.D}).catch(g=>{d.error('Error publishing on draw service : '+g)})}})}ca(b,c,d){const e=
1766
- [],f=olympe.dc.eb(),g=(k,l)=>{fp(k,m=>{if(null!==m.Fm()){const n=olympe.dc.CloudObject.get(m.Fm()).ml(olympe.sc.Runnable.ca).zf();if(null!==n){const p=l+'/'+f.name(n);n.ka()===b&&(e.push([p,m.ja()]),this.W.set(m.ja(),m));g(m,p)}}})};g(c.C,f.name(d));return e}static D(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.O(d));olympe.Y.de.publish(b,{t:olympe.sc.uj.C.Pz,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.gb.Cb('Debugger').error('Error publishing on service : ',f)})}static O(b){if(null===b||
1765
+ [],f=olympe.dc.eb(),g=(k,l)=>{gp(k,m=>{if(null!==m.Fm()){const n=olympe.dc.CloudObject.get(m.Fm()).ml(olympe.sc.Runnable.ca).zf();if(null!==n){const p=l+'/'+f.name(n);n.ka()===b&&(e.push([p,m.ja()]),this.W.set(m.ja(),m));g(m,p)}}})};g(c.C,f.name(d));return e}static D(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.O(d));olympe.Y.de.publish(b,{t:olympe.sc.uj.C.Pz,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.gb.Cb('Debugger').error('Error publishing on service : ',f)})}static O(b){if(null===b||
1767
1766
  void 0===b)return'<null>';const c=olympe.dc.eb();if(b instanceof olympe.dc.CloudObject){var d=b.De();if(!c.me(d,olympe.sc.qg))return b.toString();let f=`${b.Qe().name()} (${b.ka()})`;var e=olympe.dc.CloudObject.get(d);d=olympe.dc.nb.from(e).Yp(olympe.dc.CloudObject.extendRel,!0).Zi().oc(olympe.dc.CloudObject.propertyRel).Zi().zf();e=olympe.dc.nb.from(e).Yp(olympe.dc.CloudObject.extendRel,!0).Zi().oc(olympe.dc.CloudObject.px).Zi().zf();d=d.filter(([g])=>g instanceof olympe.sc.qg);0!==d.length&&(f+=
1768
- '<br> ',f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.Ac(b.ka(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.qg);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.uj.R='discovery_debug_id';olympe.sc.uj.C={xQ:0,KP:1,rT:2,sT:3,oR:4,Pz:5,uT:6,wp:7};olympe.sc.$c.p0=class extends olympe.sc.$c.ig{constructor(a=-1){super(a);this.C=new Map}getType(){return olympe.sc.$c.ig.D.ES}process(a,b,c,...d){if(this.active&&b===olympe.sc.$c.ig.C.zr){a=rp(c,Wo(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};function sp(a,b,c,d=new Map){for(var e=[];b;){const n=b.Fm();if(!n)break;e.push(n);b=b.getParent()}pb(a.C,c,d.set('context',e));var f;let g;for(const n of[...e,null==(f=d)?void 0:f.get('propId'),null==(g=d)?void 0:g.get('type')])if(c=n,'string'===typeof c&&!a.R.has(c)){e=a;f=c;e.eb||(e.eb=olympe.dc.eb());d=e.eb.name(f);e=(f=e.eb.model(f))?e.eb.name(f):'';var [k,l,m]=[d,f,e];d=a.C;e=(new Map).set(c,k).set(l,m);c=(new Map).set(c,l);for(const [p,r]of e.entries())d.R.set(p,r);for(const [p,r]of c.entries())d.O.set(p,
1767
+ '<br> ',f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.Ac(b.ka(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.qg);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.uj.R='discovery_debug_id';olympe.sc.uj.C={xQ:0,KP:1,rT:2,sT:3,oR:4,Pz:5,uT:6,wp:7};olympe.sc.$c.p0=class extends olympe.sc.$c.ig{constructor(a=-1){super(a);this.C=new Map}getType(){return olympe.sc.$c.ig.D.ES}process(a,b,c,...d){if(this.active&&b===olympe.sc.$c.ig.C.zr){a=sp(c,Xo(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};function tp(a,b,c,d=new Map){for(var e=[];b;){const n=b.Fm();if(!n)break;e.push(n);b=b.getParent()}pb(a.C,c,d.set('context',e));var f;let g;for(const n of[...e,null==(f=d)?void 0:f.get('propId'),null==(g=d)?void 0:g.get('type')])if(c=n,'string'===typeof c&&!a.R.has(c)){e=a;f=c;e.eb||(e.eb=olympe.dc.eb());d=e.eb.name(f);e=(f=e.eb.model(f))?e.eb.name(f):'';var [k,l,m]=[d,f,e];d=a.C;e=(new Map).set(c,k).set(l,m);c=(new Map).set(c,l);for(const [p,r]of e.entries())d.R.set(p,r);for(const [p,r]of c.entries())d.O.set(p,
1769
1768
  r)}}
1770
- olympe.sc.$c.ET=class extends olympe.sc.$c.ig{constructor(a){super();this.C=a;this.eb=olympe.dc.eb();this.R=new Set}getType(){return olympe.sc.$c.ig.D.ho}process(a,b,c,...d){var e=tp.pC,f=tp.OC,g=tp.yT;const k=tp.INIT,l=tp.zy,m=tp.Ay,n=tp.Iy,p=tp.tj;c=tp.nT;if(b===olympe.sc.$c.ig.C.zr){const [r,t]=d;b=(d=a.Fm())?olympe.dc.eb().me(d,olympe.sc.logic.Function):!1;d=d?olympe.dc.eb().me(d,olympe.sc.ui.Renderable):!1;b?(g=this.eb.Wd(r,olympe.dm.Property.typeRel),b=this.eb.me(r,olympe.sc.logic.ie),d=this.eb.me(r,
1771
- olympe.sc.logic.Le),sp(this,a,b?e:d?f:c,new Map([['propId',r],['value',t],['type',g]]))):d&&(e=this.eb.me(r,olympe.dm.Property),f=this.eb.Wd(r,olympe.dm.Property.typeRel),sp(this,a,e?g:c,new Map([['propId',r],['value',t],['type',f]])))}else b===olympe.sc.$c.ig.C.INIT?sp(this,a,k):b===olympe.sc.$c.ig.C.zy?sp(this,a,l):b===olympe.sc.$c.ig.C.Ay?sp(this,a,m):b===olympe.sc.$c.ig.C.Iy?sp(this,a,n):b===olympe.sc.$c.ig.C.tj&&sp(this,a,p)}};
1772
- const tp={pC:'input',OC:'output',yT:'prop',INIT:'init',zy:'clear',Ay:'cleared',Iy:'destroy',tj:'destroyed',nT:'other'};olympe.sc.$c.QT=class extends olympe.sc.$c.ig{constructor(a){super(1);this.R=a;this.C=new Map;this.db=olympe.dc.eb()}getType(){return olympe.sc.$c.ig.D.Rp}D(){super.D();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.$c.ig.C.zr&&void 0!==d[0]&&null!==d[0]){const e=rp(c,Wo(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Qe()instanceof olympe.sc.qg){const k=Ri(this.db,f,()=>{olympe.sc.uj.D(this.R,
1773
- e,f)});this.C.set(e,()=>{Si(this.db,f,k)})}olympe.sc.uj.D(this.R,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{qa(){return this.yg(this.FA())}ta(){return this.yg(this.GA())}ae(){return new olympe.j.ga(this.yg(this.FA()),this.yg(this.GA()))}FA(){}GA(){}};olympe.sc.Metadata.U=olympe.dc.Ja.C('0161ae936c62f9fcd131',olympe.sc.Metadata);h=olympe.sc.Metadata.prototype;h.qa.K=olympe.j.J.D;h.ta.K=olympe.j.J.D;h.ae.K=olympe.j.J.W;h.FA.K=olympe.j.J.O;h.GA.K=olympe.j.J.O;olympe.sc.Ch=class extends olympe.dc.CloudObject{D(){return this.Rd(olympe.sc.Ch.O)}C(){return this.Rd(olympe.sc.Ch.C)}};olympe.sc.Ch.U=olympe.dc.Ja.C('01703376c4a81c0e9d90',olympe.sc.Ch);olympe.sc.Ch.O=olympe.sc.Ch.U.fa('01703376c4a81c0e9d91');olympe.sc.Ch.C=olympe.sc.Ch.U.fa('01703376c4a81c0e9d92');olympe.sc.Ch.D=olympe.sc.Ch.U.tb('01703376c4a81c0e9d93');Y(olympe.dc.CloudObject.U,olympe.sc.Ch.D);olympe.sc.Ch.prototype.D.K=olympe.j.J.R;olympe.sc.Ch.prototype.C.K=olympe.j.J.R;olympe.sc.jf={};olympe.sc.jf.Yi={NQ:'folders',HK:'screenflow',oD:'ui-design',QK:'software-intelligence',Ys:'data-management',X0:'projects'};olympe.sc.bl=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}gf(){return this.yg(olympe.sc.bl.C)}};olympe.sc.bl.U=olympe.dc.Ja.C('019131fb930466a1ad79',olympe.sc.bl);olympe.sc.bl.C=olympe.sc.bl.U.fa('016d1bb681929c2cc3f1');olympe.sc.bl.D=olympe.sc.bl.U.tb('019131fb930466a1ad7a');Y(olympe.dc.CloudObject.U,olympe.sc.bl.D);olympe.sc.bl.prototype.gf.K=olympe.j.J.D;olympe.sc.Sh=class extends olympe.dm.BrickMetadata{Di(){return olympe.sc.jf.Yi.QK}C(){return this.pc(olympe.sc.Sh.C,olympe.sc.logic.Bt)}D(){return this.pc(olympe.sc.Sh.D,olympe.sc.logic.rr)}};olympe.sc.Sh.U=olympe.dc.Ja.C('011100000000000adef0',olympe.sc.Sh);olympe.sc.Sh.C=olympe.sc.Sh.U.tb('016ac4f59a2917fdef01');olympe.sc.Sh.D=olympe.sc.Sh.U.tb('016ac4f59a2917fdef02');olympe.sc.Sh.U.C=(a,b)=>Gn(a,b||'New function signature',olympe.sc.Sh,olympe.sc.logic.ki).ka();
1774
- olympe.sc.Sh.prototype.C.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.Sh.prototype.D.K=new olympe.j.J(()=>olympe.dc.Kb,[]);function up(a,b){a.$().forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function vp(a,b){b=b.filter(c=>'string'===typeof c&&a.db.me(c,olympe.sc.logic.qf));b.sort((c,d)=>{let e;c=null!=(e=a.db.Ac(c,olympe.sc.logic.qf.C,!0))?e:0;let f;d=null!=(f=a.db.Ac(d,olympe.sc.logic.qf.C,!0))?f:0;return c-d});return b}function wp(a){return vp(a,a.db.pc(a.tag,olympe.sc.yc.O))}function xp(a){return vp(a,a.db.pc(a.tag,olympe.sc.yc.D))}
1769
+ olympe.sc.$c.ET=class extends olympe.sc.$c.ig{constructor(a){super();this.C=a;this.eb=olympe.dc.eb();this.R=new Set}getType(){return olympe.sc.$c.ig.D.ho}process(a,b,c,...d){var e=up.pC,f=up.OC,g=up.yT;const k=up.INIT,l=up.zy,m=up.Ay,n=up.Iy,p=up.tj;c=up.nT;if(b===olympe.sc.$c.ig.C.zr){const [r,t]=d;b=(d=a.Fm())?olympe.dc.eb().me(d,olympe.sc.logic.Function):!1;d=d?olympe.dc.eb().me(d,olympe.sc.ui.Renderable):!1;b?(g=this.eb.Wd(r,olympe.dm.Property.typeRel),b=this.eb.me(r,olympe.sc.logic.ie),d=this.eb.me(r,
1770
+ olympe.sc.logic.Le),tp(this,a,b?e:d?f:c,new Map([['propId',r],['value',t],['type',g]]))):d&&(e=this.eb.me(r,olympe.dm.Property),f=this.eb.Wd(r,olympe.dm.Property.typeRel),tp(this,a,e?g:c,new Map([['propId',r],['value',t],['type',f]])))}else b===olympe.sc.$c.ig.C.INIT?tp(this,a,k):b===olympe.sc.$c.ig.C.zy?tp(this,a,l):b===olympe.sc.$c.ig.C.Ay?tp(this,a,m):b===olympe.sc.$c.ig.C.Iy?tp(this,a,n):b===olympe.sc.$c.ig.C.tj&&tp(this,a,p)}};
1771
+ const up={pC:'input',OC:'output',yT:'prop',INIT:'init',zy:'clear',Ay:'cleared',Iy:'destroy',tj:'destroyed',nT:'other'};olympe.sc.$c.QT=class extends olympe.sc.$c.ig{constructor(a){super(1);this.R=a;this.C=new Map;this.db=olympe.dc.eb()}getType(){return olympe.sc.$c.ig.D.Rp}D(){super.D();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.$c.ig.C.zr&&void 0!==d[0]&&null!==d[0]){const e=sp(c,Xo(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Qe()instanceof olympe.sc.qg){const k=Ri(this.db,f,()=>{olympe.sc.uj.D(this.R,
1772
+ e,f)});this.C.set(e,()=>{Si(this.db,f,k)})}olympe.sc.uj.D(this.R,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{qa(){return this.yg(this.FA())}ta(){return this.yg(this.GA())}ae(){return new olympe.j.ga(this.yg(this.FA()),this.yg(this.GA()))}FA(){}GA(){}};olympe.sc.Metadata.U=olympe.dc.Ja.C('0161ae936c62f9fcd131',olympe.sc.Metadata);h=olympe.sc.Metadata.prototype;h.qa.K=olympe.j.J.D;h.ta.K=olympe.j.J.D;h.ae.K=olympe.j.J.W;h.FA.K=olympe.j.J.O;h.GA.K=olympe.j.J.O;olympe.sc.Ch=class extends olympe.dc.CloudObject{D(){return this.Rd(olympe.sc.Ch.O)}C(){return this.Rd(olympe.sc.Ch.C)}};olympe.sc.Ch.U=olympe.dc.Ja.C('01703376c4a81c0e9d90',olympe.sc.Ch);olympe.sc.Ch.O=olympe.sc.Ch.U.fa('01703376c4a81c0e9d91');olympe.sc.Ch.C=olympe.sc.Ch.U.fa('01703376c4a81c0e9d92');olympe.sc.Ch.D=olympe.sc.Ch.U.tb('01703376c4a81c0e9d93');Y(olympe.dc.CloudObject.U,olympe.sc.Ch.D);olympe.sc.Ch.prototype.D.K=olympe.j.J.R;olympe.sc.Ch.prototype.C.K=olympe.j.J.R;olympe.sc.jf={};olympe.sc.jf.Yi={NQ:'folders',HK:'screenflow',oD:'ui-design',QK:'software-intelligence',Ys:'data-management',X0:'projects'};olympe.sc.bl=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}gf(){return this.yg(olympe.sc.bl.C)}};olympe.sc.bl.U=olympe.dc.Ja.C('019131fb930466a1ad79',olympe.sc.bl);olympe.sc.bl.C=olympe.sc.bl.U.fa('016d1bb681929c2cc3f1');olympe.sc.bl.D=olympe.sc.bl.U.tb('019131fb930466a1ad7a');Y(olympe.dc.CloudObject.U,olympe.sc.bl.D);olympe.sc.bl.prototype.gf.K=olympe.j.J.D;olympe.sc.Sh=class extends olympe.dm.BrickMetadata{Di(){return olympe.sc.jf.Yi.QK}C(){return this.pc(olympe.sc.Sh.C,olympe.sc.logic.Bt)}D(){return this.pc(olympe.sc.Sh.D,olympe.sc.logic.rr)}};olympe.sc.Sh.U=olympe.dc.Ja.C('011100000000000adef0',olympe.sc.Sh);olympe.sc.Sh.C=olympe.sc.Sh.U.tb('016ac4f59a2917fdef01');olympe.sc.Sh.D=olympe.sc.Sh.U.tb('016ac4f59a2917fdef02');olympe.sc.Sh.U.C=(a,b)=>Hn(a,b||'New function signature',olympe.sc.Sh,olympe.sc.logic.ki).ka();
1773
+ olympe.sc.Sh.prototype.C.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.Sh.prototype.D.K=new olympe.j.J(()=>olympe.dc.Kb,[]);function vp(a,b){a.$().forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function wp(a,b){b=b.filter(c=>'string'===typeof c&&a.db.me(c,olympe.sc.logic.qf));b.sort((c,d)=>{let e;c=null!=(e=a.db.Ac(c,olympe.sc.logic.qf.C,!0))?e:0;let f;d=null!=(f=a.db.Ac(d,olympe.sc.logic.qf.C,!0))?f:0;return c-d});return b}function xp(a){return wp(a,a.db.pc(a.tag,olympe.sc.yc.O))}function yp(a){return wp(a,a.db.pc(a.tag,olympe.sc.yc.D))}
1775
1774
  olympe.sc.yc=class extends olympe.dm.BrickMetadata{Ea(a,b,c,d,e=!0){e||olympe.gb.Cb('sc').error('parameter own= false ignored, investigate');return olympe.j.kj(Wb(this.Go(a,olympe.dc.Ad.Hw,c)),d)}$(){return[]}za(a,b){const c=this.db,d=olympe.oa.pk();a=olympe.j.yb();Ri(c,this.tag,a.re((e,f)=>{b(e,olympe.dc.Ad.ug(f))}),d);a.onDestroy(()=>{Si(c,this.tag,d)})}T(){return[]}O(){return rxjs.of([])}YN(){return this.pc(olympe.sc.yc.R,olympe.sc.Runnable)}sW(){return this.pc(olympe.sc.yc.T,olympe.sc.Runnable)}nq(){return this.db.Ac(this,
1776
1775
  olympe.sc.yc.da)}LA(){return null!==this.db.Wd(this.tag,olympe.sc.Runnable.W.fe())}getInputs(){return this.pc(olympe.sc.yc.O,olympe.sc.logic.ie)}getOutputs(){return this.pc(olympe.sc.yc.D,olympe.sc.logic.Le)}W(){return[olympe.sc.yc.Oa]}};olympe.sc.yc.U=olympe.dc.Ja.C('0112000000000000def0',olympe.sc.yc);olympe.sc.yc.da=olympe.sc.yc.U.fa('01692aa71f3108454479');olympe.sc.yc.sb=olympe.sc.yc.U.fa('0166446c1f128ebc903a');olympe.sc.yc.Oa=olympe.sc.yc.U.fa('0166446c1f128ebc904e');olympe.sc.yc.R=olympe.sc.yc.U.tb('01692a4af82e8984742c');
1777
1776
  olympe.sc.yc.T=olympe.sc.yc.U.tb('01692a4af82e8984742d');olympe.sc.yc.ca=olympe.sc.yc.U.tb('01692a4af82e8984742e');olympe.sc.yc.O=olympe.sc.yc.U.tb('01621fb84e320000f00a');olympe.sc.yc.D=olympe.sc.yc.U.tb('01621fb84e320000f00b');olympe.sc.yc.gd=olympe.sc.yc.U.tb('0171838bcfed0000e00e');olympe.sc.yc.Yc=olympe.sc.yc.U.tb('0171838bcfed0000a00a');h=olympe.sc.yc.prototype;h.Ea.K=olympe.j.J.O;h.YN.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.sW.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.nq.K=olympe.j.J.O;
1778
- h.LA.K=olympe.j.J.O;h.getInputs.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.getOutputs.K=new olympe.j.J(()=>olympe.dc.Kb,[]);function bp(a){let b;return null!=(b=a.kg().W().map(olympe.dc.Ya)[0])?b:null}function yp(a){const b=new olympe.dc.Tc;a=b.create(a);b.persist(a,!1);b.Kd((d,e)=>{d||olympe.gb.Cb('sc').error(`Error occurred for transaction executed by createLocalRunnable: ${e}`)});const c=olympe.dc.CloudObject.get(a);olympe.j.yb().onDestroy(()=>{const d=new olympe.dc.Tc;d.delete(c);d.Kd()});return c}
1779
- function zp(a,b){kp(b.C,a);up(a.kg(),b);const c=a.T(),d=Ap(b,c),e=[];c.forEach((f,g)=>{f===a.ca?e[0]=g:f===a.$&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Bp(a,b,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
1780
- function Cp(a,b){let c,d,e;a.V.C()&&(e=a.db.name(a.De()),c=`Brick ${e} successfully run`,d=`Brick ${e} successfully cleared`);const f=Dp(a,b),g=a.setupExecution(b).pipe(rxjs.operators.map(k=>{if(!b.lc()&&(b.clear(),null!==k)){const l=Array.isArray(k)?k:[k],m=new olympe.sc.RU(b.C);m.se().run(()=>q(function*(){try{yield a.update(m,l,f)}catch(n){m.throw(n)}}));return!0}return!1})).subscribe(rxjs.Subscriber.create(k=>k?a.V.debug(c):a.V.debug(d),k=>b.throw(k),()=>a.V.debug(`Brick ${e} completed`)));b.onDestroy(g.unsubscribe.bind(g))}
1781
- function Ep(a,b,c,d){let e=[];const f=Ui(a.db,b,c,(g,k)=>{if(g){const l=Ro(d,k),m=olympe.dc.CloudObject.get(k);m instanceof olympe.sc.logic.Bh&&null!==e?e.push(()=>m.run(l)):m.run(l)}else{let l;null==(l=To(d,k))||l.destroy()}});e.forEach(g=>g());e=null;d.se().onDestroy(a.db.D.bind(a.db,b,c,f))}function Dp(a,b){return a.kg().T(b)}
1782
- function Ap(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)}})}function Bp(a,b,c,d){b=b.se();const e=Ri(a.db,a.tag,b.re((f,g,k)=>{const l=k?d:c;null!==l&&(l(f,olympe.dc.Ad.ug(g)),k&&c!==l&&(null==c||c(f,null)))}));b.onDestroy(()=>{Si(a.db,a.tag,e)})}
1783
- olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.V=c}run(a){a.se().run(()=>{zp(this,a);this.init(a);a.js(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a));Cp(this,a);this.ue(a)})}kg(){return this.Qe()}init(a){this.onInit(a)}update(a,b,c){const d=this.kg();if(d.nq())this.onUpdate(a,b,c);else this.V.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.ja()}`),Ep(this,d,olympe.sc.yc.R,a),this.Ha()&&Ep(this,
1784
- d,olympe.sc.yc.ca,a)}ue(a){a.Qq(olympe.sc.yc.sb)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(a){return this.kg().O(a)}onInit(){}onUpdate(){const a=this.De(),b=this.db.name(a),c=this.db.name(this.db.model(a));this.V.error(`No code was found for ${b} (${c}: ${a})\n\n`+'This is probably because the code has not yet been deployed to the environment, or because the package.json does not import the required dependencies.')}onDestroy(){}getInputs(){return wp(this.kg())}getOutputs(){return xp(this.kg())}da(){return[]}W(){return null}Ha(){return!1}Ea(a,
1785
- b,c,d,e=!0){a=b.wa(a,c,e);void 0!==d&&olympe.j.kj(a,d);return a}O(a,b,c,d,e){olympe.j.Fl([d],f=>{b.set(a,olympe.j.CO(f)?f.valueOf():f)});return this.Ea(a,b,c,e)}T(){return[this.ca,this.$]}ca(a,b){Bp(this,a,b,null)}$(a,b){Bp(this,a,null,b)}ma(a,b){const c=this.db,d=olympe.sc.logic.jd.O.fe(),e=olympe.sc.logic.jd.C,f=olympe.sc.logic.jd.D;this.fA(d,g=>{var k=g.ka();if(k=c.Wd(k,e)||c.Wd(k,f))return Fp(g,a,b.bind(null,k))})}sb(a,b){const c=olympe.sc.gg.O.fe();this.fA(c,d=>d.fA(olympe.sc.gg.C,e=>{const f=
1786
- e.ka(),g=a.on(Gp(d,f),k=>{b(f,k)});return()=>{g();b(f,null)}}))}};olympe.sc.Runnable.U=Nh(olympe.dc.Ja.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.ca=olympe.sc.Runnable.U.tb('01692a4af82e8984742b');olympe.sc.Runnable.W=olympe.sc.Runnable.U.tb('01756a18d4921c103111');olympe.sc.Runnable.j3=Y(olympe.sc.Runnable.U,olympe.sc.yc.R);olympe.sc.Runnable.m3=Y(olympe.sc.Runnable.U,olympe.sc.yc.T);olympe.sc.Runnable.p3=Y(olympe.sc.Runnable.U,olympe.sc.yc.ca);Y(olympe.sc.yc.U,olympe.sc.Runnable.ca);
1787
- Y(olympe.sc.yc.U,olympe.sc.Runnable.W);olympe.sc.Runnable.prototype.kg.K=new olympe.j.J(()=>olympe.sc.yc,[]);olympe.sc.Runnable.prototype.Ea.K=new olympe.j.J(()=>Object,[]);olympe.sc.Runnable.prototype.O.K=olympe.j.J.O;function Hp(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.ri)return(a=a.D())?a.valueOf():null;if('function'===typeof a.ka)return a.ka()}return null}olympe.sc.ri=class extends olympe.dc.CloudObject{D(){return this.db.pc(this,olympe.sc.ri.C)[0]}C(){const a=Hp(this);return olympe.dc.CloudObject.get(a)}ug(){return this.C().ug()}toString(){const a=Hp(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.ri.U=olympe.dc.Ja.C('0163c9ae01f2d6e9ca49',olympe.sc.ri);
1788
- olympe.sc.ri.C=olympe.sc.ri.U.tb('0169b5a8a33144fb0b49');Y(olympe.dc.CloudObject.U,olympe.sc.ri.C);olympe.sc.ri.prototype.D.K=new olympe.j.J(()=>String,[]);olympe.sc.ri.prototype.C.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);olympe.sc.uG=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.uG.U=olympe.dc.Ja.C('0163a68ce44f3d1fa84c',olympe.sc.uG);olympe.sc.qg=class extends olympe.dm.BrickMetadata{};olympe.sc.qg.U=olympe.dc.Ja.C('016324fde11a836f76c2',olympe.sc.qg);olympe.sc.qg.C=olympe.sc.qg.U.tb('016324fde11a836087c2');olympe.sc.qg.U.C=function(a,b){return Gn(a,null!=b?b:'New type',olympe.sc.qg).ka()};let Ip=null,Jp=null,Kp=[];
1789
- function Lp(a,b){Ip=a;const c=olympe.j.yb();return olympe.dc.Rh.from(a).oc(olympe.sc.Fb.Pg.C).oc(olympe.sc.On.C.fe()).Kd({Nr:'__code-as-data__'}).then(d=>{let e;null==(e=Kp)||e.forEach(f=>f());Kp=null;Jp=d;if(null!==d){if(b){const f=olympe.dc.eb();return new Promise(g=>{kk(c,d,k=>{k=f.zu(k)?k:f.model(k);return null!==k&&f.me(k,olympe.sc.qg)},{kB:!0}).subscribe(rxjs.Subscriber.create(()=>{g()},()=>{olympe.gb.Cb('sc').error('Impossible to load the business container for the application',a,'maybe are you offline?');
1790
- g()}))})}olympe.gb.Cb('sc').debug("Found business container but won't load it's content according to configuration.")}else olympe.gb.Cb('sc').info(`No business container for application ${a}. You probably miss permissions.`);return Promise.resolve()}).catch(d=>{Kp=null;throw d;})}function lh(){return null===Kp?Promise.resolve():new Promise(a=>{Kp.push(()=>a())})}olympe.sc.On=class extends olympe.dc.CloudObject{};olympe.sc.On.U=olympe.dc.Ja.C('017b3aa8fae1e3d044dc',olympe.sc.On);olympe.sc.On.C=olympe.sc.On.U.tb('017b3aa8fd1659291b92');
1777
+ h.LA.K=olympe.j.J.O;h.getInputs.K=new olympe.j.J(()=>olympe.dc.Kb,[]);h.getOutputs.K=new olympe.j.J(()=>olympe.dc.Kb,[]);function cp(a){let b;return null!=(b=a.kg().W().map(olympe.dc.Ya)[0])?b:null}function zp(a){const b=new olympe.dc.Tc;a=b.create(a);b.persist(a,!1);b.Kd((d,e)=>{d||olympe.gb.Cb('sc').error(`Error occurred for transaction executed by createLocalRunnable: ${e}`)});const c=olympe.dc.CloudObject.get(a);olympe.j.yb().onDestroy(()=>{const d=new olympe.dc.Tc;d.delete(c);d.Kd()});return c}
1778
+ function Ap(a,b){lp(b.C,a);vp(a.kg(),b);const c=a.T(),d=Bp(b,c),e=[];c.forEach((f,g)=>{f===a.ca?e[0]=g:f===a.$&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Cp(a,b,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
1779
+ function Dp(a,b){let c,d,e;a.V.C()&&(e=a.db.name(a.De()),c=`Brick ${e} successfully run`,d=`Brick ${e} successfully cleared`);const f=Ep(a,b),g=a.setupExecution(b).pipe(rxjs.operators.map(k=>{if(!b.lc()&&(b.clear(),null!==k)){const l=Array.isArray(k)?k:[k],m=new olympe.sc.RU(b.C);m.se().run(()=>q(function*(){try{yield a.update(m,l,f)}catch(n){m.throw(n)}}));return!0}return!1})).subscribe(rxjs.Subscriber.create(k=>k?a.V.debug(c):a.V.debug(d),k=>b.throw(k),()=>a.V.debug(`Brick ${e} completed`)));b.onDestroy(g.unsubscribe.bind(g))}
1780
+ function Fp(a,b,c,d){let e=[];const f=Ui(a.db,b,c,(g,k)=>{if(g){const l=So(d,k),m=olympe.dc.CloudObject.get(k);m instanceof olympe.sc.logic.Bh&&null!==e?e.push(()=>m.run(l)):m.run(l)}else{let l;null==(l=Uo(d,k))||l.destroy()}});e.forEach(g=>g());e=null;d.se().onDestroy(a.db.D.bind(a.db,b,c,f))}function Ep(a,b){return a.kg().T(b)}
1781
+ function Bp(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)}})}function Cp(a,b,c,d){b=b.se();const e=Ri(a.db,a.tag,b.re((f,g,k)=>{const l=k?d:c;null!==l&&(l(f,olympe.dc.Ad.ug(g)),k&&c!==l&&(null==c||c(f,null)))}));b.onDestroy(()=>{Si(a.db,a.tag,e)})}
1782
+ olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.V=c}run(a){a.se().run(()=>{Ap(this,a);this.init(a);a.js(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a));Dp(this,a);this.ue(a)})}kg(){return this.Qe()}init(a){this.onInit(a)}update(a,b,c){const d=this.kg();if(d.nq())this.onUpdate(a,b,c);else this.V.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.ja()}`),Fp(this,d,olympe.sc.yc.R,a),this.Ha()&&Fp(this,
1783
+ d,olympe.sc.yc.ca,a)}ue(a){a.Qq(olympe.sc.yc.sb)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(a){return this.kg().O(a)}onInit(){}onUpdate(){const a=this.De(),b=this.db.name(a),c=this.db.name(this.db.model(a));this.V.error(`No code was found for ${b} (${c}: ${a})\n\n`+'This is probably because the code has not yet been deployed to the environment, or because the package.json does not import the required dependencies.')}onDestroy(){}getInputs(){return xp(this.kg())}getOutputs(){return yp(this.kg())}da(){return[]}W(){return null}Ha(){return!1}Ea(a,
1784
+ b,c,d,e=!0){a=b.wa(a,c,e);void 0!==d&&olympe.j.kj(a,d);return a}O(a,b,c,d,e){olympe.j.Fl([d],f=>{b.set(a,olympe.j.CO(f)?f.valueOf():f)});return this.Ea(a,b,c,e)}T(){return[this.ca,this.$]}ca(a,b){Cp(this,a,b,null)}$(a,b){Cp(this,a,null,b)}ma(a,b){const c=this.db,d=olympe.sc.logic.jd.O.fe(),e=olympe.sc.logic.jd.C,f=olympe.sc.logic.jd.D;this.fA(d,g=>{var k=g.ka();if(k=c.Wd(k,e)||c.Wd(k,f))return Gp(g,a,b.bind(null,k))})}sb(a,b){const c=olympe.sc.gg.O.fe();this.fA(c,d=>d.fA(olympe.sc.gg.C,e=>{const f=
1785
+ e.ka(),g=a.on(Hp(d,f),k=>{b(f,k)});return()=>{g();b(f,null)}}))}};olympe.sc.Runnable.U=Nh(olympe.dc.Ja.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.ca=olympe.sc.Runnable.U.tb('01692a4af82e8984742b');olympe.sc.Runnable.W=olympe.sc.Runnable.U.tb('01756a18d4921c103111');olympe.sc.Runnable.j3=Y(olympe.sc.Runnable.U,olympe.sc.yc.R);olympe.sc.Runnable.m3=Y(olympe.sc.Runnable.U,olympe.sc.yc.T);olympe.sc.Runnable.p3=Y(olympe.sc.Runnable.U,olympe.sc.yc.ca);Y(olympe.sc.yc.U,olympe.sc.Runnable.ca);
1786
+ Y(olympe.sc.yc.U,olympe.sc.Runnable.W);olympe.sc.Runnable.prototype.kg.K=new olympe.j.J(()=>olympe.sc.yc,[]);olympe.sc.Runnable.prototype.Ea.K=new olympe.j.J(()=>Object,[]);olympe.sc.Runnable.prototype.O.K=olympe.j.J.O;function Ip(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.ri)return(a=a.D())?a.valueOf():null;if('function'===typeof a.ka)return a.ka()}return null}olympe.sc.ri=class extends olympe.dc.CloudObject{D(){return this.db.pc(this,olympe.sc.ri.C)[0]}C(){const a=Ip(this);return olympe.dc.CloudObject.get(a)}ug(){return this.C().ug()}toString(){const a=Ip(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.ri.U=olympe.dc.Ja.C('0163c9ae01f2d6e9ca49',olympe.sc.ri);
1787
+ olympe.sc.ri.C=olympe.sc.ri.U.tb('0169b5a8a33144fb0b49');Y(olympe.dc.CloudObject.U,olympe.sc.ri.C);olympe.sc.ri.prototype.D.K=new olympe.j.J(()=>String,[]);olympe.sc.ri.prototype.C.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);olympe.sc.uG=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.uG.U=olympe.dc.Ja.C('0163a68ce44f3d1fa84c',olympe.sc.uG);olympe.sc.qg=class extends olympe.dm.BrickMetadata{};olympe.sc.qg.U=olympe.dc.Ja.C('016324fde11a836f76c2',olympe.sc.qg);olympe.sc.qg.C=olympe.sc.qg.U.tb('016324fde11a836087c2');olympe.sc.qg.U.C=function(a,b){return Hn(a,null!=b?b:'New type',olympe.sc.qg).ka()};let Jp=null,Kp=null,Lp=[];
1788
+ function Mp(a,b){Jp=a;const c=olympe.j.yb();return olympe.dc.Rh.from(a).oc(olympe.sc.Fb.Pg.C).oc(olympe.sc.On.C.fe()).Kd({Nr:'__code-as-data__'}).then(d=>{let e;null==(e=Lp)||e.forEach(f=>f());Lp=null;Kp=d;if(null!==d){if(b){const f=olympe.dc.eb();return new Promise(g=>{lk(c,d,k=>{k=f.zu(k)?k:f.model(k);return null!==k&&f.me(k,olympe.sc.qg)},{kB:!0}).subscribe(rxjs.Subscriber.create(()=>{g()},()=>{olympe.gb.Cb('sc').error('Impossible to load the business container for the application',a,'maybe are you offline?');
1789
+ g()}))})}olympe.gb.Cb('sc').debug("Found business container but won't load it's content according to configuration.")}else olympe.gb.Cb('sc').info(`No business container for application ${a}. You probably miss permissions.`);return Promise.resolve()}).catch(d=>{Lp=null;throw d;})}function lh(){return null===Lp?Promise.resolve():new Promise(a=>{Lp.push(()=>a())})}olympe.sc.On=class extends olympe.dc.CloudObject{};olympe.sc.On.U=olympe.dc.Ja.C('017b3aa8fae1e3d044dc',olympe.sc.On);olympe.sc.On.C=olympe.sc.On.U.tb('017b3aa8fd1659291b92');
1791
1790
  olympe.sc.On.D=olympe.sc.On.U.tb('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.U=olympe.dc.Ja.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Be=class extends olympe.sc.Map{};olympe.sc.Be.U=olympe.dc.Ja.C('01631aacd8276ea98490',olympe.sc.Be);olympe.sc.File=class extends olympe.dm.File{static KV(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.Nd(a,e,b,c,d);return e}static LV(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.QE(a,e,b,c,d);return e}static Nd(a,b,c,d,e){e=null!=e?e:'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));olympe.sc.File.QE(a,b,c,d,e)}static QE(a,b,c,d,e){const f=olympe.dc.eb(),g=f.tc(b);var k;const l=null!=(k=a.model(b))?k:olympe.sc.File;if(null===l||!f.Xm(l,olympe.dm.File))throw Error(`Try to set the content of an object which is not a file: ${b}`);
1792
1791
  k=new Date;c=(new Map).set(olympe.dm.File.fileNameProp,null!=c?c:'file').set(olympe.dm.File.urlProp,d).set(olympe.dm.File.modificationDateProp,k).set(olympe.dm.File.mimeTypeProp,null!=e?e:'application/data');g&&null!==f.Ac(b,olympe.dm.File.urlProp)||c.set(olympe.dm.File.creationDateProp,k).set(olympe.dm.File.C,!1);a.HO(b,c)}};olympe.sc.File.setURLContent=olympe.sc.File.QE;olympe.sc.File.setContent=olympe.sc.File.Nd;olympe.sc.File.createFromURL=olympe.sc.File.LV;olympe.sc.File.createFromContent=olympe.sc.File.KV;
1793
1792
  olympe.sc.File.U=Gh(olympe.dm.File,'ff021000000000000031',olympe.sc.File);olympe.sc.Xn=class extends olympe.sc.File{D(){const a=olympe.j.Za(olympe.j.kb);this.Vr(b=>{a.update(olympe.j.ic(b))});return a.wa()}};olympe.sc.Xn.U=Gh(olympe.sc.File,'01644b6297305d62fca2',olympe.sc.Xn);olympe.sc.Xn.U.C=olympe.sc.File.D.bind(null,olympe.sc.Xn);olympe.sc.Xn.prototype.D.K=olympe.j.J.R;olympe.sc.Fg=class extends olympe.sc.File{Ai(){return this.Rd(olympe.sc.Fg.fontFamilyProp)}yl(){return this.Rd(olympe.sc.Fg.O)}Bi(){return this.yg(olympe.sc.Fg.R)}};olympe.sc.Fg.U=Gh(olympe.sc.File,'01647e113043c637b541',olympe.sc.Fg);olympe.sc.Fg.fontFamilyProp=olympe.sc.Fg.U.fa('01647e35ecd24ef0b88d');olympe.sc.Fg.O=olympe.sc.Fg.U.fa('01647e677f5d1cfbdf42');olympe.sc.Fg.R=olympe.sc.Fg.U.fa('01647e6780999bf8bd25');
1794
1793
  olympe.sc.Fg.U.C=(a,b,c,d)=>{c=olympe.sc.File.D(olympe.sc.Fg,a,b,c,d);a.update(c,olympe.sc.Fg.fontFamilyProp,b.split('.')[0]);return c};olympe.sc.Fg.prototype.Ai.K=olympe.j.J.R;olympe.sc.Fg.prototype.yl.K=olympe.j.J.R;olympe.sc.Fg.prototype.Bi.K=olympe.j.J.D;olympe.sc.St=class extends olympe.sc.File{};olympe.sc.St.U=Gh(olympe.sc.File,'0164643c432146a71d5c',olympe.sc.St);olympe.sc.St.U.C=olympe.sc.File.D.bind(null,olympe.sc.St);olympe.sc.dM=class extends olympe.dc.CloudObject{};olympe.sc.dM.U=olympe.dc.Ja.C('016421bb3797e22d1c4e',olympe.sc.dM);olympe.sc.logic={};olympe.sc.logic.eH=(a,b)=>a===b?0:a>b?1:-1;
1795
1794
  olympe.sc.logic.o0=(a,b,c,d,e,f,g)=>{const k=b.ka();b=olympe.j.Qa(b.getType().ka());let l,m;if(b===olympe.dc.Ya(olympe.dm.String))l=c.valueOf().toLowerCase(),m=p=>p.Rd(k).toLowerCase();else if(b===olympe.dc.Ya(olympe.dm.Number))l=c.valueOf(),m=p=>p.yg(k);else if(b===olympe.dc.Ya(olympe.dm.DateTime))l=c.getTime(),m=p=>olympe.j.Xa([p.gx(k)],r=>r.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.eb().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
1796
1795
  return}let n;if('<'===f)n=(p,r)=>olympe.sc.logic.eH(r,p);else if('>'===f)n=(p,r)=>olympe.sc.logic.eH(p,r);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.Mr().filter(p=>olympe.j.Xa([m(p)],r=>{r=n(r.valueOf(),l);return olympe.j.hc(d.valueOf()?1===r:0<=r)},olympe.j.ia,'FilterList ListDefBuilder Filter TransformFlows')).ek())};
1797
- olympe.sc.logic.L2=(a,b)=>{if(a instanceof olympe.j.aa)return a;if(a instanceof olympe.j.kb)return a.BP();if(a instanceof olympe.j.ia)return a.LN();if('string'===typeof a||'number'===typeof a)return olympe.j.Ba(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.j.aa.JJ};olympe.sc.logic.Oc={};function Mp(a){Mh(a.U,(b,c)=>{b=b.create(a.U.D);Z(b,olympe.dc.CloudObject.nameProp,c);return b.ka()})}olympe.sc.logic.Oc.UG=class{constructor(a,b,c){this.U=olympe.dc.Ja.C(a,b,...c);Mp(this)}ka(){return this.U.ka()}getInputs(){return wp(olympe.dc.CloudObject.get(this.U))}getOutputs(){return xp(olympe.dc.CloudObject.get(this.U))}};olympe.sc.logic.Oc.UG.Aa=[olympe.dc.Ok];const Np=Object.create(null),Op=new Map;function Pp(a){if(void 0===Np[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Ih(a)}function Qp(a,b,c=olympe.sc.logic.Function){if(Op.has(a))throw c=Pp(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.Ja.C(a,b,...[]);Op.set(a,{U:d,b3:b,G2:c});return d}
1798
- olympe.sc.logic.Ja=class{constructor(){}static C(a,b,...c){if(Np[a])throw c=Pp(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.Oc.UG(a,b,[olympe.sc.ba.Vb].concat(c));return Np[a]=b}};olympe.sc.logic.gG=class a{static C(b){var c=olympe.sc.ui.Pd.O;let d=!1;const e=olympe.dc.Ya(c),f=olympe.dc.eb();f.pc(b,olympe.sc.gg.O.fe()).forEach(g=>{d=d||f.pc(g,olympe.sc.gg.C).includes(e)});!1===d&&(d=null!==a.D(c,b));return d}static D(b,c){const d=olympe.sc.logic.jd.O,e=olympe.sc.logic.jd.C,f=olympe.sc.logic.jd.Ks,g=olympe.dc.eb();let k=null;g.pc(c,d.fe()).some(l=>g.Wd(l,e)===b.ka()?(k=g.Wd(l,f)||null,!0):!1);return k}};olympe.sc.logic.Fy=class extends olympe.dc.CloudObject{};olympe.sc.logic.Fy.U=olympe.dc.Ja.C('01621fb84e320000cf00',olympe.sc.logic.Fy);function Xo(a,b,c){return new olympe.sc.logic.Error(a,b,c)}olympe.sc.logic.Error=class extends Error{constructor(a,b,c){super(a);this.code=b;this.C=null!=c?c:null}static create(a,b){return new olympe.sc.logic.Error(a,b)}ZW(){return this.message}eN(){return this.code}tk(){let a;return null!=(a=this.C)?a:''}toString(){return`${this.message}\nError found in:\n${this.tk()}\n\n${this.stack}`}};olympe.sc.logic.Error.prototype.getStack=olympe.sc.logic.Error.prototype.tk;
1799
- olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.eN;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.ZW;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;olympe.sc.logic.Fv=class extends olympe.sc.logic.Fy{};olympe.sc.logic.Fv.U=olympe.dc.Ja.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Fv);olympe.sc.logic.Qh=class extends olympe.dc.CloudObject{C(){return this.Ig(olympe.sc.logic.Qh.C,olympe.dc.CloudObject)}};olympe.sc.logic.Qh.U=olympe.dc.Ja.C('016ac4f59ee8ea2081ba',olympe.sc.logic.Qh);olympe.sc.logic.Qh.D=olympe.sc.logic.Qh.U.fa('017bc044aeacce7ffc8f');olympe.sc.logic.Qh.C=olympe.sc.logic.Qh.U.tb('016ac4f5a0091c4790e2');Y(olympe.dc.CloudObject.U,olympe.sc.logic.Qh.C);olympe.sc.logic.Qh.prototype.C.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Bt=class extends olympe.sc.logic.Qh{};olympe.sc.logic.Bt.U=olympe.dc.Ja.C('016ac4f59c592b862457',olympe.sc.logic.Bt);olympe.sc.logic.Bt.O=olympe.sc.Sh.C.fe();olympe.sc.logic.Bt.U.C=(a,b,c,d,e)=>{b=Gn(a,b||'New Predefined Input',olympe.sc.logic.Bt,olympe.sc.logic.ie);Z(b,olympe.sc.logic.Qh.D,e);a.Qb(olympe.sc.logic.Qh.C,b,c);a.Qb(olympe.sc.Sh.C,d,b);return b.ka()};olympe.sc.logic.rr=class extends olympe.sc.logic.Qh{};olympe.sc.logic.rr.U=olympe.dc.Ja.C('016ac4f59dd99f5df3e1',olympe.sc.logic.rr);olympe.sc.logic.rr.O=Y(olympe.sc.logic.rr.U,olympe.sc.Sh.D);olympe.sc.logic.rr.U.C=(a,b,c,d,e)=>{b=Gn(a,b||'New Predefined Output',olympe.sc.logic.rr,olympe.sc.logic.Le);Z(b,olympe.sc.logic.Qh.D,e);a.Qb(olympe.sc.logic.Qh.C,b,c);a.Qb(olympe.sc.Sh.D,d,b);return b.ka()};olympe.sc.logic.ki=class extends olympe.sc.yc{Di(){return olympe.sc.jf.Yi.QK}R(){return this.Vw().Mr().me([olympe.sc.logic.Function]).and().Re().me([olympe.sc.logic.Mh,olympe.sc.logic.Bh]).ek()}W(){const a=olympe.dc.Ya(olympe.sc.logic.Fv);return this.db.pc(this,olympe.sc.logic.ki.D).filter(b=>this.db.Wd(b,olympe.sc.logic.qf.typeRel)===a)}C(a){const b=this.db.eA(this,[olympe.sc.yc.O],c=>this.db.model(c)===olympe.dc.Ya(a));return b?olympe.dc.CloudObject.get(b):null}D(a){const b=this.db.eA(this,[olympe.sc.yc.D],
1800
- c=>this.db.model(c)===olympe.dc.Ya(a));return b?olympe.dc.CloudObject.get(b):null}T(a){if(!this.nq())return super.T(a);const b=olympe.dc.Ya(olympe.sc.logic.Fy),c=olympe.dc.Ya(olympe.sc.logic.Fv);return xp(this).map(d=>{switch(this.db.Wd(d,olympe.sc.logic.qf.typeRel)){case b:return a.Qq.bind(a,d);case c:return a.throw.bind(a);default:return a.set.bind(a,d)}})}O(a){if(!this.nq())return super.O(a);const b=wp(this);return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>
1801
- c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.ki.U=Qp('01621fb84e320000f000',olympe.sc.logic.ki,olympe.sc.logic.Function);olympe.sc.logic.ki.prototype.C.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ki.prototype.D.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);let Rp=null;function Sp(){if(null===Rp){let a;Rp=null!=(a=olympe.sa.getParameter('sc.action.experimental'))?a:!1}return Rp}
1802
- olympe.sc.logic.np=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63229782039429f')}da(){return this.D('016ac6322acf67eebfe7')}ma(){return this.getOutputs().Mr().oc(olympe.sc.logic.qf.typeRel).JA(olympe.sc.logic.Fv).ek().Qc().Mj(olympe.j.aa.ZERO)}O(a){if(this.nq()||Sp()){const b=this.ca().ka();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:wp(this).filter(d=>d!==b).map(d=>a.get(d))))}return super.O(a)}};olympe.sc.logic.np.C='016ac63229782039429f';olympe.sc.logic.np.$='016ac6322acf67eebfe7';
1803
- olympe.sc.logic.np.U=Qp('01621fb84e320000a000',olympe.sc.logic.np,olympe.sc.logic.Action);olympe.sc.logic.np.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.np.prototype.da.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.np.prototype.ma.K=olympe.j.J.T;olympe.sc.logic.$F=class extends olympe.sc.logic.ki{};olympe.sc.logic.$F.U=Qp('01621fb84e320000f011',olympe.sc.logic.$F);olympe.sc.logic.ZF=class extends olympe.sc.logic.np{};olympe.sc.logic.ZF.U=Qp('01621fb84e320000f012',olympe.sc.logic.ZF);olympe.sc.logic.Function=class extends olympe.sc.Runnable{T(){return[this.ma]}W(){if(!this.kg().nq())return super.W();const a=olympe.sc.sp.C.pC,b=olympe.sc.sp.C.OC,c=this.db,d=new Map,e=this.De();c.pc(e,olympe.sc.yc.O).forEach(f=>{d.set(a+c.name(f),f)});c.pc(e,olympe.sc.yc.D).forEach(f=>{d.set(b+c.name(f),f)});return d}};olympe.sc.logic.Function.U=olympe.dc.Ja.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.ba.Vb);olympe.sc.logic.qf=class extends olympe.dc.CloudObject{getType(){return this.Ig(olympe.sc.logic.qf.typeRel,olympe.dc.CloudObject)}C(){return this.yg(olympe.sc.logic.qf.C)}};olympe.sc.logic.qf.U=olympe.dc.Ja.C('0168a431d25001540000',olympe.sc.logic.qf);olympe.sc.logic.qf.C=olympe.sc.logic.qf.U.fa('01740c5d4ae4b520dd01');olympe.sc.logic.qf.typeRel=olympe.sc.logic.qf.U.tb('0168a431d3b9b7438424');Y(olympe.dc.CloudObject.U,olympe.sc.logic.qf.typeRel);
1796
+ olympe.sc.logic.L2=(a,b)=>{if(a instanceof olympe.j.aa)return a;if(a instanceof olympe.j.kb)return a.BP();if(a instanceof olympe.j.ia)return a.LN();if('string'===typeof a||'number'===typeof a)return olympe.j.Ba(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.j.aa.JJ};olympe.sc.logic.Oc={};function Np(a){Mh(a.U,(b,c)=>{b=b.create(a.U.D);Z(b,olympe.dc.CloudObject.nameProp,c);return b.ka()})}olympe.sc.logic.Oc.UG=class{constructor(a,b,c){this.U=olympe.dc.Ja.C(a,b,...c);Np(this)}ka(){return this.U.ka()}getInputs(){return xp(olympe.dc.CloudObject.get(this.U))}getOutputs(){return yp(olympe.dc.CloudObject.get(this.U))}};olympe.sc.logic.Oc.UG.Aa=[olympe.dc.Ok];const Op=Object.create(null),Pp=new Map;function Qp(a){if(void 0===Op[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Ih(a)}function Rp(a,b,c=olympe.sc.logic.Function){if(Pp.has(a))throw c=Qp(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.Ja.C(a,b,...[]);Pp.set(a,{U:d,b3:b,G2:c});return d}
1797
+ olympe.sc.logic.Ja=class{constructor(){}static C(a,b,...c){if(Op[a])throw c=Qp(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.Oc.UG(a,b,[olympe.sc.ba.Vb].concat(c));return Op[a]=b}};olympe.sc.logic.gG=class a{static C(b){var c=olympe.sc.ui.Pd.O;let d=!1;const e=olympe.dc.Ya(c),f=olympe.dc.eb();f.pc(b,olympe.sc.gg.O.fe()).forEach(g=>{d=d||f.pc(g,olympe.sc.gg.C).includes(e)});!1===d&&(d=null!==a.D(c,b));return d}static D(b,c){const d=olympe.sc.logic.jd.O,e=olympe.sc.logic.jd.C,f=olympe.sc.logic.jd.Ks,g=olympe.dc.eb();let k=null;g.pc(c,d.fe()).some(l=>g.Wd(l,e)===b.ka()?(k=g.Wd(l,f)||null,!0):!1);return k}};olympe.sc.logic.Fy=class extends olympe.dc.CloudObject{};olympe.sc.logic.Fy.U=olympe.dc.Ja.C('01621fb84e320000cf00',olympe.sc.logic.Fy);function Yo(a,b,c){return new olympe.sc.logic.Error(a,b,c)}olympe.sc.logic.Error=class extends Error{constructor(a,b,c){super(a);this.code=b;this.C=null!=c?c:null}static create(a,b){return new olympe.sc.logic.Error(a,b)}ZW(){return this.message}eN(){return this.code}tk(){let a;return null!=(a=this.C)?a:''}toString(){return`${this.message}\nError found in:\n${this.tk()}\n\n${this.stack}`}};olympe.sc.logic.Error.prototype.getStack=olympe.sc.logic.Error.prototype.tk;
1798
+ olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.eN;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.ZW;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;olympe.sc.logic.Fv=class extends olympe.sc.logic.Fy{};olympe.sc.logic.Fv.U=olympe.dc.Ja.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Fv);olympe.sc.logic.Qh=class extends olympe.dc.CloudObject{C(){return this.Ig(olympe.sc.logic.Qh.C,olympe.dc.CloudObject)}};olympe.sc.logic.Qh.U=olympe.dc.Ja.C('016ac4f59ee8ea2081ba',olympe.sc.logic.Qh);olympe.sc.logic.Qh.D=olympe.sc.logic.Qh.U.fa('017bc044aeacce7ffc8f');olympe.sc.logic.Qh.C=olympe.sc.logic.Qh.U.tb('016ac4f5a0091c4790e2');Y(olympe.dc.CloudObject.U,olympe.sc.logic.Qh.C);olympe.sc.logic.Qh.prototype.C.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Bt=class extends olympe.sc.logic.Qh{};olympe.sc.logic.Bt.U=olympe.dc.Ja.C('016ac4f59c592b862457',olympe.sc.logic.Bt);olympe.sc.logic.Bt.O=olympe.sc.Sh.C.fe();olympe.sc.logic.Bt.U.C=(a,b,c,d,e)=>{b=Hn(a,b||'New Predefined Input',olympe.sc.logic.Bt,olympe.sc.logic.ie);Z(b,olympe.sc.logic.Qh.D,e);a.Qb(olympe.sc.logic.Qh.C,b,c);a.Qb(olympe.sc.Sh.C,d,b);return b.ka()};olympe.sc.logic.rr=class extends olympe.sc.logic.Qh{};olympe.sc.logic.rr.U=olympe.dc.Ja.C('016ac4f59dd99f5df3e1',olympe.sc.logic.rr);olympe.sc.logic.rr.O=Y(olympe.sc.logic.rr.U,olympe.sc.Sh.D);olympe.sc.logic.rr.U.C=(a,b,c,d,e)=>{b=Hn(a,b||'New Predefined Output',olympe.sc.logic.rr,olympe.sc.logic.Le);Z(b,olympe.sc.logic.Qh.D,e);a.Qb(olympe.sc.logic.Qh.C,b,c);a.Qb(olympe.sc.Sh.D,d,b);return b.ka()};olympe.sc.logic.ki=class extends olympe.sc.yc{Di(){return olympe.sc.jf.Yi.QK}R(){return this.Vw().Mr().me([olympe.sc.logic.Function]).and().Re().me([olympe.sc.logic.Mh,olympe.sc.logic.Bh]).ek()}W(){const a=olympe.dc.Ya(olympe.sc.logic.Fv);return this.db.pc(this,olympe.sc.logic.ki.D).filter(b=>this.db.Wd(b,olympe.sc.logic.qf.typeRel)===a)}C(a){const b=this.db.eA(this,[olympe.sc.yc.O],c=>this.db.model(c)===olympe.dc.Ya(a));return b?olympe.dc.CloudObject.get(b):null}D(a){const b=this.db.eA(this,[olympe.sc.yc.D],
1799
+ c=>this.db.model(c)===olympe.dc.Ya(a));return b?olympe.dc.CloudObject.get(b):null}T(a){if(!this.nq())return super.T(a);const b=olympe.dc.Ya(olympe.sc.logic.Fy),c=olympe.dc.Ya(olympe.sc.logic.Fv);return yp(this).map(d=>{switch(this.db.Wd(d,olympe.sc.logic.qf.typeRel)){case b:return a.Qq.bind(a,d);case c:return a.throw.bind(a);default:return a.set.bind(a,d)}})}O(a){if(!this.nq())return super.O(a);const b=xp(this);return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>
1800
+ c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.ki.U=Rp('01621fb84e320000f000',olympe.sc.logic.ki,olympe.sc.logic.Function);olympe.sc.logic.ki.prototype.C.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ki.prototype.D.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);let Sp=null;function Tp(){if(null===Sp){let a;Sp=null!=(a=olympe.sa.getParameter('sc.action.experimental'))?a:!1}return Sp}
1801
+ olympe.sc.logic.np=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63229782039429f')}da(){return this.D('016ac6322acf67eebfe7')}ma(){return this.getOutputs().Mr().oc(olympe.sc.logic.qf.typeRel).JA(olympe.sc.logic.Fv).ek().Qc().Mj(olympe.j.aa.ZERO)}O(a){if(this.nq()||Tp()){const b=this.ca().ka();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:xp(this).filter(d=>d!==b).map(d=>a.get(d))))}return super.O(a)}};olympe.sc.logic.np.C='016ac63229782039429f';olympe.sc.logic.np.$='016ac6322acf67eebfe7';
1802
+ olympe.sc.logic.np.U=Rp('01621fb84e320000a000',olympe.sc.logic.np,olympe.sc.logic.Action);olympe.sc.logic.np.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.np.prototype.da.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.np.prototype.ma.K=olympe.j.J.T;olympe.sc.logic.$F=class extends olympe.sc.logic.ki{};olympe.sc.logic.$F.U=Rp('01621fb84e320000f011',olympe.sc.logic.$F);olympe.sc.logic.ZF=class extends olympe.sc.logic.np{};olympe.sc.logic.ZF.U=Rp('01621fb84e320000f012',olympe.sc.logic.ZF);olympe.sc.logic.Function=class extends olympe.sc.Runnable{T(){return[this.ma]}W(){if(!this.kg().nq())return super.W();const a=olympe.sc.sp.C.pC,b=olympe.sc.sp.C.OC,c=this.db,d=new Map,e=this.De();c.pc(e,olympe.sc.yc.O).forEach(f=>{d.set(a+c.name(f),f)});c.pc(e,olympe.sc.yc.D).forEach(f=>{d.set(b+c.name(f),f)});return d}};olympe.sc.logic.Function.U=olympe.dc.Ja.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.ba.Vb);olympe.sc.logic.qf=class extends olympe.dc.CloudObject{getType(){return this.Ig(olympe.sc.logic.qf.typeRel,olympe.dc.CloudObject)}C(){return this.yg(olympe.sc.logic.qf.C)}};olympe.sc.logic.qf.U=olympe.dc.Ja.C('0168a431d25001540000',olympe.sc.logic.qf);olympe.sc.logic.qf.C=olympe.sc.logic.qf.U.fa('01740c5d4ae4b520dd01');olympe.sc.logic.qf.typeRel=olympe.sc.logic.qf.U.tb('0168a431d3b9b7438424');Y(olympe.dc.CloudObject.U,olympe.sc.logic.qf.typeRel);
1804
1803
  olympe.sc.logic.qf.prototype.getType.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.qf.prototype.C.K=olympe.j.J.D;olympe.sc.logic.ie=class extends olympe.sc.logic.qf{};olympe.sc.logic.ie.U=olympe.dc.Ja.C('0168a431d25001540001',olympe.sc.logic.ie);olympe.sc.logic.ie.W=olympe.sc.logic.qf.U.fa('01740c5d4ae4b520dd02');olympe.sc.logic.ie.T=Y(olympe.sc.logic.ie.U,olympe.sc.yc.O);olympe.sc.logic.ie.D=olympe.sc.logic.ie.U.tb('0168a431d91f2578000b',olympe.dc.Ib.ORIGIN);olympe.sc.logic.ie.O=olympe.sc.logic.ie.U.tb('01621fb84e32000000a1',olympe.dc.Ib.ORIGIN);
1805
1804
  olympe.sc.logic.ie.R=olympe.sc.logic.ie.U.tb('01621fb84e32000000d1',olympe.dc.Ib.ORIGIN);olympe.sc.logic.ie.U.C=function(a,b,c,d,e,f=olympe.sc.logic.ie){f=a.create(f);Z(f,olympe.dc.CloudObject.nameProp,b||'New input');a.Qb(olympe.sc.logic.qf.typeRel,f,c);void 0!==e&&Z(f,olympe.sc.logic.qf.C,e);d&&a.Qb(olympe.sc.yc.O,d,f);return f.ka()};olympe.sc.logic.Le=class extends olympe.sc.logic.qf{};olympe.sc.logic.Le.U=olympe.dc.Ja.C('0168a431d25001540002',olympe.sc.logic.Le);olympe.sc.logic.Le.T=Y(olympe.sc.logic.Le.U,olympe.sc.yc.D);olympe.sc.logic.Le.D=olympe.sc.logic.Le.U.tb('0168a431d91f25780003',olympe.dc.Ib.ORIGIN);olympe.sc.logic.Le.R=olympe.sc.logic.Le.U.tb('01621fb84e32000000a2',olympe.dc.Ib.ORIGIN);olympe.sc.logic.Le.O=olympe.sc.logic.Le.U.tb('01621fb84e32000000d2',olympe.dc.Ib.ORIGIN);
1806
- olympe.sc.logic.Le.U.C=function(a,b,c,d,e,f=olympe.sc.logic.Le){f=a.create(f);Z(f,olympe.dc.CloudObject.nameProp,b||'New output');a.Qb(olympe.sc.logic.qf.typeRel,f,c);void 0!==e&&Z(f,olympe.sc.logic.qf.C,e);d&&a.Qb(olympe.sc.yc.D,d,f);return f.ka()};olympe.sc.logic.Mh=class extends olympe.sc.logic.Function{run(a){zp(this,a);const b=a.getParent(),c=this.db.Wd(this,olympe.sc.logic.Mh.D),d=this.db.Wd(this,olympe.sc.logic.Mh.C);a.on(c,e=>b.set(d,e),this.tag)}C(){return this.ml(olympe.sc.logic.Mh.D).zf()}D(){return this.ml(olympe.sc.logic.Mh.C).zf()}};olympe.sc.logic.Mh.U=olympe.dc.Ja.C('01621fb84e32000000a0',olympe.sc.logic.Mh,olympe.sc.ba.Vb);olympe.sc.logic.Mh.D=Y(olympe.sc.logic.Mh.U,olympe.sc.logic.ie.O);
1805
+ olympe.sc.logic.Le.U.C=function(a,b,c,d,e,f=olympe.sc.logic.Le){f=a.create(f);Z(f,olympe.dc.CloudObject.nameProp,b||'New output');a.Qb(olympe.sc.logic.qf.typeRel,f,c);void 0!==e&&Z(f,olympe.sc.logic.qf.C,e);d&&a.Qb(olympe.sc.yc.D,d,f);return f.ka()};olympe.sc.logic.Mh=class extends olympe.sc.logic.Function{run(a){Ap(this,a);const b=a.getParent(),c=this.db.Wd(this,olympe.sc.logic.Mh.D),d=this.db.Wd(this,olympe.sc.logic.Mh.C);a.on(c,e=>b.set(d,e),this.tag)}C(){return this.ml(olympe.sc.logic.Mh.D).zf()}D(){return this.ml(olympe.sc.logic.Mh.C).zf()}};olympe.sc.logic.Mh.U=olympe.dc.Ja.C('01621fb84e32000000a0',olympe.sc.logic.Mh,olympe.sc.ba.Vb);olympe.sc.logic.Mh.D=Y(olympe.sc.logic.Mh.U,olympe.sc.logic.ie.O);
1807
1806
  olympe.sc.logic.Mh.C=Y(olympe.sc.logic.Mh.U,olympe.sc.logic.Le.R);olympe.sc.logic.Mh.U.C=function(a,b,c){b=a.create(olympe.sc.logic.Mh);a.Qb(olympe.sc.logic.Mh.C,b,c);return b.ka()};olympe.sc.logic.Mh.prototype.C.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.Mh.prototype.D.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.Bh=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.Wd(this,olympe.sc.logic.Bh.C),d=this.db.Wd(this,olympe.sc.logic.Bh.D);b.on(c,e=>a.set(d,e),b.ja())}D(){return this.ml(olympe.sc.logic.Bh.C).zf()}C(){return this.ml(olympe.sc.logic.Bh.D).zf()}};olympe.sc.logic.Bh.U=olympe.dc.Ja.C('01621fb84e32000000d0',olympe.sc.logic.Bh,olympe.sc.ba.Vb);olympe.sc.logic.Bh.C=Y(olympe.sc.logic.Bh.U,olympe.sc.logic.ie.R);olympe.sc.logic.Bh.D=Y(olympe.sc.logic.Bh.U,olympe.sc.logic.Le.O);
1808
- olympe.sc.logic.Bh.U.C=function(a,b,c){b=a.create(olympe.sc.logic.Bh);a.Qb(olympe.sc.logic.Bh.C,b,c);return b.ka()};olympe.sc.logic.Bh.prototype.D.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.Bh.prototype.C.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);function Fp(a,b,c){var d;const e=null!=(d=a.db.Wd(a,olympe.sc.logic.jd.R))?d:a.db.Wd(a,olympe.sc.logic.jd.gy),f=a.db.Wd(a,olympe.sc.logic.jd.Ks);if(null!==e&&null!==f){d=a.db.Xm(Tp(a),olympe.dm.$k)?new olympe.j.ee('Pipe Context'):null;const l=a.C.bind(a,c,d);let m;const n=b.QA(f,p=>{let r;null==(r=m)||r();m=p.on(e,l,f)});return()=>{l(null);n();let p;null==(p=m)||p()}}const g=l=>c(olympe.dc.Ad.ug(l)),k=Pi(a.db,a,olympe.sc.logic.jd.valueProp,g);return()=>{g(null);Qi(a.db,a,olympe.sc.logic.jd.valueProp,
1809
- k)}}function Tp(a){let b=null,c=a.db.Wd(a,olympe.sc.logic.jd.C);c?b=a.db.Wd(c,olympe.dm.Property.typeRel):(c=a.db.Wd(a,olympe.sc.logic.jd.D))&&(b=a.db.Wd(c,olympe.sc.logic.qf.typeRel));return b||olympe.dc.Ya(olympe.dc.CloudObject)}
1807
+ olympe.sc.logic.Bh.U.C=function(a,b,c){b=a.create(olympe.sc.logic.Bh);a.Qb(olympe.sc.logic.Bh.C,b,c);return b.ka()};olympe.sc.logic.Bh.prototype.D.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.Bh.prototype.C.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);function Gp(a,b,c){var d;const e=null!=(d=a.db.Wd(a,olympe.sc.logic.jd.R))?d:a.db.Wd(a,olympe.sc.logic.jd.gy),f=a.db.Wd(a,olympe.sc.logic.jd.Ks);if(null!==e&&null!==f){d=a.db.Xm(Up(a),olympe.dm.$k)?new olympe.j.ee('Pipe Context'):null;const l=a.C.bind(a,c,d);let m;const n=b.QA(f,p=>{let r;null==(r=m)||r();m=p.on(e,l,f)});return()=>{l(null);n();let p;null==(p=m)||p()}}const g=l=>c(olympe.dc.Ad.ug(l)),k=Pi(a.db,a,olympe.sc.logic.jd.valueProp,g);return()=>{g(null);Qi(a.db,a,olympe.sc.logic.jd.valueProp,
1808
+ k)}}function Up(a){let b=null,c=a.db.Wd(a,olympe.sc.logic.jd.C);c?b=a.db.Wd(c,olympe.dm.Property.typeRel):(c=a.db.Wd(a,olympe.sc.logic.jd.D))&&(b=a.db.Wd(c,olympe.sc.logic.qf.typeRel));return b||olympe.dc.Ya(olympe.dc.CloudObject)}
1810
1809
  olympe.sc.logic.jd=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.V=c}C(a,b,c){const d=olympe.sc.Hw(c);null==b||b.xo();b&&d instanceof olympe.dm.$k?null==b||b.run(()=>{olympe.j.Wa([d.getValue()],e=>{a(e.valueOf())})}):a(d)}getValue(a){return this.Go(olympe.sc.logic.jd.valueProp,a||olympe.dc.Ad.Hw,Object)}getType(){const a=this.transform(olympe.sc.logic.jd.D,olympe.sc.logic.qf.typeRel);a.mi(olympe.dc.CloudObject);return a.Vd()}uX(){return this.Ig(olympe.sc.logic.jd.Ks,olympe.dc.CloudObject)}sX(){return this.Ig(olympe.sc.logic.jd.R,
1811
1810
  olympe.sc.logic.Le)}tX(){return this.Ig(olympe.sc.logic.jd.gy,olympe.dm.Property)}BW(){return this.Ig(olympe.sc.logic.jd.O,olympe.dc.CloudObject)}zW(){return this.Ig(olympe.sc.logic.jd.D,olympe.sc.logic.ie)}AW(){return this.Ig(olympe.sc.logic.jd.C,olympe.dm.Property)}};olympe.sc.logic.jd.U=olympe.dc.Ja.C('0168a431d91f25780000',olympe.sc.logic.jd,olympe.sc.ba.Vb);olympe.sc.logic.jd.valueProp=olympe.sc.logic.jd.U.fa('0168a431d91f25780001');olympe.sc.logic.jd.Ks=olympe.sc.logic.jd.U.tb('0168a431d91f25780002');
1812
1811
  olympe.sc.logic.jd.R=Y(olympe.sc.logic.jd.U,olympe.sc.logic.Le.D);olympe.sc.logic.jd.gy=olympe.sc.logic.jd.U.tb('0168a431d91f25780004');olympe.sc.logic.jd.O=olympe.sc.logic.jd.U.tb('0168a431d91f2578000a');olympe.sc.logic.jd.D=Y(olympe.sc.logic.jd.U,olympe.sc.logic.ie.D);olympe.sc.logic.jd.C=olympe.sc.logic.jd.U.tb('0168a431d91f2578000c');Y(olympe.dc.CloudObject.U,olympe.sc.logic.jd.Ks);Y(olympe.dm.Property.U,olympe.sc.logic.jd.gy);Y(olympe.dc.CloudObject.U,olympe.sc.logic.jd.O);
1813
- Y(olympe.dm.Property.U,olympe.sc.logic.jd.C);h=olympe.sc.logic.jd.prototype;h.getType.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.uX.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.sX.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);h.tX.K=new olympe.j.J(()=>olympe.dm.Property,[]);h.BW.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.zW.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.AW.K=new olympe.j.J(()=>olympe.dm.Property,[]);function Up(a,b){const c=a.kg(),d=c.BC().ka(),e=c.CC().ka(),f=c.DC().ka();b.on(d,g=>{if(g){g=new Map(a.getInputs().map(l=>[l,b.get(l)]));const k={timeout:a.timeout};olympe.Y.de.get(a.De(),g,k).then(l=>{for(const [m,n]of l)m!==e&&m!==f&&b.set(m,n);b.set(e,l.get(e));l=l.get(f);l instanceof olympe.sc.logic.Error&&(l=Xo(l.message,l.code,l.tk()+'\n===== Remote Call =====\n'+b.tk()),b.throw(l))}).catch(l=>{l=`RemoteAction "${a.Qe().name()}" (${a.tag}) encountered an error:\n${l}`;a.V.error(l);b.throw(olympe.sc.logic.Error.create(l,
1812
+ Y(olympe.dm.Property.U,olympe.sc.logic.jd.C);h=olympe.sc.logic.jd.prototype;h.getType.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.uX.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.sX.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);h.tX.K=new olympe.j.J(()=>olympe.dm.Property,[]);h.BW.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);h.zW.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.AW.K=new olympe.j.J(()=>olympe.dm.Property,[]);function Vp(a,b){const c=a.kg(),d=c.BC().ka(),e=c.CC().ka(),f=c.DC().ka();b.on(d,g=>{if(g){g=new Map(a.getInputs().map(l=>[l,b.get(l)]));const k={timeout:a.timeout};olympe.Y.de.get(a.De(),g,k).then(l=>{for(const [m,n]of l)m!==e&&m!==f&&b.set(m,n);b.set(e,l.get(e));l=l.get(f);l instanceof olympe.sc.logic.Error&&(l=Yo(l.message,l.code,l.tk()+'\n===== Remote Call =====\n'+b.tk()),b.throw(l))}).catch(l=>{l=`RemoteAction "${a.Qe().name()}" (${a.tag}) encountered an error:\n${l}`;a.V.error(l);b.throw(olympe.sc.logic.Error.create(l,
1814
1813
  400))})}},b.ja())}
1815
- function Vp(a,b,c,d,e,f){const g=n=>q(function*(){if(null!==n){e.cancel();let p;null==(p=l)||p();let r;null==(r=m)||r();try{const t=new Map(a.getOutputs().map(u=>[u,b.get(u)]));yield f.ai(t)}catch(t){const u=Error(`Error while trying to send the response of remote action ${a.Qe().name()} (${a.De()}): ${t}`);f.gu(u).catch(v=>{a.V.error(`Cannot reply with an error to a remote action call ${a.Qe().name()} (${a.De()}): ${v}`)})}finally{b.destroy()}}}),k=b.ja(),l=b.on(c,g,k),m=b.on(d,g,k)}
1816
- olympe.sc.logic.It=class extends olympe.sc.logic.Function{constructor(a,b,c,d){super(a,b,c);this.timeout=d}run(a){Uo(a)||(this.db.Ac(this,olympe.sc.logic.It.C)?(kp(a.C,this),this.C(a)):(zp(this,a),Up(this,a)))}C(a){const b=this.De(),c=this.kg(),d=c.lJ().ka(),e=c.BC().ka(),f=c.CC().ka(),g=c.DC().ka();(new olympe.Y.de(b,a)).Bu().subscribe(rxjs.Subscriber.create(k=>{const l=a.wo('remote call'),m=k.body(),n=Wc(()=>{k.gu(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));l.destroy()},
1817
- this.timeout);Vp(this,l,f,g,n,k);super.run(l);for(const [p,r]of m)p!==e&&l.set(p,r);k.qv().then(p=>{var r=l.get(d);null!==r&&olympe.dc.Ya(r)!==p&&(r=this.De(),this.V.warn(`Remote action ${this.db.name(r)} ${r}: try to run it with an input user that is not the real authenticated user.`));l.set(d,p);l.set(e,m.get(e))}).catch(p=>{const r=this.De();this.V.warn(`Remote action ${this.db.name(r)} ${r} Triggered by unrecognized user: ${p}.`);l.set(g,olympe.sc.logic.Error.create('Unrecognized User',1))})},
1818
- k=>{const l=this.De();this.V.error(`Error while listening on remote action ${this.db.name(l)} (${l}): ${k.message}`)}))}};olympe.sc.logic.It.U=olympe.dc.Ja.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.It,olympe.sc.ba.Vb,new olympe.sa.zb(olympe.sc.pa.qK));olympe.sc.logic.It.C=olympe.sc.logic.It.U.fa('017a7b0c62a02a89444f');olympe.sc.logic.controllers={};olympe.sc.logic.controllers.qC=class{constructor(a){this.db=olympe.dc.eb();this.typeRel=a}};olympe.sc.logic.controllers.qC.C={$Z:-1,g0:1};olympe.sc.logic.controllers.b1=class extends olympe.sc.logic.controllers.qC{constructor(){super(olympe.sc.logic.Qh.C)}};olympe.sc.logic.controllers.i1=class extends olympe.sc.logic.controllers.qC{constructor(){super(olympe.sc.logic.qf.typeRel)}};olympe.sc.logic.gA={};olympe.sc.logic.gA.wU=class extends olympe.sc.logic.Function{update(a,[b],[c]){const d=olympe.dc.Ya(b);d?olympe.dc.nb.af(a,d,olympe.dc.Te.Wi).subscribe(()=>{c(olympe.dc.CloudObject.get(d))}):this.V.warn('Cannot subscribe to an instance with no tag: '+d)}};olympe.sc.logic.Ja.C('0174bf4b7e006e4b788a',olympe.sc.logic.gA.wU);olympe.sc.logic.actions={};olympe.sc.logic.gA.OS=class extends olympe.sc.logic.Function{run(a){zp(this,a);const [b,c,d]=Dp(this,a);let e,f=null,g=null;const k=a.getParent(),l=()=>{null===g||0===e?(this.V.warn('No list to iter upon'),this.V.info(a.ja())):f<e?(b(g.ql(f)),f++,c(Date.now())):(mp(k.C),d(Date.now()))};this.getInputs().forEach((m,n)=>a.on(m,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.aj();f=0;lp(k.C);l();break;case 2:l();break;default:this.V.error('Unhandled input')}},this.tag))}};
1819
- olympe.sc.logic.Ja.C('0171889b060b6cd54300',olympe.sc.logic.gA.OS);olympe.sc.logic.ff={};olympe.sc.logic.ff.YB=class extends olympe.sc.logic.ki{ca(){return this.C('016ac638085357047a2d')}};olympe.sc.logic.ff.YB.U=Qp('0169b6876a03f14ae61b',olympe.sc.logic.ff.YB);olympe.sc.logic.ff.YB.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);let Wp=null;olympe.sc.logic.ff.rC=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63808535703691c')}O(a){if(null===Wp){let b;Wp=null!=(b=olympe.sa.getParameter('sc.event.experimental'))?b:!1}return Wp?a.observe(wp(this)[0]):super.O(a)}};olympe.sc.logic.ff.rC.U=Qp('0169b6876a03f139d50a',olympe.sc.logic.ff.rC);olympe.sc.logic.ff.rC.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ff.PC=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63809a9a8e6db96')}da(){return this.D('016ac6380ab003363b3e')}};Qp('01646ad602f933b8caaf',olympe.sc.logic.ff.PC);olympe.sc.logic.ff.PC.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ff.PC.prototype.da.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.ff.pz=class extends olympe.sc.logic.ki{ca(){return this.C('016ac6380bd98f1d91a0')}ma(){return this.D('016ac63c589ae38ca3ae')}da(){return this.D('016ac63c5a377fceabaa')}};Qp('0168ec42fc01747a98b6',olympe.sc.logic.ff.pz);olympe.sc.logic.ff.pz.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ff.pz.prototype.ma.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.ff.pz.prototype.da.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.ff.ur=class extends olympe.sc.logic.ki{BC(){return this.C('017a7b07b09e3b22c8b4')}lJ(){return this.C('017a7b07ba05807a74b0')}CC(){return this.D('017a7b0818c12388d731')}DC(){return this.D('017a7b085146d5e69aec')}qS(){return olympe.j.ia.C}};olympe.sc.logic.ff.ur.$='017a7b07b09e3b22c8b4';olympe.sc.logic.ff.ur.Pa='017a7b07ba05807a74b0';olympe.sc.logic.ff.ur.za='017a7b0818c12388d731';olympe.sc.logic.ff.ur.C='017a7b085146d5e69aec';
1820
- olympe.sc.logic.ff.ur.U=Qp('017a7b07a948e30508fa',olympe.sc.logic.ff.ur,olympe.sc.logic.It);h=olympe.sc.logic.ff.ur.prototype;h.BC.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.lJ.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.CC.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);h.DC.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);h.qS.K=olympe.j.J.T;olympe.sc.logic.ff.hL=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63c5b3ed0562740')}};Qp('016a9766c230916ea5ec',olympe.sc.logic.ff.hL);olympe.sc.logic.ff.hL.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.query={};olympe.sc.query.wF=class extends olympe.sc.Be{};olympe.sc.query.wF.U=olympe.dc.Ja.C('01631aacd8276ea98491',olympe.sc.query.wF);olympe.sc.query.YJ=class extends olympe.dm.Enum{};olympe.sc.query.YJ.U=olympe.dc.Ja.C('01631aacd8276ea98495',olympe.sc.query.YJ);olympe.sc.query.jK=class extends olympe.dm.Enum{};olympe.sc.query.jK.U=olympe.dc.Ja.C('01631aacd8276ea98494',olympe.sc.query.jK);olympe.sc.query.mK=class extends olympe.sc.Be{};olympe.sc.query.mK.U=olympe.dc.Ja.C('01631aacd8276ea98492',olympe.sc.query.mK);olympe.sc.query.Jf=class extends olympe.dc.CloudObject{};olympe.sc.query.Jf.U=olympe.dc.Ja.C('01631aacd8276ea98493',olympe.sc.query.Jf);olympe.sc.fG=class extends olympe.dc.CloudObject{};olympe.sc.fG.U=olympe.dc.Ja.C('018312ceeb3e93618a85',olympe.sc.fG);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.U=olympe.dc.Ja.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13a');
1821
- olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.U.tb('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.U.tb('017ffdd8f0b1e31fe13f');olympe.sc.workflow.jo=class extends olympe.sc.logic.ki{rS(){return this.C('017ffe02381f9fac5060')}uS(){return this.C('017ffe02381f9fac5061')}vS(){return this.C('017ffe02381f9fac5062')}xW(){return this.C('017ffe02381f9fac5065')}sS(){return this.D('017ffe02381f9fac5063')}tS(){return this.D('017ffe02381f9fac5064')}};olympe.sc.workflow.jo.U=Qp('017ffde21f5fe0f704ce',olympe.sc.workflow.jo);olympe.sc.workflow.jo.C='017ffe02381f9fac5060';olympe.sc.workflow.jo.xb='017ffe02381f9fac5061';
1814
+ function Wp(a,b,c,d,e,f){const g=n=>q(function*(){if(null!==n){e.cancel();let p;null==(p=l)||p();let r;null==(r=m)||r();try{const t=new Map(a.getOutputs().map(u=>[u,b.get(u)]));yield f.ai(t)}catch(t){const u=Error(`Error while trying to send the response of remote action ${a.Qe().name()} (${a.De()}): ${t}`);f.gu(u).catch(v=>{a.V.error(`Cannot reply with an error to a remote action call ${a.Qe().name()} (${a.De()}): ${v}`)})}finally{b.destroy()}}}),k=b.ja(),l=b.on(c,g,k),m=b.on(d,g,k)}
1815
+ olympe.sc.logic.It=class extends olympe.sc.logic.Function{constructor(a,b,c,d){super(a,b,c);this.timeout=d}run(a){Vo(a)||(this.db.Ac(this,olympe.sc.logic.It.C)?(lp(a.C,this),this.C(a)):(Ap(this,a),Vp(this,a)))}C(a){const b=this.De(),c=this.kg(),d=c.lJ().ka(),e=c.BC().ka(),f=c.CC().ka(),g=c.DC().ka();(new olympe.Y.de(b,a)).Bu().subscribe(rxjs.Subscriber.create(k=>{const l=a.wo('remote call'),m=k.body(),n=Wc(()=>{k.gu(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));l.destroy()},
1816
+ this.timeout);Wp(this,l,f,g,n,k);super.run(l);for(const [p,r]of m)p!==e&&l.set(p,r);k.qv().then(p=>{var r=l.get(d);null!==r&&olympe.dc.Ya(r)!==p&&(r=this.De(),this.V.warn(`Remote action ${this.db.name(r)} ${r}: try to run it with an input user that is not the real authenticated user.`));l.set(d,p);l.set(e,m.get(e))}).catch(p=>{const r=this.De();this.V.warn(`Remote action ${this.db.name(r)} ${r} Triggered by unrecognized user: ${p}.`);l.set(g,olympe.sc.logic.Error.create('Unrecognized User',1))})},
1817
+ k=>{const l=this.De();this.V.error(`Error while listening on remote action ${this.db.name(l)} (${l}): ${k.message}`)}))}};olympe.sc.logic.It.U=olympe.dc.Ja.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.It,olympe.sc.ba.Vb,new olympe.sa.zb(olympe.sc.pa.qK));olympe.sc.logic.It.C=olympe.sc.logic.It.U.fa('017a7b0c62a02a89444f');olympe.sc.logic.controllers={};olympe.sc.logic.controllers.qC=class{constructor(a){this.db=olympe.dc.eb();this.typeRel=a}};olympe.sc.logic.controllers.qC.C={$Z:-1,g0:1};olympe.sc.logic.controllers.b1=class extends olympe.sc.logic.controllers.qC{constructor(){super(olympe.sc.logic.Qh.C)}};olympe.sc.logic.controllers.i1=class extends olympe.sc.logic.controllers.qC{constructor(){super(olympe.sc.logic.qf.typeRel)}};olympe.sc.logic.gA={};olympe.sc.logic.gA.wU=class extends olympe.sc.logic.Function{update(a,[b],[c]){const d=olympe.dc.Ya(b);d?olympe.dc.nb.af(a,d,olympe.dc.Te.Wi).subscribe(()=>{c(olympe.dc.CloudObject.get(d))}):this.V.warn('Cannot subscribe to an instance with no tag: '+d)}};olympe.sc.logic.Ja.C('0174bf4b7e006e4b788a',olympe.sc.logic.gA.wU);olympe.sc.logic.actions={};olympe.sc.logic.gA.OS=class extends olympe.sc.logic.Function{run(a){Ap(this,a);const [b,c,d]=Ep(this,a);let e,f=null,g=null;const k=a.getParent(),l=()=>{null===g||0===e?(this.V.warn('No list to iter upon'),this.V.info(a.ja())):f<e?(b(g.ql(f)),f++,c(Date.now())):(np(k.C),d(Date.now()))};this.getInputs().forEach((m,n)=>a.on(m,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.aj();f=0;mp(k.C);l();break;case 2:l();break;default:this.V.error('Unhandled input')}},this.tag))}};
1818
+ olympe.sc.logic.Ja.C('0171889b060b6cd54300',olympe.sc.logic.gA.OS);olympe.sc.logic.ff={};olympe.sc.logic.ff.YB=class extends olympe.sc.logic.ki{ca(){return this.C('016ac638085357047a2d')}};olympe.sc.logic.ff.YB.U=Rp('0169b6876a03f14ae61b',olympe.sc.logic.ff.YB);olympe.sc.logic.ff.YB.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);let Xp=null;olympe.sc.logic.ff.rC=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63808535703691c')}O(a){if(null===Xp){let b;Xp=null!=(b=olympe.sa.getParameter('sc.event.experimental'))?b:!1}return Xp?a.observe(xp(this)[0]):super.O(a)}};olympe.sc.logic.ff.rC.U=Rp('0169b6876a03f139d50a',olympe.sc.logic.ff.rC);olympe.sc.logic.ff.rC.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ff.PC=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63809a9a8e6db96')}da(){return this.D('016ac6380ab003363b3e')}};Rp('01646ad602f933b8caaf',olympe.sc.logic.ff.PC);olympe.sc.logic.ff.PC.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ff.PC.prototype.da.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.ff.pz=class extends olympe.sc.logic.ki{ca(){return this.C('016ac6380bd98f1d91a0')}ma(){return this.D('016ac63c589ae38ca3ae')}da(){return this.D('016ac63c5a377fceabaa')}};Rp('0168ec42fc01747a98b6',olympe.sc.logic.ff.pz);olympe.sc.logic.ff.pz.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.logic.ff.pz.prototype.ma.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.ff.pz.prototype.da.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.logic.ff.ur=class extends olympe.sc.logic.ki{BC(){return this.C('017a7b07b09e3b22c8b4')}lJ(){return this.C('017a7b07ba05807a74b0')}CC(){return this.D('017a7b0818c12388d731')}DC(){return this.D('017a7b085146d5e69aec')}qS(){return olympe.j.ia.C}};olympe.sc.logic.ff.ur.$='017a7b07b09e3b22c8b4';olympe.sc.logic.ff.ur.Pa='017a7b07ba05807a74b0';olympe.sc.logic.ff.ur.za='017a7b0818c12388d731';olympe.sc.logic.ff.ur.C='017a7b085146d5e69aec';
1819
+ olympe.sc.logic.ff.ur.U=Rp('017a7b07a948e30508fa',olympe.sc.logic.ff.ur,olympe.sc.logic.It);h=olympe.sc.logic.ff.ur.prototype;h.BC.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.lJ.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.CC.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);h.DC.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);h.qS.K=olympe.j.J.T;olympe.sc.logic.ff.hL=class extends olympe.sc.logic.ki{ca(){return this.C('016ac63c5b3ed0562740')}};Rp('016a9766c230916ea5ec',olympe.sc.logic.ff.hL);olympe.sc.logic.ff.hL.prototype.ca.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);olympe.sc.query={};olympe.sc.query.wF=class extends olympe.sc.Be{};olympe.sc.query.wF.U=olympe.dc.Ja.C('01631aacd8276ea98491',olympe.sc.query.wF);olympe.sc.query.YJ=class extends olympe.dm.Enum{};olympe.sc.query.YJ.U=olympe.dc.Ja.C('01631aacd8276ea98495',olympe.sc.query.YJ);olympe.sc.query.jK=class extends olympe.dm.Enum{};olympe.sc.query.jK.U=olympe.dc.Ja.C('01631aacd8276ea98494',olympe.sc.query.jK);olympe.sc.query.mK=class extends olympe.sc.Be{};olympe.sc.query.mK.U=olympe.dc.Ja.C('01631aacd8276ea98492',olympe.sc.query.mK);olympe.sc.query.Jf=class extends olympe.dc.CloudObject{};olympe.sc.query.Jf.U=olympe.dc.Ja.C('01631aacd8276ea98493',olympe.sc.query.Jf);olympe.sc.fG=class extends olympe.dc.CloudObject{};olympe.sc.fG.U=olympe.dc.Ja.C('018312ceeb3e93618a85',olympe.sc.fG);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.U=olympe.dc.Ja.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13a');
1820
+ olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.U.fa('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.U.tb('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.U.tb('017ffdd8f0b1e31fe13f');olympe.sc.workflow.jo=class extends olympe.sc.logic.ki{rS(){return this.C('017ffe02381f9fac5060')}uS(){return this.C('017ffe02381f9fac5061')}vS(){return this.C('017ffe02381f9fac5062')}xW(){return this.C('017ffe02381f9fac5065')}sS(){return this.D('017ffe02381f9fac5063')}tS(){return this.D('017ffe02381f9fac5064')}};olympe.sc.workflow.jo.U=Rp('017ffde21f5fe0f704ce',olympe.sc.workflow.jo);olympe.sc.workflow.jo.C='017ffe02381f9fac5060';olympe.sc.workflow.jo.xb='017ffe02381f9fac5061';
1822
1821
  olympe.sc.workflow.jo.Eb='017ffe02381f9fac5062';olympe.sc.workflow.jo.za='017ffe02381f9fac5065';olympe.sc.workflow.jo.$='017ffe02381f9fac5063';olympe.sc.workflow.jo.Pa='017ffe02381f9fac5064';h=olympe.sc.workflow.jo.prototype;h.rS.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.uS.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.vS.K=new olympe.j.J(()=>olympe.sc.logic.ie,[]);h.xW.K=new olympe.j.J(()=>Map,[]);h.sS.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);h.tS.K=new olympe.j.J(()=>olympe.sc.logic.Le,[]);olympe.sc.workflow.wm=class extends olympe.dm.BrickMetadata{og(){return this.Ig(olympe.sc.workflow.Workflow.statesRel.fe(),olympe.sc.workflow.Workflow).bb().concat(['.',this.bb()])}};olympe.sc.workflow.wm.U=olympe.dc.Ja.C('017ffdc2dda51d46b430',olympe.sc.workflow.wm);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{D(){return this.xA(olympe.sc.workflow.Transition.processRefProp)}C(){return this.Ig(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.wm)}O(){return this.Ig(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.wm)}og(){const a=this.Ig(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.wm);return a.Ig(olympe.sc.workflow.Workflow.statesRel.fe(),olympe.sc.workflow.Workflow).bb().concat(['.',a.bb(),'->',this.bb()])}};
1823
1822
  olympe.sc.workflow.Transition.U=olympe.dc.Ja.C('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.U.fa('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.U.tb('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.U.tb('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.D.K=new olympe.j.J(()=>olympe.dc.CloudObject,[]);
1824
1823
  olympe.sc.workflow.Transition.prototype.C.K=new olympe.j.J(()=>olympe.sc.workflow.wm,[]);olympe.sc.workflow.Transition.prototype.O.K=new olympe.j.J(()=>olympe.sc.workflow.wm,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{Di(){return olympe.sc.jf.Yi.Ys}O(){return this.Vm(olympe.sc.workflow.Workflow.serializationEnabledProp)}C(){return this.Ig(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.qg)}D(){return this.Ig(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.wm)}};olympe.sc.workflow.Workflow.U=olympe.dc.Ja.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.U.fa('017ffdc010e5bcc9c972');
@@ -1827,82 +1826,82 @@ olympe.sc.workflow.Workflow.prototype.D.K=new olympe.j.J(()=>olympe.sc.workflow.
1827
1826
  olympe.sc.Fb.Fd.U=olympe.dc.Ja.C('011203300000000adef5',olympe.sc.Fb.Fd);olympe.sc.Fb.Fd.Yt=olympe.sc.Fb.Fd.U.fa('011203300000000adef6');olympe.sc.Fb.Fd.ma=olympe.sc.Fb.Fd.U.fa('011203300000000adef7');olympe.sc.Fb.Fd.C=olympe.sc.Fb.Fd.U.fa('011203300000000adef8');olympe.sc.Fb.Fd.R=olympe.sc.Fb.Fd.U.fa('011203300000000adef9');olympe.sc.Fb.Fd.da=olympe.sc.Fb.Fd.U.fa('011203300000000adefa');olympe.sc.Fb.Fd.$=olympe.sc.Fb.Fd.U.fa('011203300000000adefb');olympe.sc.Fb.Fd.D=olympe.sc.Fb.Fd.U.fa('011203300000000adefc');
1828
1827
  olympe.sc.Fb.Fd.ca=olympe.sc.Fb.Fd.U.fa('011203300000000adefd');olympe.sc.Fb.Fd.T=olympe.sc.Fb.Fd.U.fa('011203300000000adefe');olympe.sc.Fb.Fd.W=olympe.sc.Fb.Fd.U.fa('011203300000000adeff');olympe.sc.Fb.Fd.O=olympe.sc.Fb.Fd.U.fa('011203300000000adee0');olympe.sc.Fb.Fd.Vf={INIT:0,MZ:1,v1:2,q1:3,p1:4,w1:5,we:9};h=olympe.sc.Fb.Fd.prototype;h.xS.K=olympe.j.J.T;h.aY.K=olympe.j.J.T;h.jh.K=olympe.j.J.D;h.HW.K=olympe.j.J.R;h.kX.K=olympe.j.J.R;h.jX.K=olympe.j.J.R;h.yo.K=olympe.j.J.R;h.YW.K=olympe.j.J.R;
1829
1828
  h.hW.K=olympe.j.J.R;h.hX.K=olympe.j.J.R;h.wS.K=olympe.j.J.R;olympe.sc.Fb.nC=class extends olympe.sc.Fb.Ss{ue(a){a.set(olympe.sc.Hb.C.wB,!0);super.ue(a)}Ha(){return!0}};olympe.sc.Fb.nC.U=olympe.dc.Ja.C('0113032000000aca1102',olympe.sc.Fb.nC,olympe.sc.ba.Vb);olympe.sc.Fb.vm=class extends olympe.sc.Fb.Pg{C(){return(new olympe.dc.Mp(this.ka(),olympe.sc.Fb.Fd)).oc(olympe.sc.Fb.vm.$).ek().Vd()}};olympe.sc.Fb.vm.U=olympe.dc.Ja.C('011203300000000adef3',olympe.sc.Fb.vm);olympe.sc.Fb.vm.$=olympe.sc.Fb.vm.U.tb('011203300000000adef4');Y(olympe.sc.Fb.Fd.U,olympe.sc.Fb.vm.$);
1830
- olympe.sc.Fb.vm.U.C=(a,b,c)=>{b=Gn(a,b||'New Service Application model',olympe.sc.Fb.vm,olympe.sc.Fb.nC);a.Qb(olympe.sc.Fb.Pg.C,b,c);c=a.create(olympe.sc.Fb.Fd).ka();a.Qb(olympe.sc.Fb.vm.$,b,c);return b.ka()};olympe.sc.Fb.vm.prototype.C.K=new olympe.j.J(()=>olympe.sc.Fb.Fd,[]);olympe.sc.Dr=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.Dr.U=olympe.dc.Ja.C('011203300000000adf00',olympe.sc.Dr);olympe.sc.Dr.D=olympe.sc.Dr.U.fa('011203300000000adf01');olympe.sc.Dr.C=olympe.sc.Dr.U.fa('011203300000000adf02');olympe.sc.Dr.O='011203300000000adf0f';olympe.sc.Pq={};olympe.sc.Pq.RX=a=>{var b=a.C;const c=olympe.dc.eb();var d=null;var e=null===Kp;for(const f of b.xg())if((b=f.Qe())&&f.O()&&f.Sd()===olympe.dc.Jc.SERVER&&un(a,f.tag())&&c.me(b,olympe.sc.qg)){if(!e)throw new olympe.dc.PJ;let g,k;null==d&&(d=null,null!==Jp?d=Jp:'string'===typeof Ip&&(d=olympe.dc.Rh.from(Ip).oc(olympe.sc.Fb.Pg.C).oc(olympe.sc.On.C.fe()).zf()),d=null==(g=d)?void 0:g.ka());d=null!=(k=d)?k:null;if(null===d)throw Error(`No business container for new instance of ${olympe.dc.Ya(b)}`);a.Qb(olympe.sc.On.D.ka(),
1829
+ olympe.sc.Fb.vm.U.C=(a,b,c)=>{b=Hn(a,b||'New Service Application model',olympe.sc.Fb.vm,olympe.sc.Fb.nC);a.Qb(olympe.sc.Fb.Pg.C,b,c);c=a.create(olympe.sc.Fb.Fd).ka();a.Qb(olympe.sc.Fb.vm.$,b,c);return b.ka()};olympe.sc.Fb.vm.prototype.C.K=new olympe.j.J(()=>olympe.sc.Fb.Fd,[]);olympe.sc.Dr=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.Dr.U=olympe.dc.Ja.C('011203300000000adf00',olympe.sc.Dr);olympe.sc.Dr.D=olympe.sc.Dr.U.fa('011203300000000adf01');olympe.sc.Dr.C=olympe.sc.Dr.U.fa('011203300000000adf02');olympe.sc.Dr.O='011203300000000adf0f';olympe.sc.Pq={};olympe.sc.Pq.RX=a=>{var b=a.C;const c=olympe.dc.eb();var d=null;var e=null===Lp;for(const f of b.xg())if((b=f.Qe())&&f.O()&&f.Sd()===olympe.dc.Jc.SERVER&&vn(a,f.tag())&&c.me(b,olympe.sc.qg)){if(!e)throw new olympe.dc.PJ;let g,k;null==d&&(d=null,null!==Kp?d=Kp:'string'===typeof Jp&&(d=olympe.dc.Rh.from(Jp).oc(olympe.sc.Fb.Pg.C).oc(olympe.sc.On.C.fe()).zf()),d=null==(g=d)?void 0:g.ka());d=null!=(k=d)?k:null;if(null===d)throw Error(`No business container for new instance of ${olympe.dc.Ya(b)}`);a.Qb(olympe.sc.On.D.ka(),
1831
1830
  d,f.tag())}};
1832
1831
  olympe.sc.Pq.cY=a=>{const b=a.C,c=olympe.dc.eb();for(const d of b.xg()){const e=d.Qe();e&&!d.$h()&&c.me(e,olympe.sc.qg)&&d.be().forEach((f,g)=>{if(f instanceof olympe.dc.Kf){const m=b.ih(f.ka());if(null===m)throw Error(`Try to assign an instance as complex property which is not created within the same transaction: ${f.ka()}`);var k;f=null!=(k=null==m?void 0:m.Qe())?k:null;k=m.tag();let n;if(f===olympe.dc.Ya(olympe.sc.ri)){k=m.Wd(olympe.sc.ri.C);if(!k)throw Error('No object reference found for new ObjectRef');var l;
1833
- let p;f=null!=(p=null==(l=b.ih(k))?void 0:l.Qe())?p:c.model(k)}if(c.Xm(f,olympe.dm.$k)){l=Qo(f);let p;n=null!=(p=m.Ac(l.ka()))?p:c.Ac(k,l)}if(void 0===n)throw Error(`Try to set a complex property to an instance of a DataType: ${c.name(e)} (${e})`);a.oh(d.tag(),new Map([[g,n]]));zn(a,m.tag(),olympe.dc.Te.Qg)}})}};
1832
+ let p;f=null!=(p=null==(l=b.ih(k))?void 0:l.Qe())?p:c.model(k)}if(c.Xm(f,olympe.dm.$k)){l=Ro(f);let p;n=null!=(p=m.Ac(l.ka()))?p:c.Ac(k,l)}if(void 0===n)throw Error(`Try to set a complex property to an instance of a DataType: ${c.name(e)} (${e})`);a.oh(d.tag(),new Map([[g,n]]));An(a,m.tag(),olympe.dc.Te.Qg)}})}};
1834
1833
  olympe.sc.Pq.DV=a=>{const b=a.C,c=olympe.dc.eb(),d=new Set;for(var e of b.je.values()){a=e.tag();let f;const g=null!=(f=e.Qe())?f:c.model(a);if(null!==g&&e.kc()&&(d.has(g)||c.me(g,olympe.sc.qg))){d.add(g);const k=Array.from(e.Ha()).flatMap(([l,,m,n])=>n&&l!==olympe.dc.Lf.sh?[m]:[]).find(l=>{let m,n;const p=null!=(n=null==(m=b.ih(l))?void 0:m.Qe())?n:c.model(l);return!p||!(d.has(p)||c.me(p,olympe.sc.qg))});if(void 0!==k){let l,m,n;e=null!=(n=null!=(m=null==(l=b.ih(k))?void 0:l.Qe())?m:c.model(k))?
1835
- n:'unknown';throw Error(`Try to link an instance (${a}) of DataType ${c.name(g)} (${g}) to an instance which is not (${k}) a DataType: ${c.name(e)} (${e})`);}}}};olympe.sc.Pq.qY=a=>{var b=a.C;const c=olympe.dc.eb();for(const d of b.xg()){b=d.tag();const e=d.Qe();if(e&&!c.me(e,olympe.sc.qg)&&un(a,b))throw Error(`You are trying to persist an instance of : ${c.name(e)} (${e}), but only instances of DataType can be persisted`);}};
1836
- olympe.sa.run([olympe.dc.transaction.ba.Ob],a=>{Mn(Mn(Mn(a,olympe.sc.Pq.DV,'businessDataRelations'),olympe.sc.Pq.RX,'linkBusinessContainer'),olympe.sc.Pq.cY,'noBusinessComplexProperty')});olympe.sc.Dy=class extends olympe.dm.BrickMetadata{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.Dy.U=olympe.dc.Ja.C('01645fe6873aeea59e64',olympe.sc.Dy);olympe.sc.Dy.C=olympe.sc.Dy.U.tb('017ed8ac775f48d4d589');olympe.sc.aG=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.aG.U=olympe.dc.Ja.C('0163a68ce44f3d1fa95d',olympe.sc.aG);olympe.sc.Ws=class extends olympe.dm.BrickMetadata{};olympe.sc.Ws.U=olympe.dc.Ja.C('016324fde11a836f77d3',olympe.sc.Ws);olympe.sc.Ws.C=olympe.sc.qg.U.tb('016324fde11a836088d3');olympe.sc.Ws.U.C=(a,b)=>Gn(a,null!=b?b:'New config type',olympe.sc.Ws).ka();olympe.sc.XZ=class{};olympe.sc.Ky=class extends olympe.dm.BrickMetadata{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.Ky.U=olympe.dc.Ja.C('017dc8d6c8fd8c8bd2ff',olympe.sc.Ky);olympe.sc.Ky.U.C=(a,b)=>Gn(a,null!=b?b:'New data connector',olympe.sc.Ky,olympe.dm.DataSource).ka();function Gp(a,b){return`delegated^${olympe.dc.Ya(a)}^${olympe.dc.Ya(b)}`}olympe.sc.gg=class extends olympe.sc.Runnable{Pa(){return this.pc(olympe.sc.gg.O,olympe.sc.Runnable)}za(){return this.pc(olympe.sc.gg.C,olympe.dm.Property)}};olympe.sc.gg.U=Nh(olympe.dc.Ja.C('016c2d996d9ca27fa9d8',olympe.sc.gg));olympe.sc.gg.O=olympe.sc.gg.U.tb('016c3cb7742ec9309e0b');olympe.sc.gg.C=olympe.sc.gg.U.tb('016c42d3454636f90533');olympe.sc.gg.prototype.Pa.K=new olympe.j.J(()=>olympe.dc.Kb,[]);
1837
- olympe.sc.gg.prototype.za.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.HG=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.HG.U=olympe.dc.Ja.C('017a7a9ff057958e5678',olympe.sc.HG);olympe.sc.Ev=class extends olympe.dm.Enum{static create(a,b,c,d,e){const f=olympe.dc.eb();e=void 0!==e?e:f.tc(b)&&f.xg(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.sc.Ev.create=olympe.sc.Ev.create;olympe.sc.Ev.U=olympe.dc.Ja.C('016cdd861b32d56c8208',olympe.sc.Ev);olympe.sc.GJ=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.oD}};olympe.sc.GJ.U=olympe.dc.Ja.C('01644b6d4543b344b857',olympe.sc.GJ);olympe.sc.HJ=class extends olympe.dc.CloudObject{};olympe.sc.HJ.U=olympe.dc.Ja.C('0162f672366be5ca7a86',olympe.sc.HJ);const Xp={FG:30};olympe.sc.Mf=class extends olympe.dc.sources.Mf{D(a){return a instanceof olympe.sc.logic.Error?Ge(Xp.FG,{c:a.code,m:a.message,s:a.tk()}):super.D(a)}C(a){return(null==a?void 0:a.t)===Xp.FG?(a=a.v,Xo(a.m,a.c,a.s)):super.C(a)}R(a){super.R(a);if(this.db.model(a)===olympe.sc.ri.U.ka()){const b=olympe.sc.ri.C;this.O.get(a).r.push({r:b.ka(),o:a,d:this.db.Wd(a,b)})}return a}};function Yp(a,b,c,d){const e=Gp(a,c);olympe.j.Wa([d],f=>{b.set(e,f)});olympe.j.yb().Ve(()=>{b.remove(e)})}olympe.sc.Br=class extends olympe.sc.gg{};olympe.sc.Br.U=olympe.dc.Ja.C('016d3f37610ae4fc3962',olympe.sc.Br);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.U=olympe.dc.Ja.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Tc=class{constructor(a=!0){a=Dn(a);a.T=!0;var b=olympe.sc.Pq.qY;let c;(null==(c=olympe.sa.getParameter(olympe.dc.transaction.pa.UB))?0:c.includes('persistenceBusinessDataOnly'))||a.W.push(b);this.C=a;this.D=[];this.source=null}static from(a){const b=olympe.sc.Hb.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Tc}static process(a,b){return a.has(olympe.sc.Hb.C.TRANSACTION,!0)?Promise.resolve(!1):b.Kd().then(()=>!0)}ja(){return this.C.ja()}create(a,b=new Map,c=this.source,d){c=
1834
+ n:'unknown';throw Error(`Try to link an instance (${a}) of DataType ${c.name(g)} (${g}) to an instance which is not (${k}) a DataType: ${c.name(e)} (${e})`);}}}};olympe.sc.Pq.qY=a=>{var b=a.C;const c=olympe.dc.eb();for(const d of b.xg()){b=d.tag();const e=d.Qe();if(e&&!c.me(e,olympe.sc.qg)&&vn(a,b))throw Error(`You are trying to persist an instance of : ${c.name(e)} (${e}), but only instances of DataType can be persisted`);}};
1835
+ olympe.sa.run([olympe.dc.transaction.ba.Ob],a=>{Nn(Nn(Nn(a,olympe.sc.Pq.DV,'businessDataRelations'),olympe.sc.Pq.RX,'linkBusinessContainer'),olympe.sc.Pq.cY,'noBusinessComplexProperty')});olympe.sc.Dy=class extends olympe.dm.BrickMetadata{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.Dy.U=olympe.dc.Ja.C('01645fe6873aeea59e64',olympe.sc.Dy);olympe.sc.Dy.C=olympe.sc.Dy.U.tb('017ed8ac775f48d4d589');olympe.sc.aG=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.aG.U=olympe.dc.Ja.C('0163a68ce44f3d1fa95d',olympe.sc.aG);olympe.sc.Ws=class extends olympe.dm.BrickMetadata{};olympe.sc.Ws.U=olympe.dc.Ja.C('016324fde11a836f77d3',olympe.sc.Ws);olympe.sc.Ws.C=olympe.sc.qg.U.tb('016324fde11a836088d3');olympe.sc.Ws.U.C=(a,b)=>Hn(a,null!=b?b:'New config type',olympe.sc.Ws).ka();olympe.sc.XZ=class{};olympe.sc.Ky=class extends olympe.dm.BrickMetadata{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.Ky.U=olympe.dc.Ja.C('017dc8d6c8fd8c8bd2ff',olympe.sc.Ky);olympe.sc.Ky.U.C=(a,b)=>Hn(a,null!=b?b:'New data connector',olympe.sc.Ky,olympe.dm.DataSource).ka();function Hp(a,b){return`delegated^${olympe.dc.Ya(a)}^${olympe.dc.Ya(b)}`}olympe.sc.gg=class extends olympe.sc.Runnable{Pa(){return this.pc(olympe.sc.gg.O,olympe.sc.Runnable)}za(){return this.pc(olympe.sc.gg.C,olympe.dm.Property)}};olympe.sc.gg.U=Nh(olympe.dc.Ja.C('016c2d996d9ca27fa9d8',olympe.sc.gg));olympe.sc.gg.O=olympe.sc.gg.U.tb('016c3cb7742ec9309e0b');olympe.sc.gg.C=olympe.sc.gg.U.tb('016c42d3454636f90533');olympe.sc.gg.prototype.Pa.K=new olympe.j.J(()=>olympe.dc.Kb,[]);
1836
+ olympe.sc.gg.prototype.za.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.HG=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.Ys}};olympe.sc.HG.U=olympe.dc.Ja.C('017a7a9ff057958e5678',olympe.sc.HG);olympe.sc.Ev=class extends olympe.dm.Enum{static create(a,b,c,d,e){const f=olympe.dc.eb();e=void 0!==e?e:f.tc(b)&&f.xg(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.sc.Ev.create=olympe.sc.Ev.create;olympe.sc.Ev.U=olympe.dc.Ja.C('016cdd861b32d56c8208',olympe.sc.Ev);olympe.sc.GJ=class extends olympe.dm.Ye{Di(){return olympe.sc.jf.Yi.oD}};olympe.sc.GJ.U=olympe.dc.Ja.C('01644b6d4543b344b857',olympe.sc.GJ);olympe.sc.HJ=class extends olympe.dc.CloudObject{};olympe.sc.HJ.U=olympe.dc.Ja.C('0162f672366be5ca7a86',olympe.sc.HJ);const Yp={FG:30};olympe.sc.Mf=class extends olympe.dc.sources.Mf{D(a){return a instanceof olympe.sc.logic.Error?Ge(Yp.FG,{c:a.code,m:a.message,s:a.tk()}):super.D(a)}C(a){return(null==a?void 0:a.t)===Yp.FG?(a=a.v,Yo(a.m,a.c,a.s)):super.C(a)}R(a){super.R(a);if(this.db.model(a)===olympe.sc.ri.U.ka()){const b=olympe.sc.ri.C;this.O.get(a).r.push({r:b.ka(),o:a,d:this.db.Wd(a,b)})}return a}};function Zp(a,b,c,d){const e=Hp(a,c);olympe.j.Wa([d],f=>{b.set(e,f)});olympe.j.yb().Ve(()=>{b.remove(e)})}olympe.sc.Br=class extends olympe.sc.gg{};olympe.sc.Br.U=olympe.dc.Ja.C('016d3f37610ae4fc3962',olympe.sc.Br);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.U=olympe.dc.Ja.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Tc=class{constructor(a=!0){a=En(a);a.T=!0;var b=olympe.sc.Pq.qY;let c;(null==(c=olympe.sa.getParameter(olympe.dc.transaction.pa.UB))?0:c.includes('persistenceBusinessDataOnly'))||a.W.push(b);this.C=a;this.D=[];this.source=null}static from(a){const b=olympe.sc.Hb.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Tc}static process(a,b){return a.has(olympe.sc.Hb.C.TRANSACTION,!0)?Promise.resolve(!1):b.Kd().then(()=>!0)}ja(){return this.C.ja()}create(a,b=new Map,c=this.source,d){c=
1838
1837
  'string'===typeof c?c:olympe.dc.Kj().fromModel(a);a=this.C.create(a,d).ne(c);for(const [e,f]of b)Z(a,e,f);b=a.ka();this.D.push(b);return b}update(a,b,c){this.C.update(a,b,c);return this}HO(a,b){a=this.C.update(a);for(const [c,d]of b)b=d,a.Ji.set(olympe.dc.Ya(c),b);return this}delete(a){this.C.delete(a);return this}Qb(a,b,c){this.C.Qb(a,b,c);return this}Xf(a,b,c){this.C.Xf(a,b,c);return this}JD(a,b){this.C.JD(a,b);return this}persist(a,b=!0){this.C.persist(a,b);return this}pY(a,b=!0){olympe.gb.Cb('dc').warn('Transaction#persistInstance() has been deprecated. Please use Transaction#persist() instead.');
1839
- return this.persist(a,b)}ne(a){this.source=a;return this}model(a){return this.C.model(a)}merge(a){En(this.C,a.C);return this}AD(a){this.C.AD(a);return this}Kd(){return new Promise((a,b)=>{this.C.Kd((c,d)=>{c?a(new olympe.sc.sw(this.D)):b(d)})})}KD(){return new Promise((a,b)=>{this.C.KD((c,d)=>{c?a(new olympe.sc.sw(this.D)):b(d)})})}};olympe.sc.Tc.prototype.executeAsLarge=olympe.sc.Tc.prototype.KD;olympe.sc.Tc.prototype.execute=olympe.sc.Tc.prototype.Kd;olympe.sc.Tc.prototype.afterExecution=olympe.sc.Tc.prototype.AD;
1838
+ return this.persist(a,b)}ne(a){this.source=a;return this}model(a){return this.C.model(a)}merge(a){Fn(this.C,a.C);return this}AD(a){this.C.AD(a);return this}Kd(){return new Promise((a,b)=>{this.C.Kd((c,d)=>{c?a(new olympe.sc.sw(this.D)):b(d)})})}KD(){return new Promise((a,b)=>{this.C.KD((c,d)=>{c?a(new olympe.sc.sw(this.D)):b(d)})})}};olympe.sc.Tc.prototype.executeAsLarge=olympe.sc.Tc.prototype.KD;olympe.sc.Tc.prototype.execute=olympe.sc.Tc.prototype.Kd;olympe.sc.Tc.prototype.afterExecution=olympe.sc.Tc.prototype.AD;
1840
1839
  olympe.sc.Tc.prototype.merge=olympe.sc.Tc.prototype.merge;olympe.sc.Tc.prototype.model=olympe.sc.Tc.prototype.model;olympe.sc.Tc.prototype.setSource=olympe.sc.Tc.prototype.ne;olympe.sc.Tc.prototype.persistInstance=olympe.sc.Tc.prototype.pY;olympe.sc.Tc.prototype.persist=olympe.sc.Tc.prototype.persist;olympe.sc.Tc.prototype.deleteAllRelations=olympe.sc.Tc.prototype.JD;olympe.sc.Tc.prototype.deleteRelation=olympe.sc.Tc.prototype.Xf;olympe.sc.Tc.prototype.createRelation=olympe.sc.Tc.prototype.Qb;
1841
- olympe.sc.Tc.prototype['delete']=olympe.sc.Tc.prototype.delete;olympe.sc.Tc.prototype.multiUpdate=olympe.sc.Tc.prototype.HO;olympe.sc.Tc.prototype.update=olympe.sc.Tc.prototype.update;olympe.sc.Tc.prototype.create=olympe.sc.Tc.prototype.create;olympe.sc.Tc.prototype.getId=olympe.sc.Tc.prototype.ja;olympe.sc.Tc.process=olympe.sc.Tc.process;olympe.sc.Tc.from=olympe.sc.Tc.from;olympe.sc.sw=class{constructor(a){this.C=a}tW(){return this.C.map(olympe.dc.CloudObject.get)}};olympe.sc.sw.prototype.getCreatedObjects=olympe.sc.sw.prototype.tW;olympe.Af={};olympe.Af.uF=class{run(){}};function Zp(a,b='default'){return a.C===b}
1840
+ olympe.sc.Tc.prototype['delete']=olympe.sc.Tc.prototype.delete;olympe.sc.Tc.prototype.multiUpdate=olympe.sc.Tc.prototype.HO;olympe.sc.Tc.prototype.update=olympe.sc.Tc.prototype.update;olympe.sc.Tc.prototype.create=olympe.sc.Tc.prototype.create;olympe.sc.Tc.prototype.getId=olympe.sc.Tc.prototype.ja;olympe.sc.Tc.process=olympe.sc.Tc.process;olympe.sc.Tc.from=olympe.sc.Tc.from;olympe.sc.sw=class{constructor(a){this.C=a}tW(){return this.C.map(olympe.dc.CloudObject.get)}};olympe.sc.sw.prototype.getCreatedObjects=olympe.sc.sw.prototype.tW;olympe.Af={};olympe.Af.uF=class{run(){}};function $p(a,b='default'){return a.C===b}
1842
1841
  olympe.Af.Cc=class{constructor(a,b){this.C=a;this.V=b;this.D=null;this.O='';this.V.info('HC Manager will execute application registered as:',this.C)}Jq(a,b,c=''){b||(b='default');b===this.C?(null===this.D?this.V.log('Application',c,'designated to be launched'):this.V.log('OVERRIDE: Application',c,'designated to be launched'),this.D=a,this.O=c):this.V.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.C)}run(){null!==this.D?(this.V.info('Running application:',this.O),
1843
- this.D.run()):this.V.error('No app registered under name: '+this.C)}};olympe.Af.Jq=function(a,b,c='default'){const d=a.Cb();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.Af.pa.Zl+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.kg(olympe.Af.ba.Ob).$e(c,[b],(e,f)=>f.Jq(e,c,b),e=>Zp(e,c),'olympe.hc.registerApp')};olympe.Af.ba={Ob:'hc.Manager',Vb:'hc.Logger'};olympe.Af.pa={Zl:'hc.app',aH:'hc.globalToken'};olympe.sa.$e(function(a){E(a,olympe.Af.pa.Zl,'default');E(a,olympe.Af.pa.aH,!1);C(a,olympe.Af.ba.Vb,[olympe.gb.ba.Ob],b=>b.Vg('hc'));C(a,olympe.Bc.ba.Ar,[new olympe.sa.zb(olympe.Af.pa.Zl)],b=>b);C(a,olympe.xa.ba.vB,[olympe.Bc.ba.Ar,new olympe.sa.zb(olympe.Af.pa.aH)],(b,c)=>new olympe.xa.vF(c?'':b));B(a,olympe.Af.ba.Ob,olympe.Af.Cc,new olympe.sa.zb(olympe.Af.pa.Zl),olympe.Af.ba.Vb)},'olympe.hc');
1844
- olympe.sa.run([olympe.Af.ba.Ob],a=>a.run(),'olympe.hc');olympe.sc.ve={};function $p(a){if(a.Ha)return a.V.debug('Sending getContext request'),xk(a.Ka).then(()=>{a.V.debug('synchronisation request successful');var f=a.C;Kp=null;Ip=f}).catch(f=>{a.V.error('failed to synchronise (authenticated) with server: '+f.message)});const b=Vo(a.D);!b&&Mm();a.V.debug((b?'PULLING':'SUBSCRIBING')+' application '+a.C);const c=a.D.se(),d=new Promise((f,g)=>{const k=olympe.dc.eb(),l=new olympe.j.ee('Primordial Subscription Context',c);kk(l,a.C,m=>{m=k.zu(m)?m:k.model(m);return null!==m&&
1845
- k.me(m,olympe.sc.Ws)},{Xg:aq(b),kB:!0,DO:!0}).subscribe(rxjs.Subscriber.create(c.re(()=>{k.me(a.C,olympe.sc.Fb.Pg)?(a.Oa.$(a.C,b),f()):xd(a.O)?g(Error(`The specified application tag (${a.C}) is not an application or does not exist`)):(l.destroy(),a.O.connect().catch(m=>{g(Error(`Failed to load the app while offline, you might want to try again when online: ${m}`))}))}),m=>g(m)))}),e=new Promise(f=>{olympe.j.Wa([a.T.wk()],g=>{const k=aq(b,!1);olympe.dc.nb.Em(g,olympe.dm.User,olympe.dc.Jc.SERVER).observe(c,
1846
- {Xg:k,$z:'__code-as-data__'}).subscribe(()=>f())})});return Promise.all([d,e]).then(()=>{if(a.Pa)return bq(a);bq(a).then(()=>{})})}
1847
- function cq(a){a.V.info('Starting application '+a.C);const b=olympe.dc.eb();if(0<a.C.length){const c=qh(b,a.C,a.D.se().re((f,g)=>{if(f)if(f=yp(g),f instanceof olympe.sc.Fb.Ss){a.V.debug('application retrieved: running');g=Ro(a.D,f);const k=new olympe.sc.$c.ET(a.W);mb(a.W,()=>ep(a.D.C,k));nb(a.W,()=>{var l=k.ja();return gp(a.D.C,l)});a.xb&&a.W.start();f.run(g);'string'===typeof a.Eb&&(new olympe.sc.uj).da(f.ka(),g,a.V);g.qB(olympe.sc.Hb.C.wB).then(()=>{let l;null==(l=d)||l.cancel();a.ob.update(olympe.j.ia.C);
1848
- a.ca()})}else a.V.error('application retrieved: not an Application with a run() method');else dq(a)}));olympe.j.yb().onDestroy(()=>{nh(b,a.C,c)});const d=Wc(()=>{a.V.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},3E4);let e;null==(e=a.qc)||e.start()}}function aq(a,b=!0){return a?olympe.dc.nb.Jf.Qp:b?olympe.dc.nb.Jf.cm:olympe.dc.nb.Jf.vz}
1849
- function bq(a){return q(function*(){eq(a.C)&&(yield Lp(a.C,a.Pa).catch(b=>{throw Error(`Failed to load the business container for the application ${a.C}: ${b}`);}))})}function dq(a){a.V.info('Stop the application');a.D.se().xo()}
1842
+ this.D.run()):this.V.error('No app registered under name: '+this.C)}};olympe.Af.Jq=function(a,b,c='default'){const d=a.Cb();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.Af.pa.Zl+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.kg(olympe.Af.ba.Ob).$e(c,[b],(e,f)=>f.Jq(e,c,b),e=>$p(e,c),'olympe.hc.registerApp')};olympe.Af.ba={Ob:'hc.Manager',Vb:'hc.Logger'};olympe.Af.pa={Zl:'hc.app',aH:'hc.globalToken'};olympe.sa.$e(function(a){E(a,olympe.Af.pa.Zl,'default');E(a,olympe.Af.pa.aH,!1);C(a,olympe.Af.ba.Vb,[olympe.gb.ba.Ob],b=>b.Vg('hc'));C(a,olympe.Bc.ba.Ar,[new olympe.sa.zb(olympe.Af.pa.Zl)],b=>b);C(a,olympe.xa.ba.vB,[olympe.Bc.ba.Ar,new olympe.sa.zb(olympe.Af.pa.aH)],(b,c)=>new olympe.xa.vF(c?'':b));B(a,olympe.Af.ba.Ob,olympe.Af.Cc,new olympe.sa.zb(olympe.Af.pa.Zl),olympe.Af.ba.Vb)},'olympe.hc');
1843
+ olympe.sa.run([olympe.Af.ba.Ob],a=>a.run(),'olympe.hc');olympe.sc.ve={};function aq(a){if(a.Ha)return a.V.debug('Sending getContext request'),yk(a.Ka).then(()=>{a.V.debug('synchronisation request successful');var f=a.C;Lp=null;Jp=f}).catch(f=>{a.V.error('failed to synchronise (authenticated) with server: '+f.message)});const b=Wo(a.D);!b&&Nm();a.V.debug((b?'PULLING':'SUBSCRIBING')+' application '+a.C);const c=a.D.se(),d=new Promise((f,g)=>{const k=olympe.dc.eb(),l=new olympe.j.ee('Primordial Subscription Context',c);lk(l,a.C,m=>{m=k.zu(m)?m:k.model(m);return null!==m&&
1844
+ k.me(m,olympe.sc.Ws)},{Xg:bq(b),kB:!0,DO:!0}).subscribe(rxjs.Subscriber.create(c.re(()=>{k.me(a.C,olympe.sc.Fb.Pg)?(a.Oa.$(a.C,b),f()):xd(a.O)?g(Error(`The specified application tag (${a.C}) is not an application or does not exist`)):(l.destroy(),a.O.connect().catch(m=>{g(Error(`Failed to load the app while offline, you might want to try again when online: ${m}`))}))}),m=>g(m)))}),e=new Promise(f=>{olympe.j.Wa([a.T.wk()],g=>{const k=bq(b,!1);olympe.dc.nb.Em(g,olympe.dm.User,olympe.dc.Jc.SERVER).observe(c,
1845
+ {Xg:k,$z:'__code-as-data__'}).subscribe(()=>f())})});return Promise.all([d,e]).then(()=>{if(a.Pa)return cq(a);cq(a).then(()=>{})})}
1846
+ function dq(a){a.V.info('Starting application '+a.C);const b=olympe.dc.eb();if(0<a.C.length){const c=qh(b,a.C,a.D.se().re((f,g)=>{if(f)if(f=zp(g),f instanceof olympe.sc.Fb.Ss){a.V.debug('application retrieved: running');g=So(a.D,f);const k=new olympe.sc.$c.ET(a.W);mb(a.W,()=>fp(a.D.C,k));nb(a.W,()=>{var l=k.ja();return hp(a.D.C,l)});a.xb&&a.W.start();f.run(g);'string'===typeof a.Eb&&(new olympe.sc.uj).da(f.ka(),g,a.V);g.qB(olympe.sc.Hb.C.wB).then(()=>{let l;null==(l=d)||l.cancel();a.ob.update(olympe.j.ia.C);
1847
+ a.ca()})}else a.V.error('application retrieved: not an Application with a run() method');else eq(a)}));olympe.j.yb().onDestroy(()=>{nh(b,a.C,c)});const d=Wc(()=>{a.V.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},3E4);let e;null==(e=a.qc)||e.start()}}function bq(a,b=!0){return a?olympe.dc.nb.Jf.Qp:b?olympe.dc.nb.Jf.cm:olympe.dc.nb.Jf.vz}
1848
+ function cq(a){return q(function*(){fq(a.C)&&(yield Mp(a.C,a.Pa).catch(b=>{throw Error(`Failed to load the business container for the application ${a.C}: ${b}`);}))})}function eq(a){a.V.info('Stop the application');a.D.se().xo()}
1850
1849
  olympe.sc.ve.xr=class{constructor(a,b,c,d,e,f,g,k,l,m){this.V=a;this.T=b;this.O=c;this.Ka=d;this.D=f;this.Oa=g;this.W=k;this.qc=m;this.C=l.get('appTag');this.Ha=l.get('getContextMode');let n;this.Eb=null!=(n=l.get('debuggerName'))?n:null;this.xb=l.get('autostartProfiler');this.Pa=l.get('requireBusinessContainer');this.ob=olympe.j.Za(olympe.j.ia).update(olympe.j.ia.pb)}run(){this.V.debug('runtime starting for app #'+this.C);let a=!1;const b=olympe.Y.mf.C.nr,c=olympe.Y.mf.C.jk,d=olympe.Y.mf.C.hi;olympe.j.Wa([this.O.getState()],
1851
- e=>{switch(e){case b:case c:this.V.debug('Server session opened or working offline, start the application');a||(a=!0,this.da(),$p(this).then(olympe.j.yb().re(()=>cq(this))));break;case d:this.V.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}})}da(){}ca(){this.V.info(`Application ${olympe.dc.eb().name(this.C)} (${this.C}) started`);var a=olympe.dc.sources.Ej();a.sb=!0;a.$+=0;a.kc.next(0<a.$);0===a.$&&a.ca&&a.sb&&(a.V.debug(`Cache: set code-as-data version in local storage: ${a.version}`),
1852
- a.Ha.set('__code-as-data-version__',a.version),a.Oa||(a.ca=!1))}};olympe.sc.ve.xr.C='app_instance';olympe.sc.ve.xr.Aa=[olympe.Af.uF];olympe.sc.ve.TT=class{constructor(a,b,c,d){this.V=a;d.get('httpManifestPath');this.C=d.get('manifestCommon');if(!this.C)this.C={};else if('string'===typeof this.C)try{this.C=JSON.parse(this.C)}catch(e){this.V.warn('Invalid manifest common config'),this.C={}}}start(){md().catch(()=>this.V.error('Error while starting the RuntimeHTTPService'));this.V.debug('Started RuntimeHTTPService')}};function eq(a){var b=olympe.dm.DataSource.SERVER;const c=olympe.dc.nb.from(a).oc(olympe.sc.Fb.Pg.C).oc(olympe.dm.ii.O.fe()).oc(olympe.dm.ii.C).zf();a=olympe.dc.nb.from(a).oc(olympe.sc.Fb.Pg.C).oc(olympe.dm.fd.O).zf();return c.concat(a).has(b)}
1853
- olympe.sc.ve.Jz=class extends olympe.dc.sources.Jz{W(a){return this.db.me(a,olympe.sc.qg)}$(a,b){if(!this.R){super.init();var c=olympe.dc.Rh.from(a).oc(olympe.sc.Fb.Pg.C).zf();if(!(c instanceof olympe.dm.fd))throw Error(`Impossible to initialize the source solver for the application ${a}: no project is linked to it`);b=b?olympe.dc.nb.Jf.Qp:olympe.dc.nb.Jf.cm;Dm(this,c,b);c=new olympe.j.ee('deployed data sources');olympe.dc.nb.from(a).oc(olympe.sc.Fb.Pg.Pa).observe(c,{Xg:b}).subscribe(d=>{const e=
1850
+ e=>{switch(e){case b:case c:this.V.debug('Server session opened or working offline, start the application');a||(a=!0,this.da(),aq(this).then(olympe.j.yb().re(()=>dq(this))));break;case d:this.V.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}})}da(){}ca(){this.V.info(`Application ${olympe.dc.eb().name(this.C)} (${this.C}) started`);var a=olympe.dc.sources.Ej();a.sb=!0;a.$+=0;a.kc.next(0<a.$);0===a.$&&a.ca&&a.sb&&(a.V.debug(`Cache: set code-as-data version in local storage: ${a.version}`),
1851
+ a.Ha.set('__code-as-data-version__',a.version),a.Oa||(a.ca=!1))}};olympe.sc.ve.xr.C='app_instance';olympe.sc.ve.xr.Aa=[olympe.Af.uF];olympe.sc.ve.TT=class{constructor(a,b,c,d){this.V=a;d.get('httpManifestPath');this.C=d.get('manifestCommon');if(!this.C)this.C={};else if('string'===typeof this.C)try{this.C=JSON.parse(this.C)}catch(e){this.V.warn('Invalid manifest common config'),this.C={}}}start(){md().catch(()=>this.V.error('Error while starting the RuntimeHTTPService'));this.V.debug('Started RuntimeHTTPService')}};function fq(a){var b=olympe.dm.DataSource.SERVER;const c=olympe.dc.nb.from(a).oc(olympe.sc.Fb.Pg.C).oc(olympe.dm.ii.O.fe()).oc(olympe.dm.ii.C).zf();a=olympe.dc.nb.from(a).oc(olympe.sc.Fb.Pg.C).oc(olympe.dm.fd.O).zf();return c.concat(a).has(b)}
1852
+ olympe.sc.ve.Jz=class extends olympe.dc.sources.Jz{W(a){return this.db.me(a,olympe.sc.qg)}$(a,b){if(!this.R){super.init();var c=olympe.dc.Rh.from(a).oc(olympe.sc.Fb.Pg.C).zf();if(!(c instanceof olympe.dm.fd))throw Error(`Impossible to initialize the source solver for the application ${a}: no project is linked to it`);b=b?olympe.dc.nb.Jf.Qp:olympe.dc.nb.Jf.cm;Em(this,c,b);c=new olympe.j.ee('deployed data sources');olympe.dc.nb.from(a).oc(olympe.sc.Fb.Pg.Pa).observe(c,{Xg:b}).subscribe(d=>{const e=
1854
1853
  new olympe.dc.Tc;d.lu().forEach(f=>{e.Qb(olympe.dm.DataSource.qx,this.C,f)});d.uu().forEach(f=>{e.Xf(olympe.dm.DataSource.qx,this.C,f)});e.Kd()})}}};olympe.sc.ve.ba={Wi:'sc.runtime.Main',dl:'sc.runtime.SourceSolver',Ft:'sc.runtime.appConfig',zK:'sc.runtime.runtimeHTTPServiceConfig',yK:'sc.runtime.RuntimeHTTPService',RJ:'sc.runtime.OfflineAppConfig'};olympe.sc.ve.pa={mH:'app.httpManifestPath',tJ:'app.manifest.common',pJ:'sc.loadBusinessContainer'};
1855
1854
  olympe.sa.$e(function(a){E(a,olympe.sc.ve.pa.mH,'/runtime/manifest');E(a,olympe.sc.ve.pa.tJ,null);E(a,olympe.sc.ve.pa.pJ,!1);C(a,olympe.Bc.ba.Ar,[new olympe.sa.zb(olympe.Af.pa.Zl),new olympe.sa.zb(olympe.sc.pa.Zl)],(b,c)=>`${b}${c?'-'+c:''}`);C(a,olympe.sc.ve.ba.RJ,[new olympe.sa.zb(olympe.sc.pa.Zl),new olympe.sa.zb(olympe.Fa.pa.mz),new olympe.sa.zb(olympe.Fa.pa.MC)],(b,c,d)=>{let e;const f=null!=(e=a.getParameter(`offline.${b}.enabled`))?e:c;let g;b=null!=(g=a.getParameter(`offline.${b}.autoBackOnline`))?
1856
1855
  g:d;return new Map([['offlineEnabled',f],['offlineAutoBackOnline',!f||b]])});Ua(a,olympe.Fa.ba.lz,olympe.sc.ve.ba.RJ);B(a,olympe.sc.ve.ba.dl,olympe.sc.ve.Jz,olympe.dc.ba.Zs,new olympe.sa.zb(olympe.dc.pa.yr),new olympe.sa.zb(olympe.dc.pa.SB));Ua(a,olympe.dc.sources.ba.dl,olympe.sc.ve.ba.dl);C(a,olympe.sc.ve.ba.Ft,[new olympe.sa.zb(olympe.sc.pa.Zl),new olympe.sa.zb(olympe.dc.pa.Kt),new olympe.sa.zb(olympe.sc.pa.oG),new olympe.sa.zb(olympe.sc.pa.mF),new olympe.sa.zb(olympe.sc.ve.pa.pJ)],(b,c,d,e,f)=>
1857
1856
  new Map([['appTag',b],['getContextMode',c],['debuggerName',d],['autostartProfiler',e],['requireBusinessContainer',f]]));B(a,olympe.sc.ve.ba.Wi,olympe.sc.ve.xr,olympe.sc.ba.Vb,olympe.xa.ba.Ob,olympe.Y.ba.bm,olympe.dc.query.ba.fw,olympe.host.ba.fo,olympe.sc.ba.hw,olympe.sc.ve.ba.dl,olympe.oa.ba.ho,olympe.sc.ve.ba.Ft,olympe.sc.ve.ba.yK);C(a,olympe.sc.ve.ba.zK,[new olympe.sa.zb(olympe.sc.ve.pa.mH),new olympe.sa.zb(olympe.sc.ve.pa.tJ)],(b,c)=>new Map([['httpManifestPath',b],['manifestCommon',c]]));B(a,
1858
- olympe.sc.ve.ba.yK,olympe.sc.ve.TT,olympe.sc.ba.Vb,olympe.Fa.ba.rD,olympe.sc.ba.hw,olympe.sc.ve.ba.zK);olympe.Af.Jq(a,olympe.sc.ve.ba.Wi,'sc.runtime');olympe.Af.Jq(a,olympe.sc.ve.ba.Wi,'sc.headless');olympe.Af.Jq(a,olympe.sc.ve.ba.Wi)},'olympe.sc.runtime');olympe.sc.ui={};olympe.sc.ui.i3=function(a){return a instanceof olympe.sc.ui.Td};function fq(a){const b=olympe.dc.eb(),c=[a.ka()].concat(b.iq(a,olympe.dm.fd.C));return b.xg(olympe.sc.Fg).filter(d=>c.includes(b.Wd(d,olympe.dm.fd.T.fe()))).map(d=>olympe.dc.CloudObject.get(d))}function gq(a){return(new olympe.dc.Kb(olympe.sc.Fg)).transform(olympe.dc.CloudObject.instancesRel).transform(new olympe.dc.Ra.Qf(new olympe.dc.Ca.rt([olympe.dm.fd.T,new olympe.dc.Ra.zj(olympe.dm.fd.Pa,olympe.dc.Ib.ORIGIN,0)],[olympe.dc.Ib.ORIGIN,olympe.dc.Ib.ORIGIN],a)))}
1859
- function hq(a,b=!1){const c=new olympe.j.Map,d=e=>{let f,g;const k=olympe.j.Za(olympe.j.kb);e.Vr(l=>k.update(olympe.j.ic(l)));olympe.j.Wa([e.Ai(),e.yl(),e.Bi(),e.bx(),k],(l,m,n,p,r)=>{const t=l+':'+m+':'+n;var u=c.Fj(t);const v=u?u.DA():Object.create(null);u=u?u.ja():null;const w=f?c.Fj(f):null;p=p.valueOf().replace(/^font\//,'');g&&g!==p&&delete v[g];if(w&&t!==f){const x=w.DA();delete x[g];0===Object.keys(x).length?c.remove(f):c.set(f,new olympe.ui.it(w.SD(),w.BA(),w.aE(),x,w.ja()))}g=p;f=t;v[p]=
1860
- r.valueOf();c.set(t,new olympe.ui.it(l.valueOf(),m.valueOf(),n.valueOf(),v,u))});if(!b)olympe.j.yb().onDestroy(()=>{f&&c.remove(f)})};b?fq(a).forEach(d):gq(a).forEach(d);return c}olympe.sc.ui.X_=class{};function iq(a,b=!0){const c=d=>{d=a.db.Wd(d,olympe.sc.ui.Gg.propertyRel.fe());return a.db.Ac(d,olympe.sc.bl.C)};return[a.tag].concat(a.db.Yw(a,olympe.sc.ui.Renderable)).reduce((d,e)=>{e=a.db.pc(e,olympe.dc.CloudObject.propertyRel);b&&e.sort((f,g)=>c(f)-c(g));return d.concat(e)},[])}olympe.sc.ui.Aj=class extends olympe.sc.yc{C(){const a=olympe.dc.eb().Yw(this,olympe.sc.ui.Renderable).length;return(new olympe.dc.Mp(this.tag)).FM(a-1).oc(olympe.dc.CloudObject.propertyRel).ek()}Di(){return olympe.sc.jf.Yi.oD}R(){return null}};
1861
- olympe.sc.ui.Aj.U=olympe.dc.Ja.C('01612df1f810c91e8997',olympe.sc.ui.Aj);olympe.sc.ui.Aj.$=olympe.sc.ui.Aj.U.tb('016951f802614c4350bf');Y(olympe.dm.Property.U,olympe.sc.ui.Aj.$);olympe.sc.ui.Aj.U.C=(a,b)=>Z(Gn(a,b||'New Abstract Visual Component',olympe.sc.ui.Aj,olympe.sc.ui.ec),olympe.dc.CloudObject.FX,!0).ka();olympe.sc.ui.Aj.prototype.C.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.ui.Cy=class extends olympe.sc.ui.Aj{};olympe.sc.ui.Cy.U=olympe.dc.Ja.C('017a8a97979d7c51ab6a',olympe.sc.ui.Cy);olympe.sc.ui.Cy.U.C=function(a,b){return Gn(a,b||'New Coded Visual Component',olympe.sc.ui.Cy,olympe.sc.ui.ec).ka()};function jq(a){return(new olympe.dc.Mp(a,olympe.sc.ui.ec)).oc(olympe.sc.yc.R).me([olympe.sc.ui.ec]).lv(olympe.sc.ui.Renderable.da).ek()}function kq(a,b,c,d,e){const f=olympe.j.aa,g=olympe.j.ia,k=olympe.sc.ui.Td.za,l=olympe.sc.ui.Td.Pa,m=lq(a,b,e);a=c.Ea(k,b,g,g.pb);b=c.Ea(l,b,g,g.pb);return new olympe.j.ga(olympe.j.$a(a,()=>pc(m.qa(),d.qa()),()=>d.qa(),f),olympe.j.$a(b,()=>pc(m.ta(),d.ta()),()=>d.ta(),f))}
1862
- function mq(a,b,c,d,e,f,g,k){const l=olympe.j.aa,m=olympe.sc.ui.Td.Eb,n=olympe.sc.ui.Td.qc;a=a.Ea(olympe.sc.ui.Td.xb,b,olympe.j.ia,olympe.j.ia.pb);const p=new olympe.ui.F.wd(e);p.Ds(g);p.ev(k);p.Es(a);olympe.j.$a(a,()=>{var r=p.T();const t=c.O(m,b,l,r.qa());r=c.O(n,b,l,r.ta());Nf(p,new olympe.j.ga(t,r));const u=e.qa(),v=e.ta();nq(d,v,u,r,f.ta(),!1);nq(d,u,v,t,f.qa(),!0)});return p}
1863
- function lq(a,b,c){const d=olympe.sc.ui.Renderable.C,e=olympe.sc.ui.Renderable.D,f=olympe.sc.ui.ec.R,g=olympe.sc.ui.ec.T,k=olympe.j.aa;a=void 0===c?jq(a):c;c=(l,m,n)=>{const p=new olympe.j.Map(k);p.set('0',k.ZERO);l.forEach(r=>{var t=r.ka(),u=Ro(b,t);t=r.Ea(m,u,k);u=r.Ea(n,u,k);p.set(r.ka(),t.Sa(u))},r=>{p.remove(r)});return k.max(p)};return new olympe.j.ga(c(a,f,d),c(a,g,e))}
1864
- function nq(a,b,c,d,e,f){olympe.j.$a(b.hE(e),()=>{var g=olympe.j.Xa([b,e],(l,m)=>olympe.j.Ba(0>=m?1:l.valueOf()/m.valueOf()),olympe.j.aa);if(f){var k=new olympe.j.ga(b.hb(g),3);g=new olympe.j.ga(d.hb(g),c.ya(3))}else k=new olympe.j.ga(3,b.hb(g)),g=new olympe.j.ga(c.ya(3),d.hb(g));k=new olympe.ui.F.ye(k);k.Ma(Ac());k.Wb(3);k.ah(1E3);a.appendChild(k,'lift'+(f?'X':'Y'),g)})}
1865
- olympe.sc.ui.Td=class extends olympe.sc.ui.Aj{ca(){return this.xA(olympe.sc.ui.Td.C)}$(){return[this.za]}D(a,b){var c=olympe.j.ia;const d=olympe.sc.ui.Td.C,e=olympe.sc.ui.Td.za,f=olympe.sc.ui.Td.Pa,g=b.na(a),k=b.Ea(e,a,c,c.pb),l=b.Ea(f,a,c,c.pb),m=jq(this);c=b.Ea(d,a,olympe.sc.ui.mr);const n=new olympe.ui.F.Xe(g),p=b.Ea(olympe.sc.ui.ec.$,a,olympe.j.Color).nl().Se(1).Re();olympe.j.Wa([c],r=>{r.init(a);const t=r.qs(a,m);t.yh(p);t.ws(a.wa(olympe.sc.ui.Renderable.Ha,olympe.j.kb,!0));n.appendChild(olympe.j.$a(k.or(l),
1866
- ()=>{var u=kq(this,a,b,g,m);t.Gb(u);const v=new olympe.ui.F.Xe(g);u=mq(this,a,b,v,g,u,k,l);u.Nd(t);v.appendChild(u,'scroller');return v},()=>{t.Lr();return t},olympe.ui.F.mb),'groupContent')});return n}C(){return super.C().jy(olympe.sc.ui.Td.qM().transform(olympe.dc.CloudObject.propertyRel))}R(){return jq(this)}};olympe.sc.ui.Td.U=olympe.dc.Ja.C('016be61ab63fb8a838ee',olympe.sc.ui.Td);olympe.sc.ui.Td.C=olympe.sc.ui.Td.U.fa('016be61ab921cb3bdef9');olympe.sc.ui.Td.za=olympe.sc.ui.Td.U.fa('01664466071718f2a34b');
1867
- olympe.sc.ui.Td.Pa=olympe.sc.ui.Td.U.fa('016652f9cd0b1e216e6b');olympe.sc.ui.Td.xb=olympe.sc.ui.Td.U.fa('01665907468d5e684177');olympe.sc.ui.Td.Eb=olympe.sc.ui.Td.U.fa('016e7ee3fd5998d599ce');olympe.sc.ui.Td.qc=olympe.sc.ui.Td.U.fa('016e7ee3fd59d238eec0');olympe.sc.ui.Td.U.C=function(a,b,c,d){b=b||'Group';d=d||Gn(a,b,olympe.sc.ui.Td,olympe.sc.ui.ec);Z(d,olympe.dc.li.sj+olympe.dc.CloudObject.nameProp.ka(),b);a=a.create(olympe.sc.ui.Lb.Xe,c);Z(d,olympe.sc.ui.Td.C.ka(),new olympe.dc.Kf(a));return d.ka()};
1868
- olympe.sc.ui.Td.prototype.ca.K=new olympe.j.J(()=>olympe.sc.ui.mr,[]);olympe.sc.ui.Td.prototype.D.K=new olympe.j.J(()=>olympe.ui.F.Xe,[]);olympe.sc.ui.Fz=class extends olympe.sc.ui.Td{};olympe.sc.ui.Fz.U=olympe.dc.Ja.C('01612df349e137bbb30b',olympe.sc.ui.Fz);olympe.sc.ui.Fz.U.C=function(a,b,c){b=b||'New Screen';const d=Gn(a,b,olympe.sc.ui.Fz,olympe.sc.ui.Screen);olympe.dc.CloudObject.yf(a,olympe.sc.ui.Td,b,c,d);return d.ka()};olympe.sc.ui.Sz=class extends olympe.sc.ui.Td{};olympe.sc.ui.Sz.U=olympe.dc.Ja.C('0166446c1f124f078a5f',olympe.sc.ui.Sz);olympe.sc.ui.Sz.U.C=function(a,b,c){b=b||'New Visual Component';c=Gn(a,b,olympe.sc.ui.Sz,c||olympe.sc.ui.ec);olympe.dc.CloudObject.yf(a,olympe.sc.ui.Td,b,void 0,c);Z(c,olympe.dc.li.sj+olympe.sc.ui.Renderable.C.ka(),600);Z(c,olympe.dc.li.sj+olympe.sc.ui.Renderable.D.ka(),300);return c.ka()};const oq=new Map,pq=new Set([]);function qq(a){const b=olympe.sc.logic.jd,c=olympe.j.yb(),d=a.ka(),e=Object.create(null),f=Object.create(null);for(const [k,l]of oq)f[k]=l,oq.delete(k);const g=Ui(a.db,d,b.Ks.fe(),c.re((k,l)=>{k?(k=a.db.Wd(l,b.gy),void 0!==f[k]&&(e[l]=k,f[k].enable())):(k=e[l],void 0!==k&&(f[k].disable(),delete e[l]))}));c.onDestroy(()=>{a.db.D(d,b.Ks.fe(),g)})}function rq(a,b,c,d,e){a=new sq(c,a,b);void 0!==e?tq(a,d,e):uq(a,d);oq.set(olympe.dc.Ya(c),a)}
1869
- function vq(a,b){const c=`finalThemeClass-${a.tag}`;let d;const e=f=>{d&&d();const g=wq(f,a.De(),'');let k=!1;d=b.on(g,l=>{k=!0;b.set(c,l?f:'default')});k||b.set(c,'default');olympe.j.yb().onDestroy(()=>{d&&d()})};b.set(c,'default');b.on(olympe.sc.ui.Renderable.ob.ka(),f=>e(f))}function xq(a,b){olympe.j.Wa([a.qa()],c=>{b.set(olympe.sc.ui.Renderable.C,c.valueOf())});olympe.j.Wa([a.ta()],c=>{b.set(olympe.sc.ui.Renderable.D,c.valueOf())})}
1870
- olympe.sc.ui.Renderable=class extends olympe.sc.Runnable{constructor(a,b){super(a,b,olympe.gb.Cb('sc'));this.Ka=!!olympe.sa.getParameter(olympe.sc.pa.VB)}da(){return this.kg()instanceof olympe.sc.ui.Td?[this.De()]:[]}W(){const a=olympe.sc.sp.C.pR,b=this.db,c=new Map,d=this.kg();for(const e of iq(d,!1))c.set(a+b.name(e),e);return c}update(a,b,c){const d=olympe.sc.Hb.C.rp,e=olympe.sc.Hb.C.vp,f=this.kg().nq(),g=olympe.sc.ui.Renderable.prototype.D!==this.D;!f&&super.update(a,b,c);c=a.get(e);c||(c=a.C.se().run(()=>
1857
+ olympe.sc.ve.ba.yK,olympe.sc.ve.TT,olympe.sc.ba.Vb,olympe.Fa.ba.rD,olympe.sc.ba.hw,olympe.sc.ve.ba.zK);olympe.Af.Jq(a,olympe.sc.ve.ba.Wi,'sc.runtime');olympe.Af.Jq(a,olympe.sc.ve.ba.Wi,'sc.headless');olympe.Af.Jq(a,olympe.sc.ve.ba.Wi)},'olympe.sc.runtime');olympe.sc.ui={};olympe.sc.ui.i3=function(a){return a instanceof olympe.sc.ui.Td};function gq(a){const b=olympe.dc.eb(),c=[a.ka()].concat(b.iq(a,olympe.dm.fd.C));return b.xg(olympe.sc.Fg).filter(d=>c.includes(b.Wd(d,olympe.dm.fd.T.fe()))).map(d=>olympe.dc.CloudObject.get(d))}function hq(a){return(new olympe.dc.Kb(olympe.sc.Fg)).transform(olympe.dc.CloudObject.instancesRel).transform(new olympe.dc.Ra.Qf(new olympe.dc.Ca.rt([olympe.dm.fd.T,new olympe.dc.Ra.zj(olympe.dm.fd.Pa,olympe.dc.Ib.ORIGIN,0)],[olympe.dc.Ib.ORIGIN,olympe.dc.Ib.ORIGIN],a)))}
1858
+ function iq(a,b=!1){const c=new olympe.j.Map,d=e=>{let f,g;const k=olympe.j.Za(olympe.j.kb);e.Vr(l=>k.update(olympe.j.ic(l)));olympe.j.Wa([e.Ai(),e.yl(),e.Bi(),e.bx(),k],(l,m,n,p,r)=>{const t=l+':'+m+':'+n;var u=c.Fj(t);const v=u?u.DA():Object.create(null);u=u?u.ja():null;const w=f?c.Fj(f):null;p=p.valueOf().replace(/^font\//,'');g&&g!==p&&delete v[g];if(w&&t!==f){const x=w.DA();delete x[g];0===Object.keys(x).length?c.remove(f):c.set(f,new olympe.ui.it(w.SD(),w.BA(),w.aE(),x,w.ja()))}g=p;f=t;v[p]=
1859
+ r.valueOf();c.set(t,new olympe.ui.it(l.valueOf(),m.valueOf(),n.valueOf(),v,u))});if(!b)olympe.j.yb().onDestroy(()=>{f&&c.remove(f)})};b?gq(a).forEach(d):hq(a).forEach(d);return c}olympe.sc.ui.X_=class{};function jq(a,b=!0){const c=d=>{d=a.db.Wd(d,olympe.sc.ui.Gg.propertyRel.fe());return a.db.Ac(d,olympe.sc.bl.C)};return[a.tag].concat(a.db.Yw(a,olympe.sc.ui.Renderable)).reduce((d,e)=>{e=a.db.pc(e,olympe.dc.CloudObject.propertyRel);b&&e.sort((f,g)=>c(f)-c(g));return d.concat(e)},[])}olympe.sc.ui.Aj=class extends olympe.sc.yc{C(){const a=olympe.dc.eb().Yw(this,olympe.sc.ui.Renderable).length;return(new olympe.dc.Mp(this.tag)).FM(a-1).oc(olympe.dc.CloudObject.propertyRel).ek()}Di(){return olympe.sc.jf.Yi.oD}R(){return null}};
1860
+ olympe.sc.ui.Aj.U=olympe.dc.Ja.C('01612df1f810c91e8997',olympe.sc.ui.Aj);olympe.sc.ui.Aj.$=olympe.sc.ui.Aj.U.tb('016951f802614c4350bf');Y(olympe.dm.Property.U,olympe.sc.ui.Aj.$);olympe.sc.ui.Aj.U.C=(a,b)=>Z(Hn(a,b||'New Abstract Visual Component',olympe.sc.ui.Aj,olympe.sc.ui.ec),olympe.dc.CloudObject.FX,!0).ka();olympe.sc.ui.Aj.prototype.C.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.ui.Cy=class extends olympe.sc.ui.Aj{};olympe.sc.ui.Cy.U=olympe.dc.Ja.C('017a8a97979d7c51ab6a',olympe.sc.ui.Cy);olympe.sc.ui.Cy.U.C=function(a,b){return Hn(a,b||'New Coded Visual Component',olympe.sc.ui.Cy,olympe.sc.ui.ec).ka()};function kq(a){return(new olympe.dc.Mp(a,olympe.sc.ui.ec)).oc(olympe.sc.yc.R).me([olympe.sc.ui.ec]).lv(olympe.sc.ui.Renderable.da).ek()}function lq(a,b,c,d,e){const f=olympe.j.aa,g=olympe.j.ia,k=olympe.sc.ui.Td.za,l=olympe.sc.ui.Td.Pa,m=mq(a,b,e);a=c.Ea(k,b,g,g.pb);b=c.Ea(l,b,g,g.pb);return new olympe.j.ga(olympe.j.$a(a,()=>pc(m.qa(),d.qa()),()=>d.qa(),f),olympe.j.$a(b,()=>pc(m.ta(),d.ta()),()=>d.ta(),f))}
1861
+ function nq(a,b,c,d,e,f,g,k){const l=olympe.j.aa,m=olympe.sc.ui.Td.Eb,n=olympe.sc.ui.Td.qc;a=a.Ea(olympe.sc.ui.Td.xb,b,olympe.j.ia,olympe.j.ia.pb);const p=new olympe.ui.F.wd(e);p.Ds(g);p.ev(k);p.Es(a);olympe.j.$a(a,()=>{var r=p.T();const t=c.O(m,b,l,r.qa());r=c.O(n,b,l,r.ta());Nf(p,new olympe.j.ga(t,r));const u=e.qa(),v=e.ta();oq(d,v,u,r,f.ta(),!1);oq(d,u,v,t,f.qa(),!0)});return p}
1862
+ function mq(a,b,c){const d=olympe.sc.ui.Renderable.C,e=olympe.sc.ui.Renderable.D,f=olympe.sc.ui.ec.R,g=olympe.sc.ui.ec.T,k=olympe.j.aa;a=void 0===c?kq(a):c;c=(l,m,n)=>{const p=new olympe.j.Map(k);p.set('0',k.ZERO);l.forEach(r=>{var t=r.ka(),u=So(b,t);t=r.Ea(m,u,k);u=r.Ea(n,u,k);p.set(r.ka(),t.Sa(u))},r=>{p.remove(r)});return k.max(p)};return new olympe.j.ga(c(a,f,d),c(a,g,e))}
1863
+ function oq(a,b,c,d,e,f){olympe.j.$a(b.hE(e),()=>{var g=olympe.j.Xa([b,e],(l,m)=>olympe.j.Ba(0>=m?1:l.valueOf()/m.valueOf()),olympe.j.aa);if(f){var k=new olympe.j.ga(b.hb(g),3);g=new olympe.j.ga(d.hb(g),c.ya(3))}else k=new olympe.j.ga(3,b.hb(g)),g=new olympe.j.ga(c.ya(3),d.hb(g));k=new olympe.ui.F.ye(k);k.Ma(Ac());k.Wb(3);k.ah(1E3);a.appendChild(k,'lift'+(f?'X':'Y'),g)})}
1864
+ olympe.sc.ui.Td=class extends olympe.sc.ui.Aj{ca(){return this.xA(olympe.sc.ui.Td.C)}$(){return[this.za]}D(a,b){var c=olympe.j.ia;const d=olympe.sc.ui.Td.C,e=olympe.sc.ui.Td.za,f=olympe.sc.ui.Td.Pa,g=b.na(a),k=b.Ea(e,a,c,c.pb),l=b.Ea(f,a,c,c.pb),m=kq(this);c=b.Ea(d,a,olympe.sc.ui.mr);const n=new olympe.ui.F.Xe(g),p=b.Ea(olympe.sc.ui.ec.$,a,olympe.j.Color).nl().Se(1).Re();olympe.j.Wa([c],r=>{r.init(a);const t=r.qs(a,m);t.yh(p);t.ws(a.wa(olympe.sc.ui.Renderable.Ha,olympe.j.kb,!0));n.appendChild(olympe.j.$a(k.or(l),
1865
+ ()=>{var u=lq(this,a,b,g,m);t.Gb(u);const v=new olympe.ui.F.Xe(g);u=nq(this,a,b,v,g,u,k,l);u.Nd(t);v.appendChild(u,'scroller');return v},()=>{t.Lr();return t},olympe.ui.F.mb),'groupContent')});return n}C(){return super.C().jy(olympe.sc.ui.Td.qM().transform(olympe.dc.CloudObject.propertyRel))}R(){return kq(this)}};olympe.sc.ui.Td.U=olympe.dc.Ja.C('016be61ab63fb8a838ee',olympe.sc.ui.Td);olympe.sc.ui.Td.C=olympe.sc.ui.Td.U.fa('016be61ab921cb3bdef9');olympe.sc.ui.Td.za=olympe.sc.ui.Td.U.fa('01664466071718f2a34b');
1866
+ olympe.sc.ui.Td.Pa=olympe.sc.ui.Td.U.fa('016652f9cd0b1e216e6b');olympe.sc.ui.Td.xb=olympe.sc.ui.Td.U.fa('01665907468d5e684177');olympe.sc.ui.Td.Eb=olympe.sc.ui.Td.U.fa('016e7ee3fd5998d599ce');olympe.sc.ui.Td.qc=olympe.sc.ui.Td.U.fa('016e7ee3fd59d238eec0');olympe.sc.ui.Td.U.C=function(a,b,c,d){b=b||'Group';d=d||Hn(a,b,olympe.sc.ui.Td,olympe.sc.ui.ec);Z(d,olympe.dc.li.sj+olympe.dc.CloudObject.nameProp.ka(),b);a=a.create(olympe.sc.ui.Lb.Xe,c);Z(d,olympe.sc.ui.Td.C.ka(),new olympe.dc.Kf(a));return d.ka()};
1867
+ olympe.sc.ui.Td.prototype.ca.K=new olympe.j.J(()=>olympe.sc.ui.mr,[]);olympe.sc.ui.Td.prototype.D.K=new olympe.j.J(()=>olympe.ui.F.Xe,[]);olympe.sc.ui.Fz=class extends olympe.sc.ui.Td{};olympe.sc.ui.Fz.U=olympe.dc.Ja.C('01612df349e137bbb30b',olympe.sc.ui.Fz);olympe.sc.ui.Fz.U.C=function(a,b,c){b=b||'New Screen';const d=Hn(a,b,olympe.sc.ui.Fz,olympe.sc.ui.Screen);olympe.dc.CloudObject.yf(a,olympe.sc.ui.Td,b,c,d);return d.ka()};olympe.sc.ui.Sz=class extends olympe.sc.ui.Td{};olympe.sc.ui.Sz.U=olympe.dc.Ja.C('0166446c1f124f078a5f',olympe.sc.ui.Sz);olympe.sc.ui.Sz.U.C=function(a,b,c){b=b||'New Visual Component';c=Hn(a,b,olympe.sc.ui.Sz,c||olympe.sc.ui.ec);olympe.dc.CloudObject.yf(a,olympe.sc.ui.Td,b,void 0,c);Z(c,olympe.dc.li.sj+olympe.sc.ui.Renderable.C.ka(),600);Z(c,olympe.dc.li.sj+olympe.sc.ui.Renderable.D.ka(),300);return c.ka()};const pq=new Map,qq=new Set([]);function rq(a){const b=olympe.sc.logic.jd,c=olympe.j.yb(),d=a.ka(),e=Object.create(null),f=Object.create(null);for(const [k,l]of pq)f[k]=l,pq.delete(k);const g=Ui(a.db,d,b.Ks.fe(),c.re((k,l)=>{k?(k=a.db.Wd(l,b.gy),void 0!==f[k]&&(e[l]=k,f[k].enable())):(k=e[l],void 0!==k&&(f[k].disable(),delete e[l]))}));c.onDestroy(()=>{a.db.D(d,b.Ks.fe(),g)})}function sq(a,b,c,d,e){a=new tq(c,a,b);void 0!==e?uq(a,d,e):vq(a,d);pq.set(olympe.dc.Ya(c),a)}
1868
+ function wq(a,b){const c=`finalThemeClass-${a.tag}`;let d;const e=f=>{d&&d();const g=xq(f,a.De(),'');let k=!1;d=b.on(g,l=>{k=!0;b.set(c,l?f:'default')});k||b.set(c,'default');olympe.j.yb().onDestroy(()=>{d&&d()})};b.set(c,'default');b.on(olympe.sc.ui.Renderable.ob.ka(),f=>e(f))}function yq(a,b){olympe.j.Wa([a.qa()],c=>{b.set(olympe.sc.ui.Renderable.C,c.valueOf())});olympe.j.Wa([a.ta()],c=>{b.set(olympe.sc.ui.Renderable.D,c.valueOf())})}
1869
+ olympe.sc.ui.Renderable=class extends olympe.sc.Runnable{constructor(a,b){super(a,b,olympe.gb.Cb('sc'));this.Ka=!!olympe.sa.getParameter(olympe.sc.pa.VB)}da(){return this.kg()instanceof olympe.sc.ui.Td?[this.De()]:[]}W(){const a=olympe.sc.sp.C.pR,b=this.db,c=new Map,d=this.kg();for(const e of jq(d,!1))c.set(a+b.name(e),e);return c}update(a,b,c){const d=olympe.sc.Hb.C.rp,e=olympe.sc.Hb.C.vp,f=this.kg().nq(),g=olympe.sc.ui.Renderable.prototype.D!==this.D;!f&&super.update(a,b,c);c=a.get(e);c||(c=a.C.se().run(()=>
1871
1870
  this.D(a)),a.set(e,c));const k=f&&!g?this.render(a,b):c.Tm();if(!g&&(f||a.C.id.startsWith('_'))){const l=a.on(d,m=>{void 0!==k?null!==k&&a.set('_off_container',this.updateParent(m,k)):this.draw(a,m)},a.ja());a.onDestroy(()=>{l();let m;null==(m=a.get('_off_container'))||m();a.remove('_off_container')})}}render(){}updateParent(a,b){b&&a.appendChild(b);return()=>{b.remove()}}D(a){var b=this.kg();if(b.nq()){const c=olympe.j.ia,d=olympe.j.kb;b=new olympe.ui.F.Ue(this.tag,this.na(a));b.rd(this.Ea(olympe.sc.ui.ec.Pa,
1872
- a,c,c.pb));b.ws(this.Ea(olympe.sc.ui.Renderable.Ha,a,d));b.Ii(e=>{a.mP(e)})}else b=b.D(a,this),this.C(b,a);return b}be(){return iq(this.kg())}draw(a,b){super.onUpdate(a,[],[]);a=document.createElement('p');a.innerHTML=`No code found for:<br/>${this.Qe().name()}<br/>(${this.De()})`;a.style['vertical-align']='middle';a.style['text-align']='center';a.style.width='inherit';a.style.height='inherit';a.style.display='table-cell';a.style['background-color']='rgba(192, 192, 192, 0.5)';a.style['font-family']=
1873
- 'Roboto';b.appendChild(a)}C(a,b){a.Ma(this.Ea(olympe.sc.ui.Renderable.$,b,olympe.j.Color,Dc()));qq(this)}T(){const a=[this.sb,this.ma,this.ca,this.$];this.Ka||a.splice(3,0,this.za);return a}za(a,b){vq(this,a);const c=olympe.j.yb(),d=this.De(),e=olympe.sc.ui.Aj.$,f=this.db.Yw(this.De(),olympe.sc.ui.Renderable);f.push(d);let g=[];f.forEach(l=>{g=g.concat(this.db.pc(l,e))});let k;a.on(`finalThemeClass-${this.tag}`,c.re(l=>{k&&k.destroy();const m=n=>{const p=wq(l,d,n);a.on(p,r=>{b(n,r)})};k=new olympe.j.ee(`onFinalThemeClassKey for ${this.tag}`);
1874
- k.run(()=>{for(const n of g)m(n);k.onDestroy(()=>{for(const n of g)b(n,null)})})}))}na(a){return new olympe.j.ga(this.Ea(olympe.sc.ui.Renderable.C,a,olympe.j.aa,olympe.j.aa.ZERO,!0),this.Ea(olympe.sc.ui.Renderable.D,a,olympe.j.aa,olympe.j.aa.ZERO,!0))}gf(){return this.yg(olympe.sc.ui.Renderable.da)}R(){return null}};olympe.sc.ui.Renderable.prototype.getProperties=olympe.sc.ui.Renderable.prototype.be;let yq=0;
1875
- function tq(a,b,c){!a.$&&a.C.yh(!0);a.O=a.T.re(()=>{!a.$&&a.C.yh(!1);const d=b(()=>a.R.Qq(a.W));olympe.j.yb().onDestroy(()=>{c(d);a.$||a.C.lc()||a.C.$f()||a.C.yh(!0)})})}function uq(a,b){null!=a.O||(a.O=a.T.re(()=>{olympe.j.Wa([b()],c=>{a.R.set(a.W,c)});olympe.j.yb().onDestroy(()=>a.R.remove(a.W))}))}
1876
- class sq{constructor(a,b,c){++yq;this.W=a;this.R=b;this.C=c;this.T=new olympe.j.ee('InteractionBinder context '+yq);this.O=null;this.D=0;this.$=pq.has(this.C.constructor)}enable(){++this.D;1===this.D&&this.O()}disable(){--this.D;0===this.D&&this.T.destroy()}}olympe.sc.ui.Renderable.U=Nh(olympe.dc.Ja.C('01612df219d0691f6b4d',olympe.sc.ui.Renderable));olympe.sc.ui.Renderable.ob=olympe.sc.ui.Renderable.U.fa('0161d7ba2406f5d75a37');olympe.sc.ui.Renderable.$=olympe.sc.ui.Renderable.U.fa('01611d9c686bbed5fdba');
1871
+ a,c,c.pb));b.ws(this.Ea(olympe.sc.ui.Renderable.Ha,a,d));b.Ii(e=>{a.mP(e)})}else b=b.D(a,this),this.C(b,a);return b}be(){return jq(this.kg())}draw(a,b){super.onUpdate(a,[],[]);a=document.createElement('p');a.innerHTML=`No code found for:<br/>${this.Qe().name()}<br/>(${this.De()})`;a.style['vertical-align']='middle';a.style['text-align']='center';a.style.width='inherit';a.style.height='inherit';a.style.display='table-cell';a.style['background-color']='rgba(192, 192, 192, 0.5)';a.style['font-family']=
1872
+ 'Roboto';b.appendChild(a)}C(a,b){a.Ma(this.Ea(olympe.sc.ui.Renderable.$,b,olympe.j.Color,Dc()));rq(this)}T(){const a=[this.sb,this.ma,this.ca,this.$];this.Ka||a.splice(3,0,this.za);return a}za(a,b){wq(this,a);const c=olympe.j.yb(),d=this.De(),e=olympe.sc.ui.Aj.$,f=this.db.Yw(this.De(),olympe.sc.ui.Renderable);f.push(d);let g=[];f.forEach(l=>{g=g.concat(this.db.pc(l,e))});let k;a.on(`finalThemeClass-${this.tag}`,c.re(l=>{k&&k.destroy();const m=n=>{const p=xq(l,d,n);a.on(p,r=>{b(n,r)})};k=new olympe.j.ee(`onFinalThemeClassKey for ${this.tag}`);
1873
+ k.run(()=>{for(const n of g)m(n);k.onDestroy(()=>{for(const n of g)b(n,null)})})}))}na(a){return new olympe.j.ga(this.Ea(olympe.sc.ui.Renderable.C,a,olympe.j.aa,olympe.j.aa.ZERO,!0),this.Ea(olympe.sc.ui.Renderable.D,a,olympe.j.aa,olympe.j.aa.ZERO,!0))}gf(){return this.yg(olympe.sc.ui.Renderable.da)}R(){return null}};olympe.sc.ui.Renderable.prototype.getProperties=olympe.sc.ui.Renderable.prototype.be;let zq=0;
1874
+ function uq(a,b,c){!a.$&&a.C.yh(!0);a.O=a.T.re(()=>{!a.$&&a.C.yh(!1);const d=b(()=>a.R.Qq(a.W));olympe.j.yb().onDestroy(()=>{c(d);a.$||a.C.lc()||a.C.$f()||a.C.yh(!0)})})}function vq(a,b){null!=a.O||(a.O=a.T.re(()=>{olympe.j.Wa([b()],c=>{a.R.set(a.W,c)});olympe.j.yb().onDestroy(()=>a.R.remove(a.W))}))}
1875
+ class tq{constructor(a,b,c){++zq;this.W=a;this.R=b;this.C=c;this.T=new olympe.j.ee('InteractionBinder context '+zq);this.O=null;this.D=0;this.$=qq.has(this.C.constructor)}enable(){++this.D;1===this.D&&this.O()}disable(){--this.D;0===this.D&&this.T.destroy()}}olympe.sc.ui.Renderable.U=Nh(olympe.dc.Ja.C('01612df219d0691f6b4d',olympe.sc.ui.Renderable));olympe.sc.ui.Renderable.ob=olympe.sc.ui.Renderable.U.fa('0161d7ba2406f5d75a37');olympe.sc.ui.Renderable.$=olympe.sc.ui.Renderable.U.fa('01611d9c686bbed5fdba');
1877
1876
  olympe.sc.ui.Renderable.Ha=olympe.sc.ui.Renderable.U.fa('01611d9c686bbed5fddd');olympe.sc.ui.Renderable.C=olympe.sc.ui.Renderable.U.fa('01611d99ec0553b5926e');olympe.sc.ui.Renderable.D=olympe.sc.ui.Renderable.U.fa('01611d9a0452a179c68f');olympe.sc.ui.Renderable.da=olympe.sc.ui.Renderable.U.fa('016c23bd12493a7e1b2e');olympe.sc.ui.Renderable.prototype.na.K=olympe.j.J.W;olympe.sc.ui.Renderable.prototype.gf.K=olympe.j.J.D;olympe.sc.ui.ec=class extends olympe.sc.ui.Renderable{constructor(a,b){super(a,b)}ae(a){return new olympe.j.ga(this.Ea(olympe.sc.ui.ec.R,a,olympe.j.aa,olympe.j.aa.ZERO),this.Ea(olympe.sc.ui.ec.T,a,olympe.j.aa,olympe.j.aa.ZERO))}R(a){const b=this.kg();return b.LA()?b.YN().Mr().me([olympe.sc.ui.ec]).lv(olympe.sc.ui.Renderable.da).ek():a.includes(this.ka())?this.db.pc(b,olympe.dc.CloudObject.propertyRel).filter(c=>this.db.Xm(this.db.Wd(c,olympe.dm.Property.typeRel),olympe.sc.ui.ec)).reduce((c,d)=>{olympe.j.Wa([this.xA(d)],
1878
1877
  e=>{e=e.Qe();a.includes(olympe.dc.Ya(e))&&c.set(d,e)});return c},new olympe.j.Be(olympe.dm.hm)):null}C(a,b){const c=olympe.j.Color,d=olympe.j.aa,e=olympe.j.ia,f=olympe.j.kb;a.rd(this.Ea(olympe.sc.ui.ec.Pa,b,e,e.pb));a.ad(pc(this.Ea(olympe.sc.ui.ec.vf,b,d),0));a.nd(this.Ea(olympe.sc.ui.ec.Yh,b,c));a.Wb(this.Ea(olympe.sc.ui.ec.cf,b,d));a.Gs(this.Ea(olympe.sc.ui.ec.$V,b,d));olympe.j.Wa([this.Ea(olympe.sc.ui.ec.lg,b,f)],g=>{g=g.valueOf().split(';').filter(k=>''!==k).map(k=>k.split(':')).filter(([k,l])=>
1879
- void 0!==k&&void 0!==l);for(const [k,l]of g)a.ib(k.trim(),l.trim());a.Bf()});olympe.j.Wa([this.Ea(olympe.sc.ui.ec.ld,b,e,e.pb)],g=>{a.ib('overflow',g.valueOf()?'visible':'hidden')});rq(b,a,olympe.sc.ui.ec.FQ,a.Vc.bind(a),a.Pj.bind(a));super.C(a,b)}};olympe.sc.ui.ec.U=olympe.dc.Ja.C('01664466071746f5e167',olympe.sc.ui.ec);olympe.sc.ui.ec.R=olympe.sc.ui.ec.U.fa('01611d99243ad989b91b');olympe.sc.ui.ec.T=olympe.sc.ui.ec.U.fa('01611d9962e7f4f9a26d');olympe.sc.ui.ec.Pa=olympe.sc.ui.ec.U.fa('01611d9a88f340465399');
1878
+ void 0!==k&&void 0!==l);for(const [k,l]of g)a.ib(k.trim(),l.trim());a.Bf()});olympe.j.Wa([this.Ea(olympe.sc.ui.ec.ld,b,e,e.pb)],g=>{a.ib('overflow',g.valueOf()?'visible':'hidden')});sq(b,a,olympe.sc.ui.ec.FQ,a.Vc.bind(a),a.Pj.bind(a));super.C(a,b)}};olympe.sc.ui.ec.U=olympe.dc.Ja.C('01664466071746f5e167',olympe.sc.ui.ec);olympe.sc.ui.ec.R=olympe.sc.ui.ec.U.fa('01611d99243ad989b91b');olympe.sc.ui.ec.T=olympe.sc.ui.ec.U.fa('01611d9962e7f4f9a26d');olympe.sc.ui.ec.Pa=olympe.sc.ui.ec.U.fa('01611d9a88f340465399');
1880
1879
  olympe.sc.ui.ec.$V=olympe.sc.ui.ec.U.fa('016b08fd79c14bad3193');olympe.sc.ui.ec.lg=olympe.sc.ui.ec.U.fa('017c5114f14f96c4f187');olympe.sc.ui.ec.ld=olympe.sc.ui.ec.U.fa('017e6d4a0974fd84338f');olympe.sc.ui.ec.vf=olympe.sc.ui.ec.U.fa('0163ba941097ae1920b0');olympe.sc.ui.ec.Yh=olympe.sc.ui.ec.U.fa('0163ba942b6ee2bc78c0');olympe.sc.ui.ec.cf=olympe.sc.ui.ec.U.fa('0163ba9e1428240acec7');olympe.sc.ui.ec.QX=olympe.sc.ui.ec.U.fa('0162e2bd70fb607442d4');olympe.sc.ui.ec.FQ=olympe.sc.ui.ec.U.fa('01619aacf66faf45a75d');
1881
1880
  olympe.sc.ui.fm=class{constructor(a,b){this.tag=a;this.C=b}ka(){return this.tag}get(){return this.C.get(this.tag)}observe(){return this.C.observe(this.tag)}set(a){this.C.set(this.tag,a)}};olympe.sc.ui.fm.prototype.set=olympe.sc.ui.fm.prototype.set;olympe.sc.ui.fm.prototype.observe=olympe.sc.ui.fm.prototype.observe;olympe.sc.ui.fm.prototype.get=olympe.sc.ui.fm.prototype.get;olympe.sc.ui.fm.prototype.getTag=olympe.sc.ui.fm.prototype.ka;olympe.sc.ui.NB=class extends olympe.sc.ui.fm{Qq(){this.set(Date.now())}};
1882
- olympe.sc.ui.NB.prototype.trigger=olympe.sc.ui.NB.prototype.Qq;olympe.sc.ui.ec.Aa=[olympe.dc.Ok];olympe.sc.ui.ec.prototype.ae.K=olympe.j.J.W;function zq(a,b){const c=(d,e,f)=>{rq(b,a,d,e,f)};rq(b,a,olympe.sc.ui.Ga.PQ,a.en.bind(a),a.qq.bind(a));rq(b,a,olympe.sc.ui.Ga.zS,a.kh.bind(a),a.yk.bind(a));rq(b,a,olympe.sc.ui.Ga.zT,a.Wg.bind(a),a.Ng.bind(a));rq(b,a,olympe.sc.ui.Ga.JS,a.gj.bind(a),a.zk.bind(a));rq(b,a,olympe.sc.ui.Ga.XS,a.Hi.bind(a),a.Qj.bind(a));rq(b,a,olympe.sc.ui.Ga.eT,a.El.bind(a),a.cn.bind(a));rq(b,a,olympe.sc.ui.Ga.oT,a.Qo.bind(a),a.vq.bind(a));rq(b,a,olympe.sc.ui.Ga.GT,a.Ro.bind(a),a.wq.bind(a));rq(b,a,olympe.sc.ui.Ga.bV,a.Ck.bind(a),
1883
- a.No.bind(a));rq(b,a,olympe.sc.ui.Ga.UU,a.Bk.bind(a),a.dj.bind(a));rq(b,a,olympe.sc.ui.Ga.YU,a.Xo.bind(a),a.zq.bind(a));rq(b,a,olympe.sc.ui.Ga.OU,a.fn.bind(a),a.Mo.bind(a));rq(b,a,olympe.sc.ui.Ga.WQ,a.Bq.bind(a),a.rq.bind(a));rq(b,a,olympe.sc.ui.Ga.cV,a.Hq.bind(a),a.Aq.bind(a));rq(b,a,olympe.sc.ui.Ga.eR,a.Cq.bind(a),a.sq.bind(a));rq(b,a,olympe.sc.ui.Ga.xR,a.Dq.bind(a),a.tq.bind(a));rq(b,a,olympe.sc.ui.Ga.yS,a.Eq.bind(a),a.uq.bind(a));rq(b,a,olympe.sc.ui.Ga.tU,a.Gq.bind(a),a.yq.bind(a));rq(b,a,olympe.sc.ui.Ga.PT,
1881
+ olympe.sc.ui.NB.prototype.trigger=olympe.sc.ui.NB.prototype.Qq;olympe.sc.ui.ec.Aa=[olympe.dc.Ok];olympe.sc.ui.ec.prototype.ae.K=olympe.j.J.W;function Aq(a,b){const c=(d,e,f)=>{sq(b,a,d,e,f)};sq(b,a,olympe.sc.ui.Ga.PQ,a.en.bind(a),a.qq.bind(a));sq(b,a,olympe.sc.ui.Ga.zS,a.kh.bind(a),a.yk.bind(a));sq(b,a,olympe.sc.ui.Ga.zT,a.Wg.bind(a),a.Ng.bind(a));sq(b,a,olympe.sc.ui.Ga.JS,a.gj.bind(a),a.zk.bind(a));sq(b,a,olympe.sc.ui.Ga.XS,a.Hi.bind(a),a.Qj.bind(a));sq(b,a,olympe.sc.ui.Ga.eT,a.El.bind(a),a.cn.bind(a));sq(b,a,olympe.sc.ui.Ga.oT,a.Qo.bind(a),a.vq.bind(a));sq(b,a,olympe.sc.ui.Ga.GT,a.Ro.bind(a),a.wq.bind(a));sq(b,a,olympe.sc.ui.Ga.bV,a.Ck.bind(a),
1882
+ a.No.bind(a));sq(b,a,olympe.sc.ui.Ga.UU,a.Bk.bind(a),a.dj.bind(a));sq(b,a,olympe.sc.ui.Ga.YU,a.Xo.bind(a),a.zq.bind(a));sq(b,a,olympe.sc.ui.Ga.OU,a.fn.bind(a),a.Mo.bind(a));sq(b,a,olympe.sc.ui.Ga.WQ,a.Bq.bind(a),a.rq.bind(a));sq(b,a,olympe.sc.ui.Ga.cV,a.Hq.bind(a),a.Aq.bind(a));sq(b,a,olympe.sc.ui.Ga.eR,a.Cq.bind(a),a.sq.bind(a));sq(b,a,olympe.sc.ui.Ga.xR,a.Dq.bind(a),a.tq.bind(a));sq(b,a,olympe.sc.ui.Ga.yS,a.Eq.bind(a),a.uq.bind(a));sq(b,a,olympe.sc.ui.Ga.tU,a.Gq.bind(a),a.yq.bind(a));sq(b,a,olympe.sc.ui.Ga.PT,
1884
1883
  a.Fq.bind(a),a.za.bind(a));c(olympe.sc.ui.Ga.uZ,()=>{a.Ao()});c(olympe.sc.ui.Ga.wZ,()=>{a.Im()});c(olympe.sc.ui.Ga.OP,()=>{a.qk()});c(olympe.sc.ui.Ga.yZ,()=>{a.Km()});c(olympe.sc.ui.Ga.zZ,()=>{a.Lm()});c(olympe.sc.ui.Ga.cQ,()=>{a.Mm()});c(olympe.sc.ui.Ga.kE,()=>{a.Ym()});c(olympe.sc.ui.Ga.xE,()=>{a.Zm()});c(olympe.sc.ui.Ga.lE,()=>{a.Ih()});c(olympe.sc.ui.Ga.OX,()=>{a.Qm()});c(olympe.sc.ui.Ga.DX,()=>{a.Pm()});c(olympe.sc.ui.Ga.BX,()=>{a.Om()});c(olympe.sc.ui.Ga.cW,()=>{a.Nm()});c(olympe.sc.ui.Ga.Cl,
1885
1884
  ()=>{a.sl()});c(olympe.sc.ui.Ga.PX,()=>{a.xl()});c(olympe.sc.ui.Ga.Ko,()=>{a.tl()});c(olympe.sc.ui.Ga.fF,()=>{a.ul()});c(olympe.sc.ui.Ga.hF,()=>{a.Jm()});c(olympe.sc.ui.Ga.fV,()=>{a.wl()});c(olympe.sc.ui.Ga.eV,()=>{a.vl()})}
1886
- olympe.sc.ui.Ga=class extends olympe.sc.ui.ec{C(a,b){const c=olympe.j.Color,d=olympe.j.aa,e=olympe.j.ia;a.Oq(this.Ea(olympe.sc.ui.Ga.wV,b,d,d.ZERO));a.$g(new olympe.j.ga(this.Ea(olympe.sc.ui.Ga.oQ,b,d,d.ZERO),this.Ea(olympe.sc.ui.Ga.AQ,b,d,d.ZERO)),pc(this.Ea(olympe.sc.ui.Ga.GP,b,d,d.ZERO),0),this.Ea(olympe.sc.ui.Ga.WV,b,d,d.ZERO),this.Ea(olympe.sc.ui.Ga.FV,b,c,Dc()),this.Ea(olympe.sc.ui.Ga.RA,b,e,e.pb));zq(a,b);super.C(a,b)}};olympe.sc.ui.Ga.U=olympe.dc.Ja.C('01612df263119ee77622',olympe.sc.ui.Ga);
1885
+ olympe.sc.ui.Ga=class extends olympe.sc.ui.ec{C(a,b){const c=olympe.j.Color,d=olympe.j.aa,e=olympe.j.ia;a.Oq(this.Ea(olympe.sc.ui.Ga.wV,b,d,d.ZERO));a.$g(new olympe.j.ga(this.Ea(olympe.sc.ui.Ga.oQ,b,d,d.ZERO),this.Ea(olympe.sc.ui.Ga.AQ,b,d,d.ZERO)),pc(this.Ea(olympe.sc.ui.Ga.GP,b,d,d.ZERO),0),this.Ea(olympe.sc.ui.Ga.WV,b,d,d.ZERO),this.Ea(olympe.sc.ui.Ga.FV,b,c,Dc()),this.Ea(olympe.sc.ui.Ga.RA,b,e,e.pb));Aq(a,b);super.C(a,b)}};olympe.sc.ui.Ga.U=olympe.dc.Ja.C('01612df263119ee77622',olympe.sc.ui.Ga);
1887
1886
  olympe.sc.ui.Ga.wV=olympe.sc.ui.Ga.U.fa('01631febba3ab94ae368');olympe.sc.ui.Ga.oQ=olympe.sc.ui.Ga.U.fa('0163baa7ccf69a395b87');olympe.sc.ui.Ga.AQ=olympe.sc.ui.Ga.U.fa('0163bab1436a39979789');olympe.sc.ui.Ga.GP=olympe.sc.ui.Ga.U.fa('0163baa7e220ba9a58da');olympe.sc.ui.Ga.WV=olympe.sc.ui.Ga.U.fa('0163baa7f80f046eaf31');olympe.sc.ui.Ga.FV=olympe.sc.ui.Ga.U.fa('0163baa80bd84ac855fc');olympe.sc.ui.Ga.RA=olympe.sc.ui.Ga.U.fa('0163baa821c816754827');olympe.sc.ui.Ga.uZ=olympe.sc.ui.Ga.U.fa('0168dc764f26c7e92f9b');
1888
1887
  olympe.sc.ui.Ga.wZ=olympe.sc.ui.Ga.U.fa('0168dc76919c78c432de');olympe.sc.ui.Ga.OP=olympe.sc.ui.Ga.U.fa('0168c7726a7e3da3f394');olympe.sc.ui.Ga.yZ=olympe.sc.ui.Ga.U.fa('0168dc77a52c67b749ec');olympe.sc.ui.Ga.zZ=olympe.sc.ui.Ga.U.fa('0168dc77cf5a80ff7502');olympe.sc.ui.Ga.cQ=olympe.sc.ui.Ga.U.fa('0168dc77f26c3af6380e');olympe.sc.ui.Ga.kE=olympe.sc.ui.Ga.U.fa('0168dc76c4ce4dfa21ce');olympe.sc.ui.Ga.xE=olympe.sc.ui.Ga.U.fa('0168dc771521d4989f44');olympe.sc.ui.Ga.lE=olympe.sc.ui.Ga.U.fa('0168dc776679ae991d32');
1889
1888
  olympe.sc.ui.Ga.Cl=olympe.sc.ui.Ga.U.fa('0168dcdbac93683e961f');olympe.sc.ui.Ga.PX=olympe.sc.ui.Ga.U.fa('0168dcdbe096622948a4');olympe.sc.ui.Ga.Ko=olympe.sc.ui.Ga.U.fa('0168dcdc172e489c48b9');olympe.sc.ui.Ga.fF=olympe.sc.ui.Ga.U.fa('0168dcdc4ef0492f7be9');olympe.sc.ui.Ga.hF=olympe.sc.ui.Ga.U.fa('0168dcdc6d186bf8c60d');olympe.sc.ui.Ga.fV=olympe.sc.ui.Ga.U.fa('0168dcdcaa879e1d49ec');olympe.sc.ui.Ga.eV=olympe.sc.ui.Ga.U.fa('0168dcdcd0e43889eeaf');olympe.sc.ui.Ga.OX=olympe.sc.ui.Ga.U.fa('0168e13a2c9eff4b1bb2');
1890
1889
  olympe.sc.ui.Ga.DX=olympe.sc.ui.Ga.U.fa('0168e13a668be409860f');olympe.sc.ui.Ga.BX=olympe.sc.ui.Ga.U.fa('0168e13a9bbb31492482');olympe.sc.ui.Ga.cW=olympe.sc.ui.Ga.U.fa('0168e13ad49117906a9b');olympe.sc.ui.Ga.PQ=olympe.sc.ui.Ga.U.fa('016880862139c3324a2b');olympe.sc.ui.Ga.zS=olympe.sc.ui.Ga.U.fa('0168808622067a6ccc86');olympe.sc.ui.Ga.zT=olympe.sc.ui.Ga.U.fa('01688086226bdf417abe');olympe.sc.ui.Ga.eT=olympe.sc.ui.Ga.U.fa('0168808622d577c581a5');olympe.sc.ui.Ga.oT=olympe.sc.ui.Ga.U.fa('0168c772451ab8b1295c');
1891
1890
  olympe.sc.ui.Ga.JS=olympe.sc.ui.Ga.U.fa('0168c772458260728005');olympe.sc.ui.Ga.XS=olympe.sc.ui.Ga.U.fa('0168c77245ec33d5d3d6');olympe.sc.ui.Ga.GT=olympe.sc.ui.Ga.U.fa('0168c7724654174d5289');olympe.sc.ui.Ga.bV=olympe.sc.ui.Ga.U.fa('0168c7724990f6c6e2c5');olympe.sc.ui.Ga.UU=olympe.sc.ui.Ga.U.fa('0168c77249f71507f1a0');olympe.sc.ui.Ga.YU=olympe.sc.ui.Ga.U.fa('0168c7724a5ffdb8603c');olympe.sc.ui.Ga.OU=olympe.sc.ui.Ga.U.fa('0168c7724ac89011b0f1');olympe.sc.ui.Ga.WQ=olympe.sc.ui.Ga.U.fa('0168c7724ccef19bd4fe');
1892
- olympe.sc.ui.Ga.cV=olympe.sc.ui.Ga.U.fa('0168c7724d3698b4bacc');olympe.sc.ui.Ga.eR=olympe.sc.ui.Ga.U.fa('0168c7724d9a84b5addb');olympe.sc.ui.Ga.xR=olympe.sc.ui.Ga.U.fa('0168c7724dff8c67d120');olympe.sc.ui.Ga.yS=olympe.sc.ui.Ga.U.fa('0168c7724e65de8791ac');olympe.sc.ui.Ga.tU=olympe.sc.ui.Ga.U.fa('0168c7724eca5653c809');olympe.sc.ui.Ga.PT=olympe.sc.ui.Ga.U.fa('0168c7724f30c049da91');olympe.sc.ui.ll=class extends olympe.sc.ui.Aj{D(){return this.Ig(olympe.sc.ui.ll.C,olympe.sc.ui.Screen)}};olympe.sc.ui.ll.U=olympe.dc.Ja.C('0112025000000015def0',olympe.sc.ui.ll);olympe.sc.ui.ll.C=olympe.sc.ui.ll.U.tb('0163f988aa658051daeb');olympe.sc.ui.ll.prototype.D.K=new olympe.j.J(()=>olympe.sc.ui.Screen,[]);olympe.sc.ui.mr=class extends olympe.sc.gg{init(a){const b=a.set.bind(a);Bp(this,a,b,b)}run(){}qs(){}D(){}C(){}};olympe.sc.ui.mr.U=Nh(olympe.dc.Ja.C('016be61abe39070d9c42',olympe.sc.ui.mr));olympe.sc.ui.mr.prototype.qs.K=new olympe.j.J(()=>olympe.ui.F.mb,[]);olympe.sc.ui.Pd=class extends olympe.sc.ui.Ga{C(a,b){const c=olympe.j.Color,d=olympe.j.aa,e=olympe.j.ia,f=olympe.j.kb;a instanceof olympe.ui.F.od||(a.Jb(this.Ea(olympe.sc.ui.Pd.O,b,f)),a.vb(this.Ea(olympe.sc.ui.Pd.fontFamilyProp,b,f)),a.rb(this.Ea(olympe.sc.ui.Pd.xk,b,d)),a.Bb(this.Ea(olympe.sc.ui.Pd.sb,b,d)),a.Od(olympe.j.$a(this.Ea(olympe.sc.ui.Pd.Oa,b,e,e.pb),()=>olympe.ui.ha.Uy.tR,()=>olympe.ui.ha.Uy.jz,f)),a.lb(this.Ea(olympe.sc.ui.Pd.Ka,b,c)),a.Ub(this.Ea(olympe.sc.ui.Pd.xb,b,f)),a.Xb(this.Ea(olympe.sc.ui.Pd.Eb,
1891
+ olympe.sc.ui.Ga.cV=olympe.sc.ui.Ga.U.fa('0168c7724d3698b4bacc');olympe.sc.ui.Ga.eR=olympe.sc.ui.Ga.U.fa('0168c7724d9a84b5addb');olympe.sc.ui.Ga.xR=olympe.sc.ui.Ga.U.fa('0168c7724dff8c67d120');olympe.sc.ui.Ga.yS=olympe.sc.ui.Ga.U.fa('0168c7724e65de8791ac');olympe.sc.ui.Ga.tU=olympe.sc.ui.Ga.U.fa('0168c7724eca5653c809');olympe.sc.ui.Ga.PT=olympe.sc.ui.Ga.U.fa('0168c7724f30c049da91');olympe.sc.ui.ll=class extends olympe.sc.ui.Aj{D(){return this.Ig(olympe.sc.ui.ll.C,olympe.sc.ui.Screen)}};olympe.sc.ui.ll.U=olympe.dc.Ja.C('0112025000000015def0',olympe.sc.ui.ll);olympe.sc.ui.ll.C=olympe.sc.ui.ll.U.tb('0163f988aa658051daeb');olympe.sc.ui.ll.prototype.D.K=new olympe.j.J(()=>olympe.sc.ui.Screen,[]);olympe.sc.ui.mr=class extends olympe.sc.gg{init(a){const b=a.set.bind(a);Cp(this,a,b,b)}run(){}qs(){}D(){}C(){}};olympe.sc.ui.mr.U=Nh(olympe.dc.Ja.C('016be61abe39070d9c42',olympe.sc.ui.mr));olympe.sc.ui.mr.prototype.qs.K=new olympe.j.J(()=>olympe.ui.F.mb,[]);olympe.sc.ui.Pd=class extends olympe.sc.ui.Ga{C(a,b){const c=olympe.j.Color,d=olympe.j.aa,e=olympe.j.ia,f=olympe.j.kb;a instanceof olympe.ui.F.od||(a.Jb(this.Ea(olympe.sc.ui.Pd.O,b,f)),a.vb(this.Ea(olympe.sc.ui.Pd.fontFamilyProp,b,f)),a.rb(this.Ea(olympe.sc.ui.Pd.xk,b,d)),a.Bb(this.Ea(olympe.sc.ui.Pd.sb,b,d)),a.Od(olympe.j.$a(this.Ea(olympe.sc.ui.Pd.Oa,b,e,e.pb),()=>olympe.ui.ha.Uy.tR,()=>olympe.ui.ha.Uy.jz,f)),a.lb(this.Ea(olympe.sc.ui.Pd.Ka,b,c)),a.Ub(this.Ea(olympe.sc.ui.Pd.xb,b,f)),a.Xb(this.Ea(olympe.sc.ui.Pd.Eb,
1893
1892
  b,f)));super.C(a,b)}};olympe.sc.ui.Pd.U=Nh(olympe.dc.Ja.C('01633e9252d8e1c4f25b',olympe.sc.ui.Pd));olympe.sc.ui.Pd.fontFamilyProp=olympe.sc.ui.Pd.U.fa('01635eaa384788490dc5');olympe.sc.ui.Pd.xk=olympe.sc.ui.Pd.U.fa('01633fa38ad45c58d04d');olympe.sc.ui.Pd.Oa=olympe.sc.ui.Pd.U.fa('01633fa38c309356404a');olympe.sc.ui.Pd.sb=olympe.sc.ui.Pd.U.fa('01633fa38d2863f0a464');olympe.sc.ui.Pd.Ka=olympe.sc.ui.Pd.U.fa('01633fa5303ccd8c1801');olympe.sc.ui.Pd.xb=olympe.sc.ui.Pd.U.fa('0164229fd527ecd56900');
1894
- olympe.sc.ui.Pd.Eb=olympe.sc.ui.Pd.U.fa('016422a069b9bd45e8a8');olympe.sc.ui.Pd.O=olympe.sc.ui.Pd.U.fa('01633fa386be67e6fd1d');olympe.sc.ui.Me=class extends olympe.sc.ui.Pd{C(a,b){const c=olympe.j.aa,d=olympe.j.ia;pq.add(a.constructor);a.Og(this.Ea(olympe.sc.ui.Me.ma,b,olympe.j.kb));a.Zg(this.Ea(olympe.sc.ui.Me.Hg,b,olympe.j.Color));a.td(this.Ea(olympe.sc.ui.Me.Ls,b,c,c.ZERO));a.sd(this.Ea(olympe.sc.ui.Me.Pb,b,c,c.ZERO));a.Fc(this.Ea(olympe.sc.ui.Me.Yc,b,c,c.ZERO));a.Kc(this.Ea(olympe.sc.ui.Me.ag,b,c,c.ZERO));a.Cf(this.Ea(olympe.sc.ui.Me.kc,b,d,d.pb));rq(b,a,olympe.sc.ui.Me.vg,a.fj.bind(a),a.O.bind(a));rq(b,a,olympe.sc.ui.Me.gd,
1893
+ olympe.sc.ui.Pd.Eb=olympe.sc.ui.Pd.U.fa('016422a069b9bd45e8a8');olympe.sc.ui.Pd.O=olympe.sc.ui.Pd.U.fa('01633fa386be67e6fd1d');olympe.sc.ui.Me=class extends olympe.sc.ui.Pd{C(a,b){const c=olympe.j.aa,d=olympe.j.ia;qq.add(a.constructor);a.Og(this.Ea(olympe.sc.ui.Me.ma,b,olympe.j.kb));a.Zg(this.Ea(olympe.sc.ui.Me.Hg,b,olympe.j.Color));a.td(this.Ea(olympe.sc.ui.Me.Ls,b,c,c.ZERO));a.sd(this.Ea(olympe.sc.ui.Me.Pb,b,c,c.ZERO));a.Fc(this.Ea(olympe.sc.ui.Me.Yc,b,c,c.ZERO));a.Kc(this.Ea(olympe.sc.ui.Me.ag,b,c,c.ZERO));a.Cf(this.Ea(olympe.sc.ui.Me.kc,b,d,d.pb));sq(b,a,olympe.sc.ui.Me.vg,a.fj.bind(a),a.O.bind(a));sq(b,a,olympe.sc.ui.Me.gd,
1895
1894
  a.ej.bind(a),a.D.bind(a));super.C(a,b)}};olympe.sc.ui.Me.U=olympe.dc.Ja.C('016e64ba43b2367826cd',olympe.sc.ui.Me);olympe.sc.ui.Me.ma=olympe.sc.ui.Me.U.fa('0164b26aecbaa5ca5b23');olympe.sc.ui.Me.Hg=olympe.sc.ui.Me.U.fa('0164b69dd71d223649bc');olympe.sc.ui.Me.kc=olympe.sc.ui.Me.U.fa('016e64de79ddfffad3ea');olympe.sc.ui.Me.Ls=olympe.sc.ui.Me.U.fa('0168387e0011b88e3095');olympe.sc.ui.Me.Pb=olympe.sc.ui.Me.U.fa('0168387e0527edb9bd2a');olympe.sc.ui.Me.Yc=olympe.sc.ui.Me.U.fa('0168387e0a992ee500be');
1896
- olympe.sc.ui.Me.ag=olympe.sc.ui.Me.U.fa('0168387e0e5bfd3e00d8');olympe.sc.ui.Me.vg=olympe.sc.ui.Me.U.fa('0168377a219478c7a296');olympe.sc.ui.Me.gd=olympe.sc.ui.Me.U.fa('0168377a5118eb32afd2');olympe.sc.ui.Uv=class extends olympe.sc.ui.Td{};olympe.sc.ui.Uv.U=olympe.dc.Ja.C('01634497d5e7cab7022f',olympe.sc.ui.Uv);olympe.sc.ui.Uv.U.C=function(a,b,c,d){b=b||'List Element';c=Gn(a,{[olympe.dc.CloudObject.nameProp.ka()]:b},olympe.sc.ui.Uv,olympe.sc.ui.Z.$n);olympe.dc.CloudObject.yf(a,olympe.sc.ui.Td,b,d,c);return c.ka()};olympe.sc.ui.eL=class extends olympe.sc.ui.ll{};olympe.sc.ui.eL.U=olympe.dc.Ja.C('016c8f3b84720165aac5',olympe.sc.ui.eL);function Aq(a,b){const c=new Map;a.db.pc(a,olympe.sc.ui.ef.D).forEach(d=>{var e=a.db.Wd(d,olympe.sc.ui.th.C);d=a.db.Wd(d,olympe.sc.ui.th.D);a.V.debug(`ScreenTransition: Saving property ${e} to ${d}`);e=b.get(e);c.set(d,e)});return c}
1895
+ olympe.sc.ui.Me.ag=olympe.sc.ui.Me.U.fa('0168387e0e5bfd3e00d8');olympe.sc.ui.Me.vg=olympe.sc.ui.Me.U.fa('0168377a219478c7a296');olympe.sc.ui.Me.gd=olympe.sc.ui.Me.U.fa('0168377a5118eb32afd2');olympe.sc.ui.Uv=class extends olympe.sc.ui.Td{};olympe.sc.ui.Uv.U=olympe.dc.Ja.C('01634497d5e7cab7022f',olympe.sc.ui.Uv);olympe.sc.ui.Uv.U.C=function(a,b,c,d){b=b||'List Element';c=Hn(a,{[olympe.dc.CloudObject.nameProp.ka()]:b},olympe.sc.ui.Uv,olympe.sc.ui.Z.$n);olympe.dc.CloudObject.yf(a,olympe.sc.ui.Td,b,d,c);return c.ka()};olympe.sc.ui.eL=class extends olympe.sc.ui.ll{};olympe.sc.ui.eL.U=olympe.dc.Ja.C('016c8f3b84720165aac5',olympe.sc.ui.eL);function Bq(a,b){const c=new Map;a.db.pc(a,olympe.sc.ui.ef.D).forEach(d=>{var e=a.db.Wd(d,olympe.sc.ui.th.C);d=a.db.Wd(d,olympe.sc.ui.th.D);a.V.debug(`ScreenTransition: Saving property ${e} to ${d}`);e=b.get(e);c.set(d,e)});return c}
1897
1896
  olympe.sc.ui.ef=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.V=c}CA(){return this.ml(olympe.sc.ui.ef.O).zf()}nA(){return this.ml(olympe.sc.ui.ef.C).zf()}lA(){return this.pc(olympe.sc.ui.ef.R,olympe.dm.Property).Vd()}C(){return this.pc(olympe.sc.ui.ef.D,olympe.sc.ui.th)}};olympe.sc.ui.ef.U=olympe.dc.Ja.C('01619a10457e749fdf59',olympe.sc.ui.ef,olympe.sc.ba.Vb);olympe.sc.ui.ef.O=olympe.sc.ui.ef.U.tb('01619a16a406bf504c9f');olympe.sc.ui.ef.C=olympe.sc.ui.ef.U.tb('01619a16a406bf504c9e');
1898
- olympe.sc.ui.ef.R=olympe.sc.ui.ef.U.tb('01619a16a406bf504c90');olympe.sc.ui.ef.D=olympe.sc.ui.ef.U.tb('0162befc703dfd7b93b4');Y(olympe.dm.Property.U,olympe.sc.ui.ef.R);olympe.sc.ui.ef.prototype.CA.K=new olympe.j.J(()=>olympe.sc.ui.Screen,[]);olympe.sc.ui.ef.prototype.nA.K=new olympe.j.J(()=>olympe.sc.ui.Screen,[]);olympe.sc.ui.ef.prototype.lA.K=new olympe.j.J(()=>olympe.dm.Property,[]);olympe.sc.ui.ef.prototype.C.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.ui.Oz=class extends olympe.sc.Fb.Ss{constructor(a,b,c,d,e,f){super(a,b,c);this.D=d;this.C=e;this.Pa=f}ue(a){this.render(a);super.ue(a);const b=ge(this.C,olympe.Y.xj.Vf,c=>{c.c===olympe.Y.xt.JU&&(0<lk(olympe.dc.nb.from(olympe.sc.ui.Vh.za).oc(olympe.sc.logic.jd.gy.fe()),[olympe.sc.logic.jd.Ks],this.De()).zf().size()?(this.V.debug('A custom listener has been set for the onUpgradeDone event.'),a.Qq(olympe.sc.ui.Vh.za)):(new olympe.sc.ui.Z.TU(this.Pa)).Sk(!0))});a.onDestroy(()=>oe(this.C,olympe.Y.xj.Vf,
1899
- b))}render(a){const b=this.D.hf();var c=this.za();const d=this.kg();this.D.ci(d.bb());this.V.debug('Loading fonts');hq(c,Vo(a)).forEach(f=>{b.tI(f)});this.V.debug('Apply theme');d.C().oM(a);const e=d.D();c=Ro(a,e.ka());xq(b.na(),c);c.qB(olympe.sc.Hb.C.vp).then(f=>{a.set(olympe.sc.Hb.C.wB,!0);b.appendChild(f,'ui_app_screenflow')}).catch(()=>this.V.warn(`Screenflow ${e.ka()} has not been rendered.`))}};
1897
+ olympe.sc.ui.ef.R=olympe.sc.ui.ef.U.tb('01619a16a406bf504c90');olympe.sc.ui.ef.D=olympe.sc.ui.ef.U.tb('0162befc703dfd7b93b4');Y(olympe.dm.Property.U,olympe.sc.ui.ef.R);olympe.sc.ui.ef.prototype.CA.K=new olympe.j.J(()=>olympe.sc.ui.Screen,[]);olympe.sc.ui.ef.prototype.nA.K=new olympe.j.J(()=>olympe.sc.ui.Screen,[]);olympe.sc.ui.ef.prototype.lA.K=new olympe.j.J(()=>olympe.dm.Property,[]);olympe.sc.ui.ef.prototype.C.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.ui.Oz=class extends olympe.sc.Fb.Ss{constructor(a,b,c,d,e,f){super(a,b,c);this.D=d;this.C=e;this.Pa=f}ue(a){this.render(a);super.ue(a);const b=ge(this.C,olympe.Y.xj.Vf,c=>{c.c===olympe.Y.xt.JU&&(0<mk(olympe.dc.nb.from(olympe.sc.ui.Vh.za).oc(olympe.sc.logic.jd.gy.fe()),[olympe.sc.logic.jd.Ks],this.De()).zf().size()?(this.V.debug('A custom listener has been set for the onUpgradeDone event.'),a.Qq(olympe.sc.ui.Vh.za)):(new olympe.sc.ui.Z.TU(this.Pa)).Sk(!0))});a.onDestroy(()=>oe(this.C,olympe.Y.xj.Vf,
1898
+ b))}render(a){const b=this.D.hf();var c=this.za();const d=this.kg();this.D.ci(d.bb());this.V.debug('Loading fonts');iq(c,Wo(a)).forEach(f=>{b.tI(f)});this.V.debug('Apply theme');d.C().oM(a);const e=d.D();c=So(a,e.ka());yq(b.na(),c);c.qB(olympe.sc.Hb.C.vp).then(f=>{a.set(olympe.sc.Hb.C.wB,!0);b.appendChild(f,'ui_app_screenflow')}).catch(()=>this.V.warn(`Screenflow ${e.ka()} has not been rendered.`))}};
1900
1899
  olympe.sc.ui.Oz.U=olympe.dc.Ja.C('0113031000000aca1101',olympe.sc.ui.Oz,olympe.sc.ba.Vb,olympe.ui.ba.Ob,olympe.Y.ba.Jt,olympe.host.ba.Lt);olympe.sc.ui.Vh=class extends olympe.sc.Fb.Pg{Di(){return olympe.sc.jf.Yi.HK}C(){return this.Ig(olympe.sc.ui.Vh.$,olympe.sc.ui.vh)}D(){const a=this.db.eA(this.tag,[olympe.sc.yc.R],b=>this.db.me(b,olympe.sc.ui.Z.fl));if(null===a)throw Error('Cannot find the Screenflow associated to the UIApplication. The UIApplication was likely badly created.');return olympe.dc.CloudObject.get(a)}R(){return this.Vw().Mr().me([olympe.sc.ui.Z.fl]).ek()}};
1901
1900
  olympe.sc.ui.Vh.U=olympe.dc.Ja.C('011203100000000adef1',olympe.sc.ui.Vh,olympe.ui.ba.Ob,olympe.sc.ba.Vb);olympe.sc.ui.Vh.za=olympe.sc.Fb.Pg.U.fa('016200d21c9069cf23a3');olympe.sc.ui.Vh.$=olympe.sc.ui.Vh.U.tb('016200d21c9069cf23b4');
1902
- olympe.sc.ui.Vh.U.C=(a,b,c,d)=>{b=Gn(a,b||'New UI App',olympe.sc.ui.Vh,olympe.sc.ui.Oz);var e=olympe.oa.Rr();e=olympe.dc.CloudObject.yf(a,olympe.sc.ui.Z.fl,'UIApp Screenflow',e);a.Qb(olympe.sc.yc.R,b,e);a.Qb(olympe.dc.CloudObject.containsRel,b,e);a.Qb(olympe.sc.Fb.Pg.C,b,c);d&&a.Qb(olympe.sc.ui.Vh.$,b,d);return b.ka()};olympe.sc.ui.Vh.prototype.C.K=new olympe.j.J(()=>olympe.sc.ui.vh,[]);olympe.sc.ui.Vh.prototype.D.K=olympe.j.J.O;olympe.sc.ui.Screen=class extends olympe.sc.ui.Renderable{T(){return[this.ma,this.Pa,this.ca,this.za,this.$]}Pa(a,b){if(a=a.Qa('MAP_PROPS'))for(const [c,d]of a)b(c,d)}};olympe.sc.ui.Screen.U=olympe.dc.Ja.C('01612df3703450d895ac',olympe.sc.ui.Screen);olympe.sc.ui.Screen.O=Y(olympe.sc.ui.Screen.U,olympe.sc.ui.ef.C);olympe.sc.ui.Screen.sb=Y(olympe.sc.ui.Screen.U,olympe.sc.ui.ef.O);olympe.sc.ui.Screen.za=olympe.sc.ui.Screen.U.fa('01648dde0de293c23f90');olympe.sc.ui.Screen.T=olympe.sc.ui.Screen.U.fa('01648dde0de252c9f851');
1901
+ olympe.sc.ui.Vh.U.C=(a,b,c,d)=>{b=Hn(a,b||'New UI App',olympe.sc.ui.Vh,olympe.sc.ui.Oz);var e=olympe.oa.Rr();e=olympe.dc.CloudObject.yf(a,olympe.sc.ui.Z.fl,'UIApp Screenflow',e);a.Qb(olympe.sc.yc.R,b,e);a.Qb(olympe.dc.CloudObject.containsRel,b,e);a.Qb(olympe.sc.Fb.Pg.C,b,c);d&&a.Qb(olympe.sc.ui.Vh.$,b,d);return b.ka()};olympe.sc.ui.Vh.prototype.C.K=new olympe.j.J(()=>olympe.sc.ui.vh,[]);olympe.sc.ui.Vh.prototype.D.K=olympe.j.J.O;olympe.sc.ui.Screen=class extends olympe.sc.ui.Renderable{T(){return[this.ma,this.Pa,this.ca,this.za,this.$]}Pa(a,b){if(a=a.Qa('MAP_PROPS'))for(const [c,d]of a)b(c,d)}};olympe.sc.ui.Screen.U=olympe.dc.Ja.C('01612df3703450d895ac',olympe.sc.ui.Screen);olympe.sc.ui.Screen.O=Y(olympe.sc.ui.Screen.U,olympe.sc.ui.ef.C);olympe.sc.ui.Screen.sb=Y(olympe.sc.ui.Screen.U,olympe.sc.ui.ef.O);olympe.sc.ui.Screen.za=olympe.sc.ui.Screen.U.fa('01648dde0de293c23f90');olympe.sc.ui.Screen.T=olympe.sc.ui.Screen.U.fa('01648dde0de252c9f851');
1903
1902
  olympe.sc.ui.Screen.Ka=olympe.sc.ui.Screen.U.fa('01648dde0de26fef1ae0');olympe.sc.ui.Screen.Oa=olympe.sc.ui.Screen.U.fa('01648dde0de218c6a40b');olympe.sc.ui.Screen.ma=olympe.sc.ui.Screen.U.fa('01648dde0de2ffac7f66');olympe.sc.ui.Screen.Pa=olympe.sc.ui.Screen.U.fa('01648dde0de283af36bd');olympe.sc.ui.Screen.R=olympe.sc.ui.Screen.U.fa('01648dde0de2ea82e114');Y(olympe.sc.ui.Screen.U,olympe.sc.ui.ll.C);olympe.sc.ui.dL=class extends olympe.sc.ui.Screen{D(){const a=new olympe.ui.F.Xe(new olympe.j.ga(100,100));a.Ma(Ac());return a}};olympe.sc.ui.dL.U=olympe.dc.Ja.C('016402313e7c1e9fd8fa',olympe.sc.ui.dL);olympe.sc.ui.th=class extends olympe.dc.CloudObject{nA(){return this.pc(olympe.sc.ui.th.C,olympe.dm.Property).Vd()}CA(){return this.pc(olympe.sc.ui.th.D,olympe.dm.Property).Vd()}};olympe.sc.ui.th.O='MAP_PROPS';olympe.sc.ui.th.U=olympe.dc.Ja.C('0162d3e045580eac6c53',olympe.sc.ui.th);olympe.sc.ui.th.C=olympe.sc.ui.th.U.tb('0162bef0c00ce7782cee');olympe.sc.ui.th.D=olympe.sc.ui.th.U.tb('0162bef120e8ca8f61a3');olympe.sc.ui.th.R=Y(olympe.sc.ui.th.U,olympe.sc.ui.ef.D);Y(olympe.dm.Property.U,olympe.sc.ui.th.C);
1904
- Y(olympe.dm.Property.U,olympe.sc.ui.th.D);olympe.sc.ui.th.prototype.nA.K=new olympe.j.J(()=>olympe.dm.Property,[]);olympe.sc.ui.th.prototype.CA.K=new olympe.j.J(()=>olympe.dm.Property,[]);olympe.sc.ui.xL=class extends olympe.dc.CloudObject{};olympe.sc.ui.xL.U=olympe.dc.Ja.C('0162d3ede786c89fb31b',olympe.sc.ui.xL);olympe.sc.ui.UIEvent=class extends olympe.dc.CloudObject{};olympe.sc.ui.UIEvent.U=olympe.dc.Ja.C('0163fe51d83dad2a0f4b',olympe.sc.ui.UIEvent);olympe.sc.ui.wL=class extends olympe.dc.CloudObject{};olympe.sc.ui.wL.U=olympe.dc.Ja.C('016c865bbf883591cc25',olympe.sc.ui.wL);function wq(a,b,c){return a+'^'+b+'^'+('string'===typeof c?c:c.ka())}function Bq(a,b){void 0===a.C[b]&&(a.C[b]=new olympe.dc.Kb(b,[new olympe.dc.Ra.zj(olympe.dc.Lf.bt,olympe.dc.Ib.DESTINATION,0),olympe.sc.ui.Aj.$],olympe.dm.Property));return a.C[b].getSubscription()}
1905
- olympe.sc.ui.vh=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.C={};this.O=c}oM(a){if(!this.O){var b=this.db;this.D().forEach(c=>{const d=b.model(c);olympe.j.Wa([c.bb(),c.Rd(olympe.sc.ui.Renderable.ob)],(e,f)=>{const g=wq(e,d,'');a.Qa(g)||(a.set(g,!0),Bq(this,d).forEach(k=>{const l=wq(e,d,k);let m=null,n=null;const p=()=>{null!==m?a.set(l,m):null!==n?a.set(l,n):a.remove(l)},r=Pi(b,c,k,(t,u)=>{m=u?null:t;p()});if(!e.Rb(f)){const t=wq(f,d,k);a.on(t,u=>{n=u;p()})}olympe.j.yb().Ve(()=>
1903
+ Y(olympe.dm.Property.U,olympe.sc.ui.th.D);olympe.sc.ui.th.prototype.nA.K=new olympe.j.J(()=>olympe.dm.Property,[]);olympe.sc.ui.th.prototype.CA.K=new olympe.j.J(()=>olympe.dm.Property,[]);olympe.sc.ui.xL=class extends olympe.dc.CloudObject{};olympe.sc.ui.xL.U=olympe.dc.Ja.C('0162d3ede786c89fb31b',olympe.sc.ui.xL);olympe.sc.ui.UIEvent=class extends olympe.dc.CloudObject{};olympe.sc.ui.UIEvent.U=olympe.dc.Ja.C('0163fe51d83dad2a0f4b',olympe.sc.ui.UIEvent);olympe.sc.ui.wL=class extends olympe.dc.CloudObject{};olympe.sc.ui.wL.U=olympe.dc.Ja.C('016c865bbf883591cc25',olympe.sc.ui.wL);function xq(a,b,c){return a+'^'+b+'^'+('string'===typeof c?c:c.ka())}function Cq(a,b){void 0===a.C[b]&&(a.C[b]=new olympe.dc.Kb(b,[new olympe.dc.Ra.zj(olympe.dc.Lf.bt,olympe.dc.Ib.DESTINATION,0),olympe.sc.ui.Aj.$],olympe.dm.Property));return a.C[b].getSubscription()}
1904
+ olympe.sc.ui.vh=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.C={};this.O=c}oM(a){if(!this.O){var b=this.db;this.D().forEach(c=>{const d=b.model(c);olympe.j.Wa([c.bb(),c.Rd(olympe.sc.ui.Renderable.ob)],(e,f)=>{const g=xq(e,d,'');a.Qa(g)||(a.set(g,!0),Cq(this,d).forEach(k=>{const l=xq(e,d,k);let m=null,n=null;const p=()=>{null!==m?a.set(l,m):null!==n?a.set(l,n):a.remove(l)},r=Pi(b,c,k,(t,u)=>{m=u?null:t;p()});if(!e.Rb(f)){const t=xq(f,d,k);a.on(t,u=>{n=u;p()})}olympe.j.yb().Ve(()=>
1906
1905
  {Qi(b,c,k,r);a.remove(l)})}),olympe.j.yb().Ve(()=>{a.set(g,!1)}))})})}}Di(){return olympe.sc.jf.Yi.oD}D(){return this.pc(olympe.sc.ui.vh.C,olympe.sc.ui.Renderable)}};olympe.sc.ui.vh.U=olympe.dc.Ja.C('0161d7b7e11e93199927',olympe.sc.ui.vh,new olympe.sa.zb(olympe.sc.pa.VB));olympe.sc.ui.vh.O=Y(olympe.sc.ui.vh.U,olympe.sc.ui.Vh.$);olympe.sc.ui.vh.C=olympe.sc.ui.vh.U.tb('0170171c1c9e2f1555bb');Y(olympe.sc.ui.Renderable.U,olympe.sc.ui.vh.C);olympe.sc.ui.vh.D=Hh('01644110be563fae3bf9','DEFAULT_THEME');
1907
1906
  olympe.sc.ui.vh.prototype.oM.K=new olympe.j.J(()=>{},[]);olympe.sc.ui.vh.prototype.D.K=new olympe.j.J(()=>olympe.dc.Kb,[]);olympe.sc.ui.ThemeModel=class extends olympe.sc.qg{};olympe.sc.ui.ThemeModel.U=olympe.dc.Ja.C('018170e67563c0afc0bb',olympe.sc.ui.ThemeModel);olympe.sc.ui.ThemeModel.nameProp=olympe.sc.ui.ThemeModel.U.fa('018170e8784d922f000e');olympe.sc.ui.ThemeModel.primaryColorProp=olympe.sc.ui.ThemeModel.U.fa('018170ee2608eacd830c');olympe.sc.ui.ThemeModel.secondaryColorProp=olympe.sc.ui.ThemeModel.U.fa('018170ee44ec5d550b90');olympe.sc.ui.ThemeModel.errorColorProp=olympe.sc.ui.ThemeModel.U.fa('018170ee5d9539e6d248');
1908
1907
  olympe.sc.ui.ThemeModel.warningColorProp=olympe.sc.ui.ThemeModel.U.fa('018170ee7bbb1e53309c');olympe.sc.ui.ThemeModel.infoColorProp=olympe.sc.ui.ThemeModel.U.fa('018170ee9a10111a31b4');olympe.sc.ui.ThemeModel.successColorProp=olympe.sc.ui.ThemeModel.U.fa('018170eeb3a585062ad4');olympe.sc.ui.ThemeModel.fontFamilyProp=olympe.sc.ui.ThemeModel.U.fa('018170ef10002db20904');olympe.sc.ui.Sg=class extends olympe.dm.hm{gf(){return this.yg(olympe.sc.ui.Sg.C)}C(){return this.oc(olympe.sc.ui.Sg.D).zf()}};olympe.sc.ui.Sg.U=olympe.dc.Ja.C('01611e77c1becc16025b',olympe.sc.ui.Sg);olympe.sc.ui.Sg.C=olympe.sc.ui.Sg.U.fa('01611e7ad37b715e393d');olympe.sc.ui.Sg.propertyRel=olympe.sc.ui.Sg.U.tb('01611e7cd458bd5607ac');olympe.sc.ui.Sg.D=olympe.sc.ui.Sg.U.tb('016952415429cb0a0c0a');olympe.sc.ui.Sg.W=Hh('0164188f5cc0c205bc06','CUSTOM_PROPERTIES_TAB_CAT');
@@ -1913,11 +1912,11 @@ olympe.sc.ui.Ze.Comment.C=olympe.sc.ui.Ze.Comment.U.tb('0184be3f135a83fd6cc3');o
1913
1912
  c=>{a.set(olympe.sc.ui.Z.he.O,c.Re())});b.Ik(this.O(olympe.sc.ui.Z.he.sb,a,olympe.j.aa,b.volume.wa(),olympe.j.aa.ONE));olympe.j.Fl([this.Ea(olympe.sc.ui.Z.he.Oa,a,olympe.j.aa)],c=>{olympe.j.Qa(this.Ea(olympe.sc.ui.Z.he.O,a,olympe.j.ia)).valueOf()||b.Gk(c)});olympe.j.Fl([b.O.wa()],c=>{a.set(olympe.sc.ui.Z.he.Oa,c.hb(100).trunc().Ua(100))});olympe.j.Wa([b.duration.wa()],c=>{a.set(olympe.sc.ui.Z.he.xb,c)});return b}};olympe.sc.ui.Z.he.U=olympe.dc.Ja.C('016c04e78462a540a8e0',olympe.sc.ui.Z.he);
1914
1913
  olympe.sc.ui.Z.he.urlProp=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e1');olympe.sc.ui.Z.he.Ka=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e2');olympe.sc.ui.Z.he.ma=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e3');olympe.sc.ui.Z.he.sb=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e5');olympe.sc.ui.Z.he.O=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e4');olympe.sc.ui.Z.he.xb=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e7');olympe.sc.ui.Z.he.Oa=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e6');
1915
1914
  olympe.sc.ui.Z.he.za=olympe.sc.ui.Z.he.U.fa('016c04e78462a540a8e8');olympe.sc.ui.Z.he.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.he);b&&Z(a,olympe.dc.CloudObject.nameProp,b);Z(a,olympe.sc.ui.Renderable.C,olympe.j.Ba(384));Z(a,olympe.sc.ui.Renderable.D,olympe.j.Ba(55));Z(a,olympe.sc.ui.Z.he.Ka,olympe.j.ia.C);Z(a,olympe.sc.ui.Z.he.ma,olympe.j.ia.pb);Z(a,olympe.sc.ui.Z.he.za,olympe.j.ia.pb);Z(a,olympe.sc.ui.Z.he.sb,olympe.j.aa.ONE);return a.ka()};olympe.sc.ui.Z.jc=class extends olympe.sc.ui.Pd{D(a){var b=olympe.j.Color,c=olympe.j.ia;const d=olympe.sc.ui.Z.jc.ma;var e=olympe.sc.ui.Z.jc.za;const f=olympe.sc.ui.Z.jc.lD,g=olympe.sc.ui.Renderable.C,k=olympe.sc.ui.Renderable.D,l=new olympe.ui.F.jc(this.na(a));this.C(l,a);const m=this.Ea(olympe.sc.ui.Renderable.$,a,b);var n=this.Ea(olympe.sc.ui.Z.jc.ag,a,b);l.Zj(n);l.uC(this.Ea(olympe.sc.ui.Z.jc.Pb,a,b));const p=this.Ea(olympe.sc.ui.Z.jc.Yc,a,b);l.Ma(olympe.j.$a(l.Ih(),()=>p,()=>m,olympe.j.Color));
1916
- const r=this.Ea(olympe.sc.ui.Pd.Ka,a,b);n=this.Ea(olympe.sc.ui.Z.jc.Ls,a,b);l.wC(n);l.vC(this.Ea(olympe.sc.ui.Z.jc.kc,a,b));const t=this.Ea(olympe.sc.ui.Z.jc.gd,a,b);l.Ex(olympe.j.$a(l.Ih(),()=>t,()=>r,b));l.Cf(this.Ea(olympe.sc.ui.Z.jc.qc,a,c));b=this.Ea(olympe.sc.ui.Z.jc.vg,a,olympe.j.aa);n=this.Ea(olympe.sc.ui.Z.jc.Hg,a,olympe.j.aa);l.Yd(this.Ea(e,a,c),b);l.Ed(this.Ea(d,a,c),n);e=this.Ea(e,a,c,olympe.j.ia.pb);c=this.Ea(d,a,c,olympe.j.ia.pb);olympe.j.$a(e,()=>{Yp(this.Ea(f,a,olympe.sc.Br),a,g,olympe.j.Xa([l.na().qa()],
1917
- u=>u.valueOf(),Number))});olympe.j.$a(c,()=>{Yp(this.Ea(f,a,olympe.sc.Br),a,k,olympe.j.Xa([l.na().ta()],u=>u.valueOf(),Number))});Uo(a)&&(c=this.Ea(olympe.sc.ui.Pd.O,a,olympe.j.kb,olympe.j.ic('%UNDEFINED%')),l.Jb(olympe.j.Xa([c],u=>olympe.sc.logic.gG.C(this)?u.Rb('%UNDEFINED%')||u.Fi&&u.Fi().valueOf()?olympe.j.ic('%COMPUTED VALUE%'):u:u,olympe.j.kb)));return l}};olympe.sc.ui.Z.jc.U=olympe.dc.Ja.C('01612df3ae3701933b03',olympe.sc.ui.Z.jc);olympe.sc.ui.Z.jc.za=olympe.sc.ui.Z.jc.U.fa('016c8b3713bf8f4db871');
1915
+ const r=this.Ea(olympe.sc.ui.Pd.Ka,a,b);n=this.Ea(olympe.sc.ui.Z.jc.Ls,a,b);l.wC(n);l.vC(this.Ea(olympe.sc.ui.Z.jc.kc,a,b));const t=this.Ea(olympe.sc.ui.Z.jc.gd,a,b);l.Ex(olympe.j.$a(l.Ih(),()=>t,()=>r,b));l.Cf(this.Ea(olympe.sc.ui.Z.jc.qc,a,c));b=this.Ea(olympe.sc.ui.Z.jc.vg,a,olympe.j.aa);n=this.Ea(olympe.sc.ui.Z.jc.Hg,a,olympe.j.aa);l.Yd(this.Ea(e,a,c),b);l.Ed(this.Ea(d,a,c),n);e=this.Ea(e,a,c,olympe.j.ia.pb);c=this.Ea(d,a,c,olympe.j.ia.pb);olympe.j.$a(e,()=>{Zp(this.Ea(f,a,olympe.sc.Br),a,g,olympe.j.Xa([l.na().qa()],
1916
+ u=>u.valueOf(),Number))});olympe.j.$a(c,()=>{Zp(this.Ea(f,a,olympe.sc.Br),a,k,olympe.j.Xa([l.na().ta()],u=>u.valueOf(),Number))});Vo(a)&&(c=this.Ea(olympe.sc.ui.Pd.O,a,olympe.j.kb,olympe.j.ic('%UNDEFINED%')),l.Jb(olympe.j.Xa([c],u=>olympe.sc.logic.gG.C(this)?u.Rb('%UNDEFINED%')||u.Fi&&u.Fi().valueOf()?olympe.j.ic('%COMPUTED VALUE%'):u:u,olympe.j.kb)));return l}};olympe.sc.ui.Z.jc.U=olympe.dc.Ja.C('01612df3ae3701933b03',olympe.sc.ui.Z.jc);olympe.sc.ui.Z.jc.za=olympe.sc.ui.Z.jc.U.fa('016c8b3713bf8f4db871');
1918
1917
  olympe.sc.ui.Z.jc.ma=olympe.sc.ui.Z.jc.U.fa('016c8b3713bf8f4db872');olympe.sc.ui.Z.jc.vg=olympe.sc.ui.Z.jc.U.fa('0170ca4983528b9f6bd7');olympe.sc.ui.Z.jc.Hg=olympe.sc.ui.Z.jc.U.fa('0170ca4991f5dcc3a484');olympe.sc.ui.Z.jc.ag=olympe.sc.ui.Z.jc.U.fa('016437688914581fea4d');olympe.sc.ui.Z.jc.Yc=olympe.sc.ui.Z.jc.U.fa('016437688914b03261ce');olympe.sc.ui.Z.jc.Pb=olympe.sc.ui.Z.jc.U.fa('0168997eefed6611afa2');olympe.sc.ui.Z.jc.Ls=olympe.sc.ui.Z.jc.U.fa('016437688914bcb67a39');olympe.sc.ui.Z.jc.gd=olympe.sc.ui.Z.jc.U.fa('016437688914221515ed');
1919
1918
  olympe.sc.ui.Z.jc.kc=olympe.sc.ui.Z.jc.U.fa('0168997f731e2170e16e');olympe.sc.ui.Z.jc.qc=olympe.sc.ui.Z.jc.U.fa('0168990cc9a77f2a16b8');olympe.sc.ui.Z.jc.lD=olympe.sc.ui.Z.jc.U.fa('016d3f37610ae4fc3964');olympe.sc.ui.Z.jc.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.jc);b&&(Z(a,olympe.dc.CloudObject.nameProp,b),Z(a,olympe.sc.ui.Pd.O,b));return a.ka()};olympe.sc.ui.Z.jc.prototype.D.K=new olympe.j.J(()=>olympe.ui.F.jc,[]);olympe.sc.ui.Z.He=class extends olympe.sc.ui.Ga{D(a){const b=new olympe.ui.F.He(this.na(a)),c=olympe.j.Xa([b.qA()],d=>d.valueOf(),Boolean);b.Ff(this.O(olympe.sc.ui.Z.He.valueProp,a,Boolean,c));this.C(b,a);b.Ma(olympe.j.$a(b.qA(),()=>this.Ea(olympe.sc.ui.Z.He.za,a,olympe.j.Color),()=>this.Ea(olympe.sc.ui.Renderable.$,a,olympe.j.Color),olympe.j.Color));b.YD().Ld(this.Ea(olympe.sc.ui.Z.He.Oa,a,olympe.j.aa),this.Ea(olympe.sc.ui.Z.He.Ka,a,olympe.j.Color));b.YD().Ma(olympe.j.$a(b.qA(),()=>this.Ea(olympe.sc.ui.Z.He.xb,
1920
- a,olympe.j.Color),()=>this.Ea(olympe.sc.ui.Z.He.sb,a,olympe.j.Color),olympe.j.Color));b.Df(this.Ea(olympe.sc.ui.Z.He.O,a,olympe.j.aa,olympe.j.aa.ZERO));rq(a,b,olympe.sc.ui.Z.He.ma,b.Ka.bind(b),b.Ha.bind(b));return b}};olympe.sc.ui.Z.He.U=olympe.dc.Ja.C('0161bce1f151ed95683f',olympe.sc.ui.Z.He);olympe.sc.ui.Z.He.valueProp=olympe.sc.ui.Z.He.U.fa('0161bce236ebb4125ff7');olympe.sc.ui.Z.He.ma=olympe.sc.ui.Z.He.U.fa('0161bce2516b5beb66ee');olympe.sc.ui.Z.He.za=olympe.sc.ui.Z.He.U.fa('016952bd9b2945e0cf2d');
1919
+ a,olympe.j.Color),()=>this.Ea(olympe.sc.ui.Z.He.sb,a,olympe.j.Color),olympe.j.Color));b.Df(this.Ea(olympe.sc.ui.Z.He.O,a,olympe.j.aa,olympe.j.aa.ZERO));sq(a,b,olympe.sc.ui.Z.He.ma,b.Ka.bind(b),b.Ha.bind(b));return b}};olympe.sc.ui.Z.He.U=olympe.dc.Ja.C('0161bce1f151ed95683f',olympe.sc.ui.Z.He);olympe.sc.ui.Z.He.valueProp=olympe.sc.ui.Z.He.U.fa('0161bce236ebb4125ff7');olympe.sc.ui.Z.He.ma=olympe.sc.ui.Z.He.U.fa('0161bce2516b5beb66ee');olympe.sc.ui.Z.He.za=olympe.sc.ui.Z.He.U.fa('016952bd9b2945e0cf2d');
1921
1920
  olympe.sc.ui.Z.He.Oa=olympe.sc.ui.Z.He.U.fa('016eef124b767b01de0e');olympe.sc.ui.Z.He.Ka=olympe.sc.ui.Z.He.U.fa('016eef2694489f36a6d3');olympe.sc.ui.Z.He.sb=olympe.sc.ui.Z.He.U.fa('016eeb3de5c4036fe1fa');olympe.sc.ui.Z.He.xb=olympe.sc.ui.Z.He.U.fa('016eeb3df78614f0290b');olympe.sc.ui.Z.He.O=olympe.sc.ui.Z.He.U.fa('016eeb5e545fbe43dd7a');olympe.sc.ui.Z.He.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.He);b&&Z(a,olympe.dc.CloudObject.nameProp,b);return a.ka()};olympe.sc.ui.Z.eg=class extends olympe.sc.ui.Ga{D(a){const b=new Intl.DateTimeFormat(void 0,{month:'long'});var c=this.yg(olympe.sc.ui.Z.eg.ma),d=this.yg(olympe.sc.ui.Z.eg.O);const e=new olympe.ui.F.WF(new olympe.j.ga(c,d),{oZ:(m,n)=>{m.Jb(olympe.j.ic(n.day));m.Ma(olympe.j.$a(n.oq,()=>O(),()=>Dc(),olympe.j.Color));m.Xb(olympe.ui.ha.rc.Sc);m.Ub(olympe.ui.ha.Db.Sb);m.lb(olympe.j.$a(n.oq,()=>zc('dark slate gray',69,90,100,1),()=>olympe.j.$a(n.iE,()=>zc('dark cyan',0,150,136,1),()=>olympe.j.$a(n.fE,()=>
1922
1921
  O(),()=>Ac(),olympe.j.Color),olympe.j.Color),olympe.j.Color));m.Bb(olympe.j.$a(n.iE.and(n.oq.Re()),()=>700,()=>400,Number));m.Wb(5)},CX:(m,n,p)=>{m.Jb(olympe.j.Xa([p],r=>olympe.j.ic(b.format(r.nv())),olympe.j.kb)).Bb(800).lb(O());n.Jb(p.getYear().og()).Bb(800).lb(O());m.Xb(olympe.ui.ha.rc.Sc);m.Ub(olympe.ui.ha.Db.Sb);n.Xb(olympe.ui.ha.rc.Sc);n.Ub(olympe.ui.ha.Db.Sb)},tV:(m,n)=>{m.Jb('<'===n?'\uf104':'\uf105').Bb(800).vb('FontAwesome').lb(O()).Xb(olympe.ui.ha.rc.Sc).Ub(olympe.ui.ha.Db.Sb)},vZ:(m,n)=>
1923
1922
  {m.Jb('Mo Tu We Th Fr Sa Su'.split(' ')[n]);m.lb(O());m.Xb(olympe.ui.ha.rc.Sc);m.Ub(olympe.ui.ha.Db.Sb)}});e.Ma(olympe.j.Color.create(69,90,100));d=olympe.j.Qa(olympe.j.ac.now());e.Wx(d);e.$A(d);olympe.j.Wa([this.Ea(olympe.sc.ui.Z.eg.za,a,olympe.j.kb)],m=>{'DD.MM.YYYY'!==m.valueOf()&&this.V.warn('[DatePicker] Using custom format is no longer supported! Date will be formatted as DD.MM.YYYY!')});d=this.O(olympe.sc.ui.Z.eg.valueProp,a,String,olympe.j.Xa([e.zA()],m=>m.mp().valueOf(),String),olympe.j.ac.now().mp().valueOf());
@@ -1926,49 +1925,49 @@ n=olympe.ui.Na.hf();m?(l&&(n.Pj(l.valueOf()),l=void 0),f.update(olympe.j.ia.pb))
1926
1925
  olympe.sc.ui.Z.eg.U=olympe.dc.Ja.C('01719cda197c37ff5018',olympe.sc.ui.Z.eg);olympe.sc.ui.Z.eg.valueProp=olympe.sc.ui.Z.eg.U.fa('01719cdb1c36b870db0d');olympe.sc.ui.Z.eg.za=olympe.sc.ui.Z.eg.U.fa('01611e3015371b459ce8');olympe.sc.ui.Z.eg.ma=olympe.sc.ui.Z.eg.U.fa('01611e3015371b459cf9');olympe.sc.ui.Z.eg.O=olympe.sc.ui.Z.eg.U.fa('01611e3015371b459cd5');
1927
1926
  olympe.sc.ui.Z.eg.U.C=(a,b)=>{a=a.create(olympe.sc.ui.Z.eg);Z(a,olympe.dc.CloudObject.nameProp,b);Z(a,olympe.sc.ui.Z.eg.za,'DD.MM.YYYY');Z(a,olympe.sc.ui.Z.eg.valueProp,olympe.j.ac.now().mp());Z(a,olympe.sc.ui.Z.eg.ma,250);Z(a,olympe.sc.ui.Z.eg.O,250);Z(a,olympe.sc.ui.Renderable.C,olympe.j.Ba(250));Z(a,olympe.sc.ui.Renderable.D,olympe.j.Ba(40));return a.ka()};olympe.sc.ui.Z.od=class extends olympe.sc.ui.Pd{D(a){const b=this.Ea(olympe.sc.ui.Z.od.qc,a,olympe.j.Kk),c=this.Ea(olympe.sc.ui.Z.od.kc,a,olympe.sc.logic.Function,null),d=this.na(a),e=new olympe.ui.F.od(d,b,{render:(g,k)=>{const l=new olympe.ui.F.cb(k);l.Fc(5);this.C(l,a);olympe.j.Wa([c,g],(m,n)=>{if(null===m)l.Jb('');else{const p=a.wo('dropdown_renderer'),[r]=m.getInputs(),[t]=m.getOutputs();p.set(r,n);m.run(p);l.Jb(p.wa(t,String,!0))}});return l},getType:()=>olympe.dc.CloudObject});e.Kc(10);e.Og(olympe.j.kb.cD.bA(this.Ea(olympe.sc.ui.Z.od.Pb,
1928
1927
  a,olympe.j.kb)));this.C(e.ob,a);e.$O(this.Ea(olympe.sc.ui.Z.od.ag,a,olympe.j.ia,olympe.j.ia.pb));e.iP(d.ta().Ua(2).vn(this.Ea(olympe.sc.ui.Z.od.Ls,a,olympe.j.aa,olympe.j.aa.ZERO)));e.YO(this.Ea(olympe.sc.ui.Z.od.Hg,a,olympe.j.aa,olympe.j.Ba(10)));e.yC(new olympe.j.ga(this.Ea(olympe.sc.ui.Z.od.vg,a,olympe.j.aa),this.Ea(olympe.sc.ui.Z.od.Yc,a,olympe.j.aa)));e.zC(this.Ea(olympe.sc.ui.Z.od.gd,a,olympe.j.kb));this.C(e,a);olympe.j.cg(e.T,g=>{a.set(olympe.sc.ui.Z.od.za,g)});this.O(olympe.sc.ui.Z.od.ma,a,
1929
- olympe.j.ia,e.BO(),olympe.j.ia.pb);a.on(olympe.sc.ui.Z.od.ma,g=>{e.cP(g)},this);const f=this.Ea(olympe.sc.ui.Z.od.za,a,olympe.dc.CloudObject);e.ma.forEach((g,k)=>{olympe.j.$a(olympe.j.Xa([f,g],(l,m)=>olympe.j.hc(l.ka&&l.ka()===m.ka()),olympe.j.ia),()=>e.qP(k))});rq(a,e,olympe.sc.ui.Z.od.lD,e.ag.bind(e),e.lg.bind(e));return e}};olympe.sc.ui.Z.od.U=olympe.dc.Ja.C('01646ac1cbb34f2ae625',olympe.sc.ui.Z.od);olympe.sc.ui.Z.od.qc=olympe.sc.ui.Z.od.U.fa('01646ac1ce7698272467');olympe.sc.ui.Z.od.kc=olympe.sc.ui.Z.od.U.fa('01646ac1cf8521b01aba');
1928
+ olympe.j.ia,e.BO(),olympe.j.ia.pb);a.on(olympe.sc.ui.Z.od.ma,g=>{e.cP(g)},this);const f=this.Ea(olympe.sc.ui.Z.od.za,a,olympe.dc.CloudObject);e.ma.forEach((g,k)=>{olympe.j.$a(olympe.j.Xa([f,g],(l,m)=>olympe.j.hc(l.ka&&l.ka()===m.ka()),olympe.j.ia),()=>e.qP(k))});sq(a,e,olympe.sc.ui.Z.od.lD,e.ag.bind(e),e.lg.bind(e));return e}};olympe.sc.ui.Z.od.U=olympe.dc.Ja.C('01646ac1cbb34f2ae625',olympe.sc.ui.Z.od);olympe.sc.ui.Z.od.qc=olympe.sc.ui.Z.od.U.fa('01646ac1ce7698272467');olympe.sc.ui.Z.od.kc=olympe.sc.ui.Z.od.U.fa('01646ac1cf8521b01aba');
1930
1929
  olympe.sc.ui.Z.od.za=olympe.sc.ui.Z.od.U.fa('01646b41d4fb284e88c4');olympe.sc.ui.Z.od.Pb=olympe.sc.ui.Z.od.U.fa('016dca2998c1f20c3c6e');olympe.sc.ui.Z.od.Hg=olympe.sc.ui.Z.od.U.fa('016edaa40fdb543d0176');olympe.sc.ui.Z.od.gd=olympe.sc.ui.Z.od.U.fa('016edacf08785409c410');olympe.sc.ui.Z.od.vg=olympe.sc.ui.Z.od.U.fa('016edb1bc5fb269bfce8');olympe.sc.ui.Z.od.Yc=olympe.sc.ui.Z.od.U.fa('016edb1bcff460c08af3');olympe.sc.ui.Z.od.ag=olympe.sc.ui.Z.od.U.fa('016edb8f1f3e173ffa3e');olympe.sc.ui.Z.od.Ls=olympe.sc.ui.Z.od.U.fa('016edbc49fa2c9ef9e8d');
1931
- olympe.sc.ui.Z.od.ma=olympe.sc.ui.Z.od.U.fa('016eda7c30ccd9936f6d');olympe.sc.ui.Z.od.lD=olympe.sc.ui.Z.od.U.fa('0165cdf57056f7394839');olympe.sc.ui.Z.Ie=class extends olympe.sc.ui.Ga{D(a){const b=new olympe.ui.F.Ie(this.na(a));b.zs(!0);Rf(b,c=>{const d=Fn(),e=[];for(const f of c){c=f.bx().valueOf();const g=olympe.sc.JW(c);c=olympe.dm.File.D(g,d,f.Zy().valueOf(),f.Pe(),c);e.push(c)}d.Kd(f=>{f?(a.set(olympe.sc.ui.Z.Ie.O,e.map(olympe.dc.CloudObject.get)),a.Qq(olympe.sc.ui.Z.Ie.ma)):this.V.warn('The application encountered a problem while uploading files. The transaction failed.')})});this.C(b,a);return b}};
1930
+ olympe.sc.ui.Z.od.ma=olympe.sc.ui.Z.od.U.fa('016eda7c30ccd9936f6d');olympe.sc.ui.Z.od.lD=olympe.sc.ui.Z.od.U.fa('0165cdf57056f7394839');olympe.sc.ui.Z.Ie=class extends olympe.sc.ui.Ga{D(a){const b=new olympe.ui.F.Ie(this.na(a));b.zs(!0);Rf(b,c=>{const d=Gn(),e=[];for(const f of c){c=f.bx().valueOf();const g=olympe.sc.JW(c);c=olympe.dm.File.D(g,d,f.Zy().valueOf(),f.Pe(),c);e.push(c)}d.Kd(f=>{f?(a.set(olympe.sc.ui.Z.Ie.O,e.map(olympe.dc.CloudObject.get)),a.Qq(olympe.sc.ui.Z.Ie.ma)):this.V.warn('The application encountered a problem while uploading files. The transaction failed.')})});this.C(b,a);return b}};
1932
1931
  olympe.sc.ui.Z.Ie.U=olympe.dc.Ja.C('0165cd420a0ddfa948a2',olympe.sc.ui.Z.Ie);olympe.sc.ui.Z.Ie.O=olympe.sc.ui.Z.Ie.U.fa('0165cd42349c06193ae4');olympe.sc.ui.Z.Ie.ma=olympe.sc.ui.Z.Ie.U.fa('0165cd424c8ac11a98ba');olympe.sc.ui.Z.Image=class extends olympe.sc.ui.Ga{D(a){const b=new olympe.ui.F.ye(this.na(a));this.C(b,a);const c=olympe.dc.CloudObject.get('016eb13ba1388f7bdd71');b.us(olympe.j.Xa([this.Ea(olympe.sc.ui.Z.Image.xb,a,olympe.sc.Xn,c)],d=>{d instanceof olympe.sc.ri&&(d=d.C());if(d instanceof olympe.sc.Xn)return d.D();if('string'===typeof d||d instanceof olympe.j.kb)return olympe.j.ic(d);this.V.warn('Image: cannot set value as background image source',d);return olympe.j.kb.EMPTY},olympe.j.kb));b.Lq(this.Ea(olympe.sc.ui.Z.Image.O,
1933
1932
  a,olympe.j.kb));b.kp(this.Ea(olympe.sc.ui.Z.Image.Ka,a,olympe.j.kb));b.rs(new olympe.j.ga(this.Ea(olympe.sc.ui.Z.Image.ma,a,olympe.j.aa),this.Ea(olympe.sc.ui.Z.Image.za,a,olympe.j.aa)));b.ss(new olympe.j.ga(this.Ea(olympe.sc.ui.Z.Image.Oa,a,olympe.j.aa),this.Ea(olympe.sc.ui.Z.Image.sb,a,olympe.j.aa)));return b}};olympe.sc.ui.Z.Image.U=olympe.dc.Ja.C('0162f1bd4db6b5603fd8',olympe.sc.ui.Z.Image);olympe.sc.ui.Z.Image.xb=olympe.sc.ui.Z.Image.U.fa('01642664ca2b59d1a196');olympe.sc.ui.Z.Image.ma=olympe.sc.ui.Z.Image.U.fa('01642664d2bc3e1478f4');
1934
1933
  olympe.sc.ui.Z.Image.za=olympe.sc.ui.Z.Image.U.fa('01642664d44038c8eac1');olympe.sc.ui.Z.Image.Oa=olympe.sc.ui.Z.Image.U.fa('016426668f80d9bf7693');olympe.sc.ui.Z.Image.sb=olympe.sc.ui.Z.Image.U.fa('016426669197f66aef82');olympe.sc.ui.Z.Image.O=olympe.sc.ui.Z.Image.U.fa('01642664d0eb249710d2');olympe.sc.ui.Z.Image.Ka=olympe.sc.ui.Z.Image.U.fa('01642664d5baa65fdfc5');
1935
1934
  olympe.sc.ui.Z.Image.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.Image);Z(a,olympe.dc.CloudObject.nameProp,b);Z(a,olympe.sc.ui.Z.Image.ma,0);Z(a,olympe.sc.ui.Z.Image.za,0);Z(a,olympe.sc.ui.Z.Image.Oa,0);Z(a,olympe.sc.ui.Z.Image.sb,0);Z(a,olympe.sc.ui.Z.Image.O,'center');Z(a,olympe.sc.ui.Z.Image.Ka,'contain');return a.ka()};
1936
1935
  olympe.sc.ui.Z.Image.qc={'01611e082c56483c8ef2':olympe.ui.ha.df.Uf,'01611e09c8b095637f65':olympe.ui.ha.df.gh,'01611e09e1b2c0f0cad5':olympe.ui.ha.df.ym,'01611e09a8b328e05369':olympe.ui.ha.df.xm,'01611e0a13c26c6002fd':olympe.ui.ha.df.Sb,'01611e09fac0ad53f906':olympe.ui.ha.df.TF,'01611e0a31ba45895327':olympe.ui.ha.df.UF,'01611e0a81e4ce36d596':olympe.ui.ha.df.zh,'01611e0a67b24a1c4f54':olympe.ui.ha.df.$l,'01611e0aa70621354cbb':olympe.ui.ha.df.Ts};
1937
1936
  olympe.sc.ui.Z.Image.Pb={'01611e0bda4db5357514':olympe.ui.ha.Ah.Uf,'01611e0bf880be3d343d':olympe.ui.ha.Ah.Us,'01611e0c10abf1090731':olympe.ui.ha.Ah.Vs,'01611e0bbbd851a47e01':olympe.ui.ha.Ah.Qs};olympe.sc.ui.Z.Image.Eb='016eb13ba1388f7bdd71';olympe.sc.ui.Z.cb=class extends olympe.sc.ui.Pd{D(a){var b=olympe.sc.ui.Z.cb.Pb,c=olympe.sc.ui.Z.cb.ma;const d=olympe.sc.ui.Z.cb.za,e=olympe.sc.ui.Z.cb.Yc;var f=olympe.sc.ui.Z.cb.kc;const g=olympe.sc.ui.Z.cb.qc,k=olympe.sc.ui.Renderable.C,l=olympe.sc.ui.Renderable.D,m=olympe.j.ia.pb,n=new olympe.ui.F.cb(this.na(a));this.C(n,a);b=this.Ea(b,a,olympe.j.ia);n.Yn(b);n.bi(this.Ea(e,a,olympe.j.kb));n.Yd(this.Ea(d,a,olympe.j.ia));n.Ed(this.Ea(c,a,olympe.j.ia));n.Ml(this.Ea(f,a,olympe.j.ia));f=this.Ea(d,a,
1938
- olympe.j.ia,m);c=this.Ea(c,a,olympe.j.ia,m);olympe.j.$a(b,()=>{const p=this.Ea(g,a,olympe.sc.Br);Yp(p,a,e,olympe.ui.ha.oo.Av);Yp(p,a,d,!1)});olympe.j.$a(f,()=>{Yp(this.Ea(g,a,olympe.sc.Br),a,k,olympe.j.Xa([n.na().qa()],p=>p.valueOf(),Number))});olympe.j.$a(c,()=>{Yp(this.Ea(g,a,olympe.sc.Br),a,l,olympe.j.Xa([n.na().ta()],p=>p.valueOf(),Number))});Uo(a)&&(c=this.Ea(olympe.sc.ui.Pd.O,a,String,'%UNDEFINED%'),n.Jb(olympe.j.Xa([c],p=>olympe.sc.logic.gG.C(this)?'%UNDEFINED%'===p||''===p?'%COMPUTED VALUE%':
1937
+ olympe.j.ia,m);c=this.Ea(c,a,olympe.j.ia,m);olympe.j.$a(b,()=>{const p=this.Ea(g,a,olympe.sc.Br);Zp(p,a,e,olympe.ui.ha.oo.Av);Zp(p,a,d,!1)});olympe.j.$a(f,()=>{Zp(this.Ea(g,a,olympe.sc.Br),a,k,olympe.j.Xa([n.na().qa()],p=>p.valueOf(),Number))});olympe.j.$a(c,()=>{Zp(this.Ea(g,a,olympe.sc.Br),a,l,olympe.j.Xa([n.na().ta()],p=>p.valueOf(),Number))});Vo(a)&&(c=this.Ea(olympe.sc.ui.Pd.O,a,String,'%UNDEFINED%'),n.Jb(olympe.j.Xa([c],p=>olympe.sc.logic.gG.C(this)?'%UNDEFINED%'===p||''===p?'%COMPUTED VALUE%':
1939
1938
  p:p,olympe.j.kb)));return n}};olympe.sc.ui.Z.cb.U=olympe.dc.Ja.C('01612df39109cf82fa8d',olympe.sc.ui.Z.cb);olympe.sc.ui.Z.cb.qc=olympe.sc.ui.Z.cb.U.fa('016d3f37610ae4fc3963');olympe.sc.ui.Z.cb.Pb=olympe.sc.ui.Z.cb.U.fa('016c8b3713bf8f4db860');olympe.sc.ui.Z.cb.Yc=olympe.sc.ui.Z.cb.U.fa('0170a5a1ad57c8e9545b');olympe.sc.ui.Z.cb.za=olympe.sc.ui.Z.cb.U.fa('016c8b3713bf8f4db861');olympe.sc.ui.Z.cb.ma=olympe.sc.ui.Z.cb.U.fa('016c8b3713bf8f4db862');olympe.sc.ui.Z.cb.kc=olympe.sc.ui.Z.cb.U.fa('016ea1b4cb51e0229e85');
1940
- olympe.sc.ui.Z.cb.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.cb);b&&(Z(a,olympe.dc.CloudObject.nameProp,b),Z(a,olympe.sc.ui.Z.cb.O,b));return a.ka()};olympe.sc.ui.Z.cb.prototype.D.K=new olympe.j.J(()=>olympe.ui.F.cb,[]);function Cq(a,b){var c=a.na(b);const d=Dq(a,b),e=Eq(a,b),f=new olympe.j.Be(olympe.dc.CloudObject);olympe.j.Wa([c.ta(),d.ta(),olympe.j.kj(e.Qc(),0)],(k,l)=>{k=Math.ceil(k/l);if(Number.isFinite(k)){l=f.aj();if(k<l)for(var m=l-1;m>=k;m--)f.remove(f.rl(m));for(m=olympe.j.Qa(e);l<k;l++)f.set('item'+l,m&&m.ql(l)||null,l)}});const g=Fq(a);c=new olympe.ui.F.jt(c,f,olympe.dc.CloudObject,a.ob.bind(a,d,b,g));a.C(c,b);return c}
1941
- function Fq(a){a=a.db.Ac(a,olympe.sc.ui.Z.Be.O);return a instanceof olympe.dc.Kf?mh(a):null}function Eq(a,b){a=a.Ea(olympe.sc.ui.Z.Be.ma,b,olympe.dc.Kb);return olympe.j.Xa([a],c=>{if(c instanceof olympe.j.Be)return c;if(c instanceof olympe.dc.Kb){const e=olympe.j.Za(olympe.dc.Kb);c.Ii(()=>e.update(c));return e.wa()}const d=new olympe.j.Be(olympe.dc.CloudObject);c instanceof Array&&c.forEach((e,f)=>{const g=olympe.oa.bf();d.set(g,e);d.Cs(g,f)});return d},olympe.j.Ug)}
1942
- function Dq(a,b){const c=olympe.j.aa,d=a.Ea(olympe.sc.ui.Renderable.C,b,c,c.ZERO);a=olympe.j.Xa([a.Ea(olympe.sc.ui.Z.Be.za,b,c)],e=>0>=e.valueOf()?void 0:e,c,'List row height');return new olympe.j.ga(d,a)}
1943
- olympe.sc.ui.Z.Be=class extends olympe.sc.ui.Ga{D(a){if(Uo(a))return Cq(this,a);var b=Fq(this);b=new olympe.ui.F.jt(this.na(a),Eq(this,a),olympe.dc.CloudObject,this.Pa.bind(this,Dq(this,a),a,b));this.C(b,a);return b}R(a){return a.includes(this.ka())?this.Vw().Mr().me([olympe.sc.ui.Td]).filter(b=>a.includes(olympe.dc.Ya(b))).ek():null}ob(a,b,c,d,e,f){a=this.Pa(a,b,c,d,e,f);a.Ld(1,olympe.j.Color.create(46,135,239));a.ng(.4);return a}Pa(a,b,c,d,e){const f=new olympe.ui.F.Xe(a);olympe.j.Wa([d],g=>{const k=
1939
+ olympe.sc.ui.Z.cb.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.cb);b&&(Z(a,olympe.dc.CloudObject.nameProp,b),Z(a,olympe.sc.ui.Z.cb.O,b));return a.ka()};olympe.sc.ui.Z.cb.prototype.D.K=new olympe.j.J(()=>olympe.ui.F.cb,[]);function Dq(a,b){var c=a.na(b);const d=Eq(a,b),e=Fq(a,b),f=new olympe.j.Be(olympe.dc.CloudObject);olympe.j.Wa([c.ta(),d.ta(),olympe.j.kj(e.Qc(),0)],(k,l)=>{k=Math.ceil(k/l);if(Number.isFinite(k)){l=f.aj();if(k<l)for(var m=l-1;m>=k;m--)f.remove(f.rl(m));for(m=olympe.j.Qa(e);l<k;l++)f.set('item'+l,m&&m.ql(l)||null,l)}});const g=Gq(a);c=new olympe.ui.F.jt(c,f,olympe.dc.CloudObject,a.ob.bind(a,d,b,g));a.C(c,b);return c}
1940
+ function Gq(a){a=a.db.Ac(a,olympe.sc.ui.Z.Be.O);return a instanceof olympe.dc.Kf?mh(a):null}function Fq(a,b){a=a.Ea(olympe.sc.ui.Z.Be.ma,b,olympe.dc.Kb);return olympe.j.Xa([a],c=>{if(c instanceof olympe.j.Be)return c;if(c instanceof olympe.dc.Kb){const e=olympe.j.Za(olympe.dc.Kb);c.Ii(()=>e.update(c));return e.wa()}const d=new olympe.j.Be(olympe.dc.CloudObject);c instanceof Array&&c.forEach((e,f)=>{const g=olympe.oa.bf();d.set(g,e);d.Cs(g,f)});return d},olympe.j.Ug)}
1941
+ function Eq(a,b){const c=olympe.j.aa,d=a.Ea(olympe.sc.ui.Renderable.C,b,c,c.ZERO);a=olympe.j.Xa([a.Ea(olympe.sc.ui.Z.Be.za,b,c)],e=>0>=e.valueOf()?void 0:e,c,'List row height');return new olympe.j.ga(d,a)}
1942
+ olympe.sc.ui.Z.Be=class extends olympe.sc.ui.Ga{D(a){if(Vo(a))return Dq(this,a);var b=Gq(this);b=new olympe.ui.F.jt(this.na(a),Fq(this,a),olympe.dc.CloudObject,this.Pa.bind(this,Eq(this,a),a,b));this.C(b,a);return b}R(a){return a.includes(this.ka())?this.Vw().Mr().me([olympe.sc.ui.Td]).filter(b=>a.includes(olympe.dc.Ya(b))).ek():null}ob(a,b,c,d,e,f){a=this.Pa(a,b,c,d,e,f);a.Ld(1,olympe.j.Color.create(46,135,239));a.ng(.4);return a}Pa(a,b,c,d,e){const f=new olympe.ui.F.Xe(a);olympe.j.Wa([d],g=>{const k=
1944
1943
  b.wo('list_row');c.run(k);const l=k.get(olympe.sc.Hb.C.vp);olympe.j.Wa([a.qa()],m=>k.set(olympe.sc.ui.Renderable.C,m));olympe.j.Wa([a.ta()],m=>{0===m.valueOf()&&(m=olympe.j.aa.ONE);k.set(olympe.sc.ui.Renderable.D,m)});k.set(olympe.sc.ui.ec.R,0);k.set(olympe.sc.ui.ec.T,0);k.set(olympe.sc.ui.Z.$n.ma,g);olympe.j.Wa([e],m=>k.set(olympe.sc.ui.Z.$n.O,m));f.appendChild(l,'currentRenderedItem');olympe.j.yb().Ve(()=>{k.destroy()})});return f}};olympe.sc.ui.Z.Be.U=olympe.dc.Ja.C('01633eae77762d97b497',olympe.sc.ui.Z.Be);
1945
1944
  olympe.sc.ui.Z.Be.O=olympe.sc.ui.Z.Be.U.fa('01633eda39772493a535');olympe.sc.ui.Z.Be.ma=olympe.sc.ui.Z.Be.U.fa('01633eaf88c467023dac');olympe.sc.ui.Z.Be.za=olympe.sc.ui.Z.Be.U.fa('01633eaf88c4b25d8071');
1946
1945
  olympe.sc.ui.Z.Be.U.C=function(a,b){const c=a.create(olympe.sc.ui.Z.Be);Z(c,olympe.dc.CloudObject.nameProp,b);Z(c,olympe.sc.ui.Renderable.C,200);Z(c,olympe.sc.ui.Renderable.D,400);b=olympe.dc.CloudObject.yf(a,olympe.sc.ui.Uv,'Item Renderer',!0);const d=olympe.dc.CloudObject.yf(a,b,'item renderer');Z(c,olympe.sc.ui.Z.Be.O,new olympe.dc.Kf(d));a.Qb(olympe.sc.Runnable.ca,d,b);a.Qb(olympe.sc.Runnable.W,d,b);a.Qb(olympe.dc.CloudObject.containsRel,c,b);return c.ka()};olympe.sc.ui.Z.$n=class extends olympe.sc.ui.ec{D(a){return super.D(a)}};olympe.sc.ui.Z.$n.U=olympe.dc.Ja.C('016995c9f3cd1db60dc7',olympe.sc.ui.Z.$n);olympe.sc.ui.Z.$n.ma=olympe.sc.ui.Z.$n.U.fa('016343f1676b2cb4ad06');olympe.sc.ui.Z.$n.O=olympe.sc.ui.Z.$n.U.fa('016343f1676b131af556');olympe.sc.ui.Z.Map=class extends olympe.sc.ui.Ga{D(a){const b=new olympe.ui.Ta.Va.Map(this.na(a));this.C(b,a);b.pv(this.Ea(olympe.sc.ui.Z.Map.Ka,a,olympe.j.kb),this.Ea(olympe.sc.ui.Z.Map.za,a,olympe.j.kb));b.ys(this.O(olympe.sc.ui.Z.Map.ma,a,olympe.j.aa,b.WD()));b.xs(this.O(olympe.sc.ui.Z.Map.O,a,olympe.j.aa,b.UD()));b.Is(this.O(olympe.sc.ui.Z.Map.Oa,a,olympe.j.aa,b.R()));const c=this.Ea(olympe.sc.ui.Z.Map.sb,a,olympe.sc.logic.Function,null);olympe.j.Wa([this.Ea(olympe.sc.ui.Z.Map.xb,a,olympe.j.Ug)],
1947
1946
  d=>{d&&d.forEach&&d.forEach((e,f)=>{olympe.j.Wa([c],g=>{if(null===g)b.ps(f);else{const k=a.wo('object_to_marker'),[l]=g.getInputs(),[m,n]=g.getOutputs();k.set(l,e);g.run(k);olympe.j.Wa([k.wa(n,Number,!0),k.wa(m,Number,!0)],(p,r)=>b.au(p,r,f))}});olympe.j.yb().Ve(()=>b.ps(f))})});return b}};olympe.sc.ui.Z.Map.U=olympe.dc.Ja.C('016426b17399ffc56c99',olympe.sc.ui.Z.Map);olympe.sc.ui.Z.Map.za=olympe.sc.ui.Z.Map.U.fa('016427a99e367fa6c09d');olympe.sc.ui.Z.Map.Eb=olympe.sc.ui.Z.Map.U.fa('01766b9dcec160a517e1');
1948
1947
  olympe.sc.ui.Z.Map.ma=olympe.sc.ui.Z.Map.U.fa('016427a9b97eea350e50');olympe.sc.ui.Z.Map.O=olympe.sc.ui.Z.Map.U.fa('016427a9cfb705df606e');olympe.sc.ui.Z.Map.Oa=olympe.sc.ui.Z.Map.U.fa('016427a9e5efd39a5071');olympe.sc.ui.Z.Map.Ka=olympe.sc.ui.Z.Map.U.fa('016436f8c0383becf392');olympe.sc.ui.Z.Map.xb=olympe.sc.ui.Z.Map.U.fa('0164378b2cebf5cc6b6b');olympe.sc.ui.Z.Map.sb=olympe.sc.ui.Z.Map.U.fa('0168ec49fe6e55ebe510');
1949
- olympe.sc.ui.Z.Map.U.C=(a,b)=>{a=a.create(olympe.sc.ui.Z.Map);Z(a,olympe.dc.CloudObject.nameProp,b);Z(a,olympe.sc.ui.Z.Map.Ka,olympe.N.Ta.Va.Map.C.zJ);Z(a,olympe.sc.ui.Z.Map.za,'streets-v11');Z(a,olympe.sc.ui.Z.Map.O,46.5);Z(a,olympe.sc.ui.Z.Map.ma,6.5);Z(a,olympe.sc.ui.Z.Map.Oa,10);Z(a,olympe.sc.ui.Renderable.C,500);Z(a,olympe.sc.ui.Renderable.D,500);return a.ka()};olympe.sc.ui.Z.ye=class extends olympe.sc.ui.Ga{D(a){const b=new olympe.ui.F.ye(this.na(a));this.C(b,a);return b}};olympe.sc.ui.Z.ye.U=olympe.dc.Ja.C('01646f6a3fa5615a5bd1',olympe.sc.ui.Z.ye);olympe.sc.ui.Z.ye.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.ye);Z(a,olympe.dc.CloudObject.nameProp,b);return a.ka()};function Gq(a,b){if(Uo(b))b.set(olympe.sc.Hb.C.vp,Hq(a,b));else{var c=a.na(b),d=new olympe.ui.F.Xe(c),e=a.Qe(),f=a.Ea(olympe.sc.ui.Z.fl.O,b,olympe.sc.ui.Screen),g=Vo(b),k=new Set;Iq(a,g,()=>{a.Pa?Jq(a,e,k,g,()=>{Kq(e,f,b)}):Kq(e,f,b)});var l=olympe.j.yb(),m=olympe.j.Za(olympe.sc.ui.Screen,'Screenflow loaded screen');Lq(e,g,()=>{olympe.j.Wa([m],p=>{Mq(p,b)})});olympe.j.Wa([f],p=>{k.has(p.ka())?m.update(p):l.run(()=>Nq(p,g,()=>{k.add(p.ka());olympe.dc.Ya(f)===p.ka()?m.update(p):a.V.warn(`The selected screen ${olympe.dc.Ya(f)} has changed while the loading of another one ${p.ka()}`)}))},
1950
- 'Screenflow process screen change');var n=null;olympe.j.Wa([m],p=>{const r=Ro(b,p);n&&n.destroy();n=r;p.run(r);xq(c,r);r.qB(olympe.sc.Hb.C.vp).then(t=>{d.appendChild(t,'screen');b.set(olympe.sc.Hb.C.vp,d)}).catch(()=>a.V.warn(`Screen ${p.ka()} has not been rendered.`));olympe.j.yb().Ve(()=>{r.destroy()})},'Screenflow render loaded screen')}}
1951
- function Hq(a,b){const c=a.na(b),d=new olympe.ui.F.Xe(c);a.C(d,b);a=new olympe.ui.F.cb(c);a.Ld(1,N());a.Xb(olympe.ui.ha.rc.Sc);a.Ub(olympe.ui.ha.Db.Sb);a.Jb('Screenflow');a.rb(c.qa().hb(.1));a.ng(.5);d.appendChild(a,'label');return d}function Iq(a,b,c){const d=olympe.j.yb();olympe.dc.nb.from(a.Qe()).Zi().oc(olympe.sc.ui.ll.C,!0).back().oc(olympe.sc.yc.T,!0).oc(olympe.sc.Runnable.ca,!0).observe(d,{Xg:Oq(b)}).subscribe(d.re(()=>null==c?void 0:c()))}
1952
- function Jq(a,b,c,d,e){b=olympe.dc.nb.from(b).oc(olympe.sc.yc.T).zf();const f=olympe.j.yb(),g=new olympe.async.fL(f);b.forEach(k=>{g.add(l=>Nq(k,d,()=>{c.add(k.ka());f.run(l)}))});rd(g,(k,l)=>{!k&&a.V.error(`Error while downloading some screen data: ${l}`);e()});g.start()}
1953
- function Kq(a,b,c){let d;void 0===olympe.j.Qa(b)&&(d=a.ml(olympe.sc.ui.ll.C).zf())&&c.set(olympe.sc.ui.Z.fl.O,d);a.oc(olympe.sc.ui.ll.C).observe(olympe.j.yb(),{jg:!0}).pipe(rxjs.operators.skip(d?1:0)).subscribe(e=>{c.set(olympe.sc.ui.Z.fl.O,e.Vd())})}
1954
- function Lq(a,b,c){const d=olympe.j.yb();olympe.dc.nb.from(a).Zi().oc(olympe.sc.yc.T,!0).oc(olympe.sc.ui.ef.C.fe(),!0).oc(olympe.sc.ui.ef.O,!0).back().oc(olympe.sc.ui.ef.R,!0).back().oc(olympe.sc.ui.ef.D,!0).observe(d,{Xg:Oq(b),Nr:'__code-as-data__'}).subscribe(()=>null==c?void 0:c())}
1955
- function Mq(a,b){const c=olympe.j.yb(),d=new Map,e=a.ka();a.oc(olympe.sc.ui.ef.C.fe()).observe(c,{jg:!0}).subscribe(f=>{f.lu().forEach(g=>{const k=g.nA(),l=g.CA();if(e!==(null==l?void 0:l.ka())){var m=new olympe.j.ee('',c);d.set(g.ka(),m);m.run(()=>{const n=Ro(b,e);olympe.j.Wa([g.lA()],p=>{n.on(p,()=>{Ro(b,l);const r=Aq(g,n);b.set('MAP_PROPS',r);b.set(olympe.sc.ui.Z.fl.O,l)},k)})})}});f.uu().forEach(g=>{let k;null==(k=d.get(g))||k.destroy();d.delete(g)})})}
1956
- function Nq(a,b,c){const d=olympe.j.yb();olympe.dc.nb.af(d,a,olympe.dc.Te.Wi,void 0,{Xg:Oq(b),kB:!0}).subscribe(()=>null==c?void 0:c())}function Oq(a){return a?olympe.dc.nb.Jf.Qp:olympe.dc.nb.Jf.cm}olympe.sc.ui.Z.fl=class extends olympe.sc.ui.Ga{constructor(a,b,c,d){super(a,b);this.Pa=d}update(a){Gq(this,a)}R(){return(new olympe.dc.Mp(this)).GM().me([olympe.sc.ui.Screen]).ek()}};olympe.sc.ui.Z.fl.U=olympe.dc.Ja.C('0163f87334925ee199c4',olympe.sc.ui.Z.fl,olympe.xa.ba.Ob,new olympe.sa.zb(olympe.Fa.pa.mz));
1948
+ olympe.sc.ui.Z.Map.U.C=(a,b)=>{a=a.create(olympe.sc.ui.Z.Map);Z(a,olympe.dc.CloudObject.nameProp,b);Z(a,olympe.sc.ui.Z.Map.Ka,olympe.N.Ta.Va.Map.C.zJ);Z(a,olympe.sc.ui.Z.Map.za,'streets-v11');Z(a,olympe.sc.ui.Z.Map.O,46.5);Z(a,olympe.sc.ui.Z.Map.ma,6.5);Z(a,olympe.sc.ui.Z.Map.Oa,10);Z(a,olympe.sc.ui.Renderable.C,500);Z(a,olympe.sc.ui.Renderable.D,500);return a.ka()};olympe.sc.ui.Z.ye=class extends olympe.sc.ui.Ga{D(a){const b=new olympe.ui.F.ye(this.na(a));this.C(b,a);return b}};olympe.sc.ui.Z.ye.U=olympe.dc.Ja.C('01646f6a3fa5615a5bd1',olympe.sc.ui.Z.ye);olympe.sc.ui.Z.ye.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.ye);Z(a,olympe.dc.CloudObject.nameProp,b);return a.ka()};function Hq(a,b){if(Vo(b))b.set(olympe.sc.Hb.C.vp,Iq(a,b));else{var c=a.na(b),d=new olympe.ui.F.Xe(c),e=a.Qe(),f=a.Ea(olympe.sc.ui.Z.fl.O,b,olympe.sc.ui.Screen),g=Wo(b),k=new Set;Jq(a,g,()=>{a.Pa?Kq(a,e,k,g,()=>{Lq(e,f,b)}):Lq(e,f,b)});var l=olympe.j.yb(),m=olympe.j.Za(olympe.sc.ui.Screen,'Screenflow loaded screen');Mq(e,g,()=>{olympe.j.Wa([m],p=>{Nq(p,b)})});olympe.j.Wa([f],p=>{k.has(p.ka())?m.update(p):l.run(()=>Oq(p,g,()=>{k.add(p.ka());olympe.dc.Ya(f)===p.ka()?m.update(p):a.V.warn(`The selected screen ${olympe.dc.Ya(f)} has changed while the loading of another one ${p.ka()}`)}))},
1949
+ 'Screenflow process screen change');var n=null;olympe.j.Wa([m],p=>{const r=So(b,p);n&&n.destroy();n=r;p.run(r);yq(c,r);r.qB(olympe.sc.Hb.C.vp).then(t=>{d.appendChild(t,'screen');b.set(olympe.sc.Hb.C.vp,d)}).catch(()=>a.V.warn(`Screen ${p.ka()} has not been rendered.`));olympe.j.yb().Ve(()=>{r.destroy()})},'Screenflow render loaded screen')}}
1950
+ function Iq(a,b){const c=a.na(b),d=new olympe.ui.F.Xe(c);a.C(d,b);a=new olympe.ui.F.cb(c);a.Ld(1,N());a.Xb(olympe.ui.ha.rc.Sc);a.Ub(olympe.ui.ha.Db.Sb);a.Jb('Screenflow');a.rb(c.qa().hb(.1));a.ng(.5);d.appendChild(a,'label');return d}function Jq(a,b,c){const d=olympe.j.yb();olympe.dc.nb.from(a.Qe()).Zi().oc(olympe.sc.ui.ll.C,!0).back().oc(olympe.sc.yc.T,!0).oc(olympe.sc.Runnable.ca,!0).observe(d,{Xg:Pq(b)}).subscribe(d.re(()=>null==c?void 0:c()))}
1951
+ function Kq(a,b,c,d,e){b=olympe.dc.nb.from(b).oc(olympe.sc.yc.T).zf();const f=olympe.j.yb(),g=new olympe.async.fL(f);b.forEach(k=>{g.add(l=>Oq(k,d,()=>{c.add(k.ka());f.run(l)}))});rd(g,(k,l)=>{!k&&a.V.error(`Error while downloading some screen data: ${l}`);e()});g.start()}
1952
+ function Lq(a,b,c){let d;void 0===olympe.j.Qa(b)&&(d=a.ml(olympe.sc.ui.ll.C).zf())&&c.set(olympe.sc.ui.Z.fl.O,d);a.oc(olympe.sc.ui.ll.C).observe(olympe.j.yb(),{jg:!0}).pipe(rxjs.operators.skip(d?1:0)).subscribe(e=>{c.set(olympe.sc.ui.Z.fl.O,e.Vd())})}
1953
+ function Mq(a,b,c){const d=olympe.j.yb();olympe.dc.nb.from(a).Zi().oc(olympe.sc.yc.T,!0).oc(olympe.sc.ui.ef.C.fe(),!0).oc(olympe.sc.ui.ef.O,!0).back().oc(olympe.sc.ui.ef.R,!0).back().oc(olympe.sc.ui.ef.D,!0).observe(d,{Xg:Pq(b),Nr:'__code-as-data__'}).subscribe(()=>null==c?void 0:c())}
1954
+ function Nq(a,b){const c=olympe.j.yb(),d=new Map,e=a.ka();a.oc(olympe.sc.ui.ef.C.fe()).observe(c,{jg:!0}).subscribe(f=>{f.lu().forEach(g=>{const k=g.nA(),l=g.CA();if(e!==(null==l?void 0:l.ka())){var m=new olympe.j.ee('',c);d.set(g.ka(),m);m.run(()=>{const n=So(b,e);olympe.j.Wa([g.lA()],p=>{n.on(p,()=>{So(b,l);const r=Bq(g,n);b.set('MAP_PROPS',r);b.set(olympe.sc.ui.Z.fl.O,l)},k)})})}});f.uu().forEach(g=>{let k;null==(k=d.get(g))||k.destroy();d.delete(g)})})}
1955
+ function Oq(a,b,c){const d=olympe.j.yb();olympe.dc.nb.af(d,a,olympe.dc.Te.Wi,void 0,{Xg:Pq(b),kB:!0}).subscribe(()=>null==c?void 0:c())}function Pq(a){return a?olympe.dc.nb.Jf.Qp:olympe.dc.nb.Jf.cm}olympe.sc.ui.Z.fl=class extends olympe.sc.ui.Ga{constructor(a,b,c,d){super(a,b);this.Pa=d}update(a){Hq(this,a)}R(){return(new olympe.dc.Mp(this)).GM().me([olympe.sc.ui.Screen]).ek()}};olympe.sc.ui.Z.fl.U=olympe.dc.Ja.C('0163f87334925ee199c4',olympe.sc.ui.Z.fl,olympe.xa.ba.Ob,new olympe.sa.zb(olympe.Fa.pa.mz));
1957
1956
  olympe.sc.ui.Z.fl.O=olympe.sc.ui.Z.fl.U.fa('016e608cbdeab7a480ce');olympe.sc.ui.Z.Id=class extends olympe.sc.ui.Ga{D(a){var b=this.Ea(olympe.sc.ui.Z.Id.Oa,a,olympe.j.aa);const c=this.Ea(olympe.sc.ui.Z.Id.Ka,a,olympe.j.aa),d=this.Ea(olympe.sc.ui.Z.Id.O,a,olympe.j.aa);b=new olympe.ui.F.Id(this.na(a),b,c,d);b.Ff(this.O(olympe.sc.ui.Z.Id.valueProp,a,Number,olympe.j.Xa([b.getValue()],e=>e.valueOf(),Number)));this.C(b,a);b.hP(this.Ea(olympe.sc.ui.Z.Id.ma,a,olympe.j.Color));b.Lh(this.Ea(olympe.sc.ui.Z.Id.za,a,olympe.j.aa));b.tP(this.Ea(olympe.sc.ui.Z.Id.kc,a,olympe.j.Color));
1958
- b.vP(this.Ea(olympe.sc.ui.Z.Id.Eb,a,olympe.j.Color));b.sP(this.Ea(olympe.sc.ui.Z.Id.Pb,a,olympe.j.aa));b.rP(this.Ea(olympe.sc.ui.Z.Id.qc,a,olympe.j.Color));b.uP(this.Ea(olympe.sc.ui.Z.Id.xb,a,olympe.j.Color));rq(a,b,olympe.sc.ui.Z.Id.sb,b.NO.bind(b),b.JO.bind(b));return b}};olympe.sc.ui.Z.Id.U=olympe.dc.Ja.C('0163df0bbf0d8c8ca7d3',olympe.sc.ui.Z.Id);olympe.sc.ui.Z.Id.valueProp=olympe.sc.ui.Z.Id.U.fa('0163df0bc2f7d39a2396');olympe.sc.ui.Z.Id.Oa=olympe.sc.ui.Z.Id.U.fa('0163df0bc9635729e324');
1957
+ b.vP(this.Ea(olympe.sc.ui.Z.Id.Eb,a,olympe.j.Color));b.sP(this.Ea(olympe.sc.ui.Z.Id.Pb,a,olympe.j.aa));b.rP(this.Ea(olympe.sc.ui.Z.Id.qc,a,olympe.j.Color));b.uP(this.Ea(olympe.sc.ui.Z.Id.xb,a,olympe.j.Color));sq(a,b,olympe.sc.ui.Z.Id.sb,b.NO.bind(b),b.JO.bind(b));return b}};olympe.sc.ui.Z.Id.U=olympe.dc.Ja.C('0163df0bbf0d8c8ca7d3',olympe.sc.ui.Z.Id);olympe.sc.ui.Z.Id.valueProp=olympe.sc.ui.Z.Id.U.fa('0163df0bc2f7d39a2396');olympe.sc.ui.Z.Id.Oa=olympe.sc.ui.Z.Id.U.fa('0163df0bc9635729e324');
1959
1958
  olympe.sc.ui.Z.Id.Ka=olympe.sc.ui.Z.Id.U.fa('0163df0bca9e746a1bda');olympe.sc.ui.Z.Id.O=olympe.sc.ui.Z.Id.U.fa('01697cd892e2698db26b');olympe.sc.ui.Z.Id.za=olympe.sc.ui.Z.Id.U.fa('01697cd8ffd33aa56287');olympe.sc.ui.Z.Id.ma=olympe.sc.ui.Z.Id.U.fa('01697cd93f436566d0c9');olympe.sc.ui.Z.Id.kc=olympe.sc.ui.Z.Id.U.fa('01697cd97974dfd25476');olympe.sc.ui.Z.Id.Eb=olympe.sc.ui.Z.Id.U.fa('01697cd9b11eb39a003d');olympe.sc.ui.Z.Id.qc=olympe.sc.ui.Z.Id.U.fa('01697cd9f6f7d89034ec');olympe.sc.ui.Z.Id.Pb=olympe.sc.ui.Z.Id.U.fa('016980a2557456722aae');
1960
1959
  olympe.sc.ui.Z.Id.xb=olympe.sc.ui.Z.Id.U.fa('01697cda25b97273ee84');olympe.sc.ui.Z.Id.sb=olympe.sc.ui.Z.Id.U.fa('01697cda53b82f03b323');olympe.sc.ui.Z.Pc=class extends olympe.sc.ui.Me{D(a){const b=new olympe.ui.F.Pc(this.na(a));this.C(b,a);b.Jb(this.O(olympe.sc.ui.Pd.O,a,String,olympe.j.Xa([b.Lj()],c=>c.valueOf(),String)));return b}};olympe.sc.ui.Z.Pc.U=olympe.dc.Ja.C('01683779d3c3769a590f',olympe.sc.ui.Z.Pc);olympe.sc.ui.Z.Pc.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.Pc);b&&Z(a,olympe.dc.CloudObject.nameProp,b);Z(a,olympe.sc.ui.Pd.O,'');return a.ka()};olympe.sc.ui.Z.Pc.prototype.D.K=new olympe.j.J(()=>olympe.ui.F.Pc,[]);olympe.sc.ui.Z.Mb=class extends olympe.sc.ui.Me{D(a){const b=new olympe.ui.F.Mb(this.na(a));this.C(b,a);b.Jb(this.O(olympe.sc.ui.Pd.O,a,String,olympe.j.Xa([b.Lj()],c=>c.valueOf(),String)));b.zn(this.Ea(olympe.sc.ui.Z.Mb.za,a,olympe.j.kb));b.ip(this.Ea(olympe.sc.ui.Z.Mb.qc,a,olympe.j.ia));return b}};olympe.sc.ui.Z.Mb.U=olympe.dc.Ja.C('01626ce8543dd37b31dd',olympe.sc.ui.Z.Mb);olympe.sc.ui.Z.Mb.za=olympe.sc.ui.Z.Mb.U.fa('01699631db815bc2f18a');olympe.sc.ui.Z.Mb.qc=olympe.sc.ui.Z.Mb.U.fa('016e220471bea6ac38dd');
1961
1960
  olympe.sc.ui.Z.Mb.U.C=function(a,b){a=a.create(olympe.sc.ui.Z.Mb);b&&Z(a,olympe.dc.CloudObject.nameProp,b);Z(a,olympe.sc.ui.Pd.O,'');return a.ka()};olympe.sc.ui.Z.Mb.prototype.D.K=new olympe.j.J(()=>olympe.ui.F.Mb,[]);olympe.sc.ui.Z.TU=class extends olympe.ui.F.ew{constructor(a){super();const b=new olympe.ui.F.xd(500,0);this.C.Gb(b.na());b.Wb(8);b.Ld(1,Ec('#D2D2D2'));b.Ma(Ec('#D2D2D2'));const c=new olympe.ui.F.Zd(void 0,0,32,32);c.Wb(8);var d=new olympe.ui.F.xd(434,8,16,16);const e=(new olympe.ui.F.cb(new olympe.j.ga(300,0))).Jb('A new version is available').rb(24).Bb(800).Ed(!0).Yn(!0),f=(new olympe.ui.F.cb(new olympe.j.ga(300,0))).Jb('Your application has been upgraded in the background').rb(16).Ed(!0).Yn(!0);
1962
1961
  d.appendChild(e,'title',olympe.ui.ha.Db.Tf);d.appendChild(f,'subtitle',olympe.ui.ha.Db.Tf);c.appendChild(d,'topContent');const g=new olympe.ui.F.Zd(void 0,8,32,32);g.Wb(8);g.Ma(O());d=(k,l,m,n)=>{l=(new olympe.ui.F.jc(new olympe.j.ga(100,40),k)).Ma(l).lb(m).$g(new olympe.j.ga(0,0),0,0,N(),!1);n=(new olympe.ui.F.cb(new olympe.j.ga(213,0))).Jb(n).rb(12).Yn(!0).Ed(!0);m=new olympe.ui.F.xd(213,8,16,16);m.appendChild(l,'button',olympe.ui.ha.Db.Tf);m.appendChild(n,'text',olympe.ui.ha.Db.Tf);g.appendChild(m,
1963
- k,olympe.ui.ha.rc.Sc);return l};d('Close',Ec('#D2D2D2'),Ec('#000000'),'Ignore the new version for now and continue working on this page').Vc(()=>{this.Sk(!1)});d('Refresh',Ec('#2e87ef'),Ec('#ffffff'),'Click to reload this page and start using the new version right now').Vc(()=>{this.Sk(!1);a.D()});b.appendChild(c,'top',olympe.ui.ha.Db.Sb);b.appendChild(g,'bottom',olympe.ui.ha.Db.Sb);this.xC(N().LD(.6));this.Wb(8);Vf(this);this.Nd(b)}};olympe.sc.ui.Lb={};function Pq(a,b,c,d,e,f,g){const k=c.ka(),l=Ro(f,k);olympe.j.ls([l.wa(olympe.sc.Hb.C.vp,olympe.ui.F.mb,!0)],m=>{m.Tj(!0);b.appendChild(m,k+'_'+a.db.name(k),d,e);m.Cs(e);Qq(a,f,l,m,g)})}function Rq(a,b,c,d,e,f=olympe.j.kb.EMPTY){f!==olympe.j.kb.EMPTY&&olympe.j.Fl([f],g=>{g=g.valueOf();b.mg();d.yi((k,l,m)=>{Pq(a,b,k,g,m.gf(l),c,e)})});d.forEach((g,k,l)=>{const m=olympe.j.Qa(f).valueOf();Pq(a,b,g,m,l.gf(k),c,e)})}
1964
- function Qq(a,b,c,d,e){var f=olympe.sc.ui.ec.T,g=olympe.sc.ui.Renderable.C,k=olympe.sc.ui.Renderable.D;const l=Gp(a,olympe.sc.ui.ec.R);f=Gp(a,f);g=Gp(a,g);k=Gp(a,k);const m=d.na(),n=a.C(b);a=a.D(b);b=olympe.j.$a(n,()=>e.ta(),()=>m.ta(),olympe.j.aa);const p=olympe.j.$a(a,()=>e.qa(),()=>m.qa(),olympe.j.aa),r=(t,u,v)=>{void 0===v?olympe.j.Wa([u],w=>{c.set(t,w.valueOf())}):olympe.j.Wa([u,v],(w,x)=>{x.valueOf()?c.set(t,w.valueOf()):c.remove(t)});olympe.j.yb().onDestroy(()=>c.remove(t))};d=d.ae();r(f,d.ta());
1965
- r(l,d.qa());r(g,p,a);r(k,b,n)}olympe.sc.ui.Lb.fk=class extends olympe.sc.ui.mr{qs(){}D(){}C(){}};olympe.sc.ui.Lb.fk.D={Jy:'distributed',Uf:'manual'};olympe.sc.ui.Lb.Xe=class extends olympe.sc.ui.mr{qs(a,b){const c=olympe.j.aa,d=olympe.sc.ui.Ga.QX,e=new olympe.j.ga(this.Ea(olympe.sc.ui.Renderable.C,a,c,c.ZERO,!0),this.Ea(olympe.sc.ui.Renderable.D,a,c,c.ZERO,!0)),f=new olympe.ui.F.Xe(e);b.forEach((g,k,l)=>{const m=g.ka(),n=Ro(a,m);olympe.j.ls([n.wa(olympe.sc.Hb.C.vp,olympe.ui.F.mb,!0)],p=>{p.setPosition(g.ae(n));p.ah(g.Ea(d,n,c,c.ZERO));f.appendChild(p,m+'_'+this.db.name(m));p.Cs(l.gf(k))})});return f}D(){return olympe.j.ia.pb}C(){return olympe.j.ia.pb}};
1962
+ k,olympe.ui.ha.rc.Sc);return l};d('Close',Ec('#D2D2D2'),Ec('#000000'),'Ignore the new version for now and continue working on this page').Vc(()=>{this.Sk(!1)});d('Refresh',Ec('#2e87ef'),Ec('#ffffff'),'Click to reload this page and start using the new version right now').Vc(()=>{this.Sk(!1);a.D()});b.appendChild(c,'top',olympe.ui.ha.Db.Sb);b.appendChild(g,'bottom',olympe.ui.ha.Db.Sb);this.xC(N().LD(.6));this.Wb(8);Vf(this);this.Nd(b)}};olympe.sc.ui.Lb={};function Qq(a,b,c,d,e,f,g){const k=c.ka(),l=So(f,k);olympe.j.ls([l.wa(olympe.sc.Hb.C.vp,olympe.ui.F.mb,!0)],m=>{m.Tj(!0);b.appendChild(m,k+'_'+a.db.name(k),d,e);m.Cs(e);Rq(a,f,l,m,g)})}function Sq(a,b,c,d,e,f=olympe.j.kb.EMPTY){f!==olympe.j.kb.EMPTY&&olympe.j.Fl([f],g=>{g=g.valueOf();b.mg();d.yi((k,l,m)=>{Qq(a,b,k,g,m.gf(l),c,e)})});d.forEach((g,k,l)=>{const m=olympe.j.Qa(f).valueOf();Qq(a,b,g,m,l.gf(k),c,e)})}
1963
+ function Rq(a,b,c,d,e){var f=olympe.sc.ui.ec.T,g=olympe.sc.ui.Renderable.C,k=olympe.sc.ui.Renderable.D;const l=Hp(a,olympe.sc.ui.ec.R);f=Hp(a,f);g=Hp(a,g);k=Hp(a,k);const m=d.na(),n=a.C(b);a=a.D(b);b=olympe.j.$a(n,()=>e.ta(),()=>m.ta(),olympe.j.aa);const p=olympe.j.$a(a,()=>e.qa(),()=>m.qa(),olympe.j.aa),r=(t,u,v)=>{void 0===v?olympe.j.Wa([u],w=>{c.set(t,w.valueOf())}):olympe.j.Wa([u,v],(w,x)=>{x.valueOf()?c.set(t,w.valueOf()):c.remove(t)});olympe.j.yb().onDestroy(()=>c.remove(t))};d=d.ae();r(f,d.ta());
1964
+ r(l,d.qa());r(g,p,a);r(k,b,n)}olympe.sc.ui.Lb.fk=class extends olympe.sc.ui.mr{qs(){}D(){}C(){}};olympe.sc.ui.Lb.fk.D={Jy:'distributed',Uf:'manual'};olympe.sc.ui.Lb.Xe=class extends olympe.sc.ui.mr{qs(a,b){const c=olympe.j.aa,d=olympe.sc.ui.Ga.QX,e=new olympe.j.ga(this.Ea(olympe.sc.ui.Renderable.C,a,c,c.ZERO,!0),this.Ea(olympe.sc.ui.Renderable.D,a,c,c.ZERO,!0)),f=new olympe.ui.F.Xe(e);b.forEach((g,k,l)=>{const m=g.ka(),n=So(a,m);olympe.j.ls([n.wa(olympe.sc.Hb.C.vp,olympe.ui.F.mb,!0)],p=>{p.setPosition(g.ae(n));p.ah(g.Ea(d,n,c,c.ZERO));f.appendChild(p,m+'_'+this.db.name(m));p.Cs(l.gf(k))})});return f}D(){return olympe.j.ia.pb}C(){return olympe.j.ia.pb}};
1966
1965
  olympe.sc.ui.Lb.Xe.U=olympe.dc.Ja.C('016c2458e07561155a49',olympe.sc.ui.Lb.Xe);olympe.sc.ui.Lb.Zd=class extends olympe.sc.ui.Lb.fk{qs(a,b){var c=olympe.j.kb,d=olympe.j.aa;const e=olympe.j.ga,f=olympe.ui.F.Zd;var g=olympe.ui.ha.rc.Sc;const k=olympe.sc.ui.Lb.fk.D.Uf,l=olympe.sc.ui.Lb.fk.D.Jy,m=olympe.sc.ui.Lb.Zd.R,n=olympe.sc.ui.Lb.Zd.da;var p=olympe.sc.ui.Lb.Zd.$,r=olympe.sc.ui.Lb.Zd.T,t=this.Ea(olympe.sc.ui.Renderable.C,a,d,d.ZERO,!0);const u=this.Ea(olympe.sc.ui.Renderable.D,a,d,d.ZERO,!0);p=this.Ea(p,a,d,d.ZERO,!0);g=this.Ea(n,a,c,g,!0);c=this.Ea(m,a,c,k,!0);r=this.Ea(r,a,
1967
- d,olympe.j.Ba(-1),!0);t=olympe.j.Xa([c,t,b.Qc(),p],(v,w,x,y)=>olympe.j.Ba(v.valueOf()===l&&0<x?(w-(x-1)*y)/x:-1),olympe.j.aa);d=new f(u,p,d.ZERO,d.ZERO);Rq(this,d,a,b,new e(t,r),g);return d}D(a){const b=olympe.sc.ui.Lb.fk.D.Jy;return this.Ea(olympe.sc.ui.Lb.Zd.R,a,olympe.j.kb,olympe.sc.ui.Lb.fk.D.Uf).Se(b)}C(a){return this.Ea(olympe.sc.ui.Lb.Zd.T,a,olympe.j.aa,olympe.j.Ba(-1)).Mj(-1)}};olympe.sc.ui.Lb.Zd.U=olympe.dc.Ja.C('016c2464cd56eb1d285e',olympe.sc.ui.Lb.Zd);olympe.sc.ui.Lb.Zd.da=olympe.sc.ui.Lb.Zd.U.fa('016c2465994ea70d575b');
1966
+ d,olympe.j.Ba(-1),!0);t=olympe.j.Xa([c,t,b.Qc(),p],(v,w,x,y)=>olympe.j.Ba(v.valueOf()===l&&0<x?(w-(x-1)*y)/x:-1),olympe.j.aa);d=new f(u,p,d.ZERO,d.ZERO);Sq(this,d,a,b,new e(t,r),g);return d}D(a){const b=olympe.sc.ui.Lb.fk.D.Jy;return this.Ea(olympe.sc.ui.Lb.Zd.R,a,olympe.j.kb,olympe.sc.ui.Lb.fk.D.Uf).Se(b)}C(a){return this.Ea(olympe.sc.ui.Lb.Zd.T,a,olympe.j.aa,olympe.j.Ba(-1)).Mj(-1)}};olympe.sc.ui.Lb.Zd.U=olympe.dc.Ja.C('016c2464cd56eb1d285e',olympe.sc.ui.Lb.Zd);olympe.sc.ui.Lb.Zd.da=olympe.sc.ui.Lb.Zd.U.fa('016c2465994ea70d575b');
1968
1967
  olympe.sc.ui.Lb.Zd.R=olympe.sc.ui.Lb.Zd.U.fa('016c2465d49a1b57c37b');olympe.sc.ui.Lb.Zd.$=olympe.sc.ui.Lb.Zd.U.fa('016c24662dd291131b36');olympe.sc.ui.Lb.Zd.T=olympe.sc.ui.Lb.Zd.U.fa('016c246628ec25819a59');olympe.sc.ui.Lb.Zd.U.C=a=>{const b=a.create(olympe.sc.ui.Lb.Zd);a.Qb(olympe.sc.gg.C,b,olympe.sc.ui.ec.R);a.Qb(olympe.sc.gg.C,b,olympe.sc.ui.ec.T);return b.ka()};olympe.sc.ui.Lb.Hf=class extends olympe.sc.ui.Lb.fk{qs(a,b){var c=olympe.j.aa,d=olympe.j.ia;const e=olympe.j.ga;var f=olympe.ui.F.Hf,g=olympe.sc.ui.Lb.Hf.R,k=olympe.sc.ui.Lb.Hf.$,l=olympe.sc.ui.Lb.Hf.ma;const m=olympe.sc.ui.Lb.Hf.da,n=olympe.sc.ui.Lb.Hf.T,p=this.Ea(olympe.sc.ui.Renderable.C,a,c,c.ZERO,!0),r=this.Ea(olympe.sc.ui.Renderable.D,a,c,c.ZERO,!0);g=this.Ea(g,a,c,olympe.j.Ba(50),!0);k=this.Ea(k,a,c,c.ZERO,!0);l=this.Ea(l,a,c,c.ZERO,!0);c=this.Ea(m,a,c,c.ZERO,!0);d=this.Ea(n,a,d,d.pb,!0);f=
1969
- new f(p,r,g,k,l,c);f.aP(d);Rq(this,f,a,b,new e(g,-1));return f}D(a){return this.Ea(olympe.sc.ui.Lb.Hf.R,a,olympe.j.aa,olympe.j.Ba(50)).Mj(-1)}C(){return olympe.j.ia.pb}};olympe.sc.ui.Lb.Hf.U=olympe.dc.Ja.C('016c2466cfdfb79fda99',olympe.sc.ui.Lb.Hf);olympe.sc.ui.Lb.Hf.R=olympe.sc.ui.Lb.Hf.U.fa('016c24674d58a6863271');olympe.sc.ui.Lb.Hf.$=olympe.sc.ui.Lb.Hf.U.fa('016c24679171effcf472');olympe.sc.ui.Lb.Hf.ma=olympe.sc.ui.Lb.Hf.U.fa('016c2467dd3812adac6e');olympe.sc.ui.Lb.Hf.da=olympe.sc.ui.Lb.Hf.U.fa('016c2467fa3c2444dfec');
1968
+ new f(p,r,g,k,l,c);f.aP(d);Sq(this,f,a,b,new e(g,-1));return f}D(a){return this.Ea(olympe.sc.ui.Lb.Hf.R,a,olympe.j.aa,olympe.j.Ba(50)).Mj(-1)}C(){return olympe.j.ia.pb}};olympe.sc.ui.Lb.Hf.U=olympe.dc.Ja.C('016c2466cfdfb79fda99',olympe.sc.ui.Lb.Hf);olympe.sc.ui.Lb.Hf.R=olympe.sc.ui.Lb.Hf.U.fa('016c24674d58a6863271');olympe.sc.ui.Lb.Hf.$=olympe.sc.ui.Lb.Hf.U.fa('016c24679171effcf472');olympe.sc.ui.Lb.Hf.ma=olympe.sc.ui.Lb.Hf.U.fa('016c2467dd3812adac6e');olympe.sc.ui.Lb.Hf.da=olympe.sc.ui.Lb.Hf.U.fa('016c2467fa3c2444dfec');
1970
1969
  olympe.sc.ui.Lb.Hf.T=olympe.sc.ui.Lb.Hf.U.fa('016c24680a7ae4f6964c');olympe.sc.ui.Lb.Hf.za=olympe.sc.ui.Lb.Hf.U.fa('016c2468a81749b0dea5');olympe.sc.ui.Lb.Hf.U.C=a=>{const b=a.create(olympe.sc.ui.Lb.Hf);a.Qb(olympe.sc.gg.C,b,olympe.sc.ui.ec.R);a.Qb(olympe.sc.gg.C,b,olympe.sc.ui.ec.T);a.Qb(olympe.sc.gg.C,b,olympe.sc.ui.Renderable.C);return b.ka()};olympe.sc.ui.Lb.xd=class extends olympe.sc.ui.Lb.fk{qs(a,b){var c=olympe.j.kb,d=olympe.j.aa;const e=olympe.j.ga,f=olympe.ui.F.xd;var g=olympe.ui.ha.Db.Sb;const k=olympe.sc.ui.Lb.fk.D.Uf,l=olympe.sc.ui.Lb.fk.D.Jy,m=olympe.sc.ui.Lb.xd.$,n=olympe.sc.ui.Lb.xd.T;var p=olympe.sc.ui.Lb.xd.da,r=olympe.sc.ui.Lb.xd.R;const t=this.Ea(olympe.sc.ui.Renderable.C,a,d,d.ZERO,!0);var u=this.Ea(olympe.sc.ui.Renderable.D,a,d,d.ZERO,!0);p=this.Ea(p,a,d,d.ZERO,!0);g=this.Ea(m,a,c,g,!0);c=this.Ea(n,a,c,k,!0);r=this.Ea(r,
1971
- a,d,olympe.j.Ba(-1),!0);u=olympe.j.Xa([c,u,b.Qc(),p],(v,w,x,y)=>olympe.j.Ba(v.valueOf()===l&&0<x?(w-(x-1)*y)/x:-1),olympe.j.aa);d=new f(t,p,d.ZERO,d.ZERO);Rq(this,d,a,b,new e(r,u),g);return d}D(a){return this.Ea(olympe.sc.ui.Lb.xd.R,a,olympe.j.aa,olympe.j.Ba(-1)).Mj(-1)}C(a){const b=olympe.sc.ui.Lb.fk.D.Jy;return this.Ea(olympe.sc.ui.Lb.xd.T,a,olympe.j.kb,olympe.sc.ui.Lb.fk.D.Uf).Se(b)}};olympe.sc.ui.Lb.xd.U=olympe.dc.Ja.C('016c245de13d033efad4',olympe.sc.ui.Lb.xd);olympe.sc.ui.Lb.xd.$=olympe.sc.ui.Lb.xd.U.fa('016c2463a6aab57119e9');
1970
+ a,d,olympe.j.Ba(-1),!0);u=olympe.j.Xa([c,u,b.Qc(),p],(v,w,x,y)=>olympe.j.Ba(v.valueOf()===l&&0<x?(w-(x-1)*y)/x:-1),olympe.j.aa);d=new f(t,p,d.ZERO,d.ZERO);Sq(this,d,a,b,new e(r,u),g);return d}D(a){return this.Ea(olympe.sc.ui.Lb.xd.R,a,olympe.j.aa,olympe.j.Ba(-1)).Mj(-1)}C(a){const b=olympe.sc.ui.Lb.fk.D.Jy;return this.Ea(olympe.sc.ui.Lb.xd.T,a,olympe.j.kb,olympe.sc.ui.Lb.fk.D.Uf).Se(b)}};olympe.sc.ui.Lb.xd.U=olympe.dc.Ja.C('016c245de13d033efad4',olympe.sc.ui.Lb.xd);olympe.sc.ui.Lb.xd.$=olympe.sc.ui.Lb.xd.U.fa('016c2463a6aab57119e9');
1972
1971
  olympe.sc.ui.Lb.xd.T=olympe.sc.ui.Lb.xd.U.fa('016c245e748f56bc527c');olympe.sc.ui.Lb.xd.da=olympe.sc.ui.Lb.xd.U.fa('016c24642a7b84145c27');olympe.sc.ui.Lb.xd.R=olympe.sc.ui.Lb.xd.U.fa('016c2464540a0699987e');olympe.sc.ui.Lb.xd.U.C=a=>{const b=a.create(olympe.sc.ui.Lb.xd);a.Qb(olympe.sc.gg.C,b,olympe.sc.ui.ec.R);a.Qb(olympe.sc.gg.C,b,olympe.sc.ui.ec.T);return b.ka()};olympe.sc.ui.Of={};olympe.sc.ui.Of.Qv=class extends olympe.dc.CloudObject{};olympe.sc.ui.Of.Qv.U=olympe.dc.Ja.C('0168c77252629e4b7e4b',olympe.sc.ui.Of.Qv);olympe.sc.ui.Of.GestureEvent=class extends olympe.sc.ui.Of.Qv{};olympe.sc.ui.Of.GestureEvent.U=olympe.dc.Ja.C('0168dcccfca62952a55f',olympe.sc.ui.Of.GestureEvent);olympe.sc.ui.Of.GestureEvent.C={b0:'Horizontal Pan',C2:'Vertical Pan',c0:'Horizontal Swipe',m0:'Long Press',n0:'Long Press Up',h1:'Rotate',T0:'Pinch'};olympe.sc.ui.Of.MouseEvent=class extends olympe.sc.ui.Of.Qv{};olympe.sc.ui.Of.MouseEvent.U=olympe.dc.Ja.C('0168c772532efa4be843',olympe.sc.ui.Of.MouseEvent);olympe.sc.ui.Of.MouseEvent.C={t0:'Mouse Click',h_:'Mouse Double Click',w0:'Mouse Move',u0:'Mouse Enter',v0:'Mouse Leave',x0:'Mouse Wheel'};olympe.sc.ui.Of.hk=class extends olympe.sc.ui.Of.MouseEvent{};olympe.sc.ui.Of.hk.U=olympe.dc.Ja.C('0168dc74bc018fb93ca2',olympe.sc.ui.Of.hk);olympe.sc.ui.Of.Gr=class extends olympe.dc.CloudObject{};olympe.sc.ui.Of.Gr.U=olympe.dc.Ja.C('0168e0e2c4621df32516',olympe.sc.ui.Of.Gr);olympe.sc.ui.Of.TouchEvent=class extends olympe.sc.ui.Of.Qv{};olympe.sc.ui.Of.TouchEvent.U=olympe.dc.Ja.C('0168e0f0f8b8d1b6daa2',olympe.sc.ui.Of.TouchEvent);olympe.sc.ui.Of.TouchEvent.C={s2:'Touch Start',q2:'Touch Move',p2:'Touch End',o2:'Touch Cancel'};olympe.sc.ui.jf={};olympe.sc.ui.jf.Zk=class extends olympe.sc.Metadata{FA(){return olympe.sc.ui.jf.Zk.C}GA(){return olympe.sc.ui.jf.Zk.D}};olympe.sc.ui.jf.Zk.U=olympe.dc.Ja.C('01621f6ab29d770a3bba',olympe.sc.ui.jf.Zk);olympe.sc.ui.jf.Zk.C=olympe.sc.ui.jf.Zk.U.fa('01621f6ab58c2f884654');olympe.sc.ui.jf.Zk.D=olympe.sc.ui.jf.Zk.U.fa('01621f6ab6ac89348f20');olympe.sc.Gc={};olympe.sc.Gc.fg=class extends olympe.ui.F.ea.My{constructor(a){super();a=a.hf().na();olympe.j.yb();this.size=a.qa().vn(a.ta());this.fontSize=olympe.j.Ba(16);this.ca=Bc();Ac();this.ld=Cc();this.Ha=O();this.W=new olympe.j.Color(245,110,50);this.kc=olympe.j.Color.create(236,101,87);this.sb=olympe.j.Color.create(251,211,131);olympe.j.Color.create(217,83,79);this.$=olympe.j.Color.create(247,247,247);this.C=O();Bc();olympe.j.Color.create(43,43,43);this.Oa=olympe.j.Color.create(255,255,255,.5);this.ma=olympe.j.Color.create(218,
1973
1972
  218,218);this.O=olympe.j.Color.create(38,38,38);olympe.j.Color.create(172,146,236)}Ai(){return'Helvetica'}Bi(){return 100}cq(){return 0}hf(){return S(this,'rootElement',olympe.ui.F.ea.ar,void 0,()=>{let a=new olympe.ui.F.ea.ar;a.Ma(this.$);return a})}Gm(a){return S(this,'button',olympe.ui.F.ea.ak,a,b=>{let c=new olympe.ui.F.ea.ak;switch(b){case olympe.sc.Gc.fg.C.dK:c.Gb(new olympe.j.ga(this.fontSize.hb(12),this.fontSize.hb(3)));c.vb('Helvetica');c.rb(this.fontSize);c.Bb(100);c.Ma(this.W);c.lb(this.Ha);
1974
1973
  c.Wb(0);c.nd(this.W);c.ad(1);c.Zj(this.C);K(c.Oa,this.W);K(c.R,this.W);break;case olympe.sc.Gc.fg.C.WU:c.Gb(new olympe.j.ga(this.fontSize.hb(12),this.fontSize.hb(3)));c.vb('Helvetica');c.rb(this.fontSize);c.Bb(100);c.Ma(this.sb);c.lb(this.ca);c.Wb(0);c.nd(this.sb);c.ad(1);break;case olympe.sc.Gc.fg.C.eC:c.Gb(new olympe.j.ga(0,90));c.vb('Helvetica');c.Bb(100);break;case olympe.sc.Gc.fg.C.bD:c.Gb(new olympe.j.ga(10,90));c.vb('Helvetica');c.Bb(100);break;default:c.Gb(new olympe.j.ga(this.fontSize.hb(12),
@@ -1981,18 +1980,18 @@ case olympe.sc.Gc.fg.O.vR:c.Ma(this.kc);break;default:c.Ma(this.C),c.nd(this.ma)
1981
1980
  'alert',olympe.ui.F.ea.Jk,a,()=>{let b=new olympe.ui.F.ea.Jk;b.Gb(new olympe.j.ga(360,1));b.Yd(!1);b.Ed(!0);K(b.C,this.Oa);b.Ma(this.C);var c=this.fontSize.hb(1.5);K(b.D,c);b.Df(this.fontSize.hb(1.5));K(b.O,olympe.sc.Gc.fg.D.jF);K(b.R,olympe.sc.Gc.fg.C.dK);b.Wb(0);return b})}Zw(a){return S(this,'grid',olympe.ui.F.ea.vj,a,()=>{let b=new olympe.ui.F.ea.vj;b.Ma(this.$);K(b.C,olympe.sc.Gc.fg.D.eC);K(b.D,olympe.sc.Gc.fg.D.bD);b.Vj(30);Hf(b);return b})}iA(a){return S(this,'bubble',olympe.ui.F.ea.qp,a,()=>
1982
1981
  {let b=new olympe.ui.F.ea.qp;K(b.D,10);K(b.O,5);K(b.R,10);var c=olympe.j.Color.create(255,255,255);K(b.T,c);c=olympe.j.Color.create(200,200,200);K(b.W,c);K(b.$,1);return b})}pu(a){return S(this,'inputPopup',olympe.ui.F.ea.Qk,a,()=>{let b=new olympe.ui.F.ea.Qk;b.Gb(new olympe.j.ga(500,1));b.Yd(!1);b.Ed(!0);var c=olympe.j.Color.create(0,0,0,.6);K(b.C,c);b.Ma(this.$);K(b.D,10);b.Df(10);K(b.R,5);K(b.T,5);K(b.O,'Helvetica');return b})}EA(a){return S(this,'windowComponent',olympe.ui.F.ea.Tp,a,()=>{let b=
1983
1982
  new olympe.ui.F.ea.Tp;K(b.W,olympe.j.la(40));K(b.R,olympe.j.la(100));K(b.T,olympe.j.la(100));If(b);Jf(b);K(b.C,1);var c=new olympe.j.ga(25,25);K(b.D,c);K(b.O,'images/close.png');return b})}uA(a){return S(this,olympe.ui.F.ea.sm.Dc,olympe.ui.F.ea.sm,a,b=>{const c=new olympe.ui.F.ea.ed,d=new olympe.ui.F.ea.sm;d.Wu(!1);d.bB(c);switch(b){case olympe.sc.Gc.fg.T.qr:d.Wu(!0),d.aB(1),c.Ma(this.O)}return d})}mA(a){return S(this,olympe.ui.F.ea.nf.Dc,olympe.ui.F.ea.nf,a,b=>{const c=new olympe.ui.F.ea.nf;switch(b){case olympe.ui.F.ea.nf.D.GG:K(c.C,
1984
- olympe.ui.F.ea.nf.C.aw);break;default:K(c.C,olympe.ui.F.ea.nf.C.Oy)}return c})}};olympe.sc.Gc.fg.O={uR:'dropdown-item',wR:'dropdown-selectedvalue',vR:'dropdown-mouseoveritem'};olympe.sc.Gc.fg.D={eC:'grid-cell',bD:'grid-selected-cell',jF:'alertTitle',qr:'panel'};olympe.sc.Gc.fg.C={dK:'selected',WU:'warning',eC:'grid-cell',bD:'grid-selected-cell'};olympe.sc.Gc.fg.W={qr:'panel'};olympe.sc.Gc.fg.R={qr:'panel'};olympe.sc.Gc.fg.T={qr:'panel'};function Sq(a,b){a.C=b}
1983
+ olympe.ui.F.ea.nf.C.aw);break;default:K(c.C,olympe.ui.F.ea.nf.C.Oy)}return c})}};olympe.sc.Gc.fg.O={uR:'dropdown-item',wR:'dropdown-selectedvalue',vR:'dropdown-mouseoveritem'};olympe.sc.Gc.fg.D={eC:'grid-cell',bD:'grid-selected-cell',jF:'alertTitle',qr:'panel'};olympe.sc.Gc.fg.C={dK:'selected',WU:'warning',eC:'grid-cell',bD:'grid-selected-cell'};olympe.sc.Gc.fg.W={qr:'panel'};olympe.sc.Gc.fg.R={qr:'panel'};olympe.sc.Gc.fg.T={qr:'panel'};function Tq(a,b){a.C=b}
1985
1984
  olympe.sc.Gc.KS=class extends olympe.ui.F.Screen{constructor(a){super();this.xa=a;this.C=null}render(a){var b=olympe.j.ga,c=olympe.j.Color,d=olympe.j.Za;const e=olympe.j.Ba;var f=olympe.ui.F.cb;const g=olympe.ui.F.ye,k=olympe.ui.F.jc;var l=olympe.ui.F.Mb,m=a.qa();a=a.ta();const n=d(olympe.j.aa),p=d(olympe.j.aa),r=d(olympe.j.aa),t=d(olympe.j.aa);olympe.j.Wa([m],y=>{350<y.valueOf()?(n.update(e(350)),p.update(e(60)),r.update(e(24))):(n.update(e(175)),p.update(e(30)),r.update(e(16)));t.update(e(500>y.valueOf()?
1986
1985
  .5:1))});d=new b(n.wa(),p.wa());m=new olympe.ui.F.xd(m,15,30,30,!1,a);m.Ma(Bc());b=new g(new b(t.wa().hb(352),t.wa().hb(204)));b.Yg('images/app_launcher_logo.svg');m.appendChild(b,'logo',olympe.ui.ha.Db.Sb);const u=new f(d);u.Jb('Invalid user name or password!').lb(c.red()).Bb(800).rb(r.wa()).Xb(olympe.ui.ha.rc.Sc).vb('Roboto').rd(!0);m.appendChild(u,'errorLabel',olympe.ui.ha.Db.Sb);b=new f(d);b.Jb('User Name').lb(Cc()).vb('Roboto').rb(r.wa()).Bb(800).Xb(olympe.ui.ha.rc.Sc);m.appendChild(b,'userNameLabel',
1987
1986
  olympe.ui.ha.Db.Sb);const v=new l(d);v.zn(olympe.ui.ha.Er.zG).Og('username').Zg(c.create(132,132,132)).lb(c.create(250,250,250)).ip().vb('Roboto').rb(r.wa()).Ld(0,Dc()).Ma(N());m.appendChild(v,'userNameField',olympe.ui.ha.Db.Sb);f=new f(d);f.Jb('Password').lb(Cc()).vb('Roboto').rb(r.wa()).Bb(800).Xb(olympe.ui.ha.rc.Sc);m.appendChild(f,'pwdLabel',olympe.ui.ha.Db.Sb);const w=new l(d);w.zn(olympe.ui.ha.Er.bK).Og('password').Zg(c.create(132,132,132)).lb(c.create(250,250,250)).ip().vb('Roboto').rb(r.wa()).Ld(0,
1988
1987
  Dc()).Ma(N());m.appendChild(w,'pwd',olympe.ui.ha.Db.Sb);l=(new k(d,'Sign In')).Zj(c.create(20,100,253)).Ma(c.create(0,86,253)).vb('Roboto').rb(r).lb(O());m.appendChild(l,'loginButton',olympe.ui.ha.Db.Sb);this.C&&(c=(new k(d,'Guest')).Zj(c.create(20,100,253)).Ma(c.green()).vb('Roboto').rb(r).lb(O()),c.Vc(()=>{this.C()}),m.appendChild(c,'guestButton',olympe.ui.ha.Db.Sb));const x=()=>{var y=olympe.j.Qa(v.Lj());y=y?y.valueOf().replace(/^\s*|\s*$/,''):'';y=y.split('@');y=y[0];const A=new olympe.xa.Request;
1989
- A.set('username',y);mf(A,olympe.j.Qa(w.Lj()));lf(this.xa,A,void 0,H=>{H&&u.rd(!1)})};v.ej(y=>{y.sA().Rb(13)&&w.mj()});w.ej(y=>{y.sA().Rb(13)&&x()});l.Vc(x);v.mj();return m}};function Tq(a,b){a.D=b}function Uq(a,b){a.C=b}
1988
+ A.set('username',y);mf(A,olympe.j.Qa(w.Lj()));lf(this.xa,A,void 0,H=>{H&&u.rd(!1)})};v.ej(y=>{y.sA().Rb(13)&&w.mj()});w.ej(y=>{y.sA().Rb(13)&&x()});l.Vc(x);v.mj();return m}};function Uq(a,b){a.D=b}function Vq(a,b){a.C=b}
1990
1989
  olympe.sc.Gc.LS=class extends olympe.ui.F.Screen{constructor(a){super();this.C=this.D=null;this.O=a}render(a){const b=olympe.j.ga,c=olympe.ui.F.cb;var d=olympe.ui.F.ye,e=a.qa();const f=a.ta(),g=olympe.j.Xa([e],m=>olympe.j.Ba(500>m.valueOf()?.5:1),olympe.j.aa),k=(new olympe.dc.Mp(olympe.sc.ui.Vh.U.ka(),olympe.sc.ui.Oz)).kJ().ek();a=new olympe.ui.F.xd(a.qa(),10,10,30,!1,f);a.Ma(Bc());d=new d(new b(g.hb(352),g.hb(204)));d.Yg('images/app_launcher_logo.svg');a.appendChild(d,'logo',olympe.ui.ha.Db.Sb);
1991
1990
  const l=oc(e,375);e=new olympe.ui.F.uU(new b(l,f.ya(g.hb(204).Sa(100))),k,m=>{m=(new c(new b(l,70))).Jb(m.bb());m.Xb(olympe.ui.ha.rc.Sc).Ub(olympe.ui.ha.Db.Sb).rb(32);m.lb(Cc());m.Ma(Dc());return m},m=>{m&&this.D&&this.D(m)});e.Ma(N());jg(e,()=>{});a.appendChild(e,'appList',olympe.ui.ha.Db.Sb);e=new olympe.ui.F.jc(new b(l,50));e.Jb('Logout').lb(N()).vb('Roboto').rb(20).Bb(800).Wb(15).Ld(0,Dc()).Ma(Cc());e.Vc(()=>{this.C&&this.C()});e.rd(this.O.mx());a.appendChild(e,'logoutButton',olympe.ui.ha.Db.Sb);
1992
- return a}};function Vq(a){return q(function*(){a.$||(yield $p(a),a.$=!0)})}function Wq(a,b,c){var d=new olympe.sc.Gc.KS(a.T);c.BD(d,'login');Sq(d,()=>{c.VA('logged')});c.eP();d=new olympe.sc.Gc.LS(a.T);c.BD(d,'selection');c.zD('login','selection','logged');c.zD('selection','login','logout');b.appendChild(c,'launcher',new olympe.j.ga(0,0));Tq(d,e=>{a.C=e.ka();b.removeChild('launcher');cq(a)});Uq(d,()=>{a.T.Cu().then(()=>c.VA('logout'))})}
1991
+ return a}};function Wq(a){return q(function*(){a.$||(yield aq(a),a.$=!0)})}function Xq(a,b,c){var d=new olympe.sc.Gc.KS(a.T);c.BD(d,'login');Tq(d,()=>{c.VA('logged')});c.eP();d=new olympe.sc.Gc.LS(a.T);c.BD(d,'selection');c.zD('login','selection','logged');c.zD('selection','login','logout');b.appendChild(c,'launcher',new olympe.j.ga(0,0));Uq(d,e=>{a.C=e.ka();b.removeChild('launcher');dq(a)});Vq(d,()=>{a.T.Cu().then(()=>c.VA('logout'))})}
1993
1992
  olympe.sc.Gc.xr=class extends olympe.sc.ve.xr{constructor(a,b,c,d,e,f,g,k,l,m,n,p,r,t){super(a,c,d,f,g,m,n,p,t,null);this.ea=l;this.ma=b;this.sb=k;this.$=!1;this.za=t.get('manifestBaseUrl');this.Pb=t.get('serviceWorkerUrl');this.R=r}da(){this.ma.da(this.ea)}ca(){super.ca();const a=this.ma.hf();if(this.za.length){var b=(new URL(window.location.toString())).origin;b=`${this.za}/${this.C}?origin=${encodeURI(b)}`;a.Nx(b)}if(this.R.O()){const c=this.Pb+'&appName='+this.C;this.R.register(c).then(()=>{this.R.C(self.location.toString());
1994
- this.R.C(c);Array.from(document.querySelectorAll('script,link,img')).map(d=>d.src||d.href).filter(d=>!!d).forEach(d=>{this.R.C(d)})})}this.V.debug('Remove loading spinner');a.Qr()}run(){const a=olympe.Y.mf.C.nr,b=olympe.Y.mf.C.jk,c=olympe.Y.mf.C.hi;let d=!1;const e=olympe.ui.Na.hf(),f=new olympe.ui.F.mL(e.na());0===this.C.length?Wq(this,e,f):this.da();olympe.j.Wa([this.O.getState()],k=>{switch(k){case a:case b:this.V.debug('Server session opened or working offline, start the application');this.$=
1995
- !1;Vq(this).then(olympe.j.yb().re(()=>{0===this.C.length?f.VA('logged'):d||(cq(this),d=!0)}));break;case c:this.V.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}},'Runtime initial connectivity state listener');let g=!1;olympe.j.Fl([this.O.getState()],k=>{const l=k===olympe.Y.mf.C.nr;g&&l&&this.sb.D();g=k===olympe.Y.mf.C.hi})}};olympe.sc.Gc.xr.Aa=[olympe.Af.uF];olympe.sc.Gc.ba={oL:'sc.uiruntime.Theme',Ft:'sc.uiruntime.RuntimeAppConfig'};olympe.sc.Gc.sy={Wi:'sc.uiruntime.Main'};olympe.sc.Gc.pa={uJ:'app.manifest.enabled',HC:'app.manifest.httpHost',wJ:'app.manifest.httpPort',xJ:'app.manifest.httpSSL',vJ:'app.manifest.httpBasePath',PK:'app.serviceworker.url',NK:'app.serviceworker.cacheVersion'};
1993
+ this.R.C(c);Array.from(document.querySelectorAll('script,link,img')).map(d=>d.src||d.href).filter(d=>!!d).forEach(d=>{this.R.C(d)})})}this.V.debug('Remove loading spinner');a.Qr()}run(){const a=olympe.Y.mf.C.nr,b=olympe.Y.mf.C.jk,c=olympe.Y.mf.C.hi;let d=!1;const e=olympe.ui.Na.hf(),f=new olympe.ui.F.mL(e.na());0===this.C.length?Xq(this,e,f):this.da();olympe.j.Wa([this.O.getState()],k=>{switch(k){case a:case b:this.V.debug('Server session opened or working offline, start the application');this.$=
1994
+ !1;Wq(this).then(olympe.j.yb().re(()=>{0===this.C.length?f.VA('logged'):d||(dq(this),d=!0)}));break;case c:this.V.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}},'Runtime initial connectivity state listener');let g=!1;olympe.j.Fl([this.O.getState()],k=>{const l=k===olympe.Y.mf.C.nr;g&&l&&this.sb.D();g=k===olympe.Y.mf.C.hi})}};olympe.sc.Gc.xr.Aa=[olympe.Af.uF];olympe.sc.Gc.ba={oL:'sc.uiruntime.Theme',Ft:'sc.uiruntime.RuntimeAppConfig'};olympe.sc.Gc.sy={Wi:'sc.uiruntime.Main'};olympe.sc.Gc.pa={uJ:'app.manifest.enabled',HC:'app.manifest.httpHost',wJ:'app.manifest.httpPort',xJ:'app.manifest.httpSSL',vJ:'app.manifest.httpBasePath',PK:'app.serviceworker.url',NK:'app.serviceworker.cacheVersion'};
1996
1995
  olympe.sa.$e(function(a){B(a,olympe.sc.Gc.ba.oL,olympe.sc.Gc.fg,olympe.ui.ba.Ob);var b=a.getParameter(olympe.Y.pa.Hy);E(a,olympe.sc.Gc.pa.uJ,!0);E(a,olympe.sc.Gc.pa.HC,b);b='localhost'===a.getParameter(olympe.sc.Gc.pa.HC);E(a,olympe.sc.Gc.pa.wJ,b?3141:443);E(a,olympe.sc.Gc.pa.xJ,!b);E(a,olympe.sc.Gc.pa.vJ,'runtime/manifest');E(a,olympe.sc.Gc.pa.PK,'/service_worker.js');E(a,olympe.sc.Gc.pa.NK,a.getParameter(olympe.Jo.pa.VERSION)||'1');C(a,olympe.sc.Gc.ba.Ft,[olympe.sc.ve.ba.Ft,new olympe.sa.zb(olympe.sc.Gc.pa.uJ),
1997
1996
  new olympe.sa.zb(olympe.sc.Gc.pa.HC),new olympe.sa.zb(olympe.sc.Gc.pa.wJ),new olympe.sa.zb(olympe.sc.Gc.pa.xJ),new olympe.sa.zb(olympe.sc.Gc.pa.vJ),new olympe.sa.zb(olympe.sc.Gc.pa.PK),new olympe.sa.zb(olympe.sc.Gc.pa.NK)],(c,d,e,f,g,k,l,m)=>{c=new Map(c);e=(new olympe.Fa.Mv(e,f,k,g)).le();c.set('manifestBaseUrl',d?e:'');c.set('serviceWorkerUrl',`${l}?version=${m}`);return c});B(a,olympe.sc.Gc.sy.Wi,olympe.sc.Gc.xr,olympe.sc.ba.Vb,olympe.ui.ba.Ob,olympe.xa.ba.Ob,olympe.Y.ba.bm,olympe.Y.ba.Jt,olympe.dc.query.ba.fw,
1998
1997
  olympe.host.ba.fo,olympe.host.ba.Lt,olympe.sc.Gc.ba.oL,olympe.sc.ba.hw,olympe.sc.ve.ba.dl,olympe.oa.ba.ho,olympe.Fa.ba.Dz,olympe.sc.Gc.ba.Ft);olympe.Af.Jq(a,olympe.sc.Gc.sy.Wi,'sc.runtime');olympe.Af.Jq(a,olympe.sc.Gc.sy.Wi,'sc.ui');olympe.Af.Jq(a,olympe.sc.Gc.sy.Wi)},'olympe.sc.uiruntime');olympe.public={};olympe.public.Lc=class a{static eW(b,c){const d=new SRPClient,e=d.generateRandomSalt();return{username:b,login:b,salt:e,verifier:d.generateVerifier(e,b,c)}}static getState(){return olympe.j.Qa(olympe.public.Lc.get().D.wa())}static mx(b){return a.D(olympe.public.Lc.get().mx(),b).pipe(rxjs.operators.map(c=>c.valueOf()))}static wW(){return olympe.j.Qa(olympe.public.Lc.get().wk())}static kY(b){return a.D(olympe.public.Lc.get().wk(),b)}static vk(){var b=olympe.j,c=b.Qa;var d=olympe.public.Lc.get().C.wa().Ci();
@@ -2004,8 +2003,8 @@ olympe.public.Lc.getToken=olympe.public.Lc.vk;olympe.public.Lc.observeUser=olymp
2004
2003
  olympe.public.Qn=class{static create(a){return new class extends olympe.dc.tg.Sq{O(b,c){return olympe.dc.CloudObject.get(c)}compare(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.j.Za(olympe.j.aa),e=b.subscribe(f=>d.update(olympe.j.Ba(f)));olympe.j.yb().Ve(()=>e.unsubscribe());return d.wa()}}}};olympe.public.al=class{static mY(a,b){if('string'===typeof b)throw Error('When registering a health check, the options parameter should be an object: string is not supported anymore.');return()=>{}}static nY(){return()=>{}}static connect(){return olympe.Y.ND().connect()}static disconnect(){return olympe.Y.ND().disconnect()}static Io(a){a='function'===typeof a.se?a.se():a;return olympe.Y.ND().Io().asObservable(a).pipe(rxjs.operators.map(b=>b.valueOf()))}};olympe.public.al.isOnline=olympe.public.al.Io;
2005
2004
  olympe.public.al.disconnect=olympe.public.al.disconnect;olympe.public.al.connect=olympe.public.al.connect;olympe.public.al.onShutdown=olympe.public.al.nY;olympe.public.al.onHealthCheck=olympe.public.al.mY;'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.Oc.Relation,Direction:olympe.dc.Ib,generateTag:olympe.oa.Rr,tagToString:olympe.dc.Ya,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.zM,defineInverseRelation:olympe.dc.OV,BrickContext:olympe.sc.Hb,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Function,GlobalProperties:olympe.sc.Hb.C,registerBrick:olympe.sc.logic.Ja.C,FunctionBrick:olympe.sc.logic.Function,
2006
2005
  Context:olympe.sc.Hb,Entry:olympe.dc.Oc.Entry,PropertyModel:olympe.dm.Property,RelationModel:olympe.dm.Relation,StringModel:olympe.dm.String,NumberModel:olympe.dm.Number,BooleanModel:olympe.dm.Boolean,DatetimeModel:olympe.dm.DateTime,ColorModel:olympe.dm.Color,File:olympe.sc.File,User:olympe.dm.User,Enum:olympe.dm.yp,EnumValue:olympe.sc.Ev,DataSource:olympe.dm.DataSource,DataResult:olympe.dc.query.vi,Workflow:olympe.sc.workflow.Workflow,WorkflowState:olympe.sc.workflow.wm,WorkflowTransition:olympe.sc.workflow.Transition,
2007
- WorkflowObjectState:olympe.sc.workflow.ObjectState,Transaction:olympe.sc.Tc,BurstTransaction:olympe.dc.yv,TransactionResult:olympe.sc.sw,PredefinedDataSource:olympe.dc.Jc,QueryResult:olympe.dc.xc,Query:olympe.dc.nb,QuerySingle:olympe.dc.Rh,Predicate:olympe.dc.query.Yb,Order:olympe.dc.query.uz,Config:class{static getParameter(a){return olympe.sa.getParameter(a)}},Process:olympe.public.al,ProbeType:olympe.host.WC.C,Cache:{getCacheEntries:()=>olympe.dc.sources.Ej().T,clearCache:a=>Tm(olympe.dc.sources.Ej(),
2008
- a),getProcessingStatus:()=>olympe.dc.sources.Ej().jh(),getProcessingErrors:()=>olympe.dc.sources.Ej().Eb.asObservable(),hasPendingChanges:()=>olympe.dc.sources.Ej().da.asObservable(),synchroniseChanges:()=>Zm(),getPendingChanges:()=>bn(),clearPendingChanges:()=>fn(),loadPendingChanges:a=>dn(a)},Color:olympe.j.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequestType:olympe.Y.pd.C,ServiceRequest:olympe.Y.uh,Service:olympe.Y.de,Auth:olympe.public.Lc,AuthState:{INIT:olympe.xa.Cc.C.INIT,AUTHENTICATING:olympe.xa.Cc.C.oy,
2006
+ WorkflowObjectState:olympe.sc.workflow.ObjectState,Transaction:olympe.sc.Tc,BurstTransaction:olympe.dc.yv,TransactionResult:olympe.sc.sw,PredefinedDataSource:olympe.dc.Jc,QueryResult:olympe.dc.xc,Query:olympe.dc.nb,QuerySingle:olympe.dc.Rh,Predicate:olympe.dc.query.Yb,Order:olympe.dc.query.uz,Config:class{static getParameter(a){return olympe.sa.getParameter(a)}},Process:olympe.public.al,ProbeType:olympe.host.WC.C,Cache:{getCacheEntries:()=>olympe.dc.sources.Ej().T,clearCache:a=>Um(olympe.dc.sources.Ej(),
2007
+ a),getProcessingStatus:()=>olympe.dc.sources.Ej().jh(),getProcessingErrors:()=>olympe.dc.sources.Ej().Eb.asObservable(),hasPendingChanges:()=>olympe.dc.sources.Ej().da.asObservable(),synchroniseChanges:()=>$m(),getPendingChanges:()=>cn(),clearPendingChanges:()=>gn(),loadPendingChanges:a=>en(a)},Color:olympe.j.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequestType:olympe.Y.pd.C,ServiceRequest:olympe.Y.uh,Service:olympe.Y.de,Auth:olympe.public.Lc,AuthState:{INIT:olympe.xa.Cc.C.INIT,AUTHENTICATING:olympe.xa.Cc.C.oy,
2009
2008
  GUEST:olympe.xa.Cc.C.Gv,AUTHENTICATED:olympe.xa.Cc.C.Mn,ERROR:olympe.xa.Cc.C.we},AuthProtocol:olympe.xa.Tg.C,Sync:olympe.dc.CloudObject,BusinessObject:olympe.dc.CloudObject,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,DBView:class extends olympe.dc.zd{static get(){return olympe.dc.eb()}},ListDef:olympe.dc.Kb,
2010
2009
  instanceToTag:olympe.dc.Ya,registerSync:olympe.dc.Ja.C,getUniqueTag:olympe.oa.Rr,onDestroy:a=>olympe.j.yb().onDestroy(a),offDestroy:a=>olympe.j.yb().Lo(a),FollowRules:olympe.dc.Te,transformers:{Related:olympe.dc.Ra.um,RecursiveRelated:olympe.dc.Ra.zj,Distinct:olympe.dc.Ra.Cv,Filter:olympe.dc.Ra.Qf,Limit:olympe.dc.Ra.wt,Sort:olympe.dc.Ra.Cr,Union:olympe.dc.Ra.ro},ListDefPredicate:olympe.public.Yb,predicates:{And:olympe.dc.Ca.Ni,Or:olympe.dc.Ca.Wk,Not:olympe.dc.Ca.ik,Equals:olympe.dc.Ca.Lk,Contains:olympe.dc.Ca.Sn,
2011
2010
  Greater:olympe.dc.Ca.Vy,Smaller:olympe.dc.Ca.Iz,HasRelated:olympe.dc.Ca.rt,InstanceOf:olympe.dc.Ca.Pv,Regex:olympe.dc.Ca.mo},Comparator:olympe.public.Qn,comparators:{Number:olympe.dc.tg.Number,String:olympe.dc.tg.String,DateTime:olympe.dc.tg.DateTime},valuedefs:{BooleanProperty:olympe.dc.cd.yy,StringProperty:olympe.dc.cd.nw,NumberProperty:olympe.dc.cd.$v,DateTimeProperty:olympe.dc.cd.Bv,Constant:olympe.dc.cd.gm,Tag:olympe.dc.cd.pw}});'object'===typeof exports&&Object.assign(exports,{VisualBrick:olympe.sc.ui.ec,Theme:olympe.sc.ui.ThemeModel,registerBrick:(a,b,...c)=>{b.prototype instanceof olympe.sc.ui.ec?olympe.dc.Ja.C(a,b,...c):olympe.sc.logic.Ja.C(a,b,...c)},UIBrick:olympe.sc.ui.ec});