(function(G,Fa){function D(a){return a instanceof Array?new qa(a):a.iterator()}G.code=G.code||{};G.database=G.database||{};G.schema=G.schema||{};G.source=G.source||{};G.transform=G.transform||{};var Z=function(){return E.__string_rec(this,"")},ba=ba||{},Q;class U{constructor(a,b){this.r=new RegExp(a,b.split("u").join(""))}match(a){this.r.global&&(this.r.lastIndex=0);this.r.m=this.r.exec(a);this.r.s=a;return null!=this.r.m}}U.__name__=!0;Object.assign(U.prototype,{__class__:U});class t{static cca(a,
b){a=a.charCodeAt(b);if(a==a)return a}static substr(a,b,c){if(null==c)c=a.length;else if(0>c)if(0==b)c=a.length+c;else return"";return a.substr(b,c)}static remove(a,b){b=a.indexOf(b);if(-1==b)return!1;a.splice(b,1);return!0}static now(){return Date.now()}}t.__name__=!0;class Ga{static zip(a,b){let c=window.document.getElementById(a).firstChild;a=new ia;let e=0;for(;e<c.childNodes.length;){var d=c.childNodes.item(e).textContent,g=c.childNodes.item(e+1).textContent;g=P.ofString(g);d={fileName:b+"/"+
d,fileSize:g.length,fileTime:new Date,compressed:!1,dataSize:0,data:g,crc32:Da.make(g)};a.push(d);e+=2}b=new ca;(new ra(b)).write(a);return da.encode(b.getBytes())}}G.JsZip=Ga;Ga.__name__=!0;class u{static array(a){let b=[];for(a=D(a);a.hasNext();){let c=a.next();b.push(c)}return b}static has(a,b){for(a=D(a);a.hasNext();)if(a.next()==b)return!0;return!1}static exists(a,b){for(a=D(a);a.hasNext();){let c=a.next();if(b(c))return!0}return!1}static iter(a,b){for(a=D(a);a.hasNext();){let c=a.next();b(c)}}static filter(a,
b){let c=[];for(a=D(a);a.hasNext();){let e=a.next();b(e)&&c.push(e)}return c}static count(a,b){let c=0;if(null==b)for(b=D(a);b.hasNext();)b.next(),++c;else for(a=D(a);a.hasNext();){let e=a.next();b(e)&&++c}return c}static find(a,b){for(a=D(a);a.hasNext();){let c=a.next();if(b(c))return c}return null}static findIndex(a,b){let c=0;for(a=D(a);a.hasNext();){let e=a.next();if(b(e))return c;++c}return-1}static concat(a,b){let c=[];for(a=D(a);a.hasNext();){let e=a.next();c.push(e)}for(b=D(b);b.hasNext();)a=
b.next(),c.push(a);return c}}u.__name__=!0;Math.__name__=!0;class p{static string(a){return E.__string_rec(a,"")}static parseInt(a){a=parseInt(a);return isNaN(a)?null:a}}p.__name__=!0;class sa{constructor(){this.b=""}}sa.__name__=!0;Object.assign(sa.prototype,{__class__:sa});class A{static htmlEscape(a,b){let c="",e=0;for(;e<a.length;){var d=a;let g=e++,f=d.charCodeAt(g);55296<=f&&56319>=f&&(f=f-55232<<10|d.charCodeAt(g+1)&1023);d=f;65536<=d&&++e;switch(d){case 34:c=b?c+"&quot;":c+String.fromCodePoint(d);
break;case 38:c+="&amp;";break;case 39:c=b?c+"&#039;":c+String.fromCodePoint(d);break;case 60:c+="&lt;";break;case 62:c+="&gt;";break;default:c+=String.fromCodePoint(d)}}return c}static isSpace(a,b){a=t.cca(a,b);return 8<a&&14>a?!0:32==a}static ltrim(a){let b=a.length,c=0;for(;c<b&&A.isSpace(a,c);)++c;return 0<c?t.substr(a,c,b-c):a}static rtrim(a){let b=a.length,c=0;for(;c<b&&A.isSpace(a,b-c-1);)++c;return 0<c?t.substr(a,0,b-c):a}static trim(a){return A.ltrim(A.rtrim(a))}static replace(a,b,c){return a.split(b).join(c)}}
A.__name__=!0;class Ha{static charAt(a,b){if(0>b)return"";let c=0,e=0;for(;e<a.length;){var d=e++;let g=a.charCodeAt(d);55296<=g&&56319>=g&&(g=g-55232<<10|a.charCodeAt(d+1)&1023);d=g;if(c==b)return String.fromCodePoint(d);65536<=d&&++e;++c}return""}static get_length(a){let b=0,c=0;for(;c<a.length;){let e=a,d=c++,g=e.charCodeAt(d);55296<=g&&56319>=g&&(g=g-55232<<10|e.charCodeAt(d+1)&1023);65536<=g&&++c;++b}return b}}class z{static toString(a){switch(a){case 0:return"Element";case 1:return"PCData";
case 2:return"CData";case 3:return"Comment";case 4:return"DocType";case 5:return"ProcessingInstruction";case 6:return"Document"}}}class l{constructor(a){this.nodeType=a;this.children=[];this.attributeMap=new R}get(a){if(this.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":z.toString(this.nodeType)));return this.attributeMap.h[a]}set(a,b){if(this.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element but found "+(null==this.nodeType?
"null":z.toString(this.nodeType)));this.attributeMap.h[a]=b}attributes(){if(this.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":z.toString(this.nodeType)));return new ta(this.attributeMap.h)}addChild(a){if(this.nodeType!=l.Document&&this.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":z.toString(this.nodeType)));null!=a.parent&&a.parent.removeChild(a);this.children.push(a);
a.parent=this}removeChild(a){if(this.nodeType!=l.Document&&this.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":z.toString(this.nodeType)));return t.remove(this.children,a)?(a.parent=null,!0):!1}insertChild(a,b){if(this.nodeType!=l.Document&&this.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":z.toString(this.nodeType)));null!=a.parent&&t.remove(a.parent.children,
a);this.children.splice(b,0,a);a.parent=this}toString(){return ja.print(this)}static createElement(a){let b=new l(l.Element);if(b.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element but found "+(null==b.nodeType?"null":z.toString(b.nodeType)));b.nodeName=a;return b}static createPCData(a){let b=new l(l.PCData);if(b.nodeType==l.Document||b.nodeType==l.Element)throw w.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":z.toString(b.nodeType)));b.nodeValue=a;return b}static createDocument(){return new l(l.Document)}}
l.__name__=!0;Object.assign(l.prototype,{__class__:l});class H{static extractFieldName(a,b){null==b&&(b=3);return a.charAt(b).toLowerCase()+t.substr(a,b+1,null)}static overrides(a,b){return b.isStatic||null==a.superset?!1:u.exists(a.superset.methods,function(c){return c.className==b.className})?!0:H.overrides(a.superset,b)}static getDefaultValue(a,b,c){null==c&&(c="null");if("Array"==t.substr(a,0,5))a=b;else switch(a){case "Bool":a="false";break;case "Double":case "Float":case "Int":a="0";break;case "String":a=
'""';break;default:a=c}return a}}H.__name__=!0;class S{static generate(a){let b=new R;for(a=a.iterator();a.hasNext();){var c=a.next();if(!(c instanceof F)||E.__cast(c,F).isClass()){let e=c.className+".hx";c=S.generateClass(c);b.h[e]=c}}return b}static generateClass(a){let b="";a.isGeneric()&&(b+="@:generic\n");b=a.isInterface?b+("interface "+a.className+(a.isGeneric()?"<T>":"")+" {\n"):b+((a.isAbstract?"abstract ":"")+"class "+a.className+(a.isGeneric()?"<T> ":" ")+(null!=a.superset?"extends "+a.superset.className+
(a.superset.isGeneric()?"<T> ":" "):"")+"{\n");b+=S.generateFields(a);b+=S.generateConstructor(a);b+=S.generateMethods(a);return b+"}\n"}static generateFields(a){let b="";for(var c=a.fields,e=0;e<c.length;){let d=c[e];++e;b+="\t"+(d.visibility==q.ACCESS_PRIVATE||d.visibility==q.ACCESS_PROTECTED?"":"public ")+(d.isStatic?"static ":"")+"var "+d.className+": "+S.getType(d.classType)+";\n"}a=a.navFields;for(c=0;c<a.length;)e=a[c],++c,b+="\t"+(e.visibility==q.ACCESS_PRIVATE||e.visibility==q.ACCESS_PROTECTED?
"":"public ")+(e.isStatic?"static ":"")+"var "+e.className+": "+S.getType(e.classType)+";\n";return b}static generateMethods(a){let b="",c=0,e=[a.accessors,a.methods];for(;c<e.length;){let k=e[c];++c;let m=0;for(;m<k.length;){let n=k[m];++m;var d=n.isStatic&&n.isGeneric(),g=n.visibility==q.ACCESS_PRIVATE||n.visibility==q.ACCESS_PROTECTED,f=n.isStatic?"static ":"",h=H.overrides(a,n)?"override ":"";d="\n\t"+(d?"@:generic ":"")+(g?"":"public ")+f+h+"function "+n.className+(n.isStatic&&n.isGeneric()?
"<T>":"")+"(";g=[];for(f=D(n.params);f.hasNext();)h=f.next(),g.push(h.className+": "+S.getType(h.classType));b+=d+g.join(", ")+")"+(""==n.classType?"":": "+S.getType(n.classType))+" {\n";"get"==t.substr(n.className,0,3)||"set"==t.substr(n.className,0,3)?(d=a.getFieldCode(H.extractFieldName(n.className)),null!=d&&("set"==t.substr(n.className,0,3)&&(b+="\t\tthis."+d.className+" = "+d.className+";\n"),b+="\t\treturn this."+d.className+("Array"==t.substr(d.classType,0,5)?".copy()":"")+";\n")):1!=n.params.length||
"add"!=t.substr(n.className,0,3)&&"remove"!=t.substr(n.className,0,6)?""!=n.classType&&(b+="\t\treturn "+H.getDefaultValue(n.classType,"new Array()")+";\n"):(d=a.getFieldFromArrayType(n.params[0].classType),null!=d&&(b+="\t\tthis."+d.className+("add"==t.substr(n.className,0,3)?".push(":".remove(")+n.params[0].className+");\n",b+="\t\treturn this;\n"));b+="\t}\n"}}return b}static generateConstructor(a){let b="";if(0!=a.constructors.length){let f=a.constructors[0];for(var c=[],e=D(f.params);e.hasNext();){var d=
e.next();c.push(d.className+": "+S.getType(d.classType))}b+="\n\tpublic function new("+c.join(", ")+") {\n";if(null!=a.superset){c=[];e=0;for(d=u.filter(f.params,function(h){return null==a.getFieldCode(h.className)});e<d.length;){var g=d[e++];c.push(g.className)}b+="\t\tsuper("+c.join(", ")+");\n"}c=0;for(e=f.params;c<e.length;)d=e[c],++c,g=a.getFieldCode(d.className),null!=g&&(b+="\t\tthis."+g.className+" = "+d.className+";\n");c=a.fields;for(e=0;e<c.length;){let h=c[e];++e;h.isStatic||u.exists(f.params,
function(k){return h.className==k.className})||(b+="\t\tthis."+h.className+" = "+H.getDefaultValue(h.classType,"new Array()")+";\n")}c=a.navFields;for(e=0;e<c.length;){let h=c[e];++e;h.isStatic||u.exists(f.params,function(k){return h.className==k.className})||(b+="\t\tthis."+h.className+" = "+H.getDefaultValue(h.classType,"new Array()")+";\n")}b+="\t}\n"}return b}static getType(a){let b=a;if("Time"==a||"DateTime"==a)b="Date";return b}}G.code.HaxeCode=S;S.__name__=!0;class J{static generate(a){let b=
new R;for(a=a.iterator();a.hasNext();){var c=a.next();if(!(c instanceof F)||E.__cast(c,F).isClass()){let e=c.className+".java";c=J.generateClass(c);b.h[e]=c}}return b}static generateClass(a){let b;b=""+J.addImports(a);b=a.isInterface?b+("public interface "+a.className+(a.isGeneric()?"<T>":"")+" {\n"):b+("public "+(a.isAbstract?"abstract ":"")+"class "+a.className+(a.isGeneric()?"<T> ":" ")+(null!=a.superset?"extends "+a.superset.className+(a.superset.isGeneric()?"<T> ":" "):"")+" {\n");b+=J.generateFields(a);
b+=J.generateConstructors(a);b+=J.generateMethods(a);return b+"}\n"}static addImports(a){let b=[];for(var c=a.fields,e=0;e<c.length;){let d=c[e];++e;"Array"!=t.substr(d.classType,0,5)||u.has(b,"java.util.ArrayList")?"Date"!=t.substr(d.classType,0,4)||u.has(b,"java.time.LocalDate")?"Time"!=t.substr(d.classType,0,4)||u.has(b,"java.time.LocalTime")?"DateTime"!=t.substr(d.classType,0,8)||u.has(b,"java.time.LocalDateTime")||b.push("java.time.LocalDateTime"):b.push("java.time.LocalTime"):b.push("java.time.LocalDate"):
b.push("java.util.ArrayList")}a=a.navFields;for(c=0;c<a.length;)e=a[c],++c,"Array"!=t.substr(e.classType,0,5)||u.has(b,"java.util.ArrayList")?"Date"!=t.substr(e.classType,0,4)||u.has(b,"java.time.LocalDate")?"Time"!=t.substr(e.classType,0,4)||u.has(b,"java.time.LocalTime")?"DateTime"!=t.substr(e.classType,0,8)||u.has(b,"java.time.LocalDateTime")||b.push("java.time.LocalDateTime"):b.push("java.time.LocalTime"):b.push("java.time.LocalDate"):b.push("java.util.ArrayList");a="";for(c=0;c<b.length;)e=b[c],
++c,a+="import "+e+";\n";0!=b.length&&(a+="\n");return a}static generateFields(a){let b="";for(var c=a.fields,e=0;e<c.length;){let d=c[e];++e;b+="\t"+(d.visibility==q.ACCESS_PRIVATE?"":d.visibility==q.ACCESS_PROTECTED?"protected ":"public ")+(d.isStatic?"static ":"")+J.getType(d.classType)+" "+d.className+";\n"}a=a.navFields;for(c=0;c<a.length;)e=a[c],++c,b+="\t"+(e.visibility==q.ACCESS_PRIVATE?"":e.visibility==q.ACCESS_PROTECTED?"protected ":"public ")+(e.isStatic?"static ":"")+J.getType(e.classType)+
" "+e.className+";\n";return b}static generateMethods(a){let b="",c=0,e=[a.accessors,a.methods];for(;c<e.length;){let k=e[c];++c;let m=0;for(;m<k.length;){let n=k[m];++m;"get"==t.substr(n.className,0,3)&&"Array"==t.substr(n.classType,0,5)&&(b+='\n\t@SuppressWarnings("unchecked")');H.overrides(a,n)&&(b+="\n\t@Override");var d=n.visibility==q.ACCESS_PRIVATE?"":n.visibility==q.ACCESS_PROTECTED?"protected ":"public ",g=n.isStatic?"static ":"",f=n.isStatic&&n.isGeneric(),h=""==n.classType?"void ":J.getType(n.classType)+
" ";d="\n\t"+d+g+(f?"<T>":"")+h+n.className+"(";g=[];for(f=D(n.params);f.hasNext();)h=f.next(),g.push(J.getType(h.classType)+" "+h.className);b+=d+g.join(", ")+") {\n";"get"==t.substr(n.className,0,3)||"set"==t.substr(n.className,0,3)?(d=a.getFieldCode(H.extractFieldName(n.className)),null!=d&&("set"==t.substr(n.className,0,3)&&(b+="\t\tthis."+d.className+" = "+d.className+";\n"),b="Array"==t.substr(d.classType,0,5)?b+("\t\treturn ("+J.getType(d.classType)+") this."+d.className+".clone();\n"):b+("\t\treturn this."+
d.className+";\n"))):1!=n.params.length||"add"!=t.substr(n.className,0,3)&&"remove"!=t.substr(n.className,0,6)?""!=n.classType&&(b+="\t\treturn "+H.getDefaultValue(n.classType,"new "+J.getType(n.classType)+"()")+";\n"):(d=a.getFieldFromArrayType(n.params[0].classType),null!=d&&(b+="\t\tthis."+d.className+("add"==t.substr(n.className,0,3)?".add(":".remove(")+n.params[0].className+");\n",b+="\t\treturn this;\n"));b+="\t}\n"}}return b}static generateConstructors(a){let b="",c=0,e=a.constructors;for(;c<
e.length;){let k=e[c];++c;for(var d="\n\tpublic "+a.className+"(",g=[],f=D(k.params);f.hasNext();){var h=f.next();g.push(J.getType(h.classType)+" "+h.className)}b+=d+g.join(", ")+") {\n";if(null!=a.superset){d=[];g=0;for(f=u.filter(k.params,function(m){return null==a.getFieldCode(m.className)});g<f.length;)h=f[g++],d.push(h.className);b+="\t\tsuper("+d.join(", ")+");\n"}d=0;for(g=k.params;d<g.length;)f=g[d],++d,h=a.getFieldCode(f.className),null!=h&&(b+="\t\tthis."+h.className+" = "+f.className+";\n");
d=a.fields;for(g=0;g<d.length;){let m=d[g];++g;m.isStatic||u.exists(k.params,function(n){return m.className==n.className})||(b+="\t\tthis."+m.className+" = "+H.getDefaultValue(m.classType,"new "+J.getType(m.classType)+"()")+";\n")}d=a.navFields;for(g=0;g<d.length;){let m=d[g];++g;m.isStatic||u.exists(k.params,function(n){return m.className==n.className})||(b+="\t\tthis."+m.className+" = "+H.getDefaultValue(m.classType,"new "+J.getType(m.classType)+"()")+";\n")}b+="\t}\n"}return b}static getType(a){let b=
a;"Array"==t.substr(a,0,5)?b="ArrayList"+t.substr(a,5,null):"Int"==a||"Float"==a||"Double"==a?b=a.toLowerCase():"Bool"==a?b="boolean":"Date"==a?b="LocalDate":"Time"==a?b="LocalTime":"DateTime"==a&&(b="LocalDateTime");return b}}G.code.JavaCode=J;J.__name__=!0;class K{static generate(a){let b=new R;for(a=a.iterator();a.hasNext();){var c=a.next();if(!(c instanceof F)||E.__cast(c,F).isClass()){let e=c.className+".php";c=K.generateClass(c);b.h[e]=c}}return b}static generateClass(a){let b;b="<?php\n"+K.addImports(a);
b=a.isInterface?b+("interface "+a.className+(a.isGeneric()?"<T>":"")+" {\n"):b+((a.isAbstract?"abstract ":"")+"class "+a.className+(null!=a.superset?"extends "+a.superset.className:"")+" {\n");b+=K.generateFields(a);b+=K.generateConstructors(a);b+=K.generateMethods(a);return b+"}\n?>\n"}static addImports(a){let b=[];for(var c=a.fields,e=0;e<c.length;){var d=c[e];++e;d=0==d.classType.indexOf("Array")?d.classType.substring(6,d.classType.length-1):d.classType;90>=t.cca(K.getType(d),0)&&d!=a.className&&
"DateTime"!=K.getType(d)&&!u.has(b,"require_once('"+d+".php');")&&b.push("require_once('"+d+".php');")}c=a.navFields;for(e=0;e<c.length;)d=c[e],++e,d=0==d.classType.indexOf("Array")?d.classType.substring(6,d.classType.length-1):d.classType,90>=t.cca(K.getType(d),0)&&d!=a.className&&"DateTime"!=K.getType(d)&&!u.has(b,"require_once('"+d+".php');")&&b.push("require_once('"+d+".php');");null==a.superset||u.has(b,"require_once('"+a.superset.className+".php');")||b.push("require_once('"+a.superset.className+
".php');");return b.join("\n")+"\n\n"}static generateFields(a){let b="";for(var c=a.fields,e=0;e<c.length;){let d=c[e];++e;b+="\t"+(d.visibility==q.ACCESS_PRIVATE?"private ":d.visibility==q.ACCESS_PROTECTED?"protected ":"public ")+(d.isStatic?"static ":"")+K.getType(d.classType)+" $"+d.className+";\n"}a=a.navFields;for(c=0;c<a.length;)e=a[c],++c,b+="\t"+(e.visibility==q.ACCESS_PRIVATE?"private ":e.visibility==q.ACCESS_PROTECTED?"protected ":"public ")+(e.isStatic?"static ":"")+K.getType(e.classType)+
" $"+e.className+";\n";return b}static generateMethods(a){let b="",c=0,e=[a.accessors,a.methods];for(;c<e.length;){let g=e[c];++c;let f=0;for(;f<g.length;){let h=g[f];++f;var d="\n\t"+(h.visibility==q.ACCESS_PRIVATE?"private ":h.visibility==q.ACCESS_PROTECTED?"protected ":"public ")+(h.isStatic?"static ":"")+"function "+h.className+"(";let k=[],m=D(h.params);for(;m.hasNext();){let n=m.next();k.push(K.getType(n.classType)+" $"+n.className)}b+=d+k.join(", ")+")"+(""==h.classType?"":": "+K.getType(h.classType))+
" {\n";"get"==t.substr(h.className,0,3)||"set"==t.substr(h.className,0,3)?(d=a.getFieldCode(H.extractFieldName(h.className)),null!=d&&("set"==t.substr(h.className,0,3)&&(b+="\t\t$this->"+d.className+" = $"+d.className+";\n"),b="Array"==t.substr(d.classType,0,5)?b+("\t\treturn $this->"+d.className+"->clone();\n"):b+("\t\treturn $this->"+d.className+";\n"))):1!=h.params.length||"add"!=t.substr(h.className,0,3)&&"remove"!=t.substr(h.className,0,6)?""!=h.classType&&(b+="\t\treturn "+H.getDefaultValue(h.classType,
"[]")+";\n"):(d=a.getFieldFromArrayType(h.params[0].classType),null!=d&&(b+="\t\t$this->"+d.className+("add"==t.substr(h.className,0,3)?"->add(":"->remove(")+h.params[0].className+");\n",b+="\t\treturn $this;\n"));b+="\t}\n"}}return b}static generateConstructors(a){let b="",c=0,e=a.constructors;for(;c<e.length;){let k=e[c];++c;for(var d=[],g=D(k.params);g.hasNext();){var f=g.next();d.push(K.getType(f.classType)+" $"+f.className)}b+="\n\tfunction __construct("+d.join(", ")+") {\n";if(null!=a.superset){d=
[];g=0;for(f=u.filter(k.params,function(m){return null==a.getFieldCode(m.className)});g<f.length;){var h=f[g++];d.push("$"+h.className)}b+="\t\tparrent::__construct("+d.join(", ")+");\n"}d=0;for(g=k.params;d<g.length;)f=g[d],++d,h=a.getFieldCode(f.className),null!=h&&(b+="\t\t$this->"+h.className+" = $"+f.className+";\n");d=a.fields;for(g=0;g<d.length;){let m=d[g];++g;m.isStatic||u.exists(k.params,function(n){return m.className==n.className})||(b+="\t\t$this->"+m.className+" = "+H.getDefaultValue(m.classType,
"[]")+";\n")}d=a.navFields;for(g=0;g<d.length;){let m=d[g];++g;m.isStatic||u.exists(k.params,function(n){return m.className==n.className})||(b+="\t\t$this->"+m.className+" = "+H.getDefaultValue(m.classType,"[]")+";\n")}b+="\t}\n"}return b}static getType(a){let b=a;"Array"==t.substr(a,0,5)?b="array/*"+t.substr(a,5,null)+"*/":"Int"==a||"Float"==a||"Double"==a||"String"==a?b=a.toLowerCase():"Date"==a||"Time"==a||"DateTime"==a?b="DateTime":"Bool"==a?b="boolean":"T"==a&&(b="mixed");return b}}G.code.PhpCode=
K;K.__name__=!0;class N{static generate(a){let b=new R;for(a=a.iterator();a.hasNext();){var c=a.next();if(!(c instanceof F)||E.__cast(c,F).isClass()){let e=c.className.toLowerCase()+".py";c=N.generateClass(c);b.h[e]=c}}return b}static generateClass(a){let b;b=""+N.addImports(a);a.isInterface||(b+="class "+a.className+(null!=a.superset?"("+a.superset.className+")":"")+":\n");b+=N.generateFields(a);b+=N.generateConstructor(a);b+=N.generateMethods(a);return b+"\n"}static addImports(a){let b=[];b.push("from __future__ import annotations");
let c=0,e=[a.fields,a.navFields];for(;c<e.length;){let g=e[c];++c;let f=0;for(;f<g.length;){var d=g[f];++f;"Array"==t.substr(d.classType,0,5)?(u.has(b,"from typing import List")||b.push("from typing import List"),d=d.classType.substring(6,d.classType.length-1),u.has(b,"import "+d.toLowerCase())||b.push("import "+d.toLowerCase())):"Date"!=t.substr(d.classType,0,4)||u.has(b,"from datetime import date")?"Time"!=t.substr(d.classType,0,4)||u.has(b,"from datetime import time")?"DateTime"!=t.substr(d.classType,
0,8)||u.has(b,"from datetime import datetime")?"T"!=d.classType&&90>=t.cca(N.getType(d.classType),0)&&d.classType!=a.className&&!u.has(b,"import "+d.classType.toLowerCase())&&b.push("import "+d.classType.toLowerCase()):b.push("from datetime import datetime"):b.push("from datetime import time"):b.push("from datetime import date")}}null==a.superset||u.has(b,"from "+a.superset.className.toLowerCase()+" import "+a.superset.className)||b.push("from "+a.superset.className.toLowerCase()+" import "+a.superset.className);
if(u.exists(a.fields,function(g){return-1==g.classType.indexOf("<T>")?"T"==g.classType:!0})||u.exists(a.methods,function(g){return g.isGeneric()}))b.push("from typing import TypeVar"),b.push('T = TypeVar("T")');return b.join("\n")+"\n\n"}static generateFields(a){let b="";for(var c=a.fields,e=0;e<c.length;){let d=c[e];++e;b+="\t"+(d.visibility==q.ACCESS_PRIVATE||d.visibility==q.ACCESS_PROTECTED?"_":"")+d.className+": "+N.getType(d.classType)+(d.isStatic?" #static":"")+"\n"}a=a.navFields;for(c=0;c<
a.length;)e=a[c],++c,b+="\t"+(e.visibility==q.ACCESS_PRIVATE||e.visibility==q.ACCESS_PROTECTED?"_":"")+e.className+": "+N.getType(e.classType)+(e.isStatic?" #static":"")+"\n";return b}static generateMethods(a){let b="",c=0,e=[a.accessors,a.methods];for(;c<e.length;){let g=e[c];++c;let f=0;for(;f<g.length;){let h=g[f];++f;var d=[];let k=D(h.params);for(;k.hasNext();){let m=k.next();d.push(m.className+": "+N.getType(m.classType))}h.isStatic||d.splice(0,0,"self");b+="\n\t"+(h.visibility==q.ACCESS_PRIVATE||
h.visibility==q.ACCESS_PROTECTED?"_":"")+"def "+h.className+"("+d.join(", ")+")"+(""==h.classType?"":" -> "+N.getType(h.classType))+":\n";"get"==t.substr(h.className,0,3)||"set"==t.substr(h.className,0,3)?(d=a.getFieldCode(H.extractFieldName(h.className)),null!=d&&("set"==t.substr(h.className,0,3)&&(b+="\t\tself."+(d.visibility==q.ACCESS_PRIVATE||d.visibility==q.ACCESS_PROTECTED?"_":"")+d.className+" = "+d.className+"\n"),b+="\t\treturn self."+(d.visibility==q.ACCESS_PRIVATE||d.visibility==q.ACCESS_PROTECTED?
"_":"")+d.className+("Array"==t.substr(d.classType,0,5)?".copy()":"")+"\n")):1!=h.params.length||"add"!=t.substr(h.className,0,3)&&"remove"!=t.substr(h.className,0,6)?b=""!=h.classType?b+("\t\treturn "+H.getDefaultValue(h.classType,"None")+"\n"):b+"\t\tpass\n":(d=a.getFieldFromArrayType(h.params[0].classType),null!=d&&(b+="\t\tself."+(d.visibility==q.ACCESS_PRIVATE||d.visibility==q.ACCESS_PROTECTED?"_":"")+d.className+("add"==t.substr(h.className,0,3)?".append(":".remove(")+h.params[0].className+
")\n",b+="\t\treturn self;\n"))}}return b}static generateConstructor(a){let b="";if(0!=a.constructors.length){var c=!0;let f=a.constructors[0];for(var e=[],d=D(f.params);d.hasNext();){var g=d.next();e.push(g.className+": "+N.getType(g.classType))}e.splice(0,0,"self");b+="\n\tdef __init__("+e.join(", ")+"):\n";if(null!=a.superset){c=[];e=0;for(d=u.filter(f.params,function(h){return null==a.getFieldCode(h.className)});e<d.length;)g=d[e++],c.push(g.className);b+="\t\tsuper().__init__("+c.join(", ")+
")\n";c=!1}e=0;for(d=f.params;e<d.length;){g=d[e];++e;let h=a.getFieldCode(g.className);null!=h&&(b+="\t\tself."+(h.visibility==q.ACCESS_PRIVATE||h.visibility==q.ACCESS_PROTECTED?"_":"")+h.className+" = "+g.className+"\n",c=!1)}e=a.fields;for(d=0;d<e.length;){let h=e[d];++d;h.isStatic||u.exists(f.params,function(k){return h.className==k.className})||(b+="\t\tself."+(h.visibility==q.ACCESS_PRIVATE||h.visibility==q.ACCESS_PROTECTED?"_":"")+h.className+" = "+H.getDefaultValue(h.classType,"[]","None")+
"\n",c=!1)}e=a.navFields;for(d=0;d<e.length;){let h=e[d];++d;h.isStatic||u.exists(f.params,function(k){return h.className==k.className})||(b+="\t\tself."+(h.visibility==q.ACCESS_PRIVATE||h.visibility==q.ACCESS_PROTECTED?"_":"")+h.className+" = "+H.getDefaultValue(h.classType,"[]","None")+"\n",c=!1)}c&&(b+="\t\tpass\n")}return b}static getType(a){let b=a;if("Array"==t.substr(a,0,5))b="List["+t.substr(a,6,a.length-7)+"]";else if("String"==a)b="str";else if("Int"==a||"Float"==a||"Double"==a||"Date"==
a||"Time"==a||"DateTime"==a)b=a.toLowerCase();return b}}G.code.PythonCode=N;N.__name__=!0;class Ia{static generateSQL(a){let b="",c="";a=a.relations.h;let e=Object.keys(a),d=e.length,g=0;for(;g<d;){let f=a[e[g++]],h=!1;b+="CREATE TABLE IF NOT EXISTS "+f.name+" (";let k=!0,m=0,n=f.fields;for(;m<n.length;){let r=n[m];++m;let v=u.find(f.foreignKeys,function(C){return C.name==r.name});k?k=!1:b+=", ";b+=r.name+" ";"COUNTER"==r.type.toUpperCase()?1==f.key.length&&f.key[0]==r.name?(b+="INT PRIMARY KEY AUTO_INCREMENT",
h=!0):b+="INT":b+=r.dbType;h||1!=f.key.length||f.key[0]!=r.name||(b+=" PRIMARY KEY");null!=v&&(c+="ALTER TABLE "+f.name+" ADD FOREIGN KEY ("+r.name+") REFERENCES "+v.relation.name+"("+v.key+");\n")}1!=f.key.length&&(b+=", PRIMARY KEY("+f.key.join(",")+")");b+=");\n"}return b+c}}G.database.DBMariaDB=Ia;Ia.__name__=!0;class Ja{static generateSQL(a){let b="",c="";a=a.relations.h;let e=Object.keys(a),d=e.length,g=0;for(;g<d;){let f=a[e[g++]],h=!1;b+="CREATE TABLE IF NOT EXISTS "+f.name+" (";let k=!0,
m=0,n=f.fields;for(;m<n.length;){let r=n[m];++m;let v=u.find(f.foreignKeys,function(C){return C.name==r.name});k?k=!1:b+=", ";b+=r.name+" ";"COUNTER"==r.type.toUpperCase()?1==f.key.length&&f.key[0]==r.name?(b+="SERIAL PRIMARY KEY",h=!0):b+="INT":b+=r.dbType;h||1!=f.key.length||f.key[0]!=r.name||(b+=" PRIMARY KEY");null!=v&&(c+="ALTER TABLE "+f.name+" ADD FOREIGN KEY ("+r.name+") REFERENCES "+v.relation.name+"("+v.key+");\n")}1!=f.key.length&&(b+=", PRIMARY KEY("+f.key.join(",")+")");b+=");\n"}return b+
c}}G.database.DBPostgreSQL=Ja;Ja.__name__=!0;class Ka{static generateSQL(a){let b="";a=a.relations.h;let c=Object.keys(a),e=c.length,d=0;for(;d<e;){let g=a[c[d++]],f=!1;b+="CREATE TABLE IF NOT EXISTS "+g.name+" (";let h=!0,k=0,m=g.fields;for(;k<m.length;){let n=m[k];++k;let r=u.find(g.foreignKeys,function(v){return v.name==n.name});h?h=!1:b+=", ";b+=n.name+" ";"COUNTER"==n.type.toUpperCase()?1==g.key.length&&g.key[0]==n.name?(b+="INTEGER PRIMARY KEY AUTOINCREMENT",f=!0):b+="INT":b+=n.dbType;f||1!=
g.key.length||g.key[0]!=n.name||(b+=" PRIMARY KEY");null!=r&&(b+=" REFERENCES "+r.relation.name+"("+r.key+")")}1!=g.key.length&&(b+=", PRIMARY KEY("+g.key.join(",")+")");b+=");\n"}return b}}G.database.DBSqlite=Ka;Ka.__name__=!0;class Ea{}Ea.__name__=!0;Ea.__isInterface__=!0;class w extends Error{constructor(a,b,c){super(a);this.message=a;this.__previousException=b;this.__nativeException=null!=c?c:this}unwrap(){return this.__nativeException}toString(){return this.get_message()}get_message(){return this.message}get_native(){return this.__nativeException}static caught(a){return a instanceof
w?a:a instanceof Error?new w(a.message,null,a):new ea(a,null,a)}static thrown(a){return a instanceof w?a.get_native():a instanceof Error?a:new ea(a)}}w.__name__=!0;w.__super__=Error;Object.assign(w.prototype,{__class__:w});class ea extends w{constructor(a,b,c){super(String(a),b,c);this.value=a}unwrap(){return this.value}}ea.__name__=!0;ea.__super__=w;Object.assign(ea.prototype,{__class__:ea});class P{constructor(a){this.length=a.byteLength;this.b=new Uint8Array(a);this.b.bufferValue=a;a.hxBytes=this;
a.bytes=this.b}getString(a,b,c){if(0>a||0>b||a+b>this.length)throw w.thrown(X.OutsideBounds);null==c&&(c=ka.UTF8);let e="",d=this.b,g=a;a+=b;switch(c._hx_index){case 0:for(;g<a;)if(c=d[g++],128>c){if(0==c)break;e+=String.fromCodePoint(c)}else if(224>c)c=(c&63)<<6|d[g++]&127,e+=String.fromCodePoint(c);else if(240>c)b=d[g++],c=(c&31)<<12|(b&127)<<6|d[g++]&127,e+=String.fromCodePoint(c);else{b=d[g++];let f=d[g++];c=(c&15)<<18|(b&127)<<12|(f&127)<<6|d[g++]&127;e+=String.fromCodePoint(c)}break;case 1:for(;g<
a;)c=d[g++]|d[g++]<<8,e+=String.fromCodePoint(c)}return e}toString(){return this.getString(0,this.length)}static ofString(a,b){if(b==ka.RawNative){b=new Uint8Array(a.length<<1);for(var c=0,e=a.length;c<e;){let d=c++,g=a.charCodeAt(d);b[d<<1]=g&255;b[d<<1|1]=g>>8}return new P(b.buffer)}b=[];for(c=0;c<a.length;)e=a.charCodeAt(c++),55296<=e&&56319>=e&&(e=e-55232<<10|a.charCodeAt(c++)&1023),127>=e?b.push(e):(2047>=e?b.push(192|e>>6):(65535>=e?b.push(224|e>>12):(b.push(240|e>>18),b.push(128|e>>12&63)),
b.push(128|e>>6&63)),b.push(128|e&63));return new P((new Uint8Array(b)).buffer)}}P.__name__=!0;Object.assign(P.prototype,{__class__:P});var ka=ba["haxe.io.Encoding"]={__ename__:!0,__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:Z},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:Z}};ka.__constructs__=[ka.UTF8,ka.RawNative];class da{static encode(a,b){null==b&&(b=!0);let c=(new ua(da.BYTES)).encodeBytes(a).toString();if(b)switch(a.length%
3){case 1:c+="==";break;case 2:c+="="}return c}}da.__name__=!0;class ua{constructor(a){let b=a.length,c=1;for(;b>1<<c;)++c;if(8<c||b!=1<<c)throw w.thrown("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c}encodeBytes(a){let b=this.nbits,c=this.base,e=8*a.length/b|0,d=new P(new ArrayBuffer(e+(0==8*a.length%b?0:1))),g=0,f=0,h=(1<<b)-1,k=0,m=0;for(;m<e;){for(;f<b;)f+=8,g<<=8,g|=a.b[k++];f-=b;d.b[m++]=c.b[g>>f&h]}0<f&&(d.b[m++]=c.b[g<<b-f&h]);return d}}ua.__name__=!0;Object.assign(ua.prototype,
{__class__:ua});class Da{static make(a){let b=-1,c=a.b.bufferValue,e=0;for(a=a.length;e<a;){var d=e++;d=(b^c.bytes[d])&255;d=d>>>1^-(d&1)&-306674912;d=d>>>1^-(d&1)&-306674912;d=d>>>1^-(d&1)&-306674912;d=d>>>1^-(d&1)&-306674912;d=d>>>1^-(d&1)&-306674912;d=d>>>1^-(d&1)&-306674912;d=d>>>1^-(d&1)&-306674912;d=d>>>1^-(d&1)&-306674912;b=b>>>8^d}return b^-1}}Da.__name__=!0;class ia{constructor(){this.length=0}add(a){a=new la(a,null);null==this.h?this.h=a:this.q.next=a;this.q=a;this.length++}push(a){this.h=
a=new la(a,this.h);null==this.q&&(this.q=a);this.length++}}ia.__name__=!0;Object.assign(ia.prototype,{__class__:ia});class la{constructor(a,b){this.item=a;this.next=b}}la.__name__=!0;Object.assign(la.prototype,{__class__:la});class R{constructor(){this.h=Object.create(null)}iterator(){return new va(this.h)}}R.__name__=!0;R.__interfaces__=[Ea];Object.assign(R.prototype,{__class__:R});class ta{constructor(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0}hasNext(){return this.current<
this.length}next(){return this.keys[this.current++]}}ta.__name__=!0;Object.assign(ta.prototype,{__class__:ta});class va{constructor(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0}hasNext(){return this.current<this.length}next(){return this.h[this.keys[this.current++]]}}va.__name__=!0;Object.assign(va.prototype,{__class__:va});class fa extends w{constructor(a,b,c){super(a,b);this.posInfos=null==c?{fileName:"(unknown)",lineNumber:0,className:"(unknown)",methodName:"(unknown)"}:
c}toString(){return""+super.toString()+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber}}fa.__name__=!0;fa.__super__=w;Object.assign(fa.prototype,{__class__:fa});class ma extends fa{constructor(a,b,c){null==a&&(a="Not implemented");super(a,b,c)}}ma.__name__=!0;ma.__super__=fa;Object.assign(ma.prototype,{__class__:ma});class wa{constructor(){this.size=this.pos=0}addByte(a){this.pos==this.size&&this.grow(1);this.view.setUint8(this.pos++,
a)}addBytes(a,b,c){if(0>b||0>c||b+c>a.length)throw w.thrown(X.OutsideBounds);this.pos+c>this.size&&this.grow(c);0!=this.size&&(a=new Uint8Array(a.b.buffer,a.b.byteOffset+b,c),this.u8.set(a,this.pos),this.pos+=c)}grow(a){var b=this.pos+a;for(a=0==this.size?16:this.size;a<b;)a=3*a>>1;b=new ArrayBuffer(a);let c=new Uint8Array(b);0<this.size&&c.set(this.u8);this.size=a;this.buffer=b;this.u8=c;this.view=new DataView(this.buffer)}getBytes(){if(0==this.size)return new P(new ArrayBuffer(0));let a=new P(this.buffer);
a.length=this.pos;return a}}wa.__name__=!0;Object.assign(wa.prototype,{__class__:wa});class na{writeByte(a){throw new ma(null,null,{fileName:"haxe/io/Output.hx",lineNumber:47,className:"haxe.io.Output",methodName:"writeByte"});}writeBytes(a,b,c){if(0>b||0>c||b+c>a.length)throw w.thrown(X.OutsideBounds);a=a.b;let e=c;for(;0<e;)this.writeByte(a[b]),++b,--e;return c}write(a){let b=a.length,c=0;for(;0<b;){let e=this.writeBytes(a,c,b);if(0==e)throw w.thrown(X.Blocked);c+=e;b-=e}}writeFullBytes(a,b,c){for(;0<
c;){let e=this.writeBytes(a,b,c);b+=e;c-=e}}writeUInt16(a){if(0>a||65536<=a)throw w.thrown(X.Overflow);this.bigEndian?(this.writeByte(a>>8),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>8))}writeInt32(a){this.bigEndian?(this.writeByte(a>>>24),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>8&255),this.writeByte(a>>16&255),this.writeByte(a>>>24))}writeString(a,b){a=P.ofString(a,b);this.writeFullBytes(a,0,a.length)}}
na.__name__=!0;Object.assign(na.prototype,{__class__:na});class ca extends na{constructor(){super();this.b=new wa}writeByte(a){this.b.addByte(a)}writeBytes(a,b,c){this.b.addBytes(a,b,c);return c}getBytes(){return this.b.getBytes()}}ca.__name__=!0;ca.__super__=na;Object.assign(ca.prototype,{__class__:ca});var X=ba["haxe.io.Error"]={__ename__:!0,__constructs__:null,Blocked:{_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:Z},Overflow:{_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",
toString:Z},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:Z},Custom:(Q=function(a){return{_hx_index:3,e:a,__enum__:"haxe.io.Error",toString:Z}},Q._hx_name="Custom",Q.__params__=["e"],Q)};X.__constructs__=[X.Blocked,X.Overflow,X.OutsideBounds,X.Custom];class qa{constructor(a){this.current=0;this.array=a}hasNext(){return this.current<this.array.length}next(){return this.array[this.current++]}}qa.__name__=!0;Object.assign(qa.prototype,{__class__:qa});class ja{constructor(a){this.output=
new sa;this.pretty=a}writeNode(a,b){switch(a.nodeType){case 0:this.output.b+=p.string(b+"<");if(a.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":z.toString(a.nodeType)));this.output.b+=p.string(a.nodeName);for(var c=a.attributes();c.hasNext();){var e=c.next();this.output.b+=p.string(" "+e+'="');e=A.htmlEscape(a.get(e),!0);this.output.b+=p.string(e);this.output.b+='"'}if(this.hasChildren(a)){this.output.b+=">";this.pretty&&(this.output.b+="\n");
if(a.nodeType!=l.Document&&a.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":z.toString(a.nodeType)));c=0;for(e=a.children;c<e.length;){let d=e[c++];this.writeNode(d,this.pretty?b+"\t":b)}this.output.b+=p.string(b+"</");if(a.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":z.toString(a.nodeType)));this.output.b+=p.string(a.nodeName);this.output.b+=">"}else this.output.b+="/>";
this.pretty&&(this.output.b+="\n");break;case 1:if(a.nodeType==l.Document||a.nodeType==l.Element)throw w.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":z.toString(a.nodeType)));a=a.nodeValue;0!=a.length&&(b+=A.htmlEscape(a),this.output.b+=p.string(b),this.pretty&&(this.output.b+="\n"));break;case 2:this.output.b+=p.string(b+"<![CDATA[");if(a.nodeType==l.Document||a.nodeType==l.Element)throw w.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":z.toString(a.nodeType)));this.output.b+=
p.string(a.nodeValue);this.output.b+="]]\x3e";this.pretty&&(this.output.b+="\n");break;case 3:if(a.nodeType==l.Document||a.nodeType==l.Element)throw w.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":z.toString(a.nodeType)));a=a.nodeValue;a=a.replace(RegExp("[\n\r\t]+","g"),"");this.output.b+=null==b?"null":""+b;b=A.trim("\x3c!--"+a+"--\x3e");this.output.b+=p.string(b);this.pretty&&(this.output.b+="\n");break;case 4:if(a.nodeType==l.Document||a.nodeType==l.Element)throw w.thrown("Bad node type, unexpected "+
(null==a.nodeType?"null":z.toString(a.nodeType)));this.output.b+=p.string("<!DOCTYPE "+a.nodeValue+">");this.pretty&&(this.output.b+="\n");break;case 5:if(a.nodeType==l.Document||a.nodeType==l.Element)throw w.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":z.toString(a.nodeType)));this.output.b+=p.string("<?"+a.nodeValue+"?>");this.pretty&&(this.output.b+="\n");break;case 6:if(a.nodeType!=l.Document&&a.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+
(null==a.nodeType?"null":z.toString(a.nodeType)));c=0;for(a=a.children;c<a.length;)e=a[c++],this.writeNode(e,b)}}hasChildren(a){if(a.nodeType!=l.Document&&a.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":z.toString(a.nodeType)));let b=0;for(a=a.children;b<a.length;){let c=a[b++];switch(c.nodeType){case 0:case 1:return!0;case 2:case 3:if(c.nodeType==l.Document||c.nodeType==l.Element)throw w.thrown("Bad node type, unexpected "+(null==
c.nodeType?"null":z.toString(c.nodeType)));if(0!=A.ltrim(c.nodeValue).length)return!0}}return!1}static print(a,b){null==b&&(b=!1);b=new ja(b);b.writeNode(a,"");return b.output.b}}ja.__name__=!0;Object.assign(ja.prototype,{__class__:ja});var xa=ba["haxe.zip.ExtraField"]={__ename__:!0,__constructs__:null,FUnknown:(Q=function(a,b){return{_hx_index:0,tag:a,bytes:b,__enum__:"haxe.zip.ExtraField",toString:Z}},Q._hx_name="FUnknown",Q.__params__=["tag","bytes"],Q),FInfoZipUnicodePath:(Q=function(a,b){return{_hx_index:1,
name:a,crc:b,__enum__:"haxe.zip.ExtraField",toString:Z}},Q._hx_name="FInfoZipUnicodePath",Q.__params__=["name","crc"],Q),FUtf8:{_hx_name:"FUtf8",_hx_index:2,__enum__:"haxe.zip.ExtraField",toString:Z}};xa.__constructs__=[xa.FUnknown,xa.FInfoZipUnicodePath,xa.FUtf8];class ra{constructor(a){this.o=a;this.files=new ia}writeZipDate(a){var b=a.getHours(),c=a.getMinutes();let e=a.getSeconds()>>1;this.o.writeUInt16(b<<11|c<<5|e);b=a.getFullYear()-1980;c=a.getMonth()+1;a=a.getDate();this.o.writeUInt16(b<<
9|c<<5|a)}writeEntryHeader(a){let b=this.o;var c=0;if(null!=a.extraFields)for(var e=a.extraFields.h;null!=e;){var d=e.item;e=e.next;2==d._hx_index&&(c|=2048)}b.writeInt32(67324752);b.writeUInt16(20);b.writeUInt16(c);if(null==a.data)a.fileSize=0,a.dataSize=0,a.crc32=0,a.compressed=!1,a.data=new P(new ArrayBuffer(0));else{if(null==a.crc32){if(a.compressed)throw w.thrown("CRC32 must be processed before compression");a.crc32=Da.make(a.data)}a.compressed||(a.fileSize=a.data.length);a.dataSize=a.data.length}b.writeUInt16(a.compressed?
8:0);this.writeZipDate(a.fileTime);b.writeInt32(a.crc32);b.writeInt32(a.dataSize);b.writeInt32(a.fileSize);b.writeUInt16(a.fileName.length);c=new ca;if(null!=a.extraFields)for(e=a.extraFields.h;null!=e;)switch(d=e.item,e=e.next,d._hx_index){case 0:var g=d.bytes;c.writeUInt16(d.tag);c.writeUInt16(g.length);c.write(g);break;case 1:g=d.crc,d=P.ofString(d.name),c.writeUInt16(28789),c.writeUInt16(d.length+5),c.writeByte(1),c.writeInt32(g),c.write(d)}c=c.getBytes();b.writeUInt16(c.length);b.writeString(a.fileName);
b.write(c);this.files.add({name:a.fileName,compressed:a.compressed,clen:a.data.length,size:a.fileSize,crc:a.crc32,date:a.fileTime,fields:c})}write(a){for(a=a.h;null!=a;){var b=a.item;a=a.next;this.writeEntryHeader(b);this.o.writeFullBytes(b.data,0,b.data.length)}this.writeCDR()}writeCDR(){let a=0,b=0,c=this.files.h;for(;null!=c;){var e=c.item;c=c.next;let d=e.name.length,g=e.fields.length;this.o.writeInt32(33639248);this.o.writeUInt16(20);this.o.writeUInt16(20);this.o.writeUInt16(0);this.o.writeUInt16(e.compressed?
8:0);this.writeZipDate(e.date);this.o.writeInt32(e.crc);this.o.writeInt32(e.clen);this.o.writeInt32(e.size);this.o.writeUInt16(d);this.o.writeUInt16(g);this.o.writeUInt16(0);this.o.writeUInt16(0);this.o.writeUInt16(0);this.o.writeInt32(0);this.o.writeInt32(b);this.o.writeString(e.name);this.o.write(e.fields);a+=46+d+g;b+=30+d+g+e.clen}this.o.writeInt32(101010256);this.o.writeUInt16(0);this.o.writeUInt16(0);this.o.writeUInt16(this.files.length);this.o.writeUInt16(this.files.length);this.o.writeInt32(a);
this.o.writeInt32(b);this.o.writeUInt16(0)}}ra.__name__=!0;Object.assign(ra.prototype,{__class__:ra});class E{static getClass(a){if(null==a)return null;if(a instanceof Array)return Array;let b=a.__class__;if(null!=b)return b;a=E.__nativeClassName(a);return null!=a?E.__resolveNativeClass(a):null}static __string_rec(a,b){if(null==a)return"null";if(5<=b.length)return"<...>";var c=typeof a;"function"==c&&(a.__name__||a.__ename__)&&(c="object");switch(c){case "function":return"<function>";case "object":if(a.__enum__){var e=
ba[a.__enum__].__constructs__[a._hx_index];c=e._hx_name;if(e.__params__){b+="\t";var d=[],g=0;for(e=e.__params__;g<e.length;){let f=e[g];g+=1;d.push(E.__string_rec(a[f],b))}return c+"("+d.join(",")+")"}return c}if(a instanceof Array){c="[";b+="\t";d=0;for(g=a.length;d<g;)e=d++,c+=(0<e?",":"")+E.__string_rec(a[e],b);return c+"]"}try{d=a.toString}catch(f){return"???"}if(null!=d&&d!=Object.toString&&"function"==typeof d&&(c=a.toString(),"[object Object]"!=c))return c;c="{\n";b+="\t";d=null!=a.hasOwnProperty;
g=null;for(g in a)d&&!a.hasOwnProperty(g)||"prototype"==g||"__class__"==g||"__super__"==g||"__interfaces__"==g||"__properties__"==g||(2!=c.length&&(c+=", \n"),c+=b+g+" : "+E.__string_rec(a[g],b));b=b.substring(1);return c+("\n"+b+"}");case "string":return a;default:return String(a)}}static __interfLoop(a,b){if(null==a)return!1;if(a==b)return!0;let c=a.__interfaces__;if(null!=c&&(null==a.__super__||a.__super__.__interfaces__!=c)){let d=0,g=c.length;for(;d<g;){var e=d++;e=c[e];if(e==b||E.__interfLoop(e,
b))return!0}}return E.__interfLoop(a.__super__,b)}static __instanceof(a,b){if(null==b)return!1;switch(b){case Array:return a instanceof Array;case La:return"boolean"==typeof a;case Ma:return null!=a;case Na:return"number"==typeof a;case Oa:return"number"==typeof a?(a|0)===a:!1;case String:return"string"==typeof a;default:if(null!=a)if("function"==typeof b){if(E.__downcastCheck(a,b))return!0}else{if("object"==typeof b&&E.__isNativeObj(b)&&a instanceof b)return!0}else return!1;return b==Pa&&null!=a.__name__||
b==Qa&&null!=a.__ename__?!0:null!=a.__enum__?ba[a.__enum__]==b:!1}}static __downcastCheck(a,b){return a instanceof b?!0:b.__isInterface__?E.__interfLoop(E.getClass(a),b):!1}static __cast(a,b){if(null==a||E.__instanceof(a,b))return a;throw w.thrown("Cannot cast "+p.string(a)+" to "+p.string(b));}static __nativeClassName(a){a=E.__toStr.call(a).slice(8,-1);return"Object"==a||"Function"==a||"Math"==a||"JSON"==a?null:a}static __isNativeObj(a){return null!=E.__nativeClassName(a)}static __resolveNativeClass(a){return Fa[a]}}
E.__name__=!0;class V{constructor(a){this.set_name(a);this.fields=[]}set_name(a){this.name=a;this.dbName=V.fixName(a);this.className=this.dbName.charAt(0).toUpperCase()+t.substr(this.dbName,1,null);return this.name}getField(a){return u.find(this.fields,function(b){return b.name==a})}getFieldIndex(a){return u.findIndex(this.fields,function(b){return b.name==a})}static fixName(a,b){null==b&&(b=!0);let c="",e=!1,d=0,g=Ha.get_length(a);for(;d<g;){var f=d++;f=Ha.charAt(a,f);switch(f){case " ":b?(e=!0,
f=""):f="_";break;case ".":f="";break;case "\u00c0":case "\u00c2":case "\u00c4":f="A";break;case "\u00c6":f="EA";break;case "\u00c7":f="C";break;case "\u00c8":case "\u00c9":case "\u00ca":case "\u00cb":f="E";break;case "\u00ce":case "\u00cf":f="I";break;case "\u00d4":case "\u00d6":f="O";break;case "\u00d9":case "\u00db":case "\u00dc":f="U";break;case "\u00e0":case "\u00e2":case "\u00e4":f="a";break;case "\u00e6":f="ea";break;case "\u00e7":f="c";break;case "\u00e8":case "\u00e9":case "\u00ea":case "\u00eb":f=
"e";break;case "\u00ee":case "\u00ef":f="i";break;case "\u00f4":case "\u00f6":f="o";break;case "\u00f9":case "\u00fb":case "\u00fc":f="u";break;case "\u0152":f="EO";break;case "\u0153":f="eo";break;default:e&&(e=!1,f=f.toUpperCase())}c+=f}return c}}V.__name__=!0;Object.assign(V.prototype,{__class__:V});class M extends V{constructor(a,b,c,e,d){null==d&&(d=!1);null==e&&(e=!1);null==c&&(c=!1);super(a);this.superset=b;this.subsets=[];this.subsetType="";this.subsetOption=-1;this.subsetCode="";this.id=
[];this.compound=null;this.isTypedef=c;this.isInterface=e;this.isAbstract=d;this.interfaces=[];this.constructors=[];this.methods=[];this.accessors=[];this.navFields=[]}getFieldCode(a){let b=u.find(this.fields,function(c){return c.className==a});null==b&&(b=u.find(this.navFields,function(c){return c.className==a}));return b}getFieldFromArrayType(a){let b=u.find(this.fields,function(c){return t.substr(c.classType,6,c.classType.length-7)==a});null==b&&(b=u.find(this.navFields,function(c){return t.substr(c.classType,
6,c.classType.length-7)==a}));return b}isGeneric(){return u.exists(this.fields,function(a){return a.isStatic?!1:-1==a.classType.indexOf("<T>")?"T"==a.classType:!0})?!0:u.exists(this.methods,function(a){return a.isStatic?!1:a.isGeneric()})}getPluralClassName(){let a=this.className.charAt(this.className.length-1).toLowerCase(),b=this.className.substring(this.className.length-2,this.className.length).toLowerCase(),c=this.className+"s";if("au"==b||"eu"==b)c=this.className+"x";else if("al"==b)c=this.className.substring(0,
this.className.length-2)+"aux";else if("z"==a||"x"==a||"s"==a)c=this.className;return c}}M.__name__=!0;M.__super__=V;Object.assign(M.prototype,{__class__:M});class F extends M{constructor(a){super(a);this.links=[];this.isAgregation=!1}isNN(){return!u.exists(this.links,function(a){return"1"==a.max})}isRelation(){return this.isClass()?!0:this.isNN()}isClass(){return 0!=this.fields.length||this.isAgregation?!0:2<this.links.length}}F.__name__=!0;F.__super__=M;Object.assign(F.prototype,{__class__:F});
class ya{constructor(){this.sets=new R;this.associations=new R;this.width=this.height=0}getObj(a){let b=this.sets.h[a];null==b&&(b=this.associations.h[a]);return b}iterator(){return new za(this)}getGrid(){let a=[];for(var b=0,c=this.height;b<c;){b++;let e=[],d=0,g=this.width;for(;d<g;)d++,e.push(null);a.push(e)}for(b=this.iterator();b.hasNext();)c=b.next(),a[c.row][c.col]=c;return a}loadGrid(a){this.height=a.length;this.width=0==this.height?0:a[0].length;let b=0,c=a.length;for(;b<c;){let e=b++,d=
0,g=a[e].length;for(;d<g;){let f=d++;null!=a[e][f]&&(a[e][f].row=e,a[e][f].col=f)}}}}ya.__name__=!0;Object.assign(ya.prototype,{__class__:ya});class za{constructor(a){let b=u.array(a.sets);a=u.array(a.associations);this.objects=u.concat(b,a);this.i=0}hasNext(){return this.i!=this.objects.length}next(){this.i++;return this.objects[this.i-1]}}za.__name__=!0;Object.assign(za.prototype,{__class__:za});class q{constructor(a,b,c,e){null==e&&(e=!1);null==c&&(c=0);this.set_name(a);this.set_type(b);this.visibility=
c;this.isStatic=e}set_name(a){this.name=a;this.className=V.fixName(a);return this.name}set_type(a){this.type=a;this.dbType="COUNTER"==a.toUpperCase()?"INT":a.toUpperCase();this.languageType=this.classType=q.classOf(a);return this.type}isArray(){return"Array"==this.classType.substring(0,5)}toDomainString(){return q.getVisibilitySymbol(this.visibility)+" "+this.className}toUMLString(){let a=q.getVisibilitySymbol(this.visibility)+" "+this.className;""!=this.classType&&(a+=" : "+this.classType);return a}static getVisibilitySymbol(a){switch(a){case q.ACCESS_PRIVATE:return"-";
case q.ACCESS_PROTECTED:return"#";case q.ACCESS_PUBLIC:return"+";default:return" "}}static classOf(a){let b=a.toUpperCase();return"FLOAT"==b?"Float":"DOUBLE"==b?"Double":"BOOLEAN"==b?"Bool":"DATE"==b?"Date":"TIME"==b?"Time":"DATETIME"==b?"DateTime":"INTEGER"==b||"INT"==b||"COUNTER"==b?"Int":0==b.indexOf("CHAR(")||0==b.indexOf("VARCHAR(")||"TEXT"==b?"String":a}static arrayOf(a){return"Array<"+q.classOf(a)+">"}}q.__name__=!0;Object.assign(q.prototype,{__class__:q});class oa{constructor(a,b,c,e,d,g,
f,h){this.set=a;this.set_role(b);this.min=c;this.max=e;this.isWeak=d;this.isAgregate=g;this.hasArrow=f;this.visibility=h}set_role(a){this.role=a;this.classRole=V.fixName(a);return this.role}getMCDCards(){return"X"==this.min&&"X"==this.max?"":this.min+","+this.max}getUMLCards(){let a="";if("X"!=this.min||"X"!=this.max)a=this.min==this.max?this.min:"0"==this.min&&"N"==this.max?"*":this.min+".."+A.replace(this.max,"N","*");return a}}oa.__name__=!0;Object.assign(oa.prototype,{__class__:oa});class Aa{constructor(){this.relations=
new R}toString(a){null==a&&(a=!0);let b=[],c=D(this.relations);for(;c.hasNext();){let e=c.next();b.push(a?e.toUnivString():e.toENString())}return b.join("\n")}}Aa.__name__=!0;Object.assign(Aa.prototype,{__class__:Aa});class Y extends q{constructor(a,b,c,e){null==e&&(e=!1);null==c&&(c=0);super(a,b,c,e);this.params=[]}toUMLString(){let a=q.getVisibilitySymbol(this.visibility)+" "+this.className+"(",b=[],c=D(this.params);for(;c.hasNext();){let e=c.next();b.push(e.className+":"+e.classType)}a+=b.join(", ");
a+=")";""!=this.classType&&(a+=" : "+this.classType);return a}isGeneric(){return-1==this.classType.indexOf("<T>")&&"T"!=this.classType?u.exists(this.params,function(a){return-1==a.classType.indexOf("<T>")?"T"==a.classType:!0}):!0}}Y.__name__=!0;Y.__super__=q;Object.assign(Y.prototype,{__class__:Y});class ha extends V{constructor(a){super(a);this.key=[];this.foreignKeys=[]}mergeForeignKeys(){let a=[],b=0;for(;b<this.foreignKeys.length;){let c={names:[this.foreignKeys[b].name],relation:this.foreignKeys[b].relation,
keys:[this.foreignKeys[b].key]},e=1,d=c.relation.key.length;for(;e<d;){let g=e++;c.names.push(this.foreignKeys[b+g].name);c.keys.push(this.foreignKeys[b+g].key);++b}++b;a.push(c)}return a}toENString(){for(var a=this.name+" (",b=this.fields,c=Array(b.length),e=0,d=b.length;e<d;){var g=e++;c[g]=b[g].name}a=a+c.join(", ")+")\n    cl\u00e9 primaire : "+this.key.join(", ")+(0==this.foreignKeys.length?"":"\n");b=this.mergeForeignKeys();c=Array(b.length);e=0;for(d=b.length;e<d;){g=e++;let f=b[g];c[g]="    cl\u00e9 \u00e9trang\u00e8re : "+
f.names.join(", ")+" r\u00e9f\u00e9rence "+f.relation.name+"("+f.keys.join(", ")+")"}return a+c.join("\n")+"\n"}toUnivString(){let a=[];for(var b=0,c=this.key;b<c.length;){var e=c[b];++b;for(var d=[],g=D(this.foreignKeys);g.hasNext();){var f=g.next();d.push(f.name)}a.push("\u001b[4m"+(-1==d.indexOf(e)?"":"#")+e+"\u001b[0m")}b=0;for(c=this.fields;b<c.length;)if(e=c[b],++b,-1==this.key.indexOf(e.name)){d=[];for(g=D(this.foreignKeys);g.hasNext();)f=g.next(),d.push(f.name);a.push((-1==d.indexOf(e.name)?
"":"#")+e.name)}return"\u001b[1m"+this.name+"\u001b[0m ("+a.join(", ")+")\n"}}ha.__name__=!0;ha.__super__=V;Object.assign(ha.prototype,{__class__:ha});class pa{constructor(a,b,c,e,d,g){this.x1=a;this.y1=b;this.x2=c;this.y2=e;this.cx1=a;this.cy1=b;this.cx2=c;this.cy2=e;this.hOrientation=d;this.vOrientation=g}getSteering(){return(this.y2-this.y1)/(this.x2-this.x1)}getOffset(){return this.y2-this.getSteering()*this.x2}isVertical(){return this.x1==this.x2}isHorizontal(){return this.y1==this.y2}}pa.__name__=
!0;Object.assign(pa.prototype,{__class__:pa});class W{static generateSVG(a){let b=l.createDocument(),c=x.initSvg(b),e=a.iterator();for(;e.hasNext();){let d=e.next();d.svg=d instanceof F?W.generateAssociationSVG(E.__cast(d,F)):W.generateSetSVG(d);c.addChild(d.svg)}x.placeObjects(a,c,a.height,a.width);W.drawLines(a,c);return b}static generateAssociationSVG(a){for(var b=0,c=a.name.length,e=0,d=a.fields;e<d.length;){var g=d[e];++e;++b;g.name.length>c&&(c=g.name.length)}e=l.createElement("g");a.isAgregation&&
(d=l.createElement("rect"),e.addChild(d),d.set("height",p.string(16*(0==b?2:b+1)+10)),d.set("width",p.string(9.5*c+20)),d.set("style","fill:white"));d=l.createElement("rect");e.addChild(d);d.set("height",p.string(16*(0==b?2:b+1)+10));d.set("width",p.string(9.5*c+20));d.set("rx","20");d.set("ry","20");d.set("style","fill:lightgrey");b=l.createElement("line");e.addChild(b);b.set("x1","0");b.set("x2",p.string(9.5*c+20));b.set("y1","21");b.set("y2","21");b=l.createElement("text");e.addChild(b);b.addChild(l.createPCData(a.name));
b.set("x",p.string(10+9.5*(c-a.name.length)/2));b.set("y","17");c=l.createElement("text");e.addChild(c);b=0;for(d=a.fields.length;b<d;){g=b++;let f=l.createElement("tspan");c.addChild(f);f.set("x",p.string(10));f.set("y",p.string(16*(g+2)+5));f.addChild(l.createPCData(a.fields[g].name))}return e}static generateSetSVG(a){for(var b=0,c=a.name.length,e=0,d=a.fields;e<d.length;){var g=d[e];++e;g.isStatic||(++b,g.name.length>c&&(c=g.name.length))}e=l.createElement("g");d=l.createElement("rect");e.addChild(d);
d.set("height",p.string(16*(0==b?2:b+1)+10));d.set("width",p.string(9.5*c+10|0));d.set("style","fill:white");b=l.createElement("rect");e.addChild(b);b.set("height","21");b.set("width",p.string(9.5*c+10));b.set("style","fill:lightgrey");b=l.createElement("text");e.addChild(b);b.addChild(l.createPCData(a.name));b.set("x",p.string(5+9.5*(c-a.name.length)/2));b.set("y","16");c=l.createElement("text");e.addChild(c);b=0;for(d=a.fields.length;b<d;)if(g=b++,!a.fields[g].isStatic){let f=l.createElement("tspan");
c.addChild(f);f.set("x",p.string(2.5));f.set("y",p.string(16*(g+2)+5));-1!=a.id.indexOf(a.fields[g].name)&&f.set("style","text-decoration:underline");f.addChild(l.createPCData(a.fields[g].name))}if(0!=a.subsets.length){a=a.subsetType;if(e.nodeType!=l.Document&&e.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==e.nodeType?"null":z.toString(e.nodeType)));c=p.parseInt(e.children[0].get("width"));if(e.nodeType!=l.Document&&e.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+
(null==e.nodeType?"null":z.toString(e.nodeType)));e.addChild(W.generateInheritanceSVG(a,c,p.parseInt(e.children[0].get("height"))))}return e}static generateInheritanceSVG(a,b,c){let e=l.createElement("g");var d=l.createElement("line");e.addChild(d);d.set("x1",p.string(19));d.set("x2",p.string(19));d.set("y1","0");d.set("y2","5");d=l.createElement("path");e.addChild(d);d.set("d","M 39 24 a1,1 0 1,0 -39 0 l 39 0");d.set("style","fill:lightgrey");d=l.createElement("text");e.addChild(d);d.addChild(l.createPCData(a));
d.set("x",p.string(10+9.5*(2-a.length)/2));d.set("y","22");e.set("transform","translate("+p.string((b-39)/2|0)+","+(null==c?"null":""+c)+")");return e}static drawLines(a,b){for(var c=a.associations.h,e=Object.keys(c),d=e.length,g=0;g<d;){var f=c[e[g++]],h=0;2==f.links.length&&f.links[0].set.name==f.links[1].set.name&&(b.addChild(W.generateLineCardsSVG(f,f.links[0].set,!1,f.links[0].hasArrow,f.links[0].getMCDCards(),1,!1)),b.addChild(W.generateLineCardsSVG(f,f.links[0].set,!1,f.links[1].hasArrow,f.links[1].getMCDCards(),
-1,!1)),h=2);for(var k=f.links.length;h<k;){let m=h++;b.addChild(W.generateLineCardsSVG(f,f.links[m].set,f.links[m].isWeak,f.links[m].hasArrow,f.links[m].getMCDCards(),null,!1))}}a=a.sets.h;c=Object.keys(a);e=c.length;for(d=0;d<e;)if(g=a[c[d++]],0!=g.subsets.length)for(f=0,h=g.subsets;f<h.length;)k=h[f],++f,b.addChild(W.generateLineCardsSVG(g,k,!1,!1,"",null,!0))}static generateLineCardsSVG(a,b,c,e,d,g,f){null==g&&(g=0);c&&(d="("+d+")");b=x.getLine(a,b,"",d,g);if(f){f=x.coordRE;f=p.parseInt(a.svg.get("transform").replace(f.r,
"$1").split(",")[0]);c=x.coordRE;c=p.parseInt(a.svg.get("transform").replace(c.r,"$1").split(",")[1]);var h=a.svg;if(h.nodeType!=l.Document&&h.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==h.nodeType?"null":z.toString(h.nodeType)));h=p.parseInt(h.children[0].get("width"));a=a.svg;if(a.nodeType!=l.Document&&a.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":z.toString(a.nodeType)));
a=p.parseInt(a.children[0].get("height"));b.x1=f+(h/2|0);b.y1=c+a+19+5}a=l.createElement("g");a.addChild(x.getSvgLine(b,g,e?x.MARKERS[0].id:null));e=l.createElement("text");e.addChild(l.createPCData(d));e.set("x",null==b.cx2?"null":""+b.cx2);e.set("y",null==b.cy2?"null":""+b.cy2);a.addChild(e);return a}}G.schema.MCDToSVG=W;W.__name__=!0;class Ba{static generateSVG(a,b){let c=l.createDocument(),e=x.initSvg(c);for(var d=a.relations.h,g=Object.keys(d),f=g.length,h=0;h<f;){var k=d[g[h++]];k.svg=Ba.generateTableSvg(k,
b);e.addChild(k.svg)}x.placeObjects(a.relations,e,a.height,a.width);a=a.relations.h;b=Object.keys(a);d=b.length;for(g=0;g<d;)for(f=a[b[g++]],h=0,k=f.foreignKeys;h<k.length;){let m=k[h];++h;e.addChild(Ba.generateLineSVG(f,m))}return c}static generateTableSvg(a,b){let c=a.name.length;for(var e=0,d=a.fields;e<d.length;){var g=d[e];++e;g=g.name.length+(b?g.dbType.length+2:0);g>c&&(c=g)}e=l.createElement("g");d=l.createElement("rect");e.addChild(d);d.set("height",p.string(16*(a.fields.length+1)+10));d.set("width",
p.string(9.5*c+10|0));d.set("style","fill:white");d=l.createElement("rect");e.addChild(d);d.set("height","21");d.set("width",p.string(9.5*c+10));d.set("style","fill:lightgrey");d=l.createElement("text");e.addChild(d);d.addChild(l.createPCData(a.name));d.set("x",p.string(5+9.5*(c-a.name.length)/2));d.set("y","16");d=l.createElement("text");e.addChild(d);g=0;let f=a.fields.length;for(;g<f;){let h=g++,k=l.createElement("tspan");d.addChild(k);k.set("x",p.string(2.5));k.set("y",p.string(16*(h+2)+5));-1!=
a.key.indexOf(a.fields[h].name)&&k.set("style","text-decoration:underline");k.addChild(l.createPCData(a.fields[h].name));b&&(k=l.createElement("tspan"),d.addChild(k),k.set("x",p.string(5+9.5*(c-a.fields[h].dbType.length))),k.set("y",p.string(16*(h+2)+5)),k.addChild(l.createPCData(a.fields[h].dbType)))}return e}static generateLineSVG(a,b){var c=x.coordRE,e=a.svg.get("transform").replace(c.r,"$1").split(",");c=p.parseInt(e[0]);e=p.parseInt(e[1]);var d=a.svg;if(d.nodeType!=l.Document&&d.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+
(null==d.nodeType?"null":z.toString(d.nodeType)));var g=p.parseInt(d.children[0].get("width"));d=x.coordRE;var f=b.relation.svg.get("transform").replace(d.r,"$1").split(",");d=p.parseInt(f[0]);f=p.parseInt(f[1]);var h=b.relation.svg;if(h.nodeType!=l.Document&&h.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==h.nodeType?"null":z.toString(h.nodeType)));h=p.parseInt(h.children[0].get("width"));e+=16*(a.getFieldIndex(b.name)+2);f+=16*(b.relation.getFieldIndex(b.key)+
2);a.col==b.relation.col?(c+=g,d+=h,b=a=(Math.max(c,d)|0)+10):a.col<b.relation.col?(c+=g,a=c+10,b=d-10):(d+=h,a=c-10,b=d+10);g=l.createElement("g");h=l.createElement("path");h.set("d","M "+c+" "+e+" L "+a+" "+e+" L "+b+" "+f+" L "+d+" "+f);h.set("marker-end","url(#"+x.MARKERS[0].id+")");g.addChild(h);return g}}G.schema.MLDToSVG=Ba;Ba.__name__=!0;class x{static initSvg(a){let b=l.createElement("svg");a.addChild(b);b.set("xmlns","http://www.w3.org/2000/svg");a=l.createElement("defs");b.addChild(a);
var c=l.createElement("style");a.addChild(c);c.addChild(l.createPCData("@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap')"));c=l.createElement("style");a.addChild(c);c.addChild(l.createPCData("text,text>tspan{font-family:'Roboto Mono';font-size:16px} rect{stroke:black} line,path{fill:none;stroke:black}"));c=0;let e=x.MARKERS;for(;c<e.length;){let d=e[c];++c;let g=l.createElement("marker");g.set("id",d.id);g.set("orient","auto");g.set("refX",""+(d.width+1));g.set("refY",
""+d.height/2);g.set("markerHeight",""+d.height);g.set("markerWidth",""+d.width);let f=l.createElement("path");f.set("style",d.style);f.set("d",d.path);g.addChild(f);a.addChild(g)}return b}static placeObjects(a,b,c,e,d){null==d&&(d=1);let g=[];for(var f=0;f<c;)f++,g.push(0);f=[];for(var h=0;h<e;)h++,f.push(0);for(h=D(a);h.hasNext();){var k=h.next();if(null!=k.svg){var m=k.svg;if(m.nodeType!=l.Document&&m.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==
m.nodeType?"null":z.toString(m.nodeType)));m=p.parseInt(m.children[0].get("width"));var n=k.svg;if(n.nodeType!=l.Document&&n.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==n.nodeType?"null":z.toString(n.nodeType)));n=p.parseInt(n.children[0].get("height"));m>f[k.col]&&(f[k.col]=m);n>g[k.row]&&(g[k.row]=n)}}h=5;k=[];for(m=0;m<c;)n=m++,k[n]=h,h=h+g[n]+(0!=g[n]?50*d|0:0);c=5;m=[];for(n=0;n<e;){var r=n++;m[r]=c;c=c+f[r]+(0!=f[r]?50*d|0:0)}for(a=D(a);a.hasNext();)if(e=
a.next(),null!=e.svg){n=m[e.col];r=f[e.col];var v=e.svg;if(v.nodeType!=l.Document&&v.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==v.nodeType?"null":z.toString(v.nodeType)));n=n+(r-p.parseInt(v.children[0].get("width")))/2|0;r=k[e.row];v=g[e.row];let C=e.svg;if(C.nodeType!=l.Document&&C.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==C.nodeType?"null":z.toString(C.nodeType)));r=r+(v-p.parseInt(C.children[0].get("height")))/
2|0;e.svg.set("transform","translate("+n+","+r+")")}h=h-(50*d|0)+5;c=c-(50*d|0)+50;b.set("width",null==c?"null":""+c);b.set("height",null==h?"null":""+h)}static getLine(a,b,c,e,d){null==d&&(d=0);null==e&&(e="");null==c&&(c="");var g=x.coordRE,f=a.svg.get("transform").replace(g.r,"$1").split(",");g=p.parseInt(f[0]);f=p.parseInt(f[1]);var h=a.svg;if(h.nodeType!=l.Document&&h.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==h.nodeType?"null":z.toString(h.nodeType)));
var k=p.parseInt(h.children[0].get("width"));h=a.svg;if(h.nodeType!=l.Document&&h.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==h.nodeType?"null":z.toString(h.nodeType)));let m=p.parseInt(h.children[0].get("height"));h=x.coordRE;var n=b.svg.get("transform").replace(h.r,"$1").split(",");h=p.parseInt(n[0]);n=p.parseInt(n[1]);var r=b.svg;if(r.nodeType!=l.Document&&r.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+
(null==r.nodeType?"null":z.toString(r.nodeType)));var v=p.parseInt(r.children[0].get("width"));r=b.svg;if(r.nodeType!=l.Document&&r.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==r.nodeType?"null":z.toString(r.nodeType)));r=p.parseInt(r.children[0].get("height"));a=new pa(g+(k/2|0),f+(m/2|0),h+(v/2|0),n+(r/2|0),a.col==b.col?0:a.col<b.col?-1:1,a.row==b.row?0:a.row<b.row?-1:1);let C=b=0;g+=g<h?k:0;f+=f<n?m:0;h+=h<g?v:0;n+=n<f?r:0;if(a.isVertical())a.y1=
f,a.y2=n,0!=d&&(a.x1+=k*d/3|0,a.x2+=v*d/3|0,b=5*d);else if(a.isHorizontal())a.x2=h,0==d?a.x1=g:(a.y1=f+(1==d?m:0),a.y2+=r*d/3|0,C=5*d);else if(1==d)a.x1=g,a.y2=n,a.x2-=(a.x2-h)/2|0;else if(-1==d)a.y1=f,a.x2=h,a.y2-=(a.y2-n)/2|0;else{k=a.getSteering();v=a.getOffset();d=f<n?f-m:f;let I=Math.round((f-v)/k),L=Math.round(g*k+v);L>=d&&L<=d+m?(a.x1=g,a.y1=L):(a.x1=I,a.y1=f);d=n<f?n-r:n;g=Math.round((n-v)/k);f=Math.round(h*k+v);f>=d&&f<=d+r?(a.x2=h,a.y2=f):(a.x2=g,a.y2=n)}a.cx1=a.x1+5;a.cy1=a.y1+16+5;a.cx2=
a.x2+5+b;a.cy2=a.y2+16+5+C;1==a.hOrientation&&(a.cx1=a.x1-(9.5*c.length+7.5|0));if(-1==a.hOrientation||0<b)a.cx2=a.x2-(9.5*e.length+7.5|0)+b;1==a.vOrientation&&(a.cy1=a.y1-7);if(-1==a.vOrientation||0<C)a.cy2=a.y2-7+C;return a}static getSvgLine(a,b,c){null==b&&(b=0);let e;if(0==b)e=l.createElement("line"),e.set("x1",null==a.x1?"null":""+a.x1),e.set("x2",null==a.x2?"null":""+a.x2),e.set("y1",null==a.y1?"null":""+a.y1),e.set("y2",null==a.y2?"null":""+a.y2);else{e=l.createElement("path");var d=(a.x2+
a.x1)/2|0,g=(a.y2+a.y1)/2|0;let h=Math.sqrt(Math.pow(a.x2-a.x1,2)+Math.pow(a.y2-a.y1,2))/3;var f=-1/a.getSteering();f=Math.atan(f);0==a.hOrientation?(d+=(Math.cos(f)*h|0)*b,g+=(Math.sin(f)*h|0)*b):0==a.vOrientation?(d+=(Math.cos(f)*h|0)*b,g+=(Math.sin(f)*h|0)*a.hOrientation):(d+=(Math.cos(f)*h|0)*b*-a.hOrientation,g+=(Math.sin(f)*h|0)*b*-a.hOrientation);e.set("d","M "+a.x1+" "+a.y1+" Q "+d+" "+g+" "+a.x2+" "+a.y2)}null!=c&&e.set("marker-end","url(#"+c+")");return e}}x.__name__=!0;class B{static generateSVG(a,
b,c){let e=l.createDocument(),d=x.initSvg(e);for(var g=a.iterator();g.hasNext();){var f=g.next();if(f instanceof F){var h=E.__cast(f,F);if(h.isClass())f.svg=B.generateAssociationSVG(a,h,b,c),d.addChild(f.svg);else{f.svg=l.createElement("g");f.svg.addChild(l.createElement("g"));h=f.svg;if(h.nodeType!=l.Document&&h.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==h.nodeType?"null":z.toString(h.nodeType)));h.children[0].set("height","0");f=f.svg;if(f.nodeType!=
l.Document&&f.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==f.nodeType?"null":z.toString(f.nodeType)));f.children[0].set("width","0")}}else f.svg=B.generateSetSVG(f,b,c),d.addChild(f.svg)}x.placeObjects(a,d,a.height,a.width,b?2:4);B.drawInheritance(a,d);B.placeClassAssociations(a,d);a=a.associations.h;c=Object.keys(a);g=c.length;for(f=0;f<g;)if(h=a[c[f++]],!h.isClass()){var k=h.svg;if(k.nodeType!=l.Document&&k.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+
(null==k.nodeType?"null":z.toString(k.nodeType)));k=p.parseInt(k.children[0].get("width"));var m=h.svg;if(m.nodeType!=l.Document&&m.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==m.nodeType?"null":z.toString(m.nodeType)));m=p.parseInt(m.children[0].get("height"));var n=x.coordRE,r=h.svg.get("transform").replace(n.r,"$1").split(",");n=p.parseInt(r[0]);r=p.parseInt(r[1]);d.addChild(B.drawLinks(h,n,r,k,m,!b))}return e}static useField(a,b,c){return!a.isStatic||
b?a.visibility!=q.ACCESS_PUBLIC?c:!0:!1}static getFieldMaxWidth(a,b,c,e,d){B.useField(a,b,c)&&(a=b?a.toUMLString().length:a.toDomainString().length+(e?7:0),a>d&&(d=a));return d}static getMethodMaxWidth(a,b,c,e){B.useField(a,b,c)&&(a=a.toUMLString().length,a>e&&(e=a));return e}static getFieldsCount(a,b,c){let e;e=1+u.count(a.fields,function(d){return B.useField(d,b,c)});b&&(e+=u.count(a.navFields,function(d){return B.useField(d,b,c)}),e+=u.count(a.constructors,function(d){return B.useField(d,b,c)}),
e+=u.count(a.accessors,function(d){return B.useField(d,b,c)}),e+=u.count(a.methods,function(d){return B.useField(d,b,c)}));return e}static getMaxWidth(a,b,c){let e=a.className.length;u.iter(a.fields,function(d){e=B.getFieldMaxWidth(d,b,c,a.id.includes(d.name),e)});u.iter(a.navFields,function(d){e=B.getFieldMaxWidth(d,b,c,a.id.includes(d.name),e)});b&&(u.iter(a.constructors,function(d){e=B.getMethodMaxWidth(d,b,c,e)}),u.iter(a.accessors,function(d){e=B.getMethodMaxWidth(d,b,c,e)}),u.iter(a.methods,
function(d){e=B.getMethodMaxWidth(d,b,c,e)}));return e}static generateAssociationSVG(a,b,c,e){return B.generateSetSVG(b,c,e)}static generateSetSVG(a,b,c){var e=B.getFieldsCount(a,b,c),d=B.getMaxWidth(a,b,c);let g=l.createElement("g");var f=l.createElement("rect");g.addChild(f);f.set("height",p.string(16*e+5*(b?3:2)));f.set("width",p.string(9.5*d+10));f.set("style","fill:white");e=l.createElement("rect");g.addChild(e);e.set("height","21");e.set("width",p.string(9.5*d+10));e.set("style",b?"fill:white":
"fill:lightgrey");e=l.createElement("text");g.addChild(e);e.addChild(l.createPCData(a.className));e.set("x",p.string(5+9.5*(d-a.className.length)/2));e.set("y","16");e=l.createElement("text");g.addChild(e);f=2;var h=[a.fields];b&&h.push(a.navFields);for(var k=0;k<h.length;){var m=h[k];++k;let n=0;for(;n<m.length;){let r=m[n];++n;if(B.useField(r,b,c)){let v=l.createElement("tspan");e.addChild(v);v.set("x",p.string(2.5));v.set("y",p.string(16*f+5));r.isStatic&&v.set("style","text-decoration:underline");
v.addChild(l.createPCData(b?r.toUMLString():r.toDomainString()+(a.id.includes(r.name)?" <<id>>":"")));++f}}}h=l.createElement("line");g.addChild(h);h.set("x1","0");h.set("x2",p.string(10+9.5*d));h.set("y1",p.string(16*f-5));h.set("y2",p.string(16*f-5));if(b){d=a.constructors;for(h=0;h<d.length;)k=d[h],++h,B.useField(k,b,c)&&(m=l.createElement("tspan"),e.addChild(m),m.set("x",p.string(2.5)),m.set("y",p.string(16*f+10)),k.isStatic&&m.set("style","text-decoration:underline"),m.addChild(l.createPCData(k.toUMLString())),
++f);d=a.accessors;for(h=0;h<d.length;)k=d[h],++h,B.useField(k,b,c)&&(m=l.createElement("tspan"),e.addChild(m),m.set("x",p.string(2.5)),m.set("y",p.string(16*f+10)),k.isStatic&&m.set("style","text-decoration:underline"),m.addChild(l.createPCData(k.toUMLString())),++f);a=a.methods;for(d=0;d<a.length;)h=a[d],++d,B.useField(h,b,c)&&(k=l.createElement("tspan"),e.addChild(k),k.set("x",p.string(2.5)),k.set("y",p.string(16*f+10)),h.isStatic&&k.set("style","text-decoration:underline"),k.addChild(l.createPCData(h.toUMLString())),
++f)}return g}static drawInheritance(a,b){a=a.sets.h;let c=Object.keys(a),e=c.length,d=0;for(;d<e;){let g=a[c[d++]];null!=g.superset&&b.addChild(x.getSvgLine(x.getLine(g,g.superset),null,x.MARKERS[1].id))}}static placeClassAssociations(a,b){let c=a.associations.h,e=Object.keys(c),d=e.length,g=0;for(;g<d;){var f=c[e[g++]];if(f.isClass()){var h=f.svg;if(h.nodeType!=l.Document&&h.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==h.nodeType?"null":z.toString(h.nodeType)));
h=p.parseInt(h.children[0].get("width"));var k=f.svg;if(k.nodeType!=l.Document&&k.nodeType!=l.Element)throw w.thrown("Bad node type, expected Element or Document but found "+(null==k.nodeType?"null":z.toString(k.nodeType)));k=p.parseInt(k.children[0].get("height"));var m=x.coordRE,n=f.svg.get("transform").replace(m.r,"$1").split(",");m=p.parseInt(n[0]);let r=p.parseInt(n[1]);n=B.drawLinks(f,m,r,h,k,!1);let v=m+h/2|0,C=v,I=r+k/2|0,L=I,aa=m,Ca=r;2==f.links.length?(f.row==f.links[0].set.row&&f.row==
f.links[1].set.row?L=Ca+=k/2+20|0:f.col==f.links[0].set.col&&f.col==f.links[1].set.col&&(C=aa+=h/2+20|0),h=x.getLine(f.links[0].set,f.links[1].set),v=(h.x1+h.x2)/2|0,I=(h.y1+h.y2)/2|0):(aa+=h/2+20|0,Ca+=k/2+20|0);f.col==a.width-1&&b.set("width",p.string(p.parseInt(b.get("width"))+aa-m));f.row==a.height-1&&b.set("height",p.string(p.parseInt(b.get("height"))+Ca-r));f.svg.set("transform","translate("+aa+","+Ca+")");f=l.createElement("line");f.set("x1",null==v?"null":""+v);f.set("x2",null==C?"null":""+
C);f.set("y1",null==I?"null":""+I);f.set("y2",null==L?"null":""+L);f.set("stroke-dasharray","2,2");n.insertChild(f,0);b.insertChild(n,0)}}}static drawLinks(a,b,c,e,d,g){let f=l.createElement("g");if(2<a.links.length){b=b+e/2|0;c=c+d/2|0;g=0;for(e=a.links;g<e.length;)d=e[g],++g,d=x.getLine(d.set,a),d.x2=b,d.y2=c,f.addChild(x.getSvgLine(d));a=l.createElement("path");a.set("transform","translate("+b+","+c+")");a.set("style","fill:white;stroke:black");a.set("d","M -10 0 L 0 -10 L 10 0 L 0 10 Z");f.addChild(a)}else if(2==
a.links.length){b=a.links[0];c=a.links[1];if(c.isWeak||c.isAgregate||b.hasArrow)b=a.links[1],c=a.links[0];e=b.isWeak?x.MARKERS[3].id:b.isAgregate?x.MARKERS[2].id:c.hasArrow?x.MARKERS[0].id:null;d=l.createElement("text");d.addChild(l.createPCData(c.getUMLCards()));let h=l.createElement("text");h.addChild(l.createPCData(b.isWeak||b.isAgregate?"":b.getUMLCards()));if(b.set.className==c.set.className){let k=x.getLine(a,c.set,"",b.isWeak||b.isAgregate?"":b.getUMLCards(),-1);a=x.getLine(a,b.set,"",c.getUMLCards(),
1);let m=l.createElement("path");m.set("d","M "+a.x2+" "+a.y2+" Q "+(k.x1+(k.x2==a.x2?k.x1-k.x2:0))+" "+(k.y1+(k.y2==a.y2?k.y1-k.y2:0))+" "+k.x2+" "+k.y2);null!=e&&m.set("marker-end","url(#"+e+")");f.addChild(m);d.set("x",null==a.cx2?"null":""+a.cx2);d.set("y",null==a.cy2?"null":""+a.cy2);h.set("x",null==k.cx2?"null":""+k.cx2);h.set("y",null==k.cy2?"null":""+k.cy2);g&&(B.addNavLabel(b,c,k,2,f),B.addNavLabel(c,b,a,2,f))}else a=x.getLine(b.set,c.set,c.getUMLCards(),b.isWeak||b.isAgregate?"":b.getUMLCards()),
f.addChild(x.getSvgLine(a,0,e)),d.set("x",null==a.cx1?"null":""+a.cx1),d.set("y",null==a.cy1?"null":""+a.cy1),h.set("x",null==a.cx2?"null":""+a.cx2),h.set("y",null==a.cy2?"null":""+a.cy2),g&&(B.addNavLabel(b,c,a,2,f),B.addNavLabel(c,b,a,1,f));f.addChild(d);f.addChild(h)}return f}static addNavLabel(a,b,c,e,d){if(!a.hasArrow){let g=b.classRole;""==b.role&&(g="N"==a.max?b.set.getPluralClassName():b.set.className);switch(b.visibility){case q.ACCESS_PRIVATE:b="-";break;case q.ACCESS_PROTECTED:b="#";break;
case q.ACCESS_PUBLIC:b="+";break;default:b=""}g=b+g.charAt(0).toLowerCase()+t.substr(g,1,null);b=l.createElement("text");b.addChild(l.createPCData(g));let f=1==e?c.y1:c.y2,h=1==e?c.cx1:c.cx2,k=1==e?c.cy1:c.cy2;b.set("x",p.string((1==e?c.x1:c.x2)<h?h:h-9.5*(g.length-a.getUMLCards().length)));a.isWeak||a.isAgregate?b.set("y",null==k?"null":""+k):b.set("y",p.string(f<k?k+16:k-16));d.addChild(b)}}}G.schema.UMLToSVG=B;B.__name__=!0;class y{static deComment(a){var b=a.indexOf("//");-1!=b&&(a=a.substring(0,
b));b=a.indexOf("/*");let c=a.indexOf("*/",b+2);for(;-1!=b&&-1!=c;)a=a.substring(0,b)+a.substring(c+2),b=a.indexOf("/*"),c=a.indexOf("*/",b+2);return a}static load(a){var b=a.split("\n");a=new ya;try{y.loadSets(a,b),y.loadAssociations(a,b),y.loadSubsets(a,b),y.loadMethods(a,b),y.loadLayout(a,b)}catch(c){b=w.caught(c),"string"==typeof b.unwrap()?a=null:Fa.console.log(b.get_message())}null!=a&&0>=Object.keys(a.sets.h).length&&(a=null);return a}static loadAssociations(a,b){for(var c=0,e=b.length;c<e;){var d=
c++,g=y.deComment(b[d]);if(y.associationRE.match(g)){d=A.trim(g.substring(0,g.indexOf(",")));var f=new F(d),h=g.indexOf(":");-1==h&&(h=g.length);g=g.substring(h+1).split(",");h=0;let m=g.length;for(;h<m;){var k=h++;k=A.trim(g[k]);""!=k&&y.loadField(f,null,k)}a.associations.h[d]=f}}c=0;for(e=b.length;c<e;)d=c++,f=b[d],y.associationRE.match(f)&&(g=A.trim(f.substring(0,f.indexOf(","))),g=a.associations.h[g],h=f.indexOf(":"),-1==h&&(h=f.length),f=f.substring(f.indexOf(",")+1,h).split(","),y.loadAssociationLinks(a,
d,g,f))}static loadAssociationLinks(a,b,c,e){let d=b=null,g=0,f=e.length;for(;g<f;){var h=g++;h=A.trim(e[h]);let m=h.replace(y.linkRE.r,"$1");""!=m&&(m=t.substr(m,1,m.length-2));var k=A.trim(h.replace(y.linkRE.r,"$2"));let n=!1,r=!1,v=!1,C=q.ACCESS_UNSET,I=a.sets.h[k];null==I&&(I=a.associations.h[k],null!=I&&(E.__cast(I,F).isAgregation=!0));if(null!=I){for(;"_"==h.charAt(0)||"*"==h.charAt(0)||"o"==h.charAt(0)||"-"==h.charAt(0)||"+"==h.charAt(0)||"#"==h.charAt(0);){switch(h.charAt(0)){case "#":C=q.ACCESS_PROTECTED;
break;case "*":case "_":d=I;n=!0;break;case "+":C=q.ACCESS_PUBLIC;break;case "-":C=q.ACCESS_PRIVATE;break;case "o":r=!0}h=h.substring(1)}n||(b=I);k=h.charAt(0);let L=h.charAt(1);">"==h.charAt(2)&&(v=!0);c.links.push(new oa(I,m,k,L,n,r,v,C))}}null!=d&&(d.compound=b)}static loadSets(a,b){let c=0;for(;c<b.length;){var e=b[c];++c;e=y.deComment(e);if(y.entityRE.match(e)){let d=A.trim(e.substring(0,e.indexOf(":"))),g=new M(d,null,!1,!1);e=A.trim(e.substring(e.indexOf(":")+1));if(""!=e){e=e.split(",");let f=
0,h=e.length;for(;f<h;){let k=f++;y.loadField(g,k,A.trim(e[k]))}}a.sets.h[d]=g}}}static loadField(a,b,c){null==b&&(b=-1);let e=y.DEFAULT_TYPE,d=q.ACCESS_UNSET,g=!1,f=!1;y.typeRE.match(c)&&(e=A.trim(c.replace(y.typeRE.r,"$2")),c=A.trim(c.replace(y.typeRE.r,"$1")));for(;"_"==c.charAt(0)||"~"==c.charAt(0)||"-"==c.charAt(0)||"+"==c.charAt(0)||"#"==c.charAt(0);){switch(c.charAt(0)){case "#":d=q.ACCESS_PROTECTED;break;case "+":d=q.ACCESS_PUBLIC;break;case "-":d=q.ACCESS_PRIVATE;break;case "_":f=!0;break;
case "~":g=!0}c=t.substr(c,1,null)}a instanceof F||(0==b&&!f||0!=b&&f)&&a.id.push(c);a.fields.push(new q(c,e,d,g))}static loadSubsets(a,b){let c=0,e=b.length;for(;c<e;){var d=c++,g=y.deComment(b[d]);if(y.legacySubsetRE.match(g)){var f=g.replace(y.legacySubsetRE.r,"$4");d=A.trim(g.replace(y.legacySubsetRE.r,"$5"));d=a.sets.h[d];if(null!=d){d.subsetType=f;if("XT"==f||"TX"==f||"P"==f)d.isAbstract=!0;g=g.replace(y.legacySubsetRE.r,"$1").split(" U ");f=0;for(var h=g.length;f<h;){var k=f++;k=A.trim(g[k]);
k=a.sets.h[k];null!=k&&(d.subsets.push(k),k.id=[],k.superset=d)}}}else if(y.subsetRE.match(g)&&(f=g.replace(y.subsetRE.r,"$1"),d=A.rtrim(g.replace(y.subsetRE.r,"$2")),d=a.sets.h[d],null!=d)){d.subsetType=f;switch(g.replace(y.subsetRE.r,"$3")){case "-":h=M.SUBSET_OPT_BOTH;break;case "<":h=M.SUBSET_OPT_PARENT;break;case ">":h=M.SUBSET_OPT_CHILDREN;break;default:h=-1}d.subsetOption=h;if("XT"==f||"TX"==f||"P"==f)d.isAbstract=!0;f=g.replace(y.subsetRE.r,"$4");""!=f&&(d.subsetCode=t.substr(f,1,f.length-
2));g=g.replace(y.subsetRE.r,"$5").split(",");f=0;for(h=g.length;f<h;)k=f++,k=A.trim(g[k]),k=a.sets.h[k],null!=k&&(d.subsets.push(k),k.id.shift(),k.superset=d)}}}static loadMethods(a,b){let c=0,e=b.length;for(;c<e;){var d=c++,g=y.deComment(b[d]);if(y.methodRE.match(g)){var f=A.trim(g.substring(0,g.indexOf(":")-2));d=a.sets.h[f];null==d&&(d=new M(f,null,!1,!0,!0),a.sets.h[f]=d);g=g.substring(g.indexOf(":")+1);f=0;for(var h=g.indexOf(")",f);-1!=h;){let m=g.indexOf(",",h);var k=g.indexOf("[",h);h=g.indexOf("]",
h);-1!=k&&m>k&&m<h&&(m=g.indexOf(",",h));-1!=m?(k=g.substring(f,m),f=m+1,h=g.indexOf(")",f)):(k=g.substring(f),h=-1);y.loadMethod(d,A.trim(k))}}}}static loadMethod(a,b){var c=q.ACCESS_PUBLIC;let e=!1,d=A.trim(b.substring(0,b.indexOf("("))),g=b.substring(b.indexOf(")")+1);g=A.trim(g.substring(g.indexOf("[")+1,g.indexOf("]")));let f=d.charAt(0);for(;"~"==f||"-"==f||"+"==f||"#"==f;){switch(f){case "#":c=q.ACCESS_PROTECTED;break;case "+":c=q.ACCESS_PUBLIC;break;case "-":c=q.ACCESS_PRIVATE;break;case "~":e=
!0}d=t.substr(d,1,null);f=d.charAt(0)}""==d&&(d=a.name);c=new Y(d,g,c,e);b=A.trim(b.substring(b.indexOf("(")+1,b.indexOf(")")));""!=b&&y.loadParams(a,c,b);d==a.name?a.constructors.push(c):a.methods.push(c)}static loadParams(a,b,c){let e=0;for(c=c.split(",");e<c.length;){var d=c[e];++e;let g=A.trim(d),f="";-1!=d.indexOf("[")&&(g=A.trim(d.substring(0,d.indexOf("["))),-1!=d.indexOf("]",d.indexOf("["))&&(f=A.trim(d.substring(d.indexOf("[")+1,d.indexOf("]")))));""==f&&(d=a.getField(g),f=null!=d?d.dbType:
y.DEFAULT_TYPE);b.params.push(new q(g,f))}}static loadLayout(a,b){let c=0,e=0,d=0,g=0;for(;g<b.length;){var f=b[g];++g;f=y.deComment(f);if(""==A.trim(f))0!=e&&(e>c&&(c=e),e=0,++d);else if(":"==A.trim(f))++e;else if(y.entityRE.match(f)){var h=a.sets;f=A.trim(f.substring(0,f.indexOf(":")));f=h.h[f];f.row=d;f.col=e;++e}else y.associationRE.match(f)&&(h=a.associations,f=A.trim(f.substring(0,f.indexOf(","))),f=h.h[f],f.row=d,f.col=e,++e)}a.height=d;a.width=c}static save(a){let b="";a=a.getGrid();let c=
0,e=a.length;for(;c<e;){let d=c++,g=0,f=a[d];for(;g<f.length;){let h=f[g];++g;b=null==h?b+":":h instanceof F?b+y.saveAssociation(E.__cast(h,F)):b+y.saveSet(h);b+="\n"}d!=a.length-1&&(b+="\n")}return b}static saveAssociation(a){let b=a.name;for(var c=0,e=a.links;c<e.length;){var d=e[c];++c;b+=", "+(d.isWeak?"_":"")+d.min+d.max+" "+d.set.name}c=0;for(e=a.fields.length;c<e;)d=c++,b=0!=d?b+", ":b+": ",b+=a.fields[d].name+" ["+a.fields[d].type+"]";return b}static saveSet(a){let b=a.name+": ";for(var c=
[],e=D(a.fields);e.hasNext();){var d=e.next();c.push(d.name+" ["+d.type+"]")}b+="_"+c.join(", ");if(0!=a.subsets.length){c="\n/\\ "+a.name+" - ";e=[];for(a=D(a.subsets);a.hasNext();)d=a.next(),e.push(d.name);b+=c+e.join(", ")}return b}}G.source.Mocodo=y;y.__name__=!0;class O{static transform(a){let b=new Aa;O.setsToRelations(a,b);O.subsetsToRelations(a,b);O.componentsToRelations(a,b);O.associationsToRelations(a,b);O.supersetToChildren(a,b);O.subsetsToParent(a,b);O.copyLayout(a,b);let c=[];u.iter(b.relations,
function(e){0==e.foreignKeys.length&&e.key.length==e.fields.length&&c.push(e.name)});u.iter(c,function(e){let d=b.relations;Object.prototype.hasOwnProperty.call(d.h,e)&&delete d.h[e]});for(a=0;a<c.length;){let e=c[a];++a;u.iter(b.relations,function(d){d.foreignKeys=u.filter(d.foreignKeys,function(g){return g.relation.name!=e})})}return b}static setsToRelations(a,b){a=a.sets.h;let c=Object.keys(a),e=c.length,d=0;for(;d<e;){let g=a[c[d++]],f=g.dbName,h=new ha(f),k=0,m=g.fields;for(;k<m.length;){let n=
m[k];++k;let r=n.className;n.isStatic||(h.fields.push(new q(r,n.type)),-1!=g.id.indexOf(n.name)&&h.key.push(r))}b.relations.h[f]=h}}static subsetsToRelations(a,b){a=a.sets.h;let c=Object.keys(a),e=c.length,d=0;for(;d<e;){var g=a[c[d++]];if(null!=g.superset){let h=b.relations.h[g.dbName];g=b.relations.h[g.superset.dbName];let k=0!=h.key.length,m=0,n=0,r=g.key;for(;n<r.length;){let v=r[n];++n;k||h.key.push(v);var f=g.getField(v);let C=h.fields;f=new q(v,f.dbType);C.splice(m,0,f);++m;h.foreignKeys.push({name:v,
relation:g,key:v})}}}}static componentsToRelations(a,b){a=a.sets.h;let c=Object.keys(a),e=c.length,d=0;for(;d<e;){var g=a[c[d++]];if(null!=g.compound){let h=b.relations.h[g.dbName],k=0;g=b.relations.h[g.compound.dbName];let m=0,n=g.key;for(;m<n.length;){let r=n[m];++m;h.key.splice(k,0,r);var f=g.getField(r).dbType;let v=h.fields;f=new q(r,f);v.splice(k,0,f);h.foreignKeys.push({name:r,relation:g,key:r});++k}}}}static associationsToRelations(a,b){let c=[];var e=a.associations.h;let d=Object.keys(e),
g=d.length,f=0;for(;f<g;){let h=e[d[f++]];c.push(h)}for(;0!=c.length;)e=c.pop(),u.exists(e.links,function(h){return null==b.relations.h[h.set.dbName]})?c.splice(0,0,e):e.isRelation()?O.associationNNtoRelation(a,b,e):O.association1NtoRelation(a,b,e)}static association1NtoRelation(a,b,c){let e=null,d=null;var g=0;for(c=c.links;g<c.length;){let f=c[g];++g;"1"==f.max?null==e?e=f:"1"==f.min?(d=e,e=f):d=f:d=f}null!=e&&null!=d&&(g=b.relations.h[e.set.dbName],e.isWeak||O.addForeignKey(a,b,d,g,!1))}static associationNNtoRelation(a,
b,c){let e=new ha(c.dbName);var d=c.isNN(),g=0;let f=c.links;for(;g<f.length;){let h=f[g];++g;O.addForeignKey(a,b,h,e,d||"1"==h.max)}a=0;for(d=c.fields;a<d.length;)g=d[a],++a,g.isStatic||e.fields.push(new q(g.className,g.type));b.relations.h[c.dbName]=e}static addForeignKey(a,b,c,e,d){a=b.relations.h[c.set.dbName];null==a&&(a=b.relations.h[c.set.superset.dbName]);b=0;let g=a.key;for(;b<g.length;){let f=g[b];++b;let h=O.constructFieldName(e,f,c.classRole,a.dbName,1==a.key.length),k=a.getField(f).dbType;
e.fields.push(new q(h,k));e.foreignKeys.push({name:h,relation:a,key:f});d&&e.key.push(h)}}static constructFieldName(a,b,c,e,d){b=""!=c?d?c:b+(97<=t.cca(b,b.length-1)&&90>=t.cca(c,0)?c.charAt(0).toUpperCase()+c.substring(1):"_"+c):-1==b.toLowerCase().indexOf(e.toLowerCase())&&5>b.length?b+(97<=t.cca(b,b.length-1)&&90>=t.cca(e,0)?e.charAt(0).toUpperCase()+e.substring(1):"_"+e):b;c=a.fields;a=Array(c.length);e=0;for(d=c.length;e<d;){let g=e++;a[g]=c[g].name}c=b;for(e=0;-1!=a.indexOf(c);)++e,c=b+(null==
e?"null":""+e);return c}static subsetsToParent(a,b){a=a.sets.h;let c=Object.keys(a),e=c.length,d=0;for(;d<e;){var g=a[c[d++]];if(g.subsetOption==M.SUBSET_OPT_PARENT){let h=b.relations.h[g.dbName];""!=g.subsetCode&&h.fields.push(new q(g.subsetCode,"INT"));let k=0;for(g=g.subsets;k<g.length;){var f=g[k];++k;let m=b.relations.h[f.dbName];u.iter(m.fields,function(r){-1==h.key.indexOf(r.name)&&h.fields.push(r)});u.iter(m.foreignKeys,function(r){r.relation.name!=h.name&&h.foreignKeys.push(r)});u.iter(b.relations,
function(r){u.iter(r.foreignKeys,function(v){v.relation.name==m.name&&(v.relation=h)})});f=b.relations;let n=m.name;Object.prototype.hasOwnProperty.call(f.h,n)&&delete f.h[n]}}}}static supersetToChildren(a,b){a=a.sets.h;let c=Object.keys(a),e=c.length,d=0;for(;d<e;){var g=a[c[d++]];let n=b.relations.h[g.dbName];for(var f=[],h=D(g.subsets);h.hasNext();){var k=h.next();f.push(k.dbName)}let r=f;f=g.subsetType.toUpperCase();h=u.count(b.relations,function(v){return-1==r.indexOf(v.name)?u.exists(v.foreignKeys,
function(C){return C.relation.name==n.name}):!1});if(g.subsetOption==M.SUBSET_OPT_CHILDREN&&0==h&&(1==g.subsets.length||"X"==f||"XT"==f||"TX"==f||"P"==f)){h=0;for(k=g.subsets;h<k.length;){var m=k[h];++h;let v=b.relations.h[m.dbName];m=v.key.length-1;let C=0,I=n.fields;for(;C<I.length;){let L=I[C];++C;-1==n.key.indexOf(L.name)&&v.fields.splice(m,0,L);++m}u.iter(n.foreignKeys,function(L){v.foreignKeys.push(L)});if(1==g.subsets.length||"XT"==f||"TX"==f||"P"==f){let L=[];u.iter(v.foreignKeys,function(aa){aa.relation.name==
n.name&&L.push(aa)});u.iter(L,function(aa){t.remove(v.foreignKeys,aa)})}}if(1==g.subsets.length||"XT"==f||"TX"==f||"P"==f)g=b.relations,f=n.name,Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}}}static copyLayout(a,b){b.height=a.height;b.width=a.width;let c=[];for(var e=0,d=b.height;e<d;)e++,c.push(0);e=[];d=0;for(var g=b.width;d<g;)d++,e.push(0);for(a=a.iterator();a.hasNext();)d=a.next(),g=b.relations.h[d.dbName],null!=g&&(g.row=d.row,g.col=d.col,c[g.row]++,e[g.col]++);d=a=0;for(g=c.length;d<
g;){var f=d++;0==c[f]?++a:c[f]=f-a}b.height-=a;d=a=0;for(g=e.length;d<g;)f=d++,0==e[f]?++a:e[f]=f-a;b.width-=a;b=b.relations.h;a=Object.keys(b);d=a.length;for(g=0;g<d;)f=b[a[g++]],f.row=c[f.row],f.col=e[f.col]}}G.transform.DiagramToMLD=O;O.__name__=!0;class T{static transform(a){T.initNavigation(a);T.initConstructors(a);T.initAccessors(a)}static initNavigation(a){let b=a.associations.h,c=Object.keys(b),e=c.length,d=0;for(;d<e;){let h=b[c[d++]];if(h.isClass())for(var g=0,f=h.links;g<f.length;){let k=
f[g];++g;h.navFields.push(new q(T.constructFieldName(k,"1"),k.set.className,k.visibility))}else 2==h.links.length&&(h.links[0].hasArrow||(g=a.getObj(h.links[0].set.name),f="1"==h.links[0].max?h.links[1].set.className:q.arrayOf(h.links[1].set.className),g.navFields.push(new q(T.constructFieldName(h.links[1],h.links[0].max),f,h.links[1].visibility))),h.links[1].hasArrow||(g=a.getObj(h.links[1].set.name),f="1"==h.links[1].max?h.links[0].set.className:q.arrayOf(h.links[0].set.className),g.navFields.push(new q(T.constructFieldName(h.links[0],
h.links[1].max),f,h.links[0].visibility))))}}static constructFieldName(a,b){let c=a.classRole;""==a.role&&(c="N"==b?a.set.getPluralClassName():a.set.className);return c=c.charAt(0).toLowerCase()+t.substr(c,1,null)}static initConstructors(a){for(a=a.iterator();a.hasNext();){let b=a.next();if(!(0!=b.constructors.length||b instanceof F&&!E.__cast(b,F).isClass())){let c=new Y(b.className,"",b.isAbstract?q.ACCESS_PROTECTED:q.ACCESS_PUBLIC),e=0,d=T.retrieveConstructorFields(b);for(;e<d.length;){let g=d[e];
++e;c.params.push(new q(g.className,g.classType))}b.constructors.push(c)}}}static retrieveConstructorFields(a){let b;b=null!=a.superset?T.retrieveConstructorFields(a.superset):[];for(var c=a.fields,e=0;e<c.length;){let d=c[e];++e;d.isArray()||b.push(d)}a=a.navFields;for(c=0;c<a.length;)e=a[c],++c,e.isArray()||b.push(e);return b}static initAccessors(a){for(a=a.iterator();a.hasNext();){let b=a.next();b instanceof F&&!E.__cast(b,F).isClass()||(u.iter(b.fields,function(c){T.setAccessors(b,c)}),u.iter(b.navFields,
function(c){T.setAccessors(b,c)}))}}static setAccessors(a,b){if(b.visibility==q.ACCESS_UNSET){b.visibility=q.ACCESS_PROTECTED;var c=new Y("get"+b.className.charAt(0).toUpperCase()+t.substr(b.className,1,null),b.classType,q.ACCESS_PUBLIC);a.accessors.push(c);"Array"==t.substr(b.classType,0,5)?(b=t.substr(b.classType,6,b.classType.length-7),c=new Y("add"+b,a.className,q.ACCESS_PUBLIC),c.params.push(new q("item",b)),a.accessors.push(c),c=new Y("remove"+b,a.className,q.ACCESS_PUBLIC),c.params.push(new q("item",
b)),a.accessors.push(c)):(c=new Y("set"+b.className.charAt(0).toUpperCase()+t.substr(b.className,1,null),b.classType,q.ACCESS_PUBLIC),c.params.push(new q(b.className,b.classType)),a.accessors.push(c))}}}G.transform.DiagramToUML=T;T.__name__=!0;"undefined"!=typeof performance&&"function"==typeof performance.now&&(t.now=performance.now.bind(performance));null==String.fromCodePoint&&(String.fromCodePoint=function(a){return 65536>a?String.fromCharCode(a):String.fromCharCode((a>>10)+55232)+String.fromCharCode((a&
1023)+56320)});Object.defineProperty(String.prototype,"__class__",{value:String,enumerable:!1,writable:!0});String.__name__=!0;Array.__name__=!0;Date.prototype.__class__=Date;Date.__name__="Date";var Oa={},Ma={},Na=Number,La=Boolean,Pa={},Qa={};E.__toStr={}.toString;l.Element=0;l.PCData=1;l.Document=6;S.__meta__={statics:{generateMethods:{SuppressWarnings:["checkstyle:CyclomaticComplexity"]}}};J.__meta__={statics:{generateMethods:{SuppressWarnings:["checkstyle:CyclomaticComplexity"]}}};K.__meta__=
{statics:{generateMethods:{SuppressWarnings:["checkstyle:CyclomaticComplexity"]}}};N.__meta__={statics:{generateMethods:{SuppressWarnings:["checkstyle:CyclomaticComplexity"]}}};da.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";da.BYTES=P.ofString(da.CHARS);V.__meta__={statics:{fixName:{SuppressWarnings:["checkstyle:CyclomaticComplexity"]}}};M.SUBSET_OPT_BOTH=0;M.SUBSET_OPT_CHILDREN=1;M.SUBSET_OPT_PARENT=2;q.ACCESS_UNSET=0;q.ACCESS_PRIVATE=1;q.ACCESS_PROTECTED=2;q.ACCESS_PUBLIC=
3;oa.__meta__={fields:{_:{SuppressWarnings:["checkstyle:ParameterNumber"]}}};pa.__meta__={fields:{_:{SuppressWarnings:["checkstyle:ParameterNumber"]}}};W.__meta__={statics:{generateLineCardsSVG:{SuppressWarnings:["checkstyle:ParameterNumber"]}}};x.__meta__={statics:{getLine:{SuppressWarnings:["checkstyle:CyclomaticComplexity"]}}};x.coordRE=new U("^translate\\(([0-9]+,[0-9]+)\\)$","");x.PADDING=5;x.MARGIN=50;x.IMARGIN=10;x.RXY=20;x.LETTER_HEIGHT=16;x.TEXT_STYLE="font-family:'Roboto Mono';font-size:16px";
x.LETTER_WIDTH=9.5;x.UNDERLINE_STYLE="text-decoration:underline";x.RECT_STYLE="stroke:black";x.LINE_STYLE="fill:none;stroke:black";x.WHITE_STYLE="fill:white;stroke:black";x.DOTTED_STYLE="2,2";x.MARKERS=[{id:"arrowMarker",height:10,width:5,path:"M 0 0 L 5 5 L 0 10 Z",style:"fill:black;stroke:black"},{id:"inheritMarker",height:15,width:15,path:"M 0 0 L 15 7.5 L 0 15 Z",style:"fill:white;stroke:black"},{id:"aggregationMarker",height:15,width:20,path:"M 0 7.5 L 10 0 L 20 7.5 L 10 15 Z",style:"fill:white;stroke:black"},
{id:"compositionMarker",height:15,width:20,path:"M 0 7.5 L 10 0 L 20 7.5 L 10 15 Z",style:"fill:black;stroke:black"}];x.FILL_WHITE_STYLE="fill:white";x.FILL_GREY_STYLE="fill:lightgrey";B.__meta__={statics:{drawLinks:{SuppressWarnings:["checkstyle:ParameterNumber"]}}};y.DEFAULT_TYPE="VARCHAR(50)";y.typeRE=new U("([^\\[]*)\\[(.*)\\]","");y.entityRE=new U("^[^/,:(]{2,}:","");y.associationRE=new U("^[^/,:]{2,},","");y.legacySubsetRE=new U("([^/,:]{2,}( U [^,:]{2,})*) C( ?\\[(X?T?)\\])? ([^,:]{2,})$",
"i");y.subsetRE=new U("^/([XT]{0,2}|P)?\\\\ * ([^-><]{2,}) *([-><]) *(\\[.*\\])? *(.*$)","i");y.linkRE=new U("[^01NX]*[01NX]{2}>? *(\\[.*\\])?(.*)$","");y.methodRE=new U("^[^/,:(]{2,}\\(\\):","")})("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
