/*
 * Copyright CADMAI Software GmbH.
 * All rights reserved.
 *
 * Redistribution (includes making available on a web location) is permitted 
 * provided that the following conditions are met:
 *
 * The redistributor must hold one of these licenses:
 * a valid CADMAI WebGl-Publisher license (SingleWebGlPubLic)
 * a valid CADMAI WebGl-Publisher Revit export license (SingleWebGlRevitExportLic)
 * a valid CADMAI WebGl-Publisher Inventor export license (SingleWebGlInventorExportLic)
 * or a written permission of CADMAI Software GmbH 
 *
 * The redistributor / user does not have the right to change, translate,
 * back-develop, decompile or disassemble the software.
 * 
 * Redistributions must retain the above copyright notice, 
 * this list of conditions and the following disclaimer.
 *   
 * Neither the name of CADMAI Software GmbH nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 "\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74";var CmiJsonBomExportFlags=function(){this.skipWrittenSubstructures=false;this.createModelReferences=true;this.useModFlags=false;this.writeNodeAttributesInStructure=false;this.writeNodes=true;this.combinePosNrs=false;this.c9="";};var CmiStructureNode=function(){var NK=CmiHelpers.generateGuid();var Un="";var mm="";var HF="\x61\x72\x74\x69\x63\x6c\x65";var lJ="";var t7="";var ZJ="";var A4=new Array();var OV=new Array();var vx=null;var U1=null;this.getIternalId=function(){return NK};this.Wr=function(sC){NK=sC;};this.Rp=function(){return Un};this.setExternalId=function(CD){Un=CD;};this.getTitle=function(){return mm};this.setTitle=function(Jz){mm=Jz;};this.getType=function(){return HF};this.setType=function(KU){HF=KU;};this.getModelRef=function(){return U1;};this.Hf=function(gO){U1=gO;lJ=U1.getModelName()};this.IL=function(){return t7};this.cB=function(lv){t7=lv;};this.getAttributes=function(){return A4};this.setAttributes=function(Hx){A4=Hx;};this.NF=function(){return vx};this.UV=function(){return lJ};this.lO=function(){return OV};this.wA=function(){return ZJ};this.P_=function(dp){ZJ=dp;};this.clearProperties=function(){A4=new Array();};this.addProperties=function(Ap){var key="";var val="";if(Ap.length>0){Ap.forEach(GN=>{key=GN.getKey();val=GN.getValue();if(key.length>0){if(!A4.some(e=>e.getKey()===GN.getKey())){A4.push(GN);};}});};};this.updateProperty=function(GN){let Vj=A4.find((lI)=>lI.getKey()===GN.getKey());if(Vj!=null)Vj.setValue(GN.getValue());else A4.push(GN);};this.hy=function(Ap){let result=new Array();if(Ap.length>0){Ap.forEach(GN=>{if(!A4.some(e=>e.getKey()===GN.getKey())){result.push(GN);};});A4=result;};};this.c4=function(wB){if(wB.length>0){wB.forEach(nl=>{if(!OV.some(e=>e===nl)){OV.push(nl);};});};};this.Gt=function(wB){let result=new Array();if(wB.length>0){wB.forEach(nl=>{if(!OV.some(e=>e===GN)){result.push(nl);};});OV=result;};};this.loadFromJSON=function(jsonObject){if(jsonObject.intId!=undefined)NK=jsonObject.intId;if(jsonObject.extId!=undefined)Un=jsonObject.extId;if(jsonObject.psTtl!=undefined)mm=jsonObject.psTtl;if(jsonObject.psTyp!=undefined)HF=jsonObject.psTyp;if(jsonObject.tplModNm!=undefined)lJ=jsonObject.tplModNm;if(jsonObject.psVnr!=undefined)t7=jsonObject.psVnr;if(jsonObject.psMfl!=undefined)ZJ=jsonObject.psMfl;if(jsonObject.attribs!=undefined){A4=new Array();let Kf=null;for(let G=0;G<jsonObject.attribs.length;G++){Kf=new CmiProperty();Kf.loadFromJSON(jsonObject.attribs[G]);A4.push(Kf);};};};this.connectToModel=function(tD){vx=tD;if(lJ.length==0)return;if(vx.getModelName()==lJ){U1=vx;}else{U1=vx.getCmiWindow().getTemplateModel(lJ).getModel();}};this.getObjectAsJsonString=function(BP){let oR=Un;let UM=null;let T_="\x5b";for(let G=0;G<A4.length;G++){if((BP.c9.length>0)&&(BP.c9==A4[G].getKey())){oR=A4[G].getValue();}if(G>0)T_=T_+"\x2c";T_=T_+A4[G].getObjectAsJsonString();};T_=T_+"\x5d";let qj="";if(BP.createModelReferences==true)qj="\x22\x74\x70\x6c\x4d\x6f\x64\x4e\x6d\x22\x3a\x22"+lJ+"\x22\x2c";let E4="\x7b"+"\x22\x69\x6e\x74\x49\x64\x22\x3a\x22"+NK+"\x22\x2c"+"\x22\x65\x78\x74\x49\x64\x22\x3a\x22"+oR+"\x22\x2c"+"\x22\x70\x73\x54\x74\x6c\x22\x3a\x22"+mm+"\x22\x2c"+"\x22\x70\x73\x54\x79\x70\x22\x3a\x22"+HF+"\x22\x2c"+qj+"\x22\x70\x73\x56\x6e\x72\x22\x3a\x22"+t7+"\x22\x2c"+"\x22\x70\x73\x4d\x66\x6c\x22\x3a\x22"+ZJ+"\x22\x2c"+"\x22\x61\x74\x74\x72\x69\x62\x73\x22\x3a"+T_+"\x7d";return E4;};};var CmiStructureNodeReference=function(fW){var fj=new Array();var RA=fW;RA.c4([this]);this.getIternalId=function(){return RA.getIternalId()};this.Wr=function(sC){RA.Wr(sC);};this.Rp=function(){return RA.Rp()};this.setExternalId=function(CD){RA.setExternalId(CD);};this.getTitle=function(){return RA.getTitle()};this.setTitle=function(Jz){RA.setTitle(Jz);};this.getType=function(){return RA.getType()};this.setType=function(KU){RA.setType(KU);};this.getModelRef=function(){return RA.getModelRef()};this.Hf=function(gO){RA.Hf(gO);};this.IL=function(){return RA.IL()};this.cB=function(lv){RA.cB(lv);};this.getAttributes=function(){return RA.getAttributes()};this.setAttributes=function(Hx){RA.setAttributes(Hx);};this.getNode=function(){return RA};this.wA=function(){return RA.wA()};this.P_=function(dp){RA.P_(dp);};this.sq=function(){return fj};this.jv=function(qq){var QF=new CmiStructureLink();QF.Q6(this);QF.dl(qq);fj.push(QF);return QF;};this.D9=function(){fj.sort(function(a,b){let x=a.getPosNr();let y=b.getPosNr();let B1=parseInt(x);let Ry=parseInt(y);if(isNaN(B1)||isNaN(Ry)){x=x.toLowerCase();y=y.toLowerCase();if(x<y){return-1;}if(x>y){return 1;}return 0;}else{if(B1<Ry){return-1;}if(B1>Ry){return 1;}return 0;}});};};var CmiStructureLink=function(){var NK=CmiHelpers.generateGuid();var Un="";var Tz="";var gC="";var eF="";var V2=1;var vZ="";var A4=new Array();var WL=null;var bA=null;var aZ="";var uo=0;var vx=null;var JV=null;var Ov=null;var Ed=null;var X6=null;this.getIternalId=function(){return NK};this.Wr=function(sC){NK=sC;};this.Rp=function(){return Un};this.setExternalId=function(CD){Un=CD;};this.qp=function(){return Tz};this.BO=function(TZ){Tz=TZ;};this.hH=function(){return gC};this.gS=function(mc){gC=mc;};this.getPosNr=function(){return eF};this.setPosNr=function(d5){eF=d5;};this.ow=function(){return V2};this.V9=function(AS){V2=AS;};this.L4=function(){return vZ};this.Qs=function(H1){vZ=H1;};this.getComponentRef=function(){return X6};this.Tv=function(fu){X6=fu;};this.sk=function(){return JV};this.Q6=function(cY){JV=cY;Tz=cY.getIternalId();};this.getSonNodeRef=function(){return Ov};this.dl=function(D8){Ov=D8;gC=D8.getIternalId();};this.gr=function(){return uo};this.P6=function(l1){uo=l1;};this.y8=function(){return aZ};this.fq=function(TN){aZ=TN;};this.VL=function(){return Ed};this.AU=function(q1){Ed=q1};this.je=function(){var xs=null;var Q8=null;var av="";var bB=new Array();bB.push(eF);Q8=JV;xs=Ed;while(xs!=null){bB.push(xs.getPosNr());xs=xs.VL();if(xs!=null)Q8=xs.sk();};for(let G=bB.length-1;G>=0;G--){av=av+bB[G];if(G>0)av=av+"\x2e";};return av;};this.addProperties=function(Ap){var key="";var val="";if(Ap.length>0){Ap.forEach(GN=>{key=GN.getKey();val=GN.getValue();if(key.length>0){if(!A4.some(e=>e.getKey()===GN.getKey())){A4.push(GN);};}});};};this.hy=function(Ap){let result=new Array();if(Ap.length>0){Ap.forEach(GN=>{if(!A4.some(e=>e.getKey()===GN.getKey())){result.push(GN);};});A4=result;};};this.loadFromJSON=function(jsonObject){if(jsonObject.intId!=undefined)NK=jsonObject.intId;if(jsonObject.extId!=undefined)Un=jsonObject.extId;if(jsonObject.fId!=undefined)Tz=jsonObject.fId;if(jsonObject.sId!=undefined)gC=jsonObject.sId;if(jsonObject.pNr!=undefined){eF=jsonObject.pNr;};if(jsonObject.cNt!=undefined){if(isNaN(jsonObject.cNt))V2=1;else V2=parseInt(jsonObject.cNt);};if(jsonObject.cmpNm!=undefined)vZ=jsonObject.cmpNm;if(jsonObject.attribs!=undefined){A4=new Array();let Kf=null;for(let G=0;G<jsonObject.attribs.length;G++){Kf=new CmiProperty();Kf.loadFromJSON(jsonObject.attribs[G]);A4.push(Kf);};};};this.connectToModel=function(tD){vx=tD;X6=vx.getEntityByName(vZ);};this.getObjectAsJsonString=function(BP,KG){let oR=Un;let UM=null;let oc=null;let T_="\x5b";if((KG!=null)&&(KG.length>0)){oc=new Array();let zh=Ov.getAttributes();zh.forEach(GN=>{if(KG.some((Kh)=>GN.getKey()===Kh)){oc.push(GN);}else{let wZ=new CmiProperty();wZ.setKey(Kh);wZ.setValue("");oc.push(wZ);}});}else{oc=A4.slice();}for(let G=0;G<oc.length;G++){if((BP.c9.length>0)&&(BP.c9==oc[G].getKey())){oR=oc[G].getValue();}if(G>0)T_=T_+"\x2c";T_=T_+oc[G].getObjectAsJsonString();};T_=T_+"\x5d";let hO="";let wK="";if(BP.createModelReferences==true){hO="\x22\x63\x6d\x70\x4e\x6d\x22\x3a\x22"+vZ+"\x22\x2c";if((WL!=null)&&(bA!=null)){wK="\x22\x65\x6c\x41\x22\x3a\x5b"+WL[0]+"\x2c"+WL[1]+"\x2c"+WL[2]+"\x5d\x2c";wK=wK+"\x22\x70\x6f\x73\x22\x3a\x5b"+bA[0]+"\x2c"+bA[1]+"\x2c"+bA[2]+"\x5d\x2c";}}let dP="";if(aZ.length>0)dP="\x22\x6d\x6f\x64\x22\x3a\x22"+aZ+"\x22\x2c";let TY=eF;if(BP.combinePosNrs==true)TY=this.je(BP.combinePosNrs);let E4="\x7b"+"\x22\x69\x6e\x74\x49\x64\x22\x3a\x22"+NK+"\x22\x2c"+"\x22\x65\x78\x74\x49\x64\x22\x3a\x22"+oR+"\x22\x2c"+"\x22\x66\x49\x64\x22\x3a\x22"+Tz+"\x22\x2c"+"\x22\x73\x49\x64\x22\x3a\x22"+gC+"\x22\x2c"+"\x22\x70\x4e\x72\x22\x3a\x22"+TY+"\x22\x2c"+"\x22\x63\x4e\x74\x22\x3a\x22"+V2+"\x22\x2c"+dP+hO+wK+"\x22\x61\x74\x74\x72\x69\x62\x73\x22\x3a"+T_+"\x7d";return E4;};};var CmiProductStructure=function(){var NK=CmiHelpers.generateGuid();var Un="";var mm="";var HF="\x62\x6f\x6d";var t7="";var A4=new Array();var z4=0;var Lg=0;var Wc=new Array();var n5=0;var ML=null;var cr=null;var vx=null;var al=null;var Kp="";this.getIternalId=function(){return NK};this.getTitle=function(){return mm};this.setTitle=function(Jz){mm=Jz;};this.getAttributeNameForExternalKey=function(){return Kp};this.setAttributeNameForExternalKey=function(Ku){Kp=Ku;};this.getAttributes=function(){return A4};this.setAttributes=function(Hx){A4=Hx;};this.getTopNodeRef=function(){return cr;};this.jm=function(){return z4;};this.Bk=function(){return Lg;};this.getTransferState=function(){return n5;};this.getTransferDate=function(){if(n5>0)return ML.CT();else return "";};this.getLinkageArray=function(skipWrittenSubstructures,j6,lc){var El=new Array();var R2=true;var cn=cr;if(cn==null)return(El);X_(cn);Pl(cn,El,true,skipWrittenSubstructures,lc);if(j6==true){let LI=new CmiStructureLink();LI.dl(cn);El.push(LI);}return(El);};this.findNode=function(intId){return Wc.find((Kb)=>Kb.getIternalId()===intId);};this.sf=function(){for(let G=0;G<Wc.length;G++){Wc[G].P_("");};};this.D9=function(){var cn=cr;if(cn!=null)Fr(cn);};var Fr=function(Q8){var oo=null;var Z6=Q8.sq();Q8.D9();if(Z6.length==0)return;for(let G=0;G<Z6.length;G++){oo=Z6[G].getSonNodeRef();oo.D9();Fr(oo);};};var X_=function(Q8){var oo=null;var Z6=Q8.sq();if(Z6.length==0)return;for(let G=0;G<Z6.length;G++){Z6[G].V9(1);oo=Z6[G].getSonNodeRef();X_(oo);};};var Pl=function(Q8,IO,R2,mJ,lc){var Z6=Q8.sq();var qB=null;var Aa="";var oo=null;var cmp=null;var lj=true;if(Z6.length==0)return;if(mJ==false){for(let G=0;G<Z6.length;G++){qB=Z6[G];cmp=qB.getComponentRef();if((cmp!=null)&&(cmp.getBrowserVisibleState()>=3)&&(lc))lj=false;if(lj){oo=qB.getSonNodeRef();IO.push(qB);if(R2==true)Pl(oo,IO,R2,mJ,lc);}};return;}var Ht=null;var ho=new Array();var dE=null;for(let G=0;G<Z6.length;G++){qB=Z6[G];dE=new Array();for(let M=0;M<ho.length;M++){Ht=ho[M];if((Ht.qp()==qB.qp())&&(Ht.hH()==qB.hH())){dE.push(Ht);}};if(dE.length==0){ho.push(qB);oo=qB.getSonNodeRef();IO.push(qB);oo=qB.getSonNodeRef();Pl(oo,IO,R2,mJ,lc);}else{Ht=dE.find(e=>e.getPosNr()===qB.getPosNr());if(Ht==undefined){ho.push(qB);oo=qB.getSonNodeRef();IO.push(qB);}else Ht.V9(Ht.ow()+1);}};};this.tx=function(){Lg=0;var an=new CmiStructureNodeReference(cr.getNode());Qt(an,cr,null);return an;};var Qt=function(gN,Zo,xs){var Ke=Zo.sq();var ca=null;var HE=null;var JS=null;var Ij=null;var Aa="";var Xt=null;if(Ke.length==0)return;for(let G=0;G<Ke.length;G++){ca=Ke[G];JS=ca.getSonNodeRef();Aa=JS.wA();Xt=JS.getNode();switch(Aa){case "\x73\x63":break;case "\x73\x73":Ij=new CmiStructureNodeReference(Xt);Lg++;HE=gN.jv(Ij);HE.setExternalId(ca.Rp());HE.setPosNr(ca.getPosNr());HE.V9(ca.ow());HE.Qs(ca.L4());HE.Tv(ca.getComponentRef());HE.AU(xs);break;case "\x6d\x75\x73":Qt(gN,JS,xs);break;default:Ij=new CmiStructureNodeReference(Xt);Lg++;HE=gN.jv(Ij);HE.setExternalId(ca.Rp());HE.setPosNr(ca.getPosNr());HE.V9(ca.ow());HE.Qs(ca.L4());HE.Tv(ca.getComponentRef());HE.AU(xs);Qt(Ij,JS,HE);break;};};return;};this.defineFromWpmModel=function(QU){vx=QU;Wc=new Array();z4=0;let SC=new CmiStructureNode();SC.setType("\x61\x72\x74\x69\x63\x6c\x65");SC.setTitle(vx.getModelName());SC.Hf(vx);Wc.push(SC);cr=new CmiStructureNodeReference(SC);var level=0;MS(cr,null,level);Lg=z4;};var MS=function(YZ,xs,level){var cD=null;var K2=null;if(xs!=null)K2=xs.getComponentRef();if(K2==null)cD=vx.getSubComponents();else if(K2.getModel()!=null){if(K2.getModel().isTemplate())cD=K2.getSubComponents();else cD=K2.getModel().getSubComponents();}else return;if(cD.length==0)return;var OQ=null;var oo=null;var wk=null;var c5=null;var uW="";var fg=0;for(let G=0;G<cD.length;G++){c5=cD[G].getModel();uW=c5.getModelName();z4++;OQ=Wc.find(e=>e.getModelRef()===c5);if(OQ==undefined){OQ=new CmiStructureNode();OQ.setType("\x61\x72\x74\x69\x63\x6c\x65");OQ.setTitle(uW);OQ.Hf(c5);Wc.push(OQ);oo=new CmiStructureNodeReference(OQ);wk=YZ.jv(oo);if(xs==null)wk.Qs(cD[G].entityName);else{wk.AU(xs);wk.Qs(xs.L4()+"\x2e"+cD[G].entityName);}wk.setPosNr(fg+1);wk.P6(level);wk.Tv(cD[G]);fg++;if(c5.suppressComponentsInBrowser==false){level++;MS(oo,wk,level);}}else{oo=new CmiStructureNodeReference(OQ);wk=YZ.jv(oo);if(xs==null)wk.Qs(cD[G].entityName);else{wk.AU(xs);wk.Qs(xs.L4()+"\x2e"+cD[G].entityName);}wk.setPosNr(fg+1);wk.Tv(cD[G]);fg++;if(c5.suppressComponentsInBrowser==false){level++;MS(oo,wk,level);}};};};this.rP=function(v){al=new CmiModel(v);qC.setUid(cr.getIternalId());al.modelDirectoryName="\x2e\x2f";};this.loadFromJSON=function(jsonObject){z4=0;if(jsonObject.intId!=undefined)NK=jsonObject.intId;if(jsonObject.extId!=undefined)Un=jsonObject.extId;if(jsonObject.psTtl!=undefined)mm=jsonObject.psTtl;if(jsonObject.psTyp!=undefined)HF=jsonObject.psTyp;if(jsonObject.psVnr!=undefined)t7=jsonObject.psVnr;if(jsonObject.extKa!=undefined)Kp=jsonObject.extKa;if(jsonObject.attribs!=undefined){A4=new Array();let Kf=null;for(let G=0;G<jsonObject.attribs.length;G++){Kf=new CmiProperty();Kf.loadFromJSON(jsonObject.attribs[G]);A4.push(Kf);};};if(jsonObject.nodes!=undefined){Wc=new Array();let Kb=null;for(let G=0;G<jsonObject.nodes.length;G++){Kb=new CmiStructureNode();Kb.loadFromJSON(jsonObject.nodes[G]);Wc.push(Kb);};}if(jsonObject.topId!=undefined){let SC=Wc.find(e=>e.getIternalId()===jsonObject.topId);if(SC!=undefined)cr=new CmiStructureNodeReference(SC);}if(jsonObject.links!=undefined){let mL=null;let Lb=null;let YZ=cr;let xs=null;let Xt=null;let rm=new Array();let LL=new Array();let kv=null;let gn=null;let bG=null;rm.push(cr);for(let G=0;G<jsonObject.links.length;G++){Lb=Wc.find(e=>e.getIternalId()===jsonObject.links[G].fId);Xt=Wc.find(e=>e.getIternalId()===jsonObject.links[G].sId);if((Lb!=null)&&(Xt!=null)){z4++;kv=rm[rm.length-1];if(LL.length>0)gn=LL[LL.length-1];else gn=null;if(kv.getIternalId()==Lb.getIternalId()){YZ=kv;xs=gn;bG=new CmiStructureNodeReference(Xt);mL=YZ.jv(bG);mL.loadFromJSON(jsonObject.links[G]);mL.AU(xs);rm.push(bG);LL.push(mL);}else{while(YZ.getIternalId()!=Lb.getIternalId()){rm.pop();if(LL.length>0)LL.pop();YZ=rm[rm.length-1];if(LL.length>0)xs=LL[LL.length-1];else xs=null;};bG=new CmiStructureNodeReference(Xt);mL=YZ.jv(bG);mL.loadFromJSON(jsonObject.links[G]);mL.AU(xs);rm.push(bG);LL.push(mL);}}};this.tx();}};this.connectToModel=function(tD){vx=tD;for(let G=0;G<Wc.length;G++){Wc[G].connectToModel(tD);};let Bx=this.getLinkageArray(false,false);for(let G=0;G<Bx.length;G++){Bx[G].connectToModel(tD);};};this.getObjectAsJsonString=function(ec){var BP=null;if(ec!=undefined)BP=ec;else BP=new CmiJsonBomExportFlags();BP.c9=Kp;let vh="\x5b";for(let G=0;G<A4.length;G++){if(G>0)vh=vh+"\x2c";vh=vh+A4[G].getObjectAsJsonString();};vh=vh+"\x5d";let Qb=new Array();Wc.forEach(ZU=>{if(!Qb.some(e=>e.getIternalId()===ZU.getIternalId())){Qb.push(ZU);};});let sp="\x5b";if(BP.writeNodes==true){for(let G=0;G<Qb.length;G++){if(G>0)sp=sp+"\x2c";sp=sp+Qb[G].getObjectAsJsonString(BP);};}sp=sp+"\x5d";var Bx=null;if(BP.useModFlags==true){let Z2=this.tx();Bx=new Array();X_(Z2);Pl(Z2,Bx,true,BP.skipWrittenSubstructures,false);}else Bx=this.getLinkageArray(BP.skipWrittenSubstructures,false);if(BP.combinePosNrs==true){Bx.sort(function(a,b){let x=a.je();let y=b.je();let PM="";let GZ="";let RH=x.split("\x2e");let Nc=y.split("\x2e");for(let G=0;G<RH.length;G++){if(RH[G].length==1)RH[G]="\x30\x30"+RH[G];else if(RH[G].length==2)RH[G]="\x30"+RH[G];PM=PM+RH[G];if(G<RH.length-1)PM=PM+"\x2e";}for(let G=0;G<Nc.length;G++){if(Nc[G].length==1)Nc[G]="\x30\x30"+Nc[G];else if(Nc[G].length==2)Nc[G]="\x30"+Nc[G];GZ=GZ+Nc[G];if(G<Nc.length-1)GZ=GZ+"\x2e";}if(PM<GZ){return-1;}if(PM>GZ){return 1;}return 0;});}let tw=new Array();let jI="\x5b";if(BP.writeNodeAttributesInStructure==true){Wc.forEach(ZU=>{let zh=ZU.getAttributes();zh.forEach(GN=>{if(!tw.some((Kh)=>GN.getKey()===Kh)){tw.push(GN.getKey());};});});}for(let G=0;G<Bx.length;G++){if(G>0)jI=jI+"\x2c";jI=jI+Bx[G].getObjectAsJsonString(BP,tw);};jI=jI+"\x5d";let E4="\x7b"+"\x22\x69\x6e\x74\x49\x64\x22\x3a\x22"+NK+"\x22\x2c"+"\x22\x65\x78\x74\x49\x64\x22\x3a\x22"+Un+"\x22\x2c"+"\x22\x65\x78\x74\x4b\x61\x22\x3a\x22"+Kp+"\x22\x2c"+"\x22\x70\x73\x54\x74\x6c\x22\x3a\x22"+mm+"\x22\x2c"+"\x22\x70\x73\x54\x79\x70\x22\x3a\x22"+HF+"\x22\x2c"+"\x22\x70\x73\x56\x6e\x72\x22\x3a\x22"+t7+"\x22\x2c"+"\x22\x74\x6f\x70\x49\x64\x22\x3a\x22"+cr.getIternalId()+"\x22\x2c"+"\x22\x61\x74\x74\x72\x69\x62\x73\x22\x3a"+vh+"\x2c"+"\x22\x6e\x6f\x64\x65\x73\x22\x3a"+sp+"\x2c"+"\x22\x6c\x69\x6e\x6b\x73\x22\x3a"+jI+"\x7d";return E4;};};
