/*
 * 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 yC=function(m2,_H,ak,WH,C8,yl){this.G6=m2;this.XQ=_H;this.Gr=ak;this.xJ=WH;this.FQ=C8;this.nD=yl;this.L0=this.G6/this.Gr;};var CmiAttribute=function(J7,wl,Vh){this.name=J7;this.title=wl;this.value=Vh;};var CmiProperty=function(){var cN="";var L3="";var mm="";var yi="";this.getKey=function(){return cN};this.setKey=function(q4){cN=q4;};this.getValue=function(){return L3};this.setValue=function(newValue){L3=newValue;};this.getTitel=function(){return mm};this.setTitel=function(BD){mm=BD;};this.getOrigin=function(){return yi};this.setOrigin=function(lY){yi=lY;};this.createCopy=function(){var qg=new CmiProperty();qg.setKey(cN);qg.setValue(L3);qg.setTitel(mm);qg.setOrigin(yi);return qg;};this.loadFromJSON=function(jsonObject){if(jsonObject.name!=undefined)cN=jsonObject.name;if(jsonObject.value!=undefined)L3=jsonObject.value;if(jsonObject.title!=undefined)mm=jsonObject.title;if(jsonObject.key!=undefined)cN=jsonObject.key;if(jsonObject.val!=undefined)L3=jsonObject.val;if(jsonObject.ttl!=undefined)mm=jsonObject.ttl;};this.getObjectAsJsonString=function(){let E4="\x7b"+"\x22\x6b\x65\x79\x22\x3a\x22"+cN+"\x22\x2c"+"\x22\x76\x61\x6c\x22\x3a\x22"+L3;if(mm.length>0)E4=E4+"\x2c\x22\x74\x74\x6c\x22\x3a\x22"+mm+"\x22\x7d";else E4=E4+"\x22\x7d";return E4;};};var CmiTexture=function(o,hq){this.v=o;this.h=o.q9();this.textureName=hq;this.Na=false;this.ei=false;this.Dz=null;this.loaded=false;this.Rc=false;this.XK=1.0;this.wq=0;this.R7=0;this.l8=0;this.La=0;this.EX=function(){this.Na=true;this.loaded=false;this.v.J3(false,this);};this.md=function(size){var C=this.h;this.Dz=C.createTexture();C.bindTexture(C.TEXTURE_2D,this.Dz);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE);C.texImage2D(C.TEXTURE_2D,0,C.DEPTH_COMPONENT,size,size,0,C.DEPTH_COMPONENT,C.UNSIGNED_SHORT,null);this.loaded=true;};this.DY=function(size){var C=this.h;this.Dz=C.createTexture();C.bindTexture(C.TEXTURE_2D,this.Dz);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE);C.texImage2D(C.TEXTURE_2D,0,C.RGBA,size,size,0,C.RGBA,C.UNSIGNED_BYTE,null);this.loaded=true;};this.Il=function(canvas,width,height){var C=this.h;C.bindFramebuffer(C.FRAMEBUFFER,this.v.mp);var data=new Uint8Array(o.fa*o.fa*4);C.readPixels(0,0,o.fa,o.fa,C.RGBA,C.UNSIGNED_BYTE,data);C.bindFramebuffer(C.FRAMEBUFFER,null);var Zr=document.createElement("\x63\x61\x6e\x76\x61\x73");var H7=Zr.getContext("\x32\x64");Zr.width=o.fa;Zr.height=o.fa;var nD=H7.createImageData(o.fa,o.fa);nD.data.set(data);H7.putImageData(nD,0,0);canvas.width=width;canvas.height=height;var context=canvas.getContext("\x32\x64");context.clearRect(0,0,context.canvas.clientWidth,context.canvas.clientHeight);context.setTransform(1,0,0,-1,0,canvas.height);context.scale(width/o.fa,width/o.fa);context.drawImage(Zr,0,0);return;};this.MV=function(width,height){var C=this.h;var ZK=C.createFramebuffer();C.bindFramebuffer(C.FRAMEBUFFER,ZK);C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,this.Dz,0);var data=new Uint8Array(width*height*4);C.readPixels(0,0,width,height,C.RGBA,C.UNSIGNED_BYTE,data);C.deleteFramebuffer(ZK);var canvas=document.createElement("\x63\x61\x6e\x76\x61\x73");canvas.width=width;canvas.height=height;var context=canvas.getContext("\x32\x64");var nD=context.createImageData(width,height);nD.data.set(data);context.putImageData(nD,0,0);var rY=new Image();rY.src=canvas.toDataURL("\x69\x6d\x61\x67\x65\x2f\x70\x6e\x67");return rY;};this.Kz=function(){var C=this.h;this.Dz=C.createTexture();C.bindTexture(C.TEXTURE_2D,this.Dz);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.REPEAT);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.REPEAT);C.texImage2D(C.TEXTURE_2D,0,C.RGBA,1,1,0,C.RGBA,C.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.loaded=true;};this.he=function(){var C=this.h;this.Dz=C.createTexture();C.bindTexture(C.TEXTURE_CUBE_MAP,this.Dz);C.texParameteri(C.TEXTURE_CUBE_MAP,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE);C.texParameteri(C.TEXTURE_CUBE_MAP,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE);C.texImage2D(C.TEXTURE_CUBE_MAP_POSITIVE_X,0,C.RGBA,1,1,0,C.RGBA,C.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));C.texImage2D(C.TEXTURE_CUBE_MAP_NEGATIVE_X,0,C.RGBA,1,1,0,C.RGBA,C.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));C.texImage2D(C.TEXTURE_CUBE_MAP_POSITIVE_Y,0,C.RGBA,1,1,0,C.RGBA,C.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));C.texImage2D(C.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,C.RGBA,1,1,0,C.RGBA,C.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));C.texImage2D(C.TEXTURE_CUBE_MAP_POSITIVE_Z,0,C.RGBA,1,1,0,C.RGBA,C.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));C.texImage2D(C.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,C.RGBA,1,1,0,C.RGBA,C.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.loaded=true;};this.yx=function(Lw,qk,flipY){var C=this.h;this.XK=Lw.width/Lw.height;this.wq=Lw.width;this.Rc=flipY;this.v.J3(true,this);this.Dz=C.createTexture();C.bindTexture(C.TEXTURE_2D,this.Dz);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.REPEAT);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.REPEAT);var TL=Math.log(Lw.width)/Math.LN2;var aY=Math.log(Lw.height)/Math.LN2;if((TL>parseInt(TL))||(aY>parseInt(aY))){var canvas=document.createElement("\x63\x61\x6e\x76\x61\x73");canvas.width=Math.pow(2,parseInt(TL));canvas.height=Math.pow(2,parseInt(aY));var v9=canvas.getContext("\x32\x64");v9.drawImage(Lw,0,0,canvas.width,canvas.height);Lw=canvas;}C.bindTexture(C.TEXTURE_2D,this.Dz);if(this.Rc)C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,true);else C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,false);try{C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,Lw);}catch(N){this.loaded=false;this.Na=true;this.v.J3(false,this);this.v.s(N.name,"\x3c\x61\x20\x68\x72\x65\x66\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x65\x62\x67\x6c\x2d\x70\x75\x62\x6c\x69\x73\x68\x65\x72\x2e\x63\x6f\x6d\x2f\x41\x63\x63\x65\x73\x73\x45\x72\x72\x6f\x72\x73\x45\x6e\x2e\x68\x74\x6d\x6c\x27\x20\x74\x61\x72\x67\x65\x74\x3d\x27\x5f\x62\x6c\x61\x6e\x6b\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x63\x6f\x6c\x6f\x72\x3a\x23\x46\x46\x46\x46\x30\x30\x3b\x27\x3e"+N.message+"\x3c\x2f\x61\x3e","\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");return;}if(qk==true){C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR_MIPMAP_LINEAR);C.generateMipmap(C.TEXTURE_2D);}else{C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR);}this.v.J3(false,this);this.loaded=true;};this.Cr=function(oS,qk,flipY){var tq;this.Rc=flipY;this.v.J3(true,this);tq=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,tq);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);var Lw=new Image();CmiHelpers.addEventListener(Lw,"\x65\x72\x72\x6f\x72",this.EX,this);Lw.onload=function(cc,Lw,wv,qk){return function(){var C=wv.h;wv.XK=Lw.width/Lw.height;wv.wq=Lw.width;var TL=Math.log(Lw.width)/Math.LN2;var aY=Math.log(Lw.height)/Math.LN2;if((TL>parseInt(TL))||(aY>parseInt(aY))){var canvas=document.createElement("\x63\x61\x6e\x76\x61\x73");canvas.width=Math.pow(2,parseInt(TL));canvas.height=Math.pow(2,parseInt(aY));var v9=canvas.getContext("\x32\x64");v9.drawImage(Lw,0,0,canvas.width,canvas.height);Lw=canvas;}C.bindTexture(C.TEXTURE_2D,cc);if(wv.Rc)C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,true);else C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,false);try{C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,Lw);}catch(N){wv.loaded=false;wv.Na=true;wv.v.J3(false,this);wv.v.s(N.name,"\x3c\x61\x20\x68\x72\x65\x66\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x65\x62\x67\x6c\x2d\x70\x75\x62\x6c\x69\x73\x68\x65\x72\x2e\x63\x6f\x6d\x2f\x41\x63\x63\x65\x73\x73\x45\x72\x72\x6f\x72\x73\x45\x6e\x2e\x68\x74\x6d\x6c\x27\x20\x74\x61\x72\x67\x65\x74\x3d\x27\x5f\x62\x6c\x61\x6e\x6b\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x63\x6f\x6c\x6f\x72\x3a\x23\x46\x46\x46\x46\x30\x30\x3b\x27\x3e"+N.message+"\x3c\x2f\x61\x3e","\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");return;}if(qk==true){C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR_MIPMAP_LINEAR);C.generateMipmap(C.TEXTURE_2D);}else{C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR);}wv.R7=1;wv.loaded=true;wv.v.J3(false,wv);wv.v.sendCmiNotification("\x43\x4d\x49\x5f\x49\x4e\x46\x4f\x7c\x54\x65\x78\x74\x75\x72\x65\x4c\x6f\x61\x64\x65\x64\x7c"+wv.textureName+"\x7c");}}(tq,Lw,this,qk);try{Lw.src=oS;}catch(N){wv.loaded=false;wv.Na=true;wv.v.J3(false,this);wv.v.s(N.name,N.message,"\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");}this.Dz=tq;};this.uX=function(hB,qk,flipY,vq){var tq;this.Rc=flipY;this.v.J3(true,this);tq=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,tq);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);var Lw=new Image();CmiHelpers.addEventListener(Lw,"\x65\x72\x72\x6f\x72",this.EX,this);Lw.onload=function(cc,Lw,wv,qk,vq){return function(){var C=wv.h;wv.XK=Lw.width/Lw.height;wv.wq=Lw.width;var TL=Math.log(Lw.width)/Math.LN2;var aY=Math.log(Lw.height)/Math.LN2;if((TL>parseInt(TL))||(aY>parseInt(aY))||((aY!=TL)&&(vq==true))){var canvas=document.createElement("\x63\x61\x6e\x76\x61\x73");var v9=canvas.getContext("\x32\x64");if(vq==true){canvas.width=Math.pow(2,parseInt(Math.max(TL,aY)));canvas.height=canvas.width;var Py=0;var fK=0;var dA=canvas.width;var ir=canvas.height;if(Lw.width>Lw.height){ir=parseInt(canvas.height/wv.XK);fK=parseInt((canvas.height-ir)*0.5);this.La=fK;}else{dA=parseInt(canvas.width*wv.XK);Py=parseInt((canvas.width-dA)*0.5);this.l8=Py;}v9.drawImage(Lw,Py,fK,dA,ir);}else{canvas.width=Math.pow(2,parseInt(TL));canvas.height=Math.pow(2,parseInt(aY));v9.drawImage(Lw,0,0,canvas.width,canvas.height);}Lw=canvas;}C.bindTexture(C.TEXTURE_2D,cc);if(wv.Rc)C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,true);else C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,false);try{C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,Lw);}catch(N){wv.loaded=false;wv.Na=true;wv.v.J3(false,this);wv.v.s(N.name,"\x3c\x61\x20\x68\x72\x65\x66\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x65\x62\x67\x6c\x2d\x70\x75\x62\x6c\x69\x73\x68\x65\x72\x2e\x63\x6f\x6d\x2f\x41\x63\x63\x65\x73\x73\x45\x72\x72\x6f\x72\x73\x45\x6e\x2e\x68\x74\x6d\x6c\x27\x20\x74\x61\x72\x67\x65\x74\x3d\x27\x5f\x62\x6c\x61\x6e\x6b\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x63\x6f\x6c\x6f\x72\x3a\x23\x46\x46\x46\x46\x30\x30\x3b\x27\x3e"+N.message+"\x3c\x2f\x61\x3e","\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");return;}if(qk==true){C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR_MIPMAP_LINEAR);C.generateMipmap(C.TEXTURE_2D);}else{C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR);}wv.R7=1;wv.loaded=true;wv.v.J3(false,wv);wv.v.sendCmiNotification("\x43\x4d\x49\x5f\x49\x4e\x46\x4f\x7c\x54\x65\x78\x74\x75\x72\x65\x4c\x6f\x61\x64\x65\x64\x7c"+wv.textureName+"\x7c");}}(tq,Lw,this,qk,vq);try{Lw.src=hB;}catch(N){wv.loaded=false;wv.Na=true;wv.v.J3(false,this);wv.v.s(N.name,N.message,"\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");}this.Dz=tq;};this.gc=function(hB,qk,flipY,rotate,Hd){var tq;this.Rc=flipY;this.S6=false;this.Ub=false;if(rotate)this.S6=rotate;if(Hd)this.Ub=Hd;this.v.J3(true,this);tq=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,tq);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.REPEAT);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.REPEAT);var Lw=new Image();Lw.style.filter="\x67\x72\x61\x79\x73\x63\x61\x6c\x65\x28\x31\x30\x30\x25\x29";CmiHelpers.addEventListener(Lw,"\x65\x72\x72\x6f\x72",this.EX,this);Lw.onload=function(cc,Lw,wv,qk){return function(){var C=wv.h;wv.XK=Lw.width/Lw.height;wv.wq=Lw.width;if((wv.S6==true)||(wv.Ub==true)){var canvas=document.createElement("\x63\x61\x6e\x76\x61\x73");if(wv.S6==true){canvas.width=Lw.width;canvas.height=Lw.height;}else{canvas.width=Lw.height;canvas.height=Lw.width;}var v9=canvas.getContext("\x32\x64");if(wv.Ub==true)v9.filter="\x67\x72\x61\x79\x73\x63\x61\x6c\x65\x28\x31\x30\x30\x25\x29";if(wv.S6==true){v9.translate(Lw.height/2,Lw.width/2);v9.rotate(270*Math.PI/180);v9.drawImage(Lw,-Lw.width/2,-Lw.height/2);}else{v9.drawImage(Lw,0,0,canvas.width,canvas.height);}Lw=canvas;}var TL=Math.log(Lw.width)/Math.LN2;var aY=Math.log(Lw.height)/Math.LN2;if((TL>parseInt(TL))||(aY>parseInt(aY))){var canvas=document.createElement("\x63\x61\x6e\x76\x61\x73");canvas.width=Math.pow(2,parseInt(TL));canvas.height=Math.pow(2,parseInt(aY));var v9=canvas.getContext("\x32\x64");v9.drawImage(Lw,0,0,canvas.width,canvas.height);Lw=canvas;}C.bindTexture(C.TEXTURE_2D,cc);if(wv.Rc)C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,true);else C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,false);try{C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,Lw);}catch(N){wv.loaded=false;wv.Na=true;wv.v.J3(false,this);wv.v.s(N.name,"\x3c\x61\x20\x68\x72\x65\x66\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x65\x62\x67\x6c\x2d\x70\x75\x62\x6c\x69\x73\x68\x65\x72\x2e\x63\x6f\x6d\x2f\x41\x63\x63\x65\x73\x73\x45\x72\x72\x6f\x72\x73\x45\x6e\x2e\x68\x74\x6d\x6c\x27\x20\x74\x61\x72\x67\x65\x74\x3d\x27\x5f\x62\x6c\x61\x6e\x6b\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x63\x6f\x6c\x6f\x72\x3a\x23\x46\x46\x46\x46\x30\x30\x3b\x27\x3e"+N.message+"\x3c\x2f\x61\x3e","\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");return;}if(qk==true){C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR_MIPMAP_LINEAR);C.generateMipmap(C.TEXTURE_2D);}else{C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR);C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR);}wv.R7=1;wv.loaded=true;wv.v.J3(false,wv);wv.v.sendCmiNotification("\x43\x4d\x49\x5f\x49\x4e\x46\x4f\x7c\x54\x65\x78\x74\x75\x72\x65\x4c\x6f\x61\x64\x65\x64\x7c"+wv.textureName+"\x7c");}}(tq,Lw,this,qk);try{Lw.src=hB;}catch(N){wv.loaded=false;wv.Na=true;wv.v.J3(false,this);wv.v.s(N.name,N.message,"\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");}this.Dz=tq;};this.KQ=function(Y2,flipY,SV){var W6;this.Rc=flipY;W6=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_CUBE_MAP,W6);this.h.texImage2D(this.h.TEXTURE_CUBE_MAP_POSITIVE_X,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texImage2D(this.h.TEXTURE_CUBE_MAP_NEGATIVE_X,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texImage2D(this.h.TEXTURE_CUBE_MAP_POSITIVE_Y,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texImage2D(this.h.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texImage2D(this.h.TEXTURE_CUBE_MAP_POSITIVE_Z,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texImage2D(this.h.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,this.h.RGBA,1,1,0,this.h.RGBA,this.h.UNSIGNED_BYTE,new Uint8Array([120,120,120,0]));this.h.texParameteri(this.h.TEXTURE_CUBE_MAP,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_CUBE_MAP,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_CUBE_MAP,this.h.TEXTURE_MIN_FILTER,this.h.LINEAR);this.h.texParameteri(this.h.TEXTURE_CUBE_MAP,this.h.TEXTURE_MAG_FILTER,this.h.LINEAR);var qo=[[Y2[0],this.h.TEXTURE_CUBE_MAP_POSITIVE_X],[Y2[1],this.h.TEXTURE_CUBE_MAP_NEGATIVE_X],[Y2[2],this.h.TEXTURE_CUBE_MAP_POSITIVE_Y],[Y2[3],this.h.TEXTURE_CUBE_MAP_NEGATIVE_Y],[Y2[4],this.h.TEXTURE_CUBE_MAP_POSITIVE_Z],[Y2[5],this.h.TEXTURE_CUBE_MAP_NEGATIVE_Z]];for(var G=0;G<qo.length;G++){var face=qo[G][1];var Lw=new Image();Lw.onload=function(cc,face,Lw,wv,zo){return function(){var C=wv.h;C.bindTexture(C.TEXTURE_CUBE_MAP,cc);if(wv.Rc)C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,true);else C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,false);try{C.texImage2D(face,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,Lw);}catch(N){wv.loaded=false;wv.Na=true;wv.v.J3(false,this);wv.v.s(N.name,N.message,"\x53\x54\x44\x5f\x45\x52\x52\x52\x4f\x52");return;}wv.R7++;if(wv.R7==6){wv.loaded=true;if(zo==true)wv.v.PK(wv);}}}(W6,face,Lw,this,SV);CmiHelpers.addEventListener(Lw,"\x65\x72\x72\x6f\x72",this.EX,this);Lw.src=qo[G][0];}this.Dz=W6;};};var Yv=function(){var Nx=[];this.create=function(length,defaultValue){Nx=new Array(parseInt(length));if(defaultValue){for(var G=0;G<length;G++)Nx[G]=defaultValue;}};this.VO=function(pos,content){if((pos<0)||(pos>Nx.length))return-1;Nx[pos]=content;};this.create=function(length){Nx=new Array(parseInt(length));};this.append=function(fp){Nx.push(fp);return this;};this.toString=function(length){if(length){var jh=Nx.join("");return jh.substr(0,length);}else return Nx.join("");};};var jo=function(o){var oL="\x63\x6d\x69\x41\x6a\x61\x78\x52\x65\x73\x70\x6f\x6e\x73\x65";var q=o;this.getClassName=function(){return oL;};this.responseValue="";this.errorCode="";this.cmiData="";this.loadFromJSON=function(jsonObject){if(jsonObject.cmiClassName=="\x63\x6d\x69\x41\x6a\x61\x78\x52\x65\x73\x70\x6f\x6e\x73\x65"){if(jsonObject.responseValue)this.responseValue=jsonObject.responseValue;if(jsonObject.errorCode)this.errorCode=jsonObject.errorCode;if(jsonObject.cmiData)this.cmiData=jsonObject.cmiData;return 0;}else{q.s("\x43\x6d\x69\x41\x6a\x61\x78\x52\x65\x73\x70\x6f\x6e\x73\x65\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};};var Ps=function(){var oL="\x63\x6d\x69\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4c\x69\x73\x74\x45\x6e\x74\x72\x79";this.IU=new Array(0.0,0.0,0.0,1.0);this.Jg="";this.vW=null;this.E0=false;this.kl=0;this.fh=0;this.getClassName=function(){return oL;};};var CmiLayerObject=function(HR){var oL="\x63\x6d\x69\x4c\x61\x79\x65\x72\x4f\x62\x6a\x65\x63\x74";var dv=HR;this.getClassName=function(){return oL;};this.getLayerName=function(){return dv;};this.contentVisible=true;this.contentHighlighted=false;this.__=0;this.entityName=HR;this.Pw=false;this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x6c\x41\x79"){if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.lNm)dv=jsonObject.lNm;if(!(typeof jsonObject.cVi==="\x75\x6e\x64\x65\x66\x69\x6e\x65\x64"))this.contentVisible=jsonObject.cVi;return 0;}else{this.v.s("\x43\x6d\x69\x4c\x61\x79\x65\x72\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};};var CmiBaseObject=function(){this.color=new Array(0.4,0.4,0.4,1.0);this.__=0;this.entityName="";this.E6="";this.e7="";this.iq="";this.v=null;this.yu=false;this.BS=null;this.isHighlighted=false;this.Bb=false;this.gV=true;this.cmiType=-1;this.shaderObject=null;this.h=null;this.ib=null;this.lP=null;this.P=null;this.jT=null;this.a9=null;this.nL=true;this.CB=false;this.Z7=false;this.Pw=false;this.zz="";this.Fx=null;this.isComponentObject=false;this.w0=0;this.drawBoundingBox=false;this.FA="";this.attributes=new Array();this.size=0.0;this.KA=0.0;this.Ox=new Array(0.0,0.0,0.0);this.Qr=null;this.Cf=null;var H9=null;var zQ=new Array(0.0,0.0,0.0);var cA=new Array(0.0,0.0,0.0);var MU=new Array(0.0,0.0,0.0);var u3=new Array(0.0,0.0,0.0);var Ck=null;var LR=null;var j1=new Array(0,0,0,0);var LY=null;var Ys=null;var yy=null;var Fe=0.0;var v_=new Array(0.0,0.0,0.0);var b5=0.0;var SK=0.0;var jA=null;this.getParentModel=function(){return this.BS;};this.getInfoText=function(){return this.e7;};this.setInfoText=function(WG){this.e7=WG;};this.getSelectionInfo=function(){return this.E6;};this.getUrlInfo=function(){return this.iq;};this.setSelectionInfo=function(Qy){this.E6=Qy;};this.setUrlInfo=function(N7){this.iq=N7;};this.getLayer=function(){return this.ib;};this.getType=function(){return this.cmiType;};this.getCenterPoint=function(){return this.Ox;};this.G4=function(){if(this.Qr!=null)return this.Qr[0];else return this.Ox;};this.RQ=function(){if(this.Qr!=null)return this.Qr[6];else return this.Ox;};this.setVisibility=function(visible){if(visible===true)this.gV=true;else this.gV=false;};this.getUid=function(){return this.FA;};this.setUid=function(uId,X7){this.FA=uId;if((X7==true)&&(this.cmiType==18)){this.gq(undefined,uId);}};this.t8=function(){this.FA=Date.now().toString(36)+Math.random().toString(36).substring(2);};this.getPropertyValue=function(propertyName){if(propertyName==null)return undefined;for(var G=0;G<this.attributes.length;G++){if(this.attributes[G].getKey()==propertyName){return this.attributes[G].getValue();}}return undefined;};this.setPropertyValue=function(propertyName,kN){for(var G=0;G<this.attributes.length;G++){if(this.attributes[G].getKey()==propertyName){this.attributes[G].setValue(kN);return;}}var Kf=new CmiProperty();Kf.setKey(propertyName);Kf.setValue(kN);this.attributes.push(Kf);};this.Pu=function(K_){this.attributes=new Array();let Kf=null;if(K_.length>0){if(typeof K_[0]==="\x73\x74\x72\x69\x6e\x67"){for(let G=0;G<K_.length;G++){Kf=new CmiProperty();Kf.setKey(K_[G]);G++;Kf.setValue(K_[G]);this.attributes.push(Kf);};}else{for(let G=0;G<K_.length;G++){Kf=new CmiProperty();Kf.loadFromJSON(K_[G]);this.attributes.push(Kf);};}}};this.VQ=function(){var K_=new Array();var ve=null;for(let G=0;G<this.attributes.length;G++){ve=new Object();ve.key=this.attributes[G].getKey();ve.val=this.attributes[G].getValue();ve.ttl=this.attributes[G].getTitel();K_.push(ve);};return K_;};this.resetHighlight=function(){this.isHighlighted=false;this.Bb=false;if(this.cmiType==18)this.R1();};this.uv=function(jW,o6,op){var ah=new Array(jW[0],jW[1],jW[2]);var fl=new Array(o6[0],jW[1],jW[2]);var nz=new Array(o6[0],o6[1],jW[2]);var HT=new Array(jW[0],o6[1],jW[2]);var Ro=new Array(jW[0],jW[1],o6[2]);var z5=new Array(o6[0],jW[1],o6[2]);var Gk=new Array(o6[0],o6[1],o6[2]);var ZO=new Array(jW[0],o6[1],o6[2]);if(op!=null){mat4.multiplyVec3(op,ah);mat4.multiplyVec3(op,fl);mat4.multiplyVec3(op,nz);mat4.multiplyVec3(op,HT);mat4.multiplyVec3(op,Ro);mat4.multiplyVec3(op,z5);mat4.multiplyVec3(op,Gk);mat4.multiplyVec3(op,ZO);}this.Qr=new Array(ah,fl,nz,HT,Ro,z5,Gk,ZO);};this.Mi=function(Sk,dU,NB,R5){var JK=this.Qr[dU][0]-this.Qr[Sk][0];var Sy=this.Qr[dU][1]-this.Qr[Sk][1];var QT=this.Qr[dU][2]-this.Qr[Sk][2];var bF=this.Qr[NB][0]-this.Qr[Sk][0];var Ac=this.Qr[NB][1]-this.Qr[Sk][1];var BA=this.Qr[NB][2]-this.Qr[Sk][2];var Nj=this.Qr[NB][0]-this.Qr[dU][0];var vp=this.Qr[NB][1]-this.Qr[dU][1];var c0=this.Qr[NB][2]-this.Qr[dU][2];if(((JK==0.0)&&(Sy==0.0)&&(QT==0.0))||((bF==0.0)&&(Ac==0.0)&&(BA==0.0))||((Nj==0.0)&&(vp==0.0)&&(c0==0.0)))return-1;R5[0]=(Sy*BA)-(QT*Ac);R5[1]=(QT*bF)-(JK*BA);R5[2]=(JK*Ac)-(Sy*bF);R5[3]=-((this.Qr[dU][0]*R5[0])+(this.Qr[dU][1]*R5[1])+(this.Qr[dU][2]*R5[2]));if((R5[0]==0.0)&&(R5[1]==0.0)&&(R5[2]==0.0))return-1;return 0;};this.nu=function(){if(this.Qr.length!=8)return;var zC=new Array(0.0,0.0,0.0,0.0);var o5=new Array(0.0,0.0,0.0,0.0);var PG=new Array(0.0,0.0,0.0,0.0);var tC=new Array(0.0,0.0,0.0,0.0);var pd=new Array(0.0,0.0,0.0,0.0);var j0=new Array(0.0,0.0,0.0,0.0);var MO=new Array(0.0,0.0,0.0,0.0);if(this.Mi(2,1,0,MO)==0){zC[0]=MO[0];zC[1]=MO[1];zC[2]=MO[2];zC[3]=MO[3];}if(this.Mi(1,2,6,MO)==0){o5[0]=MO[0];o5[1]=MO[1];o5[2]=MO[2];o5[3]=MO[3];}if(this.Mi(4,5,6,MO)==0){PG[0]=MO[0];PG[1]=MO[1];PG[2]=MO[2];PG[3]=MO[3];}if(this.Mi(4,7,3,MO)==0){tC[0]=MO[0];tC[1]=MO[1];tC[2]=MO[2];tC[3]=MO[3];}if(this.Mi(0,1,5,MO)==0){pd[0]=MO[0];pd[1]=MO[1];pd[2]=MO[2];pd[3]=MO[3];}if(this.Mi(3,7,6,MO)==0){j0[0]=MO[0];j0[1]=MO[1];j0[2]=MO[2];j0[3]=MO[3];}this.Cf=new Array(zC,o5,PG,tC,pd,j0);};this.isPointInsideBoundary=function(Cb,qn,kX){cA[0]=Cb;cA[1]=qn;cA[2]=kX;Fe=CmiHelpers.calculate3dDistance(cA,this.Ox);if(Fe>this.KA)return false;if(this.Qr==null)return false;if(this.Cf==null)this.nu();var G;for(G=0;G<6;G++){if((this.Cf[G][0]*Cb+this.Cf[G][1]*qn+this.Cf[G][2]*kX+this.Cf[G][3])>0)return false;}return true;};this.setLayer=function(HR){var Zt=this.v.getCmiModel();this.ib=Zt.getLayer(HR);};this.getFullEntityName=function(){var AV=new Array();var ly;var bp;var Jg="";AV.push(this.entityName);ly=this.BS;if(ly!=null)bp=this.BS.xY;while((ly!=null)&&(bp!=null)){AV.push(bp.entityName);ly=bp.BS;if(ly!=null)bp=ly.xY};Jg=Jg+AV.pop();while(AV.length>0){Jg=Jg+"\x2e"+AV.pop();};return Jg;};this.getColor=function(){if((this.CB)&&(this.a9!=null))return this.a9;else if(this.isHighlighted==true)return this.v.hlColIni;else if(this.Bb==true)return this.v.zp;else if(this.Z7)return this.v.MG;else if((this.ib!=null)&&(this.ib.contentHighlighted==true))return this.v.hlColIni;else{var ly=null;var bp=null;ly=this.BS;if(ly!=null)bp=this.BS.xY;while((ly!=null)&&(bp!=null)){if((bp.CB)&&(bp.a9!=null))return bp.a9;else if(bp.isHighlighted==true)return this.v.hlColIni;else if(bp.Bb==true)return this.v.zp;else{ly=bp.BS;if(ly!=null)bp=ly.xY}};}if(this.v.ownColor==true)return this.color;else{var ly=null;var bp=null;var pC=this.color;ly=this.BS;if(ly!=null)bp=this.BS.xY;while((ly!=null)&&(bp!=null)){if(bp.rJ==true)pC=bp.color;ly=bp.BS;if(ly!=null)bp=ly.xY};return pC;}};this.Xk=function(){return this.v.getCmiModel().Sg;};this.qw=function(L_){if(L_){if(this.v.xb(this.getClassName())==false)return false;}if(this.cmiType==10){if((this.gV==true)&&(this.v.showModelLocators==true)){if(this.v.currentModelTemplateCategory==0)return true;for(var G=0;G<this.DD.length;G++){if((this.v.currentModelTemplateCategory==this.DD[G])||(this.DD[G]==0))return true;}}return false;}if(this.gV==false)return false;else if((this.ib!=null)&&(this.ib.contentVisible==false))return false;else{var ly;var bp;ly=this.BS;if(ly!=null)bp=this.BS.xY;while((ly!=null)&&(bp!=null)){if(bp.gV==false)return false;else{ly=bp.BS;if(ly!=null)bp=ly.xY}};}return true;};this.IS=function(useViewportCulling){if(this.size>0.0){if((this.v.useSizeCulling==true)||(useViewportCulling==true)){if(this.v.useSizeCulling==true){if(this.size<this.v.minGeoSizeToDisplay)return false;if((this.v.isOrthoView==true)&&(this.size<this.v.bE))return false;}if((useViewportCulling==true)||((this.cmiType==19)&&(this.Au==true))){Ck=this.v.jD();this.v.cz(this.Ox,this.KA);if((this.v.getFirstPersonViewState()==true)&&(this.v.useBackPlaneCulling==true)){if(jA==null)jA=new mat4.create();if((this.Pw==true)||(this.isComponentObject==true)){mat4.identity(jA);mat4.multiply(jA,this.v.Oo);mat4.multiply(jA,Ck);mat4.multiplyVec3(jA,this.v.fP,zQ);H9=zQ;}else{H9=this.v.fP;}yy=this.v.sB();Ys=this.v.getCurrentViewerPosition();Fe=CmiHelpers.calculate3dDistance(Ys,H9);b5=1/Fe;v_[0]=H9[0]-Ys[0];v_[1]=H9[1]-Ys[1];v_[2]=H9[2]-Ys[2];v_[0]*=b5;v_[1]*=b5;v_[2]*=b5;b5=yy[0]*v_[0]+yy[1]*v_[1]+yy[2]*v_[2];SK=Math.acos(b5);if(SK>1.57079632679489661923){return false;}}LR=this.v.uf();j1[2]=this.v.Rg().width;j1[3]=this.v.Rg().height;GLU.project(this.v.fP[0],this.v.fP[1],this.v.fP[2],Ck,LR,j1,cA);MU[0]=cA[0];MU[1]=cA[1];u3[0]=cA[0];u3[1]=cA[1];GLU.project(this.v.oC[0],this.v.oC[1],this.v.oC[2],Ck,LR,j1,cA);MU[0]=Math.min(MU[0],cA[0]);u3[0]=Math.max(u3[0],cA[0]);MU[1]=Math.min(MU[1],cA[1]);u3[1]=Math.max(u3[1],cA[1]);GLU.project(this.v.hw[0],this.v.hw[1],this.v.hw[2],Ck,LR,j1,cA);MU[0]=Math.min(MU[0],cA[0]);u3[0]=Math.max(u3[0],cA[0]);MU[1]=Math.min(MU[1],cA[1]);u3[1]=Math.max(u3[1],cA[1]);GLU.project(this.v.yW[0],this.v.yW[1],this.v.yW[2],Ck,LR,j1,cA);MU[0]=Math.min(MU[0],cA[0]);u3[0]=Math.max(u3[0],cA[0]);MU[1]=Math.min(MU[1],cA[1]);u3[1]=Math.max(u3[1],cA[1]);GLU.project(this.v.J6[0],this.v.J6[1],this.v.J6[2],Ck,LR,j1,cA);MU[0]=Math.min(MU[0],cA[0]);u3[0]=Math.max(u3[0],cA[0]);MU[1]=Math.min(MU[1],cA[1]);u3[1]=Math.max(u3[1],cA[1]);GLU.project(this.v.ws[0],this.v.ws[1],this.v.ws[2],Ck,LR,j1,cA);MU[0]=Math.min(MU[0],cA[0]);u3[0]=Math.max(u3[0],cA[0]);MU[1]=Math.min(MU[1],cA[1]);u3[1]=Math.max(u3[1],cA[1]);this.w0=Math.max(Math.abs(MU[0]-u3[0]),Math.abs(MU[1]-u3[1]));if(this.v.useSizeCulling==true){if(this.w0<this.v.minSizeToDisplay)return false;}if(u3[1]<0)return false;if(MU[1]>j1[3])return false;if(MU[0]>j1[2])return false;if(u3[0]<0)return false;}}return true;}else{return false;}};this.yI=function(Cp,Dt,qc){var WO=this.v.getShader("\x4c\x69\x6e\x65");var zs=this.v.getShader("\x50\x6f\x69\x6e\x74");if(Cp){this.v.cz(this.Ox,this.KA);CmiHelpers.vj(this.Ox,this.v.J6,[1.0,0.0,0.0,1.0],WO,zs,this.h);CmiHelpers.vj(this.Ox,this.v.ws,[0.0,1.0,0.0,1.0],WO,zs,this.h);CmiHelpers.vj(this.Ox,this.v.hw,[0.0,0.0,1.0,1.0],WO,zs,this.h);CmiHelpers.vj(this.Ox,this.v.yW,[1.0,0.0,1.0,1.0],WO,zs,this.h);CmiHelpers.vj(this.Ox,this.v.oC,[1.0,1.0,1.0,1.0],WO,zs,this.h);CmiHelpers.vj(this.Ox,this.v.fP,[0.0,1.0,1.0,1.0],WO,zs,this.h);}if(this.isHighlighted){if(Dt)CmiHelpers.Cn(this.Ox,this.size,[1.0,0.0,0.0,1.0],WO,this.h);if(qc)CmiHelpers.drawBoundingBox(this.Qr,this.size,[1.0,0.0,0.0,1.0],WO,this.h);}else{if(Dt)CmiHelpers.Cn(this.Ox,this.size,[1.0,1.0,0.0,1.0],WO,this.h);if(qc)CmiHelpers.drawBoundingBox(this.Qr,this.size,[1.0,1.0,0.0,1.0],WO,this.h);}};this.IP=function(baseName){var UB="";if(baseName.indexOf("\x62\x61\x73\x65\x36\x34\x2c")!=-1){return baseName;}if(baseName.indexOf("\x2e\x2f")!=-1){var xI=baseName.replace("\x2e\x2f","");var EJ=this.BS.E_();if(EJ.length==0){var k="\x43\x4d\x49\x5f\x49\x4e\x46\x4f\x7c\x4c\x6f\x63\x61\x6c\x54\x65\x78\x74\x75\x72\x65\x4e\x6f\x74\x46\x6f\x75\x6e\x64\x7c"+xI+"\x7c"+this.getFullEntityName();this.v.sendCmiNotification(k);return(this.v.getBitmapDirectory()+"\x2f\x47\x65\x6e\x65\x72\x69\x63\x54\x65\x78\x74\x75\x72\x65\x2e\x6a\x70\x67");}else{return(EJ+"\x2f"+xI);}}if(baseName.indexOf("\x47\x65\x6e\x65\x72\x69\x63")!=-1){UB=this.v.getBitmapDirectory();}else{UB=this.v.AG();}if(baseName.indexOf("\x2e")!=-1){return(UB+"\x2f"+baseName);}else{return(UB+"\x2f"+baseName+"\x2e\x6a\x70\x67");}};};var CmiGrepObject=function(o){var oL="\x63\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74";var ET=new Array();var oO=new Jo(o);ET.push(oO);var d1=null;var kC=false;var eX=null;var U2=null;var Jx=null;var bM=null;var e2=null;var G9=null;var Qx=false;var _i=false;var oM=false;var Op=false;var tl=null;var UC=null;var su=null;var ai=null;var Z9=null;var F4=null;var M1=false;var Zi=false;var qH=false;var tO=false;var mD=null;var zZ=-1.0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();var Ty=null;var BF=null;var _a=false;var Kw=null;var Ev=null;var Zw=null;var Qg=20.0;this.Au=false;this.ME=function(){return oO.nj;};this.getClassName=function(){return oL;};this.eQ=function(){return U2;};this.WW=function(){return bM;};this.rZ=function(){return G9;};this.getNrOfTriangles=function(){return oO.ba;};this.sO=function(){return Op;};this.setColor=function(J_){this.color=J_;};this.setTexture=function(textureName){U2=this.v.getPreloadedTexture(textureName);if(U2!=null){eX=textureName;Qx=true;}};this.T8=function(textureName){bM=this.v.getPreloadedTexture(textureName);if(bM!=null){Jx=textureName;_i=true;}};this.gi=function(textureName){G9=this.v.getPreloadedTexture(textureName);if(G9!=null){e2=textureName;if(textureName=="\x47\x65\x6e\x65\x72\x69\x63\x42\x75\x6d\x70\x4d\x61\x70")Op=true;else Op=false;oM=true;}};this.v=o;this.h=o.q9();this.cmiType=19;this.attributes=new Array();Qg=this.v.locatorPointSize;d1=this.v.getShader("\x43\x6f\x6c\x6f\x72\x33\x44");Zw=this.v.getShader("\x56\x65\x72\x74\x65\x78\x43\x6f\x6c\x6f\x72");this.zE=function(startIndex){if(ET.length>0){let p8=ET[0];p8.zE(startIndex);return p8.Lr();}else return 0;};this.zR=function(oK){this.v.N3[3]=0;if(ET.length>0){let p8=ET[0];let v3=this.v.selectionTolerance;let cC=p8.T4();let r0=p8.Lr();let gH=(oK-p8.Hb)/v3;if((gH>=0)&&(gH<=r0-1)){this.v.N3[0]=cC[gH*3+0];this.v.N3[1]=cC[gH*3+1];this.v.N3[2]=cC[gH*3+2];this.v.N3[3]=1;}}};this.MZ=function(Sn){for(var G=0;G<ET.length;G++){if((ET[G].nj==false)||((Sn==true)&&(ET[G].i9==false))){ET[G].YE();}}};this.Bi=function(){for(var G=0;G<ET.length;G++){ET[G].Bi();}};this.b_=function(){for(var G=0;G<ET.length;G++){ET[G].b_();}};this.setShader=function(QK){if(!QK){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x73\x68\x61\x64\x65\x72\x20\x67\x69\x76\x65\x6e","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(QK.usable==false){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x53\x68\x61\x64\x65\x72\x20\x6e\x6f\x74\x20\x75\x73\x61\x62\x6c\x65","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}switch(QK.aN){case "\x53\x6b\x79\x42\x6f\x78":case "\x42\x67\x49\x6d\x61\x67\x65":U2=QK.Jm();Qx=true;_a=true;break;case "\x54\x65\x78\x74\x75\x72\x65\x33\x44":case "\x50\x72\x6f\x6a\x65\x63\x74\x65\x64\x54\x65\x78\x74\x75\x72\x65\x33\x44":if(eX==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x61\x6d\x65\x20\x6e\x6f\x74\x20\x67\x69\x76\x65\x6e\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}U2=this.v.getTexture(eX);if(U2==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x74\x65\x78\x74\x75\x72\x65\x20\x66\x6f\x75\x6e\x64\x20"+eX+"\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}else eX=U2.textureName;if(U2.Na){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x6f\x74\x20\x66\x6f\x75\x6e\x64\x20\x28\x6c\x6f\x61\x64\x20\x65\x72\x72\x6f\x72\x29\x20"+eX+"\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(oO.wH()==0){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x74\x65\x78\x74\x75\x72\x65\x20\x63\x6f\x6f\x72\x64\x69\x6e\x61\x74\x65\x73\x20\x67\x69\x76\x65\x6e\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(QK.aN=="\x50\x72\x6f\x6a\x65\x63\x74\x65\x64\x54\x65\x78\x74\x75\x72\x65\x33\x44"){var C1=0;C1=oO.js();if(C1!=0){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x43\x61\x6e\x6e\x6f\x74\x20\x63\x72\x65\x61\x74\x65\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x74\x65\x78\x74\x75\x72\x65\x20\x61\x72\x72\x61\x79\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}this.Q4();}Qx=true;break;case "\x47\x65\x6e\x65\x72\x69\x63":case "\x47\x65\x6e\x65\x72\x69\x63\x4e\x6f\x52\x65\x66\x6c\x65\x63\x74":case "\x57\x61\x76\x65\x66\x72\x6f\x6e\x74\x42\x75\x6d\x70":if(oO.nj==false){oO.RL();this.nj=false;}if(Jx==null){Jx=this.v.getBitmapDirectory()+"\x2f\x47\x65\x6e\x65\x72\x69\x63\x54\x65\x78\x74\x75\x72\x65\x2e\x6a\x70\x67";}bM=this.v.getTexture(Jx);if(bM==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x74\x65\x78\x74\x75\x72\x65\x20\x66\x6f\x75\x6e\x64\x20"+Jx+"\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(bM.Na){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x6f\x74\x20\x66\x6f\x75\x6e\x64\x20\x28\x6c\x6f\x61\x64\x20\x65\x72\x72\x6f\x72\x29\x20"+Jx+"\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(e2==null){e2=this.v.getBitmapDirectory()+"\x2f\x47\x65\x6e\x65\x72\x69\x63\x42\x75\x6d\x70\x4d\x61\x70\x2e\x6a\x70\x67";Op=true;}else if(e2.indexOf("\x47\x65\x6e\x65\x72\x69\x63\x42\x75\x6d\x70\x4d\x61\x70")!=-1){Op=true;}G9=this.v.getTexture(e2);if(G9==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x74\x65\x78\x74\x75\x72\x65\x20\x66\x6f\x75\x6e\x64\x20"+e2+"\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(G9.Na){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x6f\x74\x20\x66\x6f\x75\x6e\x64\x20\x28\x6c\x6f\x61\x64\x20\x65\x72\x72\x6f\x72\x29\x20"+e2+"\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if((this.Fx!=null)&&(this.Fx.transparency!=null)){zZ=this.color[3];this.color[3]=1.0-parseFloat(this.Fx.transparency);}_i=true;oM=true;break;case "\x47\x6c\x61\x73\x73":zZ=this.color[3];this.color[3]=0.0;break;default:if(zZ!=-1.0){this.color[3]=zZ;zZ=-1.0;}break;}if((this.Fx!=null)&&(this.Fx.useCalculatedUvCoords!=null)){if(this.Fx.useCalculatedUvCoords==true)this.Bi();else this.b_();}if(QK.uF==true){var C1=0;C1=oO.GD();if(C1!=0){kC=false;this.Q4();this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x45\x72\x72\x6f\x72\x20\x64\x65\x66\x69\x6e\x69\x6e\x67\x20\x74\x61\x6e\x67\x65\x6e\x74\x20\x61\x72\x72\x61\x79\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}this.Q4();kC=true;}this.shaderObject=QK;return 0;};this.L9=function(){this.b_();if(Ev!=null){this.Fx=Ev;if(this.Fx.baseTexture!=undefined){Jx=this.IP(this.Fx.baseTexture);}if(this.Fx.normalMap!=undefined){e2=this.IP(this.Fx.normalMap);}if(this.Fx.transparency!=undefined){zZ=this.color[3];this.color[3]=1.0-parseFloat(this.Fx.transparency);}}if(Kw!=null){if(this.setShader(Kw)!=0){this.shaderObject=this.v.getShader("\x43\x6f\x6c\x6f\x72\x33\x44");}else if(Kw.aN=="\x47\x6c\x61\x73\x73"){zZ=this.color[3];this.color[3]=0.0;}}this.Q4();};this.pJ=function(z7){tl=eX;UC=U2;su=Jx;ai=bM;Z9=e2;F4=G9;M1=Qx;Zi=_i;qH=oM;tO=Op;BF=this.shaderObject;mD=this.Fx;eX=z7.textureName;U2=z7.cc;Jx=z7.HA;bM=z7.BY;e2=z7.Qz;G9=z7.normalMap;Qx=z7.Vi;_i=z7.Q9;oM=z7.Et;Op=z7.R3;this.Fx=z7.Fx;return(this.setShader(z7.shaderObject));};this._3=function(){eX=tl;U2=UC;Jx=su;bM=ai;e2=Z9;G9=F4;Qx=M1;_i=Zi;oM=qH;Op=tO;this.Fx=mD;this.setShader(BF);};this.defineFrom3dGeometry=function(tS,entityName){if(this.v.p5()==false){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x46\x72\x6f\x6d\x33\x64\x47\x65\x6f\x6d\x65\x74\x72\x79","\x4e\x6f\x20\x70\x72\x6f\x64\x75\x63\x74\x20\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x74\x69\x6f\x6e\x20\x6c\x69\x63\x65\x6e\x73\x65\x20\x61\x76\x61\x69\x6c\x61\x62\x6c\x65","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if((tS==null)||(tS.getClassName()!="\x63\x6d\x69\x33\x64\x47\x65\x6f\x6d\x65\x74\x72\x79")){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x46\x72\x6f\x6d\x33\x64\x47\x65\x6f\x6d\x65\x74\x72\x79","\x57\x72\x6f\x6e\x67\x20\x6f\x62\x6a\x65\x63\x74\x20\x74\x79\x70\x65","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}oO.defineFrom3dGeometry(tS,entityName);if(oO.isUsable==false){return-1;}this.__=0;this.entityName=entityName;this.color=new Array(1.0,1.0,1.0,1.0);this.shaderObject=this.v.getShader("\x43\x6f\x6c\x6f\x72\x33\x44");this.uv(oO.G4(),oO.RQ());this.Ox=oO.getCenterPoint();this.size=oO.xf();this.KA=this.size*0.5;this.yu=true;return 0;};this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x67\x52"){if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;if(this.color[3]==undefined)this.color[3]=1.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());var UB="";if(jsonObject.tEx){eX=this.IP(jsonObject.tEx);var aJ=jsonObject.tEx;}oO.loadFromJSON(jsonObject);if(oO.isUsable==false){return-1;}if(oO.wH()>0)this.nj=true;else this.nj=false;this.uv(oO.G4(),oO.RQ());if(this.v.useSizeCulling==true){var mI=new Jo(this.v);mI.sR(this);this.Uk(mI);}if(jsonObject.shPar){Ev=jsonObject.shPar;this.Fx=jsonObject.shPar;if(this.Fx.baseTexture!=undefined){Jx=this.IP(this.Fx.baseTexture);}if(this.Fx.normalMap!=undefined){e2=this.IP(this.Fx.normalMap);}if(this.Fx.transparency!=undefined){zZ=this.color[3];this.color[3]=1.0-parseFloat(this.Fx.transparency);}}if(jsonObject.shNm){var QK=this.v.getShader(jsonObject.shNm);if(this.setShader(QK)!=0){this.shaderObject=this.v.getShader("\x43\x6f\x6c\x6f\x72\x33\x44");}else if(QK.aN=="\x47\x6c\x61\x73\x73"){zZ=this.color[3];this.color[3]=0.0;}Kw=this.shaderObject;}this.Ox=oO.getCenterPoint();this.size=oO.xf();this.KA=this.size*0.5;this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.getJsonString=function(){return JSON.stringify(this.getJsonObject());};this.getJsonObject=function(){var O_={"\x63\x6c\x4e\x6d":"\x67\x52","\x61\x4e\x72":this.__,"\x65\x4e\x6d":this.entityName,"\x73\x54\x78":this.E6,"\x68\x52\x66":this.iq,"\x63\x6f\x6c":this.color,"\x73\x69\x5a":this.size,"\x73\x68\x4e\x6d":this.shaderObject.aN,"\x6e\x72\x54\x72":oO.ba,"\x74\x52":oO.xa(),"\x76\x41":oO.kI(),"\x6e\x41":oO.Bd()};var SE=oO.od();if(SE.length>0)O_.tA=SE;if(eX!=null)O_.tEx=eX;if(this.ib!=null)O_.lAn=this.ib.getLayerName();if(this.attributes.length>0)O_.attribs=this.VQ();return O_;};this.QD=function(){for(var G=0;G<ET.length;G++){ET[G].QD();}};this.Q4=function(){for(var G=0;G<ET.length;G++){ET[G].Q4();}};this.Uk=function(h6){var FM=ET.length;var Uv=null;for(var G=FM-1;G>=0;G--){Uv=ET[G];if(Uv.XI==h6.XI){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x61\x64\x64\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e","\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x20"+h6.entityName+"\x66\x6f\x72\x20\x53\x69\x7a\x65\x3d"+h6.XI+"\x20\x61\x6c\x72\x65\x61\x64\x79\x20\x70\x72\x65\x73\x65\x6e\x74","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return(-1);}else if(Uv.XI>h6.XI){ET.push(h6);this.Au=true;ET.sort(RB);return(0);}}this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x61\x64\x64\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e","\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x20"+h6.entityName+"\x66\x6f\x72\x20\x53\x69\x7a\x65\x3d"+h6.XI+"\x20\x6e\x6f\x74\x20\x61\x64\x64\x65\x64","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return(-1);};var RB=function(a,b){if(a.XI==b.XI)return 0;else if(a.XI>b.XI)return-1;else return 1;};this.nb=function(QI){if(QI==0){oO=ET[0];}else if(ET.length>1){oO=ET[0];for(var G=0;G<ET.length;G++){if(ET[G].XI>QI){oO=ET[G];}else{G=ET.length;}}}};this.Li=function(tN,Wg,hi){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.da(Wg,tN);this.v.Za(true);tN.hE();this.da(Wg,tN);this.v.kF(true,true);}else{if(hi==true)this.es(Wg);this.da(Wg,tN);}return 0;};this.da=function(Wg,tN){tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,oO.m7);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);if(oO.Lt){this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,oO.fT);this.h.drawElements(this.h.TRIANGLES,oO.ba*3,this.h.UNSIGNED_SHORT,0);}else this.h.drawArrays(this.h.TRIANGLES,0,oO.ba*3);tN.PL(0);};this.es=function(Wg){let p8=ET[0];p8.QE();Zw.Np(Qg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,p8.m7);this.h.vertexAttribPointer(Zw.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,p8.J8);this.h.vertexAttribPointer(Zw.j2,3,this.h.FLOAT,false,0,0);if(p8.Lt){this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,p8.fT);this.h.drawElements(this.h.POINTS,p8.ba*3,this.h.UNSIGNED_SHORT,0);}else this.h.drawArrays(this.h.POINTS,0,p8.Lr());Zw.PL(0);};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(ET.length>1){this.nb(this.w0);}if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}if(this.drawBoundingBox==true)this.yI(false,false,true);Ty=this.Xk();if(Ty!=null){if(this.pJ(Ty)!=0){this._3();Ty=null;}}if(this.nL==false)this.h.disable(this.h.DEPTH_TEST);if((this.isHighlighted==true)||(this.Bb==true)||(this.CB==true)||(this.Z7==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true))||((Qx==true)&&(U2.loaded==false))||((_i==true)&&(bM.loaded==false))||((oM==true)&&(G9.loaded==false))){d1.Np(this,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,oO.m7);this.h.vertexAttribPointer(d1.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,oO._Y);this.h.vertexAttribPointer(d1.LX,3,this.h.FLOAT,false,0,0);if(oO.Lt==false){if(this.v.OY==true){this.v.TF(true,true);if(_a==true){this.v.jH(false);this.h.drawArrays(this.h.TRIANGLES,0,oO.ba*3);this.v.Za(false);this.h.drawArrays(this.h.TRIANGLES,0,oO.ba*3);}else{this.v.jH(true);d1.hE();this.h.drawArrays(this.h.TRIANGLES,0,oO.ba*3);this.v.Za(true);d1.hE();this.h.drawArrays(this.h.TRIANGLES,0,oO.ba*3);}this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,oO.ba*3);}}else{this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,oO.fT);if(this.v.OY==true){this.v.TF(true,true);if(_a==true){this.v.jH(false);this.h.drawElements(this.h.TRIANGLES,oO.ba*3,this.h.UNSIGNED_SHORT,0);this.v.Za(false);this.h.drawElements(this.h.TRIANGLES,oO.ba*3,this.h.UNSIGNED_SHORT,0);}else{this.v.jH(true);d1.hE();this.h.drawElements(this.h.TRIANGLES,oO.ba*3,this.h.UNSIGNED_SHORT,0);this.v.Za(true);d1.hE();this.h.drawElements(this.h.TRIANGLES,oO.ba*3,this.h.UNSIGNED_SHORT,0);}this.v.kF(true,true);}else{this.h.drawElements(this.h.TRIANGLES,oO.ba*3,this.h.UNSIGNED_SHORT,0);}}d1.PL(0);}else{{this.shaderObject.Np(this,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,oO.m7);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);if(this.shaderObject.LX!=null){this.h.bindBuffer(this.h.ARRAY_BUFFER,oO._Y);this.h.vertexAttribPointer(this.shaderObject.LX,3,this.h.FLOAT,false,0,0);}if(this.shaderObject.rD!=null){this.h.bindBuffer(this.h.ARRAY_BUFFER,oO.GV);this.h.vertexAttribPointer(this.shaderObject.rD,2,this.h.FLOAT,false,0,0);}if(this.shaderObject.tE!=null){this.h.bindBuffer(this.h.ARRAY_BUFFER,oO.dZ);this.h.vertexAttribPointer(this.shaderObject.tE,2,this.h.FLOAT,false,0,0);}if((kC)&&(this.shaderObject.r6!=null)){this.h.bindBuffer(this.h.ARRAY_BUFFER,oO.nO);this.h.vertexAttribPointer(this.shaderObject.r6,3,this.h.FLOAT,false,0,0);}if((kC)&&(this.shaderObject.Yr!=null)){this.h.bindBuffer(this.h.ARRAY_BUFFER,oO.Ga);this.h.vertexAttribPointer(this.shaderObject.Yr,3,this.h.FLOAT,false,0,0);}if(oO.Lt==false){if(this.v.OY==true){this.v.TF(true,true);if(_a==true){this.v.jH(false);this.h.drawArrays(this.shaderObject.i8,0,oO.ba*3);this.v.Za(false);this.h.drawArrays(this.shaderObject.i8,0,oO.ba*3);}else{this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.shaderObject.i8,0,oO.ba*3);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.shaderObject.i8,0,oO.ba*3);}this.v.kF(true,true);}else{this.h.drawArrays(this.shaderObject.i8,0,oO.ba*3);}}else{this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,oO.fT);if(this.v.OY==true){this.v.TF(true,true);if(_a==true){this.v.jH(false);this.h.drawElements(this.shaderObject.i8,oO.ba*3,this.h.UNSIGNED_SHORT,0);this.v.Za(false);this.h.drawElements(this.shaderObject.i8,oO.ba*3,this.h.UNSIGNED_SHORT,0);}else{this.v.jH(true);this.shaderObject.hE();this.h.drawElements(this.shaderObject.i8,oO.ba*3,this.h.UNSIGNED_SHORT,0);this.v.Za(true);this.shaderObject.hE();this.h.drawElements(this.shaderObject.i8,oO.ba*3,this.h.UNSIGNED_SHORT,0);}this.v.kF(true,true);}else{this.h.drawElements(this.shaderObject.i8,oO.ba*3,this.h.UNSIGNED_SHORT,0);}}this.shaderObject.PL(0);}}if(Ty!=null){this._3();}if(this.P!=null){this.v.kF(true,true);}if(this.nL==false)this.h.enable(this.h.DEPTH_TEST);return 0;};};CmiGrepObject.prototype=new CmiBaseObject();var Jo=function(o){var oL="\x63\x6d\x69\x47\x72\x65\x70\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e";var Wj=new Float32Array(0);var B=new Float32Array(0);var i3=new Float32Array(0);var Ti=new Float32Array(0);var ma=new Float32Array(0);var A3=new Float32Array(0);var Oe=new Uint32Array(0);var Jt=new Float32Array(0);var nX=new Float32Array(0);var tQ=new Float32Array(0);var o1=new Float32Array(0);var lH=tQ;var zP=new Uint16Array(0);var f4=new Uint32Array(0);this.i9=false;this.KC=false;this.nj=false;this.ba=0;this.isUsable=false;this.Hb=0;this.dQ="";this.entityName="";this.Lt=false;this.mu=false;this.m7=null;this.J8=null;this._Y=null;this.GV=null;this.dZ=null;this.fT=null;this.nO=null;this.Ga=null;var q=o;var I=o.q9();var nK=new Array(0.0,0.0,0.0);var tm=new Array(0.0,0.0,0.0);var Yh=new Array(0.0,0.0,0.0);var rk=0.0;var lZ=0.0;this.XI=10*Math.max(q.Rg().width,q.Rg().height);this.QE=function(){if(Wj.length==0)this.dn();};this.getClassName=function(){return oL;};this.wH=function(){if(this.nj==true)return lH.length;else return 0;};this.T4=function(){return B;};this.Md=function(){return Wj;};this.getCenterPoint=function(){return nK;};this.G4=function(){return tm;};this.RQ=function(){return Yh;};this.xf=function(){return rk;};this.bz=function(){return lZ;};this.Lr=function(){return B.length/3;};this.xa=function(){return Array.from(Oe);};this.kI=function(){return Array.from(B);};this.Bd=function(){return Array.from(i3);};this.od=function(){if(this.nj==true)return Array.from(lH);else return new Float32Array(0);};this.Bi=function(){lH=o1;};this.b_=function(){lH=tQ;};this.zE=function(startIndex){if((Wj.length==0)||(this.Hb!=startIndex)){this.Hb=startIndex;Wj=new Float32Array(0);this.Q4();}};this.dn=function(){var wr=new Float32Array(B.length);var count=B.length/3;var UJ=[0.0,0.0,0.0];var v3=q.selectionTolerance;for(let G=0;G<count;G++){CmiHelpers.Z4(G*v3+this.Hb,UJ);wr[3*G+0]=UJ[0];wr[3*G+1]=UJ[1];wr[3*G+2]=UJ[2];}Wj=wr;this.Q4();};this.RL=function(){lH=i3;};this.YE=function(){var eB=null;var _=new Object();var mw=new Object();var a2=new Object();var Vo,g3,R_,RO,rM,Ld;var lQ=0;var Kc=new Array(0.0,0.0,0.0);var fl=new Array(0.0,0.0,0.0);var nz=new Array(0.0,0.0,0.0);var HT=new Array(0.0,0.0,0.0);{this.EI();this.Lt=false;}eB=f4;var DJ=B.length/3;var kw=eB.length/3;o1=new Float32Array(parseInt(B.length/3*2)+1).fill(0);for(var G=0;G<eB.length;G++){lQ=eB[G];_.SL=B[lQ*3+0];_.uB=B[lQ*3+1];_.Zh=B[lQ*3+2];_.SM=B[lQ*3+0];_.Fh=B[lQ*3+1];_.xk=B[lQ*3+1];_.LF=B[lQ*3+2];_.Lf=B[lQ*3+0];_.z1=B[lQ*3+2];_.lQ=lQ;G++;lQ=eB[G];mw.SL=B[lQ*3+0];mw.uB=B[lQ*3+1];mw.Zh=B[lQ*3+2];mw.SM=B[lQ*3+0];mw.Fh=B[lQ*3+1];mw.xk=B[lQ*3+1];mw.LF=B[lQ*3+2];mw.Lf=B[lQ*3+0];mw.z1=B[lQ*3+2];mw.lQ=lQ;G++;lQ=eB[G];a2.SL=B[lQ*3+0];a2.uB=B[lQ*3+1];a2.Zh=B[lQ*3+2];a2.SM=B[lQ*3+0];a2.Fh=B[lQ*3+1];a2.xk=B[lQ*3+1];a2.LF=B[lQ*3+2];a2.Lf=B[lQ*3+0];a2.z1=B[lQ*3+2];a2.lQ=lQ;fl[0]=_.SL;fl[1]=_.uB;fl[2]=_.Zh;nz[0]=mw.SL;nz[1]=mw.uB;nz[2]=mw.Zh;HT[0]=a2.SL;HT[1]=a2.uB;HT[2]=a2.Zh;CmiHelpers.nW(fl,nz,HT,Kc);Kc[0]=Math.abs(Kc[0]);Kc[1]=Math.abs(Kc[1]);Kc[2]=Math.abs(Kc[2]);Vo=0.0;g3=0.0;R_=0.0;RO=0.0;rM=0.0;Ld=0.0;if((Kc[0]>Kc[1])&&((Kc[0]>Kc[2]))){o1[_.lQ*2+0]=_.xk;o1[_.lQ*2+1]=_.LF;o1[mw.lQ*2+0]=mw.xk;o1[mw.lQ*2+1]=mw.LF;o1[a2.lQ*2+0]=a2.xk;o1[a2.lQ*2+1]=a2.LF;}else if((Kc[1]>Kc[2])&&((Kc[1]>Kc[0]))){o1[_.lQ*2+0]=_.Lf;o1[_.lQ*2+1]=_.z1;o1[mw.lQ*2+0]=mw.Lf;o1[mw.lQ*2+1]=mw.z1;o1[a2.lQ*2+0]=a2.Lf;o1[a2.lQ*2+1]=a2.z1;}else{o1[_.lQ*2+0]=_.SM;o1[_.lQ*2+1]=_.Fh;o1[mw.lQ*2+0]=mw.SM;o1[mw.lQ*2+1]=mw.Fh;o1[a2.lQ*2+0]=a2.SM;o1[a2.lQ*2+1]=a2.Fh;}}this.i9=true;this.nj=true;};this.GD=function(){var C1=0;if(this.KC==true)return 0;if(this.nj==false){ma=i3;A3=i3;return 0;}if(this.Lt){this.EI();this.Lt=false;}if(f4.length==0){f4=new Uint32Array(this.ba*3);for(var G=0;G<this.ba*3;G++){f4[G]=G;}}C1=this.An(f4);if(C1==0)this.KC=true;return(C1);};this.js=function(){if(this.nj==false)return-1;if(Ti.length>0)return 0;var qL=lH.length/2;var D2=lH[0];var GB=lH[0];var pH=lH[1];var yj=lH[1];for(var G=0;G<qL;G++){if(lH[G*2]>GB)GB=lH[G*2];if(lH[G*2]<D2)D2=lH[G*2];if(lH[G*2+1]>pH)pH=lH[G*2+1];if(lH[G*2+1]<yj)yj=lH[G*2+1];}var m2=GB-D2;var _H=pH-yj;var Vq=1/Math.min(m2,_H);Ti=new Float32Array(lH.length);for(var G=0;G<qL;G++){Ti[G*2+0]=(lH[G*2]-D2)*Vq;Ti[G*2+1]=(lH[G*2+1]-yj)*Vq;}return 0;};this.An=function(iM){if(this.nj==false)return-1;if((i3.length==0)||(lH.length==0))return-1;var BQ=B.length/3;var Hc=new Float32Array(3);var Ee=new Float32Array(3);var XW=new Float32Array(2);var K5=new Float32Array(2);var wU=new Float32Array(3);var K3=new Float32Array(3);var ku=0.0;var ts=0.0;var N1=0.0;var q3=0.0;var qd,Sk,dU;var Xy,zy,bw;var Ss,ke,_c;var w9,yt,Ms;var wc,yT,nf;var AT,Ba,Ax;A3=new Float32Array(B.length);ma=new Float32Array(B.length);for(var G=0;G<BQ;G++){A3[G*3+0]=0.0;A3[G*3+1]=0.0;A3[G*3+2]=0.0;ma[G*3+0]=0.0;ma[G*3+1]=0.0;ma[G*3+2]=0.0;}for(var G=0;G<this.ba;G++){qd=iM[G*3+0];Sk=iM[G*3+1];dU=iM[G*3+2];Xy=qd*3;zy=Sk*3;bw=dU*3;w9=qd*2;yt=Sk*2;Ms=dU*2;Hc[0]=B[zy+0]-B[Xy+0];Hc[1]=B[zy+1]-B[Xy+1];Hc[2]=B[zy+2]-B[Xy+2];Ee[0]=B[bw+0]-B[Xy+0];Ee[1]=B[bw+1]-B[Xy+1];Ee[2]=B[bw+2]-B[Xy+2];XW[0]=lH[yt+0]-lH[w9+0];XW[1]=lH[yt+1]-lH[w9+1];K5[0]=lH[Ms+0]-lH[w9+0];K5[1]=lH[Ms+1]-lH[w9+1];ku=XW[0]*K5[1]-K5[0]*XW[1];if(Math.abs(ku)<0.000001){wU[0]=1.0;wU[1]=0.0;wU[2]=0.0;K3[0]=0.0;K3[1]=1.0;K3[2]=0.0;}else{ku=1.0/ku;wU[0]=(K5[1]*Hc[0]-XW[1]*Ee[0])*ku;wU[1]=(K5[1]*Hc[1]-XW[1]*Ee[1])*ku;wU[2]=(K5[1]*Hc[2]-XW[1]*Ee[2])*ku;K3[0]=(-K5[0]*Hc[0]+XW[0]*Ee[0])*ku;K3[1]=(-K5[0]*Hc[1]+XW[0]*Ee[1])*ku;K3[2]=(-K5[0]*Hc[2]+XW[0]*Ee[2])*ku;}A3[qd*3+0]=A3[qd*3+0]+wU[0];A3[qd*3+1]=A3[qd*3+1]+wU[1];A3[qd*3+2]=A3[qd*3+2]+wU[2];A3[Sk*3+0]=A3[Sk*3+0]+wU[0];A3[Sk*3+1]=A3[Sk*3+1]+wU[1];A3[Sk*3+2]=A3[Sk*3+2]+wU[2];A3[dU*3+0]=A3[dU*3+0]+wU[0];A3[dU*3+1]=A3[dU*3+1]+wU[1];A3[dU*3+2]=A3[dU*3+2]+wU[2];ma[qd*3+0]=ma[qd*3+0]+K3[0];ma[qd*3+1]=ma[qd*3+1]+K3[1];ma[qd*3+2]=ma[qd*3+2]+K3[2];ma[Sk*3+0]=ma[Sk*3+0]+K3[0];ma[Sk*3+1]=ma[Sk*3+1]+K3[1];ma[Sk*3+2]=ma[Sk*3+2]+K3[2];ma[dU*3+0]=ma[dU*3+0]+K3[0];ma[dU*3+1]=ma[dU*3+1]+K3[1];ma[dU*3+2]=ma[dU*3+2]+K3[2];}for(var G=0;G<this.ba;G++){qd=iM[G*3+0];Sk=iM[G*3+1];dU=iM[G*3+2];Ss=qd*3;ke=Sk*3;_c=dU*3;wc=qd*3;yT=Sk*3;nf=dU*3;AT=qd*3;Ba=Sk*3;Ax=dU*3;ts=i3[Ss+0]*A3[wc+0]+i3[Ss+1]*A3[wc+1]+i3[Ss+2]*A3[wc+2];A3[wc+0]-=i3[Ss+0]*ts;A3[wc+1]-=i3[Ss+1]*ts;A3[wc+2]-=i3[Ss+2]*ts;q3=1.0/Math.sqrt(A3[wc+0]*A3[wc+0]+A3[wc+1]*A3[wc+1]+A3[wc+2]*A3[wc+2]);A3[wc+0]*=q3;A3[wc+1]*=q3;A3[wc+2]*=q3;ts=i3[ke+0]*A3[yT+0]+i3[ke+1]*A3[yT+1]+i3[ke+2]*A3[yT+2];A3[yT+0]-=i3[ke+0]*ts;A3[yT+1]-=i3[ke+1]*ts;A3[yT+2]-=i3[ke+2]*ts;q3=1.0/Math.sqrt(A3[yT+0]*A3[yT+0]+A3[yT+1]*A3[yT+1]+A3[yT+2]*A3[yT+2]);A3[yT+0]*=q3;A3[yT+1]*=q3;A3[yT+2]*=q3;ts=i3[_c+0]*A3[nf+0]+i3[_c+1]*A3[nf+1]+i3[_c+2]*A3[nf+2];A3[nf+0]-=i3[_c+0]*ts;A3[nf+1]-=i3[_c+1]*ts;A3[nf+2]-=i3[_c+2]*ts;q3=1.0/Math.sqrt(A3[nf+0]*A3[nf+0]+A3[nf+1]*A3[nf+1]+A3[nf+2]*A3[nf+2]);A3[nf+0]*=q3;A3[nf+1]*=q3;A3[nf+2]*=q3;K3[0]=(i3[Ss+1]*A3[wc+2])-(i3[Ss+2]*A3[wc+1]);K3[1]=(i3[Ss+2]*A3[wc+0])-(i3[Ss+0]*A3[wc+2]);K3[2]=(i3[Ss+0]*A3[wc+1])-(i3[Ss+1]*A3[wc+0]);N1=K3[0]*ma[AT+0]+K3[1]*ma[AT+1]+K3[2]*ma[AT+2];ma[AT+0]=K3[0];ma[AT+1]=K3[1];ma[AT+2]=K3[2];K3[0]=(i3[ke+1]*A3[yT+2])-(i3[ke+2]*A3[yT+1]);K3[1]=(i3[ke+2]*A3[yT+0])-(i3[ke+0]*A3[yT+2]);K3[2]=(i3[ke+0]*A3[yT+1])-(i3[ke+1]*A3[yT+0]);N1=K3[0]*ma[Ba+0]+K3[1]*ma[Ba+1]+K3[2]*ma[Ba+2];ma[Ba+0]=K3[0];ma[Ba+1]=K3[1];ma[Ba+2]=K3[2];K3[0]=(i3[_c+1]*A3[nf+2])-(i3[_c+2]*A3[nf+1]);K3[1]=(i3[_c+2]*A3[nf+0])-(i3[_c+0]*A3[nf+2]);K3[2]=(i3[_c+0]*A3[nf+1])-(i3[_c+1]*A3[nf+0]);N1=K3[0]*ma[Ax+0]+K3[1]*ma[Ax+1]+K3[2]*ma[Ax+2];ma[Ax+0]=K3[0];ma[Ax+1]=K3[1];ma[Ax+2]=K3[2];}return 0;};this.EI=function(){var count=this.ba*3;var JJ;var Bw;if(this.mu==true)return;if(B.length>0){var O2=new Float32Array(this.ba*9);for(var G=0;G<count;G++){JJ=Oe[G]*3;Bw=G*3;O2[Bw]=B[JJ];O2[Bw+1]=B[JJ+1];O2[Bw+2]=B[JJ+2];}B=O2;}if(Wj.length>0){this.dn();}if(i3.length>0){var ql=new Float32Array(this.ba*9);for(var G=0;G<count;G++){JJ=Oe[G]*3;Bw=G*3;ql[Bw]=i3[JJ];ql[Bw+1]=i3[JJ+1];ql[Bw+2]=i3[JJ+2];}i3=ql;}if((lH.length>0)&&(this.nj==true)){var yw=new Float32Array(this.ba*6);for(var G=0;G<count;G++){JJ=Oe[G]*2;Bw=G*2;yw[Bw]=lH[JJ];yw[Bw+1]=lH[JJ+1];}tQ=yw;lH=tQ;}if((A3!=null)&&(A3.length>0)&&(this.nj==true)){var vg=new Float32Array(this.ba*9);for(var G=0;G<count;G++){JJ=Oe[G]*3;Bw=G*3;vg[Bw]=A3[JJ];vg[Bw+1]=A3[JJ+1];vg[Bw+2]=A3[JJ+2];}A3=vg;}if((ma!=null)&&(ma.length>0)&&(this.nj==true)){var el=new Float32Array(this.ba*9);for(var G=0;G<count;G++){JJ=Oe[G]*3;Bw=G*3;el[Bw]=ma[JJ];el[Bw+1]=ma[JJ+1];el[Bw+2]=ma[JJ+2];}ma=el;}f4=new Uint32Array(this.ba*3);for(var G=0;G<this.ba*3;G++){f4[G]=G;}this.Lt=false;this.mu=true;};this.sR=function(tn){var Of=new Array();var TM=new Array();var Wi=new Array();var Ri=new Array();var m8=Math.abs(tn.Qr[1][0]-tn.Qr[0][0]);var P9=Math.abs(tn.Qr[2][1]-tn.Qr[1][1]);var P4=Math.abs(tn.Qr[5][2]-tn.Qr[1][2]);var vy=m8*0.5;var zr=P9*0.5;var rX=Math.max(m8,Math.max(P9,P4));var RN=new Array(tn.Qr[0][0],tn.Qr[0][1],tn.Qr[0][2]);var Cg=new Array(tn.Qr[1][0],tn.Qr[1][1],tn.Qr[1][2]);var WN=new Array(tn.Qr[2][0],tn.Qr[2][1],tn.Qr[2][2]);var N0=new Array(tn.Qr[3][0],tn.Qr[3][1],tn.Qr[3][2]);var kr=new Array(tn.Qr[4][0],tn.Qr[4][1],tn.Qr[4][2]);var ux=new Array(tn.Qr[5][0],tn.Qr[5][1],tn.Qr[5][2]);var tB=new Array(tn.Qr[6][0],tn.Qr[6][1],tn.Qr[6][2]);var im=new Array(tn.Qr[7][0],tn.Qr[7][1],tn.Qr[7][2]);var Cq=new Array(-1.0,0.0,0.0);var iQ=new Array(1.0,0.0,0.0);var Zp=new Array(0.0,1.0,0.0);var lF=new Array(0.0,-1.0,0.0);var Tp=new Array(0.0,0.0,1.0);var ZD=new Array(0.0,0.0,-1.0);var sL=new Array(0.0,0.0);var CK=new Array(m8/rX,0.0);var ID=new Array(m8/rX,P9/rX);var cq=new Array(0.0,P9/rX);var FH=new Array(0.0,0.0);var Xf=new Array(P9/rX,0.0);var lG=new Array(0.0,P4/rX);var VH=new Array(P9/rX,P4/rX);var G2=new Array(0.0,0.0);var _X=new Array(m8/rX,0.0);var az=new Array(0.0,P4/rX);var pf=new Array(m8/rX,P4/rX);Of=Of.concat(RN,Cg,WN,N0);TM=TM.concat(ZD,ZD,ZD,ZD);Wi=Wi.concat(sL,CK,ID,cq);Ri=Ri.concat(0,3,2,2,1,0);Of=Of.concat(kr,ux,tB,im);TM=TM.concat(Tp,Tp,Tp,Tp);Wi=Wi.concat(sL,CK,ID,cq);Ri=Ri.concat(4,5,6,6,7,4);Of=Of.concat(RN,kr,im,N0);TM=TM.concat(Cq,Cq,Cq,Cq);Wi=Wi.concat(lG,FH,Xf,VH);Ri=Ri.concat(8,9,10,10,11,8);Of=Of.concat(ux,Cg,WN,tB);TM=TM.concat(iQ,iQ,iQ,iQ);Wi=Wi.concat(lG,FH,Xf,VH);Ri=Ri.concat(12,13,14,14,15,12);Of=Of.concat(im,tB,WN,N0);TM=TM.concat(Zp,Zp,Zp,Zp);Wi=Wi.concat(pf,az,G2,_X);Ri=Ri.concat(16,17,18,18,19,16);Of=Of.concat(ux,kr,RN,Cg);TM=TM.concat(lF,lF,lF,lF);Wi=Wi.concat(pf,az,G2,_X);Ri=Ri.concat(20,21,22,22,23,20);this.entityName="\x62\x42\x6f\x78";this.ba=12;this.Lt=true;B=new Float32Array(Of);i3=new Float32Array(TM);tQ=new Float32Array(Wi);lH=tQ;this.nj=true;Oe=new Uint32Array(Ri);zP=new Uint16Array(Ri);this.XI=q.O7;this.Q4();this.calculateExtensions();this.isUsable=true;return 0;};this.defineFrom3dGeometry=function(tS,entityName){if(tS.getNrOfTriangles()==0){q.s("\x43\x6d\x69\x47\x72\x65\x70\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x2e\x64\x65\x66\x69\x6e\x65\x46\x72\x6f\x6d\x33\x64\x47\x65\x6f\x6d\x65\x74\x72\x79","\x4e\x72\x4f\x66\x54\x72\x69\x61\x6e\x67\x6c\x65\x73\x20\x3d\x20\x30\x20\x69\x6e\x20\x33\x64\x20\x67\x65\x6f\x65\x6d\x74\x72\x79","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}this.entityName=entityName;this.ba=tS.getNrOfTriangles();this.Lt=tS.IJ();B=new Float32Array(tS.EK());i3=new Float32Array(tS.y4());tQ=new Float32Array(tS.ko());lH=tQ;this.nj=true;Oe=new Uint32Array(tS._L());if(this.Lt==true){zP=new Uint16Array(tS._L());}this.Q4();this.calculateExtensions();this.isUsable=true;return 0;};this.loadFromJSON=function(jsonObject){if((jsonObject.clNm=="\x67\x52")||(jsonObject.clNm=="\x67\x52\x72\x65\x50")){if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.eNmBase){this.dQ=jsonObject.eNmBase;}if(jsonObject.mxPsiZ){this.XI=jsonObject.mxPsiZ*Math.max(q.Rg().width,q.Rg().height);}if(jsonObject.nrTr){this.ba=jsonObject.nrTr;}if(jsonObject.tR)Oe=new Uint32Array(jsonObject.tR);if(jsonObject.tA){if(jsonObject.tA.every((val,G,A1)=>val===A1[0])==true)jsonObject.tA=undefined;}if((jsonObject.comp)&&(jsonObject.comp=="\x32\x4e\x75\x6d\x2d\x52\x4c\x45")){if((!jsonObject.vA)||(!jsonObject.nA)){q.s("\x43\x6d\x69\x47\x72\x65\x70\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x4d\x69\x73\x73\x69\x6e\x67\x20\x61\x72\x72\x61\x79\x73","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(jsonObject.vA)B=new Float32Array(CmiHelpers.Uh(jsonObject.vA));if(jsonObject.nA)i3=new Float32Array(CmiHelpers.Uh(jsonObject.nA));if(jsonObject.tA){tQ=new Float32Array(CmiHelpers.Uh(jsonObject.tA));lH=tQ;this.nj=true;}}else if((jsonObject.comp)&&(jsonObject.comp=="\x52\x4c\x45")){if((!jsonObject.vA)||(!jsonObject.nA)){q.s("\x43\x6d\x69\x47\x72\x65\x70\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x4d\x69\x73\x73\x69\x6e\x67\x20\x61\x72\x72\x61\x79\x73\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(jsonObject.vA){B=new Float32Array(this.ba*9);CmiHelpers.xi(jsonObject.vA,B);}if(jsonObject.nA){i3=new Float32Array(this.ba*9);CmiHelpers.xi(jsonObject.nA,i3);}if(jsonObject.tA){tQ=new Float32Array(this.ba*6);lH=tQ;CmiHelpers.xi(jsonObject.tA,tQ);this.nj=true;}}else{if((!jsonObject.vA)||(!jsonObject.nA)){q.s("\x43\x6d\x69\x47\x72\x65\x70\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x4d\x69\x73\x73\x69\x6e\x67\x20\x61\x72\x72\x61\x79\x73\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(jsonObject.vA)B=new Float32Array(jsonObject.vA);if(jsonObject.nA)i3=new Float32Array(jsonObject.nA);if(jsonObject.tA){tQ=new Float32Array(jsonObject.tA);lH=tQ;this.nj=true;}}if(B.length==this.ba*9){this.Lt=false;f4=new Uint16Array(jsonObject.tR);}else{if(Oe.length==0){this.v.s("\x43\x6d\x69\x47\x72\x65\x70\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x4d\x69\x73\x73\x69\x6e\x67\x20\x74\x72\x69\x61\x6e\x67\x6c\x65\x20\x61\x72\x72\x61\x79\x20\x28"+this.getFullEntityName()+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}this.Lt=true;if(B.length/3>65536){if(jsonObject.vA)Jt=new Float32Array(jsonObject.vA);if(jsonObject.nA)nX=new Float32Array(jsonObject.nA);if(jsonObject.tA){tQ=new Float32Array(jsonObject.tA);lH=tQ;this.nj=true;}this.EI();this.Lt=false;}else{zP=new Uint16Array(jsonObject.tR);}}this.Q4();this.calculateExtensions();this.isUsable=true;return 0;}else{q.s("\x43\x6d\x69\x47\x72\x65\x70\x52\x65\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.calculateExtensions=function(){if(B.length<3){return;}tm=new Array(10000000.0,10000000.0,10000000.0);Yh=new Array(-10000000.0,-10000000.0,-10000000.0);var L5=B.length/3;for(var G=0;G<L5;G++){if(B[3*G+0]<tm[0])tm[0]=B[3*G+0];if(B[3*G+1]<tm[1])tm[1]=B[3*G+1];if(B[3*G+2]<tm[2])tm[2]=B[3*G+2];if(B[3*G+0]>Yh[0])Yh[0]=B[3*G+0];if(B[3*G+1]>Yh[1])Yh[1]=B[3*G+1];if(B[3*G+2]>Yh[2])Yh[2]=B[3*G+2];}nK=CmiHelpers.mv(tm,Yh);rk=CmiHelpers.calculate3dDistance(tm,Yh);lZ=rk*0.5;};this.QD=function(){if(this.m7!=null)I.deleteBuffer(this.m7);this.m7=null;if(this.J8!=null)I.deleteBuffer(this.J8);this.J8=null;if(this._Y!=null)I.deleteBuffer(this._Y);this._Y=null;if(this.GV!=null)I.deleteBuffer(this.GV);this.GV=null;if(this.dZ!=null)I.deleteBuffer(this.dZ);this.dZ=null;if(this.nO!=null)I.deleteBuffer(this.nO);this.nO=null;if(this.Ga!=null)I.deleteBuffer(this.Ga);this.Ga=null;if(this.fT!=null)I.deleteBuffer(this.fT);this.fT=null;};this.Q4=function(){this.QD();if(this.m7==null)this.m7=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,this.m7);I.bufferData(I.ARRAY_BUFFER,B,I.STATIC_DRAW);this.m7.itemSize=3;this.m7.numItems=B.length/3;if(this.J8==null)this.J8=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,this.J8);I.bufferData(I.ARRAY_BUFFER,Wj,I.STATIC_DRAW);this.J8.itemSize=3;this.J8.numItems=B.length/3;if(this._Y==null)this._Y=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,this._Y);I.bufferData(I.ARRAY_BUFFER,i3,I.STATIC_DRAW);this._Y.itemSize=3;this._Y.numItems=i3.length/3;if(this.GV==null)this.GV=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,this.GV);I.bufferData(I.ARRAY_BUFFER,lH,I.STATIC_DRAW);this.GV.itemSize=2;this.GV.numItems=lH.length/2;if(this.dZ==null)this.dZ=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,this.dZ);I.bufferData(I.ARRAY_BUFFER,Ti,I.STATIC_DRAW);this.dZ.itemSize=2;this.dZ.numItems=Ti.length/2;if(this.nO==null)this.nO=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,this.nO);I.bufferData(I.ARRAY_BUFFER,A3,I.STATIC_DRAW);this.nO.itemSize=3;this.nO.numItems=A3.length/3;if(this.Ga==null)this.Ga=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,this.Ga);I.bufferData(I.ARRAY_BUFFER,ma,I.STATIC_DRAW);this.Ga.itemSize=3;this.Ga.numItems=ma.length/3;if(this.fT==null)this.fT=I.createBuffer();I.bindBuffer(I.ELEMENT_ARRAY_BUFFER,this.fT);I.bufferData(I.ELEMENT_ARRAY_BUFFER,zP,I.STATIC_DRAW);this.fT.itemSize=1;this.fT.numItems=zP.length;};};var CmiLocatorObject=function(o){var oL="\x63\x6d\x69\x4c\x6f\x63\x61\x74\x6f\x72\x4f\x62\x6a\x65\x63\x74";var B=new Float32Array(3);var qr=null;var Wu=new Array(0.6,0.2,0.2,1.0);var SF=null;var Qg=20.0;var Je=null;var Ie=null;var fO=new Array(0,0);var Ck=o.jD();var jA=o.JF();var r9=o.VY();var wu=1.0;var qD=o.useSizeCulling;var _b=o.useViewportCulling;this.getClassName=function(){return oL;};this.v=o;this.h=o.q9();this.cmiType=10;this.attributes=new Array();this.color=new Array(0.6,0.2,0.2,1.0);Qg=this.v.locatorPointSize;this.DD=new Array();this.Ii=new Float32Array([0.0,0.0,0.0]);this.origin=new Float32Array([0.0,0.0,0.0]);this.qQ=new Float32Array([0.0,0.0,0.0]);this.Jq=new Float32Array([0.0,0.0,0.0]);if(this.v.lx!=null){Ie=this.v.lx;this.shaderObject=this.v.getShader("\x53\x70\x72\x69\x74\x65");}else{this.shaderObject=this.v.getShader("\x50\x6f\x69\x6e\x74");}this.getGlobalEulerAngles=function(){return this.qQ;};this.getGlobalOrigin=function(){return this.Jq;};this.getPointSize=function(){return Qg;};this.setPointSize=function(hp){Qg=hp;};this.getPixelOffset=function(){return fO;};this.setPixelOffset=function(Yq){fO=Yq;};this.getOrigin=function(){return[this.origin[0],this.origin[1],this.origin[2]];};this.setOrigin=function(Hv){this.origin=new Float32Array([Hv[0],Hv[1],Hv[2]]);B=new Float32Array([Hv[0],Hv[1],Hv[2]]);this.Q4();};this.setEulerAngles=function(uV){this.Ii=new Float32Array([Hv[0],Hv[1],Hv[2]]);};this.getTexture=function(){return Ie;};this.setTexture=function(textureName){Je=textureName;this.shaderObject=this.v.getShader("\x53\x70\x72\x69\x74\x65");Ie=this.v.CH(Je,true);this.Q4();};this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x6c\x4f\x63"){if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if((jsonObject.pO)&&(jsonObject.pO.constructor===Array)){this.DD=jsonObject.pO.slice();}if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.tSz)Qg=jsonObject.tSz;if(jsonObject.lAn){var Zt=this.v.getCmiModel();this.ib=Zt.getLayer(HR);}if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.org){this.origin=new Float32Array(jsonObject.org);B=new Float32Array(jsonObject.org);this.Ox=new Float32Array(jsonObject.org);this.Jq=new Float32Array(jsonObject.org);}if(jsonObject.elA){this.Ii=new Float32Array(jsonObject.elA);this.qQ=new Float32Array(jsonObject.elA);}var UB="";if(jsonObject.tEx){Je=this.IP(jsonObject.tEx);Ie=this.v.CH(Je,true);this.shaderObject=this.v.getShader("\x53\x70\x72\x69\x74\x65");}this.Q4();this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x4c\x6f\x63\x61\x74\x6f\x72\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.getJsonString=function(){return JSON.stringify(this.getJsonObject());};this.getJsonObject=function(){var sY=Je.split(/[\\/]/).pop();var v0=sY.split("\x2e").slice(0,-1).join("\x2e");var vV=sY.substr(sY.lastIndexOf("\x2e")+1);var O_={"\x63\x6c\x4e\x6d":"\x6c\x4f\x63","\x61\x4e\x72":this.__,"\x65\x4e\x6d":this.entityName,"\x73\x54\x78":this.E6,"\x68\x52\x66":this.iq,"\x74\x53\x7a":Qg,"\x70\x4f\x66":fO,"\x6f\x72\x67":new Array(this.origin[0],this.origin[1],this.origin[2]),"\x65\x6c\x41":new Array(this.Ii[0],this.Ii[1],this.Ii[2]),"\x74\x45\x78":v0+"\x2e"+vV};if(this.ib!=null)O_.lAn=this.ib.getLayerName();if(this.attributes.length>0)O_.attribs=this.VQ();return O_;};this.x_=function(Py,fK,wn,Vs,XN,Pg){this.origin=new Float32Array([Py,fK,wn]);B=new Float32Array([Py,fK,wn]);this.Ox=new Float32Array([Py,fK,wn]);this.Ii=new Float32Array([Vs,XN,Pg]);this.Q4();};this.QD=function(){var C=this.v.q9();if(qr!=null)this.h.deleteBuffer(qr);qr=null;};this.Q4=function(){var C=this.v.q9();this.QD();qr=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.bufferData(this.h.ARRAY_BUFFER,B,this.h.STATIC_DRAW);qr.itemSize=3;qr.numItems=B.length/3;};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x4c\x6f\x63\x61\x74\x6f\x72\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.v.locatorDisplay=="\x33\x64"){}else if(Ie!=null){var GX=[Ie.l8*this.v.GI,Ie.La*this.v.GI];if(this.v.isMobileEnvironment==true)this.shaderObject.Np(Wg,Qg,GX,3,0);else this.shaderObject.Np(Wg,Qg,GX,1,0);this.h.activeTexture(this.h.TEXTURE0);this.h.bindTexture(this.h.TEXTURE_2D,Ie.Dz);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);}else{this.shaderObject.Np(Wg,Qg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);}if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);if(this.v.locatorDisplay=="\x33\x64")this.cK(true,tN,Wg);else{this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);}this.v.Za(true);if(this.v.locatorDisplay=="\x33\x64")this.cK(true,tN,Wg);else{this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);}this.v.kF(true,true);}else{if(this.v.locatorDisplay=="\x33\x64")this.cK(true,tN,Wg);else this.h.drawArrays(this.h.POINTS,0,1);}if(this.v.locatorDisplay!="\x33\x64"){if(Ie!=null)this.h.bindTexture(this.h.TEXTURE_2D,null);this.shaderObject.PL(0);}return 0;};this.cK=function(L_,tN,Wg){mat4.identity(jA);wu=(this.v.locatorPointSize*this.v.GI)/15;this.v.useSizeCulling=false;this.v.useViewportCulling=false;this.v.TF(true,true);mat4.AddZRotation(jA,-this.Ii[2]*0.01745329251994329576923690768489);mat4.AddYRotation(jA,-this.Ii[1]*0.01745329251994329576923690768489);mat4.AddXRotation(jA,-this.Ii[0]*0.01745329251994329576923690768489);mat4.addTranslation(jA,this.origin);mat4.scale(jA,[wu,wu,wu]);mat4.multiply(Ck,jA);if(L_){for(var G=0;G<r9.length;G++){r9[G].Li(tN,Wg);}}else{for(var G=0;G<r9.length;G++){r9[G].draw(false);}}this.v.useSizeCulling=qD;this.v.useViewportCulling=_b;this.v.kF(true,true);};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x4c\x6f\x63\x61\x74\x6f\x72\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x4c\x6f\x63\x61\x74\x6f\x72\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.v.locatorDisplay=="\x33\x64"){if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true))){for(var G=0;G<r9.length;G++){r9[G].isHighlighted=true;}}}else if(Ie!=null){var GX=[Ie.l8*this.v.GI,Ie.La*this.v.GI];if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true)))this.shaderObject.Np(this.v.hlColIni,Qg,GX,2,0);else this.shaderObject.Np([0.0,0.0,0.0,0.0],Qg,GX,0,0);this.h.activeTexture(this.h.TEXTURE0);this.h.bindTexture(this.h.TEXTURE_2D,Ie.Dz);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);}else{this.shaderObject.Np(this.getColor(),Qg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);}if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);if(this.v.locatorDisplay=="\x33\x64")this.cK(false);else{this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);}this.v.Za(true);if(this.v.locatorDisplay=="\x33\x64")this.cK(false);else{this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);}this.v.kF(true,true);}else{if(this.v.locatorDisplay=="\x33\x64")this.cK(false);else this.h.drawArrays(this.h.POINTS,0,1);}if(this.v.locatorDisplay=="\x33\x64"){if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true))){for(var G=0;G<r9.length;G++){r9[G].isHighlighted=false;}}}else{if(Ie!=null)this.h.bindTexture(this.h.TEXTURE_2D,null);this.shaderObject.PL(0);}return 0;};};CmiLocatorObject.prototype=new CmiBaseObject();var CmiSpriteObject=function(o){var oL="\x63\x6d\x69\x53\x70\x72\x69\x74\x65\x4f\x62\x6a\x65\x63\x74";var B=new Float32Array(3);var qr=null;var SF=null;var Qg=20.0;var Je=null;var Ie=null;var uG=o.getShader("\x50\x6f\x69\x6e\x74");var fO=new Array(0,0);var mZ=new Float32Array([0.0,0.0,0.0]);this.getClassName=function(){return oL;};this.getTexture=function(){return Ie;};this.setTexture=function(textureName){Je=textureName;Ie=this.v.CH(Je,true);this.Q4();};this.getGlobalOrigin=function(){return this.Jq;};this.getPointSize=function(){return Qg;};this.setPointSize=function(hp){Qg=hp;};this.getPixelOffset=function(){return fO;};this.setPixelOffset=function(Yq){fO=Yq;};this.getOrigin=function(){return[origin[0],origin[1],origin[2]];};this.setOrigin=function(Hv){mZ=new Float32Array([Hv[0],Hv[1],Hv[2]]);B=new Float32Array([Hv[0],Hv[1],Hv[2]]);this.Ox=new Float32Array([Hv[0],Hv[1],Hv[2]]);this.Q4();};this.v=o;this.h=o.q9();this.cmiType=29;this.attributes=new Array();this.color=new Array(0.6,0.2,0.2,1.0);Qg=this.v.locatorPointSize;this.color[3]=0.0;this.Jq=new Float32Array([0.0,0.0,0.0]);this.shaderObject=this.v.getShader("\x53\x70\x72\x69\x74\x65");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x73\x50\x72"){if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.tSz)Qg=jsonObject.tSz;if(jsonObject.pOf)fO=jsonObject.pOf;if(jsonObject.lAn){var Zt=this.v.getCmiModel();this.ib=Zt.getLayer(jsonObject.lAn);}if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.org){mZ=new Float32Array(jsonObject.org);B=new Float32Array(jsonObject.org);this.Ox=new Float32Array(jsonObject.org);this.Jq=new Float32Array(jsonObject.org);}var UB="";if(jsonObject.tEx){UB=this.v.getBitmapDirectory();if(jsonObject.tEx.indexOf("\x2e")!=-1){Je=UB+"\x2f"+jsonObject.tEx;}else{Je=UB+"\x2f"+jsonObject.tEx+"\x2e\x6a\x70\x67";}}Ie=this.v.CH(Je,true);this.Q4();this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x53\x70\x72\x69\x74\x65\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.getJsonString=function(){return JSON.stringify(this.getJsonObject());};this.getJsonObject=function(){var sY=Je.split(/[\\/]/).pop();var v0=sY.split("\x2e").slice(0,-1).join("\x2e");var vV=sY.substr(sY.lastIndexOf("\x2e")+1);var O_={"\x63\x6c\x4e\x6d":"\x73\x50\x72","\x61\x4e\x72":this.__,"\x65\x4e\x6d":this.entityName,"\x73\x54\x78":this.E6,"\x68\x52\x66":this.iq,"\x74\x53\x7a":Qg,"\x70\x4f\x66":fO,"\x6f\x72\x67":new Array(mZ[0],mZ[1],mZ[2]),"\x74\x45\x78":v0+"\x2e"+vV};if(this.ib!=null)O_.lAn=this.ib.getLayerName();if(this.attributes.length>0)O_.attribs=this.VQ();return O_;};this.x_=function(Py,fK,wn){mZ=new Float32Array([Py,fK,wn]);B=new Float32Array([Py,fK,wn]);this.Ox=new Float32Array([Py,fK,wn]);this.Q4();};this.QD=function(){if(qr!=null)this.h.deleteBuffer(qr);qr=null;};this.Q4=function(){var C=this.v.q9();this.QD();qr=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.bufferData(this.h.ARRAY_BUFFER,B,this.h.STATIC_DRAW);qr.itemSize=3;qr.numItems=B.length/3;this.h.bindTexture(this.h.TEXTURE_2D,null);};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x53\x70\x72\x69\x74\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x53\x70\x72\x69\x74\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}var GX=[(fO[0]+Ie.l8)*this.v.GI,(fO[1]+Ie.La)*this.v.GI];if(this.v.isMobileEnvironment==true)this.shaderObject.Np(Wg,Qg,GX,3,0);else this.shaderObject.Np(Wg,Qg,GX,1,0);this.h.activeTexture(this.h.TEXTURE0);this.h.bindTexture(this.h.TEXTURE_2D,Ie.Dz);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);this.v.kF(true,true);}else{this.h.drawArrays(this.h.POINTS,0,1);}this.h.bindTexture(this.h.TEXTURE_2D,null);this.shaderObject.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x53\x70\x72\x69\x74\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x53\x70\x72\x69\x74\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}var GX=[(fO[0]+Ie.l8)*this.v.GI,(fO[1]+Ie.La)*this.v.GI];if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true)))this.shaderObject.Np(this.v.hlColIni,Qg,GX,2,0);else this.shaderObject.Np([0.0,0.0,0.0,0.0],Qg,GX,0,0);this.h.activeTexture(this.h.TEXTURE0);this.h.bindTexture(this.h.TEXTURE_2D,Ie.Dz);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.h.POINTS,0,1);this.v.kF(true,true);}else{this.h.drawArrays(this.h.POINTS,0,1);}this.h.bindTexture(this.h.TEXTURE_2D,null);this.shaderObject.PL(0);return 0;};};CmiSpriteObject.prototype=new CmiBaseObject();var Iq=function(o){var oL="\x63\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74";var B=new Float32Array(8);var qr=null;var _v=0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();this.getClassName=function(){return oL;};this.T4=function(){return B;};this.xp=function(){return _v;};this.v=o;this.h=o.q9();this.cmiType=1;this.attributes=new Array();this.shaderObject=this.v.getShader("\x4c\x69\x6e\x65");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x6c\x4e"){var KH;if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;if(this.color[3]==undefined)this.color[3]=1.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.lS)_v=jsonObject.lS;if(jsonObject.vA)KH=new Float32Array(jsonObject.vA);if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());var dx=KH[0]-KH[3];var dy=KH[1]-KH[4];var LQ=KH[2]-KH[5];var IM=Math.max(1.0,Math.sqrt((dx*dx)+(dy*dy)+(LQ*LQ)));B[0]=KH[0];B[1]=KH[1];B[2]=KH[2];B[3]=0.0;B[4]=KH[3];B[5]=KH[4];B[6]=KH[5];B[7]=IM;this.Q4();this.calculateExtensions();this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.calculateExtensions=function(){if(B.length<3){return;}var m=new Array(Math.min(B[0],B[4]),Math.min(B[1],B[5]),Math.min(B[2],B[6]));var V=new Array(Math.max(B[0],B[4]),Math.max(B[1],B[5]),Math.max(B[2],B[6]));this.Ox=CmiHelpers.mv(m,V);this.size=B[7];this.KA=this.size*0.5;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(qr!=null)this.h.deleteBuffer(qr);qr=null;};this.Q4=function(){var C=this.v.q9();this.QD();qr=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.bufferData(this.h.ARRAY_BUFFER,B,this.h.STATIC_DRAW);qr.itemSize=4;qr.numItems=B.length/4;};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.LINES,0,2);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.LINES,0,2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,2);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}if(this.drawBoundingBox==true)this.yI(false,false,true);this.shaderObject.Np(this.getColor(),_v,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,2);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,2);}this.shaderObject.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};Iq.prototype=new CmiBaseObject();var CmiArcObject=function(o){var oL="\x63\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74";var B=new Float32Array(0);var qr=null;var _v=0;var yk=new Float32Array([0.0,0.0,0.0]);var np=10.0;var Qc=0.0;var NQ=360.0;var rS=0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();var vd=new Float32Array([0.0,0.0,0.0]);this.getClassName=function(){return oL;};this.a_=function(){return rS;};this.T4=function(){return B;};this.xp=function(){return _v;};this.getOrientation=function(){return vd;};this.setColor=function(J_){this.color=J_;};this.setOrientation=function(F_){vd=new Float32Array([F_[0],F_[1],F_[2]]);};this.setCenterPoint=function(jK){yk=new Float32Array([jK[0],jK[1],jK[2]]);};this.setRadius=function(vf){np=vf;};this.v=o;this.h=o.q9();this.cmiType=2;this.attributes=new Array();this.shaderObject=this.v.getShader("\x4c\x69\x6e\x65");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x61\x52"){if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;if(this.color[3]==undefined)this.color[3]=1.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.lS)_v=jsonObject.lS;if(jsonObject.cP)yk=new Float32Array(jsonObject.cP);if(jsonObject.rad)np=jsonObject.rad;if(jsonObject.sA)Qc=jsonObject.sA;if(jsonObject.eA)NQ=jsonObject.eA;if(jsonObject.elA)vd=new Float32Array(jsonObject.elA);if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(NQ==0.0)NQ=360.0;if(NQ<Qc)NQ=360+NQ;Kl(vd);this.Q4();this.calculateExtensions();this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.getJsonString=function(){return JSON.stringify(this.getJsonObject());};this.getJsonObject=function(){var O_={"\x63\x6c\x4e\x6d":"\x61\x52","\x61\x4e\x72":this.__,"\x65\x4e\x6d":this.entityName,"\x73\x54\x78":this.E6,"\x68\x52\x66":this.iq,"\x63\x6f\x6c":this.color,"\x73\x69\x5a":this.size,"\x6c\x53":_v,"\x63\x50":new Array(yk[0],yk[1],yk[2]),"\x72\x61\x64":np,"\x73\x41":Qc,"\x65\x41":NQ,"\x65\x6c\x41":new Array(vd[0],vd[1],vd[2])};if(this.ib!=null)O_.lAn=this.ib.getLayerName();if(this.attributes.length>0)O_.attribs=this.VQ();return O_;};this.buildArc=function(){Kl(vd);this.Q4();this.calculateExtensions();this.yu=true;return 0;};var Kl=function(Ii){var qV=new mat4.createIdent();var zj=new Float32Array([0.0,0.0,0.0]);if((Ii[0]!=0.0)||(Ii[1]!=0.0)||(Ii[2]!=0.0)){mat4.AddXRotation(qV,Ii[0]*Math.PI/180.0);mat4.AddYRotation(qV,Ii[1]*Math.PI/180.0);mat4.AddZRotation(qV,Ii[2]*Math.PI/180.0);}mat4.addTranslation(qV,yk);B=CmiHelpers.Di(zj,np,Qc,NQ,qV,true);rS=parseInt(B.length/8);return;};this.calculateExtensions=function(){var m=new Array(yk[0]-np,yk[1]-np,yk[2]-np);var V=new Array(yk[0]+np,yk[1]+np,yk[2]+np);this.Ox=new Array(0.0,0.0,0.0);this.Ox[0]=yk[0];this.Ox[1]=yk[1];this.Ox[2]=yk[2];this.size=2*np;this.KA=np;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(qr!=null)this.h.deleteBuffer(qr);qr=null;};this.Q4=function(){var C=this.v.q9();this.QD();qr=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.bufferData(this.h.ARRAY_BUFFER,B,this.h.STATIC_DRAW);qr.itemSize=4;qr.numItems=B.length/4;};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,rS*2);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}this.shaderObject.Np(this.getColor(),_v,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,rS*2);}this.shaderObject.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};CmiArcObject.prototype=new CmiBaseObject();var oY=function(o){var oL="\x63\x6d\x69\x43\x72\x6f\x73\x73\x68\x61\x74\x63\x68\x4f\x62\x6a\x65\x63\x74";var B=new Float32Array(0);var qr=null;var rS=0;var _v=0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();this.getClassName=function(){return oL;};this.v=o;this.h=o.q9();this.cmiType=5;this.attributes=new Array();this.shaderObject=this.v.getShader("\x4c\x69\x6e\x65");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x63\x48"){var KH;if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;if(this.color[3]==undefined)this.color[3]=1.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.lS)_v=jsonObject.lS;if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.vA)KH=new Float32Array(jsonObject.vA);rS=KH.length/6;B=new Float32Array(rS*8);var dx=0.0;var dy=0.0;var LQ=0.0;var IM=0.0;for(var G=0;G<rS;G++){dx=KH[G*6+0]-KH[G*6+3];dy=KH[G*6+1]-KH[G*6+4];LQ=KH[G*6+2]-KH[G*6+5];IM=Math.max(1.0,Math.sqrt((dx*dx)+(dy*dy)+(LQ*LQ)));B[G*8+0]=KH[G*6+0];B[G*8+1]=KH[G*6+1];B[G*8+2]=KH[G*6+2];B[G*8+3]=0.0;B[G*8+4]=KH[G*6+3];B[G*8+5]=KH[G*6+4];B[G*8+6]=KH[G*6+5];B[G*8+7]=IM;}this.Q4();this.calculateExtensions();this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x43\x72\x6f\x73\x73\x68\x61\x74\x63\x68\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.calculateExtensions=function(){if(B.length<3){return;}var m=new Array(10000000.0,10000000.0,10000000.0);var V=new Array(-10000000.0,-10000000.0,-10000000.0);for(var G=0;G<rS;G++){if(B[G*8+0]<m[0])m[0]=B[G*8+0];if(B[G*8+1]<m[1])m[1]=B[G*8+1];if(B[G*8+2]<m[2])m[2]=B[G*8+2];if(B[G*8+0]>V[0])V[0]=B[G*8+0];if(B[G*8+1]>V[1])V[1]=B[G*8+1];if(B[G*8+2]>V[2])V[2]=B[G*8+2];if(B[G*8+4]<m[0])m[0]=B[G*8+4];if(B[G*8+5]<m[1])m[1]=B[G*8+5];if(B[G*8+6]<m[2])m[2]=B[G*8+6];if(B[G*8+4]>V[0])V[0]=B[G*8+4];if(B[G*8+5]>V[1])V[1]=B[G*8+5];if(B[G*8+6]>V[2])V[2]=B[G*8+6];}this.Ox=CmiHelpers.mv(m,V);this.size=CmiHelpers.calculate3dDistance(m,V);this.KA=this.size*0.5;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(qr!=null)this.h.deleteBuffer(qr);qr=null;};this.Q4=function(){var C=this.v.q9();this.QD();qr=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.bufferData(this.h.ARRAY_BUFFER,B,this.h.STATIC_DRAW);qr.itemSize=4;qr.numItems=B.length/4;};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x43\x72\x6f\x73\x73\x68\x61\x74\x63\x68\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x43\x72\x6f\x73\x73\x68\x61\x74\x63\x68\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,rS*2);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x43\x72\x6f\x73\x73\x68\x61\x74\x63\x68\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x43\x72\x6f\x73\x73\x68\x61\x74\x63\x68\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}this.shaderObject.Np(this.getColor(),_v,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,rS*2);}this.shaderObject.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};oY.prototype=new CmiBaseObject();var xS=function(o){var oL="\x63\x6d\x69\x4c\x69\x6e\x65\x41\x72\x72\x61\x79\x4f\x62\x6a\x65\x63\x74";var B=new Float32Array(0);var qr=null;var rS=0;var _v=0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();var iT=new Array();this.getClassName=function(){return oL;};this.rT=function(){return iT;};this.xp=function(){return _v;};this.v=o;this.h=o.q9();this.cmiType=5;this.attributes=new Array();this.shaderObject=this.v.getShader("\x4c\x69\x6e\x65");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x6c\x69\x41"){var KH;if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;if(this.color[3]==undefined)this.color[3]=1.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.lS)_v=jsonObject.lS;if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.vA)KH=new Float32Array(jsonObject.vA);rS=KH.length/6;B=new Float32Array(rS*8);var dx=0.0;var dy=0.0;var LQ=0.0;var IM=0.0;for(var G=0;G<rS;G++){dx=KH[G*6+0]-KH[G*6+3];dy=KH[G*6+1]-KH[G*6+4];LQ=KH[G*6+2]-KH[G*6+5];IM=Math.max(1.0,Math.sqrt((dx*dx)+(dy*dy)+(LQ*LQ)));B[G*8+0]=KH[G*6+0];B[G*8+1]=KH[G*6+1];B[G*8+2]=KH[G*6+2];B[G*8+3]=0.0;B[G*8+4]=KH[G*6+3];B[G*8+5]=KH[G*6+4];B[G*8+6]=KH[G*6+5];B[G*8+7]=IM;}this.Q4();this.calculateExtensions();this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x41\x72\x72\x61\x79\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.Sx=function(){var lo=0;var JX=0;var Z=null;for(var G=0;G<iT.length;G++){Z=iT[G];if(Z.getClassName()=="\x63\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74"){lo=lo+Z.a_();}else if(Z.getClassName()=="\x63\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74"){lo++;}}JX=rS+lo;var jQ=new Float32Array(JX*8);var PZ=0;jQ.set(B);PZ=B.length;var ay=null;for(var G=0;G<iT.length;G++){Z=iT[G];if(Z.getClassName()=="\x63\x6d\x69\x41\x72\x63\x4f\x62\x6a\x65\x63\x74"){ay=Z.T4();jQ.set(ay,PZ);PZ=PZ+ay.length;}else if(Z.getClassName()=="\x63\x6d\x69\x4c\x69\x6e\x65\x4f\x62\x6a\x65\x63\x74"){ay=Z.T4();jQ.set(ay,PZ);PZ=PZ+ay.length;}}rS=JX;B=jQ;iT=new Array();this.Q4();this.calculateExtensions();this.yu=true;return 0;};this.calculateExtensions=function(){if(B.length<3){return;}var m=new Array(10000000.0,10000000.0,10000000.0);var V=new Array(-10000000.0,-10000000.0,-10000000.0);for(var G=0;G<rS;G++){if(B[G*8+0]<m[0])m[0]=B[G*8+0];if(B[G*8+1]<m[1])m[1]=B[G*8+1];if(B[G*8+2]<m[2])m[2]=B[G*8+2];if(B[G*8+0]>V[0])V[0]=B[G*8+0];if(B[G*8+1]>V[1])V[1]=B[G*8+1];if(B[G*8+2]>V[2])V[2]=B[G*8+2];if(B[G*8+4]<m[0])m[0]=B[G*8+4];if(B[G*8+5]<m[1])m[1]=B[G*8+5];if(B[G*8+6]<m[2])m[2]=B[G*8+6];if(B[G*8+4]>V[0])V[0]=B[G*8+4];if(B[G*8+5]>V[1])V[1]=B[G*8+5];if(B[G*8+6]>V[2])V[2]=B[G*8+6];}this.Ox=CmiHelpers.mv(m,V);this.size=CmiHelpers.calculate3dDistance(m,V);this.KA=this.size*0.5;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(qr!=null)this.h.deleteBuffer(qr);qr=null;};this.Q4=function(){var C=this.v.q9();this.QD();qr=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.bufferData(this.h.ARRAY_BUFFER,B,this.h.STATIC_DRAW);qr.itemSize=4;qr.numItems=B.length/4;};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x41\x72\x72\x61\x79\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x41\x72\x72\x61\x79\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,rS*2);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x41\x72\x72\x61\x79\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x4c\x69\x6e\x65\x41\x72\x72\x61\x79\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}this.shaderObject.Np(this.getColor(),_v,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,4,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,rS*2);}this.shaderObject.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};xS.prototype=new CmiBaseObject();var CmiTextObject=function(o){var oL="\x63\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74";var B=new Float32Array(18);var a7=new Float32Array(18);var T1=new Float32Array(12);var Gi=new Uint16Array(0);var qr=null;var wL=null;var AO=null;var GF=null;var d1=null;var vl="";var rU="";var hZ=0.0;var g8=0.0;var Ie=null;var QR=null;var No=null;var mh=null;var vL=0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();var Nb=false;var zi=new Array(1.0,1.0,1.0,0.0);this.getClassName=function(){return oL;};this.getFontName=function(){return vl;};this.setFontName=function(Zl){vl=Zl;};this.getAutoSizeWidth=function(){return Nb;};this.setAutoSizeWidth=function(hh){Nb=hh;};this.getText=function(){return rU;};this.setText=function(hS){rU=hS;};this.getTextHeight=function(){return g8;};this.setTextheight=function(aT){g8=aT;};this.getTextWidth=function(){return hZ;};this.setTextWidth=function(Jc){hZ=Jc;};this.setColor=function(J_){this.color=J_;};this.setBgColor=function(J_){zi=J_;};this.getBgColor=function(J_){return zi};this.v=o;this.h=o.q9();this.cmiType=3;this.attributes=new Array();this.color[3]=0.0;this.shaderObject=this.v.getShader("\x54\x65\x78\x74");d1=this.v.getShader("\x50\x6c\x61\x69\x6e\x43\x6f\x6c\x6f\x72");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x74\x58"){var KH=null;this.yu=false;if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;this.color[3]=0.0;}if(jsonObject.bgCol){zi=jsonObject.bgCol;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.fnt)vl=jsonObject.fnt;if(jsonObject.mr)vL=jsonObject.mr;if(jsonObject.txt)rU=jsonObject.txt;if(jsonObject.hT)g8=jsonObject.hT;if(jsonObject.wD)hZ=jsonObject.wD;if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.vA)KH=new Float32Array(jsonObject.vA);if(jsonObject.aSw)Nb=jsonObject.aSw;if(KH!=null)return this.RC(KH);else{this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x4e\x6f\x20\x65\x78\x74\x65\x6e\x73\x69\x6f\x6e\x73\x20\x67\x69\x76\x65\x6e\x20\x3d\x20\x30","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}}else{this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.calculateTextObject=function(llP,urP,orientation,qt){var vd=new Float32Array([orientation[0],orientation[1],orientation[2]]);var p2=new Float32Array([llP[0],llP[1],llP[2]]);var qV=new mat4.createIdent();var eD=new mat4.createIdent();mat4.AddXRotation(qV,vd[0]*Math.PI/180.0);mat4.AddYRotation(qV,vd[1]*Math.PI/180.0);mat4.AddZRotation(qV,vd[2]*Math.PI/180.0);mat4.addTranslation(qV,[llP[0],llP[1],llP[2]]);mat4.inverse(qV,eD);var Mu=CmiHelpers.projectPointToCs(llP,eD);var h2=CmiHelpers.projectPointToCs(urP,eD);var Su=new Array(h2[0],Mu[1],Mu[2]);var D4=new Array(Mu[0],h2[1],h2[2]);Mu[2]=qt;h2[2]=qt;Su[2]=qt;D4[2]=qt;Mu=CmiHelpers.projectPointToCs(Mu,qV);h2=CmiHelpers.projectPointToCs(h2,qV);Su=CmiHelpers.projectPointToCs(Su,qV);D4=CmiHelpers.projectPointToCs(D4,qV);if((hZ==0.0)||(g8==0.0)){hZ=CmiHelpers.calculate3dDistance(Mu,Su);g8=CmiHelpers.calculate3dDistance(Mu,D4);}var KH=new Array(Mu[0],Mu[1],Mu[2],Su[0],Su[1],Su[2],h2[0],h2[1],h2[2],D4[0],D4[1],D4[2]);return this.RC(KH);};this.reCalculateTextObject=function(){var KH=new Array(B[0],B[1],B[2],B[3],B[4],B[5],B[6],B[7],B[8],B[12],B[13],B[14]);return this.RC(KH);};this.RC=function(KH){if((hZ==0.0)||(g8==0.0)){var Mu=new Array(KH[0],KH[1],KH[2]);var Su=new Array(KH[3],KH[4],KH[5]);var h2=new Array(KH[6],KH[7],KH[8]);var D4=new Array(KH[9],KH[10],KH[11]);hZ=CmiHelpers.calculate3dDistance(Mu,Su);g8=CmiHelpers.calculate3dDistance(Mu,D4);}if((g8==0.0)||(hZ==0.0)){this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x54\x65\x78\x74\x20\x77\x69\x64\x74\x68\x20\x6f\x72\x20\x68\x65\x69\x67\x68\x74\x20\x3d\x20\x30","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(Nb==true){var CI=this.v.T3(rU,vl);hZ=g8*CI;}if(zi[3]==0.0)QR=this.v.ZC(g8,hZ,vl,rU,this.getColor(),null,vL);else QR=this.v.ZC(g8,hZ,vl,rU,this.getColor(),zi,vL);if(QR==null){this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x43\x61\x6e\x6e\x6f\x74\x20\x63\x72\x65\x61\x74\x65\x20\x74\x65\x78\x74\x20\x69\x6d\x61\x67\x65","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(zi[3]==0.0)mh=this.v.ZC(g8,hZ,vl,rU,this.v.hlColIni,null,vL);else mh=this.v.ZC(g8,hZ,vl,rU,this.v.hlColIni,zi,vL);B[0]=KH[0];B[1]=KH[1];B[2]=KH[2];B[3]=KH[3];B[4]=KH[4];B[5]=KH[5];B[6]=KH[6];B[7]=KH[7];B[8]=KH[8];B[9]=KH[6];B[10]=KH[7];B[11]=KH[8];B[12]=KH[9];B[13]=KH[10];B[14]=KH[11];B[15]=KH[0];B[16]=KH[1];B[17]=KH[2];if(zi[3]>0){let _=new Float32Array([B[0],B[1],B[2]]);let mw=new Float32Array([B[3],B[4],B[5]]);let a2=new Float32Array([B[6],B[7],B[8]]);let Da=new Float32Array([B[9],B[10],B[11]]);let ol=new Float32Array([B[12],B[13],B[14]]);let Hg=new Float32Array([B[15],B[16],B[17]]);let op=mat4.createIdent();let Kc=new Array(0.0,0.0,0.0);var PH=CmiHelpers.nW(a2,mw,_,Kc);Kc[0]=Kc[0]/g8*0.01;Kc[1]=Kc[1]/g8*0.01;Kc[2]=Kc[2]/g8*0.01;mat4.addTranslation(op,Kc);mat4.multiplyVec3(op,_);mat4.multiplyVec3(op,mw);mat4.multiplyVec3(op,a2);mat4.multiplyVec3(op,Da);mat4.multiplyVec3(op,ol);mat4.multiplyVec3(op,Hg);a7[0]=_[0];a7[1]=_[1];a7[2]=_[2];a7[3]=mw[0];a7[4]=mw[1];a7[5]=mw[2];a7[6]=a2[0];a7[7]=a2[1];a7[8]=a2[2];a7[9]=Da[0];a7[10]=Da[1];a7[11]=Da[2];a7[12]=ol[0];a7[13]=ol[1];a7[14]=ol[2];a7[15]=Hg[0];a7[16]=Hg[1];a7[17]=Hg[2];}var qV=new mat4.createIdent();var Fj=new vec3.create();Fj[2]=0.0;T1[0]=0.0;T1[1]=0.0;Fj[0]=QR.L0;Fj[1]=0.0;mat4.multiplyVec3(qV,Fj);T1[2]=Fj[0];T1[3]=Fj[1];Fj[0]=QR.L0;Fj[1]=1.0;mat4.multiplyVec3(qV,Fj);T1[4]=Fj[0];T1[5]=Fj[1];Fj[0]=QR.L0;Fj[1]=1.0;mat4.multiplyVec3(qV,Fj);T1[6]=Fj[0];T1[7]=Fj[1];Fj[0]=0.0;Fj[1]=1.0;mat4.multiplyVec3(qV,Fj);T1[8]=Fj[0];T1[9]=Fj[1];T1[10]=0.0;T1[11]=0.0;Gi=new Uint16Array(2*3);for(var G=0;G<2*3;G++){Gi[G]=G;}this.Q4();this.calculateExtensions();this.yu=true;return 0;};this.getJsonString=function(){return JSON.stringify(this.getJsonObject());};this.getJsonObject=function(){var O_={"\x63\x6c\x4e\x6d":"\x74\x58","\x61\x4e\x72":this.__,"\x65\x4e\x6d":this.entityName,"\x73\x54\x78":this.E6,"\x68\x52\x66":this.iq,"\x63\x6f\x6c":this.color,"\x62\x67\x43\x6f\x6c":zi,"\x73\x69\x5a":this.size,"\x66\x6e\x74":vl,"\x6d\x72":vL,"\x74\x78\x74":rU,"\x68\x54":g8,"\x77\x44":hZ,"\x61\x53\x77":Nb,"\x76\x41":new Array(B[0],B[1],B[2],B[3],B[4],B[5],B[6],B[7],B[8],B[12],B[13],B[14])};if(this.ib!=null)O_.lAn=this.ib.getLayerName();if(this.attributes.length>0)O_.attribs=this.VQ();return O_;};this.calculateExtensions=function(){if(B.length<3){return;}var m=new Array(10000000.0,10000000.0,10000000.0);var V=new Array(-10000000.0,-10000000.0,-10000000.0);var L5=B.length/3;for(var G=0;G<L5;G++){if(B[3*G+0]<m[0])m[0]=B[3*G+0];if(B[3*G+1]<m[1])m[1]=B[3*G+1];if(B[3*G+2]<m[2])m[2]=B[3*G+2];if(B[3*G+0]>V[0])V[0]=B[3*G+0];if(B[3*G+1]>V[1])V[1]=B[3*G+1];if(B[3*G+2]>V[2])V[2]=B[3*G+2];}this.Ox=CmiHelpers.mv(m,V);this.size=CmiHelpers.calculate3dDistance(m,V);this.KA=this.size*0.5;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(qr!=null)this.h.deleteBuffer(qr);qr=null;if(GF!=null)this.h.deleteBuffer(GF);GF=null;if(wL!=null)this.h.deleteBuffer(wL);wL=null;if(AO!=null)this.h.deleteBuffer(AO);AO=null;if(Ie!=null)this.h.deleteTexture(Ie);Ie=null;if(No!=null)this.h.deleteTexture(No);No=null;};this.Q4=function(){var C=this.v.q9();this.QD();qr=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.bufferData(this.h.ARRAY_BUFFER,B,this.h.STATIC_DRAW);qr.itemSize=3;qr.numItems=B.length/3;GF=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,GF);this.h.bufferData(this.h.ARRAY_BUFFER,a7,this.h.STATIC_DRAW);GF.itemSize=3;GF.numItems=a7.length/3;wL=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.bufferData(this.h.ARRAY_BUFFER,T1,this.h.STATIC_DRAW);wL.itemSize=2;wL.numItems=T1.length/2;AO=this.h.createBuffer();this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);this.h.bufferData(this.h.ELEMENT_ARRAY_BUFFER,Gi,this.h.STATIC_DRAW);AO.itemSize=1;AO.numItems=Gi.length;Ie=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,Ie);this.h.pixelStorei(this.h.UNPACK_FLIP_Y_WEBGL,true);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,this.h.RGBA,this.h.UNSIGNED_BYTE,QR.nD);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MAG_FILTER,this.h.LINEAR);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MIN_FILTER,this.h.LINEAR_MIPMAP_LINEAR);this.h.generateMipmap(this.h.TEXTURE_2D);this.h.bindTexture(this.h.TEXTURE_2D,null);No=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,No);this.h.pixelStorei(this.h.UNPACK_FLIP_Y_WEBGL,true);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,this.h.RGBA,this.h.UNSIGNED_BYTE,mh.nD);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MAG_FILTER,this.h.LINEAR);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MIN_FILTER,this.h.LINEAR_MIPMAP_LINEAR);this.h.generateMipmap(this.h.TEXTURE_2D);this.h.bindTexture(this.h.TEXTURE_2D,null);};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(this.shaderObject==null||this.shaderObject.A==null){this.v.s("\x43\x6d\x69\x54\x65\x78\x74\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}if(zi[3]>0){d1.Np(zi,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,GF);this.h.vertexAttribPointer(d1.W,3,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}d1.PL(0);}this.shaderObject.Np(this.v.bgColIni,0);this.h.activeTexture(this.h.TEXTURE0);if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true)))this.h.bindTexture(this.h.TEXTURE_2D,No);else this.h.bindTexture(this.h.TEXTURE_2D,Ie);this.h.bindBuffer(this.h.ARRAY_BUFFER,qr);this.h.vertexAttribPointer(this.shaderObject.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.vertexAttribPointer(this.shaderObject.rD,2,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);this.shaderObject.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);this.shaderObject.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}this.h.bindTexture(this.h.TEXTURE_2D,null);this.shaderObject.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};CmiTextObject.prototype=new CmiBaseObject();var CmiLabelObject=function(o){var oL="\x63\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74";var iu=new Float32Array(18);var U=new Float32Array(18);var jj=new Float32Array(9);var a7=new Float32Array(18);var T1=new Float32Array(12);var Gi=new Uint16Array(0);var vn=null;var vt=null;var nF=null;var GF=null;var wL=null;var AO=null;var ym=null;var WO=null;var d1=null;var vl="";var rU="";var hZ=0.0;var g8=0.0;var xM=0.0;var Ie=null;var QR=null;var No=null;var mh=null;var Ag=0;var Hz=0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();var vd=new Float32Array([0.0,0.0,0.0]);var wJ=new Float32Array([0.0,0.0,0.0]);var MC=new Float32Array([0.0,0.0,0.0]);var Yp=new Float32Array([0.0,0.0,0.0]);var jk=0.0;var Nb=false;var zi=new Array(0.0,1.0,1.0,0.0);this.getClassName=function(){return oL;};this.getFontName=function(){return vl;};this.setFontName=function(Zl){vl=Zl;};this.getAutoSizeWidth=function(){return Nb;};this.setAutoSizeWidth=function(hh){Nb=hh;};this.getText=function(){return rU;};this.setText=function(hS){rU=hS;};this.getTextHeight=function(){return g8;};this.setTextheight=function(aT){g8=aT;if(xM==0.0)xM=g8;};this.getTextWidth=function(){return hZ;};this.setTextWidth=function(Jc){hZ=Jc;};this.getArrowSize=function(){return xM;};this.setArrowSize=function(ey){xM=ey;};this.setColor=function(J_){this.color=J_;};this.setBgColor=function(J_){zi=J_;};this.getBgColor=function(J_){return zi};this.getOrientation=function(){return vd;};this.setOrientation=function(F_){vd=new Float32Array([F_[0],F_[1],F_[2]]);jk=0.0;};this.getLineStartPoint=function(){return wJ;};this.setLineStartPoint=function(lg){wJ=new Float32Array([lg[0],lg[1],lg[2]]);jk=0.0;};this.getLineEndPoint=function(){return MC;};this.setLineEndPoint=function(kQ,project){if(project==true){var qV=new mat4.createIdent();var eD=new mat4.createIdent();mat4.AddXRotation(qV,vd[0]*Math.PI/180.0);mat4.AddYRotation(qV,vd[1]*Math.PI/180.0);mat4.AddZRotation(qV,vd[2]*Math.PI/180.0);mat4.inverse(qV,eD);var Nn=CmiHelpers.projectPointToCs(kQ,eD);var DM=CmiHelpers.projectPointToCs(wJ,eD);Nn[2]=DM[2];Nn=CmiHelpers.projectPointToCs(Nn,qV);MC=new Float32Array([Nn[0],Nn[1],Nn[2]]);}else MC=new Float32Array([kQ[0],kQ[1],kQ[2]]);jk=0.0;};this.getTextPoint=function(){return Yp;};this.setTextPoint=function(c8,project){if(project==true){var qV=new mat4.createIdent();var eD=new mat4.createIdent();mat4.AddXRotation(qV,vd[0]*Math.PI/180.0);mat4.AddYRotation(qV,vd[1]*Math.PI/180.0);mat4.AddZRotation(qV,vd[2]*Math.PI/180.0);mat4.inverse(qV,eD);var Nn=CmiHelpers.projectPointToCs(c8,eD);var DM=CmiHelpers.projectPointToCs(wJ,eD);Nn[2]=DM[2];Nn=CmiHelpers.projectPointToCs(Nn,qV);Yp=new Float32Array([Nn[0],Nn[1],Nn[2]]);}else Yp=new Float32Array([c8[0],c8[1],c8[2]]);};this.getBorderStyle=function(){return Ag;};this.setBorderStyle=function(S7){Ag=S7;};this.v=o;this.h=o.q9();this.cmiType=13;this.attributes=new Array();this.color[3]=0.0;ym=this.v.getShader("\x54\x65\x78\x74");WO=this.v.getShader("\x50\x6c\x61\x69\x6e\x43\x6f\x6c\x6f\x72");d1=this.v.getShader("\x50\x6c\x61\x69\x6e\x43\x6f\x6c\x6f\x72");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x6c\x42"){if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;this.color[3]=0.0;}if(jsonObject.bgCol){zi=jsonObject.bgCol;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.fnt)vl=jsonObject.fnt;if(jsonObject.txt)rU=jsonObject.txt;if(jsonObject.hT)g8=jsonObject.hT;if(jsonObject.wD)hZ=jsonObject.wD;if(jsonObject.a2d)jk=jsonObject.a2d;if(jsonObject.elA)vd=new Float32Array(jsonObject.elA);if(jsonObject.lsP)wJ=new Float32Array(jsonObject.lsP);if(jsonObject.leP)MC=new Float32Array(jsonObject.leP);if(jsonObject.txP)Yp=new Float32Array(jsonObject.txP);if(jsonObject.brd)Ag=jsonObject.brd;if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.arS)xM=jsonObject.arS;if(jsonObject.aSw)Nb=jsonObject.aSw;if(xM==0.0)xM=g8;if(jsonObject.kTp)return this.buildLabel(false);else return this.buildLabel(true);}else{this.v.s("\x43\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.getJsonString=function(){return JSON.stringify(this.getJsonObject());};this.getJsonObject=function(){var O_={"\x63\x6c\x4e\x6d":"\x6c\x42","\x61\x4e\x72":this.__,"\x65\x4e\x6d":this.entityName,"\x73\x54\x78":this.E6,"\x68\x52\x66":this.iq,"\x63\x6f\x6c":this.color,"\x62\x67\x43\x6f\x6c":zi,"\x73\x69\x5a":this.size,"\x66\x6e\x74":vl,"\x74\x78\x74":rU,"\x68\x54":g8,"\x77\x44":hZ,"\x61\x32\x64":jk,"\x65\x6c\x41":new Array(vd[0],vd[1],vd[2]),"\x6c\x73\x50":new Array(wJ[0],wJ[1],wJ[2]),"\x6c\x65\x50":new Array(MC[0],MC[1],MC[2]),"\x74\x78\x50":new Array(Yp[0],Yp[1],Yp[2]),"\x62\x72\x64":Ag,"\x61\x72\x53":xM,"\x61\x53\x77":Nb};if(this.ib!=null)O_.lAn=this.ib.getLayerName();if(this.attributes.length>0)O_.attribs=this.VQ();return O_;};this.buildLabel=function(FF){var KH;var qh="\x6c\x6c";this.yu=false;var _=new Float32Array([0.0,0.0,0.0]);var mw=new Float32Array([0.0,0.0,0.0]);var a2=new Float32Array([0.0,0.0,0.0]);var Da=new Float32Array([0.0,0.0,0.0]);if((g8==0.0)||(hZ==0.0)){this.v.s("\x43\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x54\x65\x78\x74\x20\x77\x69\x64\x74\x68\x20\x6f\x72\x20\x68\x65\x69\x67\x68\x74\x20\x3d\x20\x30","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(Nb==true){var CI=this.v.T3(rU,vl);hZ=g8*CI;}if(zi[3]==0.0)QR=this.v.ZC(g8,hZ,vl,rU,this.getColor(),null,0);else QR=this.v.ZC(g8,hZ,vl,rU,this.getColor(),zi,0);if(QR==null){this.v.s("\x43\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x43\x61\x6e\x6e\x6f\x74\x20\x63\x72\x65\x61\x74\x65\x20\x74\x65\x78\x74\x20\x69\x6d\x61\x67\x65","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(zi[3]==0.0)mh=this.v.ZC(g8,hZ,vl,rU,this.v.hlColIni,null,0);else mh=this.v.ZC(g8,hZ,vl,rU,this.v.hlColIni,zi,0);var qV=new mat4.createIdent();var O9=new mat4.createIdent();mat4.AddXRotation(qV,vd[0]*Math.PI/180.0);mat4.AddYRotation(qV,vd[1]*Math.PI/180.0);mat4.AddZRotation(qV,vd[2]*Math.PI/180.0);if(FF==false){var qf=new Float32Array([Yp[0],Yp[1],Yp[2]]);var KT=new Float32Array([wJ[0],wJ[1],wJ[2]]);var uh=g8*0.5;var eD=new mat4.createIdent();mat4.inverse(qV,eD);mat4.multiplyVec3(eD,qf);mat4.multiplyVec3(eD,KT);_[0]=qf[0];_[1]=qf[1];_[2]=qf[2];mw[0]=qf[0]+(hZ+2*uh);mw[1]=qf[1];mw[2]=qf[2];a2[0]=qf[0];a2[1]=qf[1]+(g8+2*uh);a2[2]=qf[2];Da[0]=qf[0]+(hZ+2*uh);Da[1]=qf[1]+(g8+2*uh);Da[2]=qf[2];var Y1=CmiHelpers.calculate3dDistance(KT,_);var _T=CmiHelpers.calculate3dDistance(KT,mw);var kn=CmiHelpers.calculate3dDistance(KT,a2);var YP=CmiHelpers.calculate3dDistance(KT,Da);var D6=Math.min(Math.min(Y1,_T),Math.min(kn,YP));if(CmiHelpers.isEqual(D6,Y1)){qh="\x6c\x6c";}else if(CmiHelpers.isEqual(D6,_T)){qh="\x6c\x72";}else if(CmiHelpers.isEqual(D6,kn)){qh="\x75\x6c";}else if(CmiHelpers.isEqual(D6,YP)){qh="\x75\x72";}_=new Float32Array([0.0,0.0,0.0]);mw=new Float32Array([0.0,0.0,0.0]);a2=new Float32Array([0.0,0.0,0.0]);Da=new Float32Array([0.0,0.0,0.0]);}if(jk==0.0){var eD=new mat4.createIdent();mat4.inverse(qV,eD);jk=CmiHelpers.jc(wJ,MC,eD);}mat4.addTranslation(qV,wJ,O9);CmiHelpers.AA(xM,xM*0.5,jk,mw,a2);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);jj[0]=_[0];jj[1]=_[1];jj[2]=_[2];jj[3]=mw[0];jj[4]=mw[1];jj[5]=mw[2];jj[6]=a2[0];jj[7]=a2[1];jj[8]=a2[2];mat4.addTranslation(qV,Yp,O9);var m2=0;var _H=0;if(qh=="\x6c\x6c"){m2=g8+hZ;_H=g8*2;}else if(qh=="\x6c\x72"){m2=-(g8+hZ);_H=g8*2;}else if(qh=="\x75\x6c"){m2=g8+hZ;_H=-(g8*2);}else if(qh=="\x75\x72"){m2=-(g8+hZ);_H=-(g8*2);}_[0]=0.0;_[1]=0.0;_[2]=0.0;mw[0]=m2;mw[1]=0.0;mw[2]=0.0;a2[0]=0.0;a2[1]=_H;a2[2]=0.0;Da[0]=m2;Da[1]=_H;Da[2]=0.0;if(zi[3]>0){_[2]=-g8*0.01;mw[2]=-g8*0.01;a2[2]=-g8*0.01;a2[2]=-g8*0.01;mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);a7[0]=_[0];a7[1]=_[1];a7[2]=_[2];a7[3]=mw[0];a7[4]=mw[1];a7[5]=mw[2];a7[6]=Da[0];a7[7]=Da[1];a7[8]=Da[2];a7[9]=Da[0];a7[10]=Da[1];a7[11]=Da[2];a7[12]=a2[0];a7[13]=a2[1];a7[14]=a2[2];a7[15]=_[0];a7[16]=_[1];a7[17]=_[2];_[0]=0.0;_[1]=0.0;_[2]=0.0;mw[0]=m2;mw[1]=0.0;mw[2]=0.0;a2[0]=0.0;a2[1]=_H;a2[2]=0.0;Da[0]=m2;Da[1]=_H;Da[2]=0.0;}switch(Ag){case 0:U=new Float32Array(6);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];Hz=1;break;case 1:U=new Float32Array(12);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=a2[0];U[7]=a2[1];U[8]=a2[2];U[9]=Da[0];U[10]=Da[1];U[11]=Da[2];Hz=2;break;case 2:U=new Float32Array(12);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=_[0];U[7]=_[1];U[8]=_[2];U[9]=mw[0];U[10]=mw[1];U[11]=mw[2];Hz=2;break;case 3:U=new Float32Array(30);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=_[0];U[7]=_[1];U[8]=_[2];U[9]=mw[0];U[10]=mw[1];U[11]=mw[2];U[12]=a2[0];U[13]=a2[1];U[14]=a2[2];U[15]=Da[0];U[16]=Da[1];U[17]=Da[2];U[18]=_[0];U[19]=_[1];U[20]=_[2];U[21]=a2[0];U[22]=a2[1];U[23]=a2[2];U[24]=mw[0];U[25]=mw[1];U[26]=mw[2];U[27]=Da[0];U[28]=Da[1];U[29]=Da[2];Hz=5;break;case 4:{var NW=(a2[1]-_[1])*0.5;var kR=0;var jP=0;var ol=new Float32Array([_[0],_[1]+NW,0.0]);var Hg=new Float32Array([mw[0],_[1]+NW,0.0]);var tf=CmiHelpers.Di(ol,NW,90,270,O9,false);var Dv=CmiHelpers.Di(Hg,NW,-90,90,O9,false);kR=parseInt(tf.length/6);jP=parseInt(Dv.length/6);U=new Float32Array((kR+jP+3)*3*2);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=_[0];U[7]=_[1];U[8]=_[2];U[9]=mw[0];U[10]=mw[1];U[11]=mw[2];Hz=2;U[12]=a2[0];U[13]=a2[1];U[14]=a2[2];U[15]=Da[0];U[16]=Da[1];U[17]=Da[2];Hz=3+kR+jP;U.set(tf,3*3*2);U.set(Dv,(3+kR)*3*2);}break;}var uh=g8*0.5;mat4.addTranslation(qV,Yp,O9);if(qh=="\x6c\x6c"){_[0]=uh;_[1]=uh;_[2]=0.0;mw[0]=hZ+uh;mw[1]=uh;mw[2]=0.0;a2[0]=uh;a2[1]=g8+uh;a2[2]=0.0;Da[0]=hZ+uh;Da[1]=g8+uh;Da[2]=0.0;}else if(qh=="\x6c\x72"){_[0]=-hZ-uh;_[1]=uh;_[2]=0.0;mw[0]=-uh;mw[1]=uh;mw[2]=0.0;a2[0]=-hZ-uh;a2[1]=g8+uh;a2[2]=0.0;Da[0]=-uh;Da[1]=g8+uh;Da[2]=0.0;}else if(qh=="\x75\x6c"){_[0]=uh;_[1]=-g8-uh;_[2]=0.0;mw[0]=hZ+uh;mw[1]=-g8-uh;mw[2]=0.0;a2[0]=uh;a2[1]=-uh;a2[2]=0.0;Da[0]=hZ+uh;Da[1]=-uh;Da[2]=0.0;}else if(qh=="\x75\x72"){_[0]=-hZ-uh;_[1]=-g8-uh;_[2]=0.0;mw[0]=-uh;mw[1]=-g8-uh;mw[2]=0.0;a2[0]=-hZ-uh;a2[1]=-uh;a2[2]=0.0;Da[0]=-uh;Da[1]=-uh;Da[2]=0.0;}mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);iu[0]=_[0];iu[1]=_[1];iu[2]=_[2];iu[3]=mw[0];iu[4]=mw[1];iu[5]=mw[2];iu[6]=Da[0];iu[7]=Da[1];iu[8]=Da[2];iu[9]=Da[0];iu[10]=Da[1];iu[11]=Da[2];iu[12]=a2[0];iu[13]=a2[1];iu[14]=a2[2];iu[15]=_[0];iu[16]=_[1];iu[17]=_[2];var Fj=new vec3.create();mat4.identity(qV);Fj[2]=0.0;T1[0]=0.0;T1[1]=0.0;Fj[0]=QR.L0;Fj[1]=0.0;mat4.multiplyVec3(qV,Fj);T1[2]=Fj[0];T1[3]=Fj[1];Fj[0]=QR.L0;Fj[1]=1.0;mat4.multiplyVec3(qV,Fj);T1[4]=Fj[0];T1[5]=Fj[1];Fj[0]=QR.L0;Fj[1]=1.0;mat4.multiplyVec3(qV,Fj);T1[6]=Fj[0];T1[7]=Fj[1];Fj[0]=0.0;Fj[1]=1.0;mat4.multiplyVec3(qV,Fj);T1[8]=Fj[0];T1[9]=Fj[1];T1[10]=0.0;T1[11]=0.0;var _I=Math.max(2,Hz*2);Gi=new Uint16Array(_I*3);for(var G=0;G<_I*3;G++){Gi[G]=G;}this.Q4();this.calculateExtensions();this.yu=true;return 0;};this.calculateExtensions=function(){if(iu.length<3){return;}var m=new Array(10000000.0,10000000.0,10000000.0);var V=new Array(-10000000.0,-10000000.0,-10000000.0);var L5=iu.length/3;for(var G=0;G<L5;G++){if(iu[3*G+0]<m[0])m[0]=iu[3*G+0];if(iu[3*G+1]<m[1])m[1]=iu[3*G+1];if(iu[3*G+2]<m[2])m[2]=iu[3*G+2];if(iu[3*G+0]>V[0])V[0]=iu[3*G+0];if(iu[3*G+1]>V[1])V[1]=iu[3*G+1];if(iu[3*G+2]>V[2])V[2]=iu[3*G+2];}L5=jj.length/3;for(var G=0;G<L5;G++){if(jj[3*G+0]<m[0])m[0]=jj[3*G+0];if(jj[3*G+1]<m[1])m[1]=jj[3*G+1];if(jj[3*G+2]<m[2])m[2]=jj[3*G+2];if(jj[3*G+0]>V[0])V[0]=jj[3*G+0];if(jj[3*G+1]>V[1])V[1]=jj[3*G+1];if(jj[3*G+2]>V[2])V[2]=jj[3*G+2];}L5=U.length/3;for(var G=0;G<L5;G++){if(U[3*G+0]<m[0])m[0]=U[3*G+0];if(U[3*G+1]<m[1])m[1]=U[3*G+1];if(U[3*G+2]<m[2])m[2]=U[3*G+2];if(U[3*G+0]>V[0])V[0]=U[3*G+0];if(U[3*G+1]>V[1])V[1]=U[3*G+1];if(U[3*G+2]>V[2])V[2]=U[3*G+2];}this.Ox=CmiHelpers.mv(m,V);this.size=CmiHelpers.calculate3dDistance(m,V);this.KA=this.size*0.5;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(vn!=null)this.h.deleteBuffer(vn);vn=null;if(nF!=null)this.h.deleteBuffer(nF);nF=null;if(vt!=null)this.h.deleteBuffer(vt);vt=null;if(GF!=null)this.h.deleteBuffer(GF);GF=null;if(wL!=null)this.h.deleteBuffer(wL);wL=null;if(AO!=null)this.h.deleteBuffer(AO);AO=null;if(Ie!=null)this.h.deleteTexture(Ie);Ie=null;if(No!=null)this.h.deleteTexture(No);No=null;};this.Q4=function(){var C=this.v.q9();this.QD();vn=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.bufferData(this.h.ARRAY_BUFFER,iu,this.h.STATIC_DRAW);vn.itemSize=3;vn.numItems=iu.length/3;nF=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.bufferData(this.h.ARRAY_BUFFER,jj,this.h.STATIC_DRAW);nF.itemSize=3;nF.numItems=jj.length/3;vt=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,vt);this.h.bufferData(this.h.ARRAY_BUFFER,U,this.h.STATIC_DRAW);vt.itemSize=3;vt.numItems=U.length/3;GF=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,GF);this.h.bufferData(this.h.ARRAY_BUFFER,a7,this.h.STATIC_DRAW);GF.itemSize=3;GF.numItems=a7.length/3;wL=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.bufferData(this.h.ARRAY_BUFFER,T1,this.h.STATIC_DRAW);wL.itemSize=2;wL.numItems=T1.length/2;AO=this.h.createBuffer();this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);this.h.bufferData(this.h.ELEMENT_ARRAY_BUFFER,Gi,this.h.STATIC_DRAW);AO.itemSize=1;AO.numItems=Gi.length;Ie=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,Ie);this.h.pixelStorei(this.h.UNPACK_FLIP_Y_WEBGL,true);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,this.h.RGBA,this.h.UNSIGNED_BYTE,QR.nD);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MAG_FILTER,this.h.LINEAR);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MIN_FILTER,this.h.LINEAR_MIPMAP_LINEAR);this.h.generateMipmap(this.h.TEXTURE_2D);this.h.bindTexture(this.h.TEXTURE_2D,null);No=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,No);this.h.pixelStorei(this.h.UNPACK_FLIP_Y_WEBGL,true);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,this.h.RGBA,this.h.UNSIGNED_BYTE,mh.nD);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MAG_FILTER,this.h.LINEAR);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MIN_FILTER,this.h.LINEAR_MIPMAP_LINEAR);this.h.generateMipmap(this.h.TEXTURE_2D);this.h.bindTexture(this.h.TEXTURE_2D,null);};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,1*3);}this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(ym.A==null){this.v.s("\x43\x6d\x69\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.drawBoundingBox==true)this.yI(false,false,true);if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}WO.Np(this.getColor(),0);this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.vertexAttribPointer(WO.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,1*3);}WO.Np(this.getColor(),0);this.h.bindBuffer(this.h.ARRAY_BUFFER,vt);this.h.vertexAttribPointer(WO.W,3,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.LINES,0,Hz*2);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.LINES,0,Hz*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,Hz*2);}WO.PL(0);if(zi[3]>0){d1.Np(zi,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,GF);this.h.vertexAttribPointer(d1.W,3,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}d1.PL(0);}ym.Np(this.v.bgColIni,0);this.h.activeTexture(this.h.TEXTURE0);if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true)))this.h.bindTexture(this.h.TEXTURE_2D,No);else this.h.bindTexture(this.h.TEXTURE_2D,Ie);this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.vertexAttribPointer(ym.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.vertexAttribPointer(ym.rD,2,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);ym.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);ym.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}ym.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};CmiLabelObject.prototype=new CmiBaseObject();var CmiImageLabelObject=function(o){var oL="\x63\x6d\x69\x49\x6d\x61\x67\x65\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74";var S0=new Float32Array(18);var U=new Float32Array(18);var jj=new Float32Array(9);var T1=new Float32Array(12);var Gi=new Uint16Array(0);var vn=null;var vt=null;var nF=null;var wL=null;var AO=null;var ym=null;var WO=null;var F1=0.0;var Jp=0.0;var xM=1.0;var Ie=null;var Ag=0;var Hz=0;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();var vd=new Float32Array([0.0,0.0,0.0]);var wJ=new Float32Array([0.0,0.0,0.0]);var MC=new Float32Array([0.0,0.0,0.0]);var zF=new Float32Array([0.0,0.0,0.0]);var jk=0.0;var u4="";this.getClassName=function(){return oL;};this.setColor=function(J_){this.color=J_;};this.getImageWidth=function(){return F1;};this.setImageWidth=function(Ji){F1=Ji;jk=0.0;};this.b0=function(){return Jp;};this.setImageheight=function(OU){Jp=OU;jk=0.0;};this.getArrowSize=function(){return xM;};this.setArrowSize=function(ey){xM=ey;};this.getTexture=function(){return Ie;};this.setImage=function(p1){var canvas=document.createElement("\x63\x61\x6e\x76\x61\x73");canvas.width=p1.width;canvas.height=p1.height;var v9=canvas.getContext("\x32\x64");v9.drawImage(p1,0,0);u4=canvas.toDataURL("\x69\x6d\x61\x67\x65\x2f\x70\x6e\x67");Ie=this.v.getPreloadedTexture(p1.src);if(Ie==null){Ie=new CmiTexture(this.v,p1.src);Ie.Cr(u4,true,true);this.v._y(Ie);}jk=0.0;};this.getImageData=function(){return u4;};this.getOrientation=function(){return vd;};this.setOrientation=function(F_){vd=new Float32Array([F_[0],F_[1],F_[2]]);jk=0.0;};this.getLineStartPoint=function(){return wJ;};this.setLineStartPoint=function(lg){wJ=new Float32Array([lg[0],lg[1],lg[2]]);jk=0.0;};this.getLineEndPoint=function(){return MC;};this.setLineEndPoint=function(kQ,project){if(project==true){var qV=new mat4.createIdent();var eD=new mat4.createIdent();mat4.AddXRotation(qV,vd[0]*Math.PI/180.0);mat4.AddYRotation(qV,vd[1]*Math.PI/180.0);mat4.AddZRotation(qV,vd[2]*Math.PI/180.0);mat4.inverse(qV,eD);var Nn=CmiHelpers.projectPointToCs(kQ,eD);var DM=CmiHelpers.projectPointToCs(wJ,eD);Nn[2]=DM[2];Nn=CmiHelpers.projectPointToCs(Nn,qV);MC=new Float32Array([Nn[0],Nn[1],Nn[2]]);}else MC=new Float32Array([kQ[0],kQ[1],kQ[2]]);jk=0.0;};this.getImagePoint=function(){return zF;};this.setImagePoint=function(pA,project){if(project==true){var qV=new mat4.createIdent();var eD=new mat4.createIdent();mat4.AddXRotation(qV,vd[0]*Math.PI/180.0);mat4.AddYRotation(qV,vd[1]*Math.PI/180.0);mat4.AddZRotation(qV,vd[2]*Math.PI/180.0);mat4.inverse(qV,eD);var Nn=CmiHelpers.projectPointToCs(pA,eD);var DM=CmiHelpers.projectPointToCs(wJ,eD);Nn[2]=DM[2];Nn=CmiHelpers.projectPointToCs(Nn,qV);zF=new Float32Array([Nn[0],Nn[1],Nn[2]]);}else zF=new Float32Array([pA[0],pA[1],pA[2]]);};this.getBorderStyle=function(){return Ag;};this.setBorderStyle=function(S7){Ag=S7;};this.v=o;this.h=o.q9();this.cmiType=42;this.attributes=new Array();this.color[3]=0.0;ym=this.v.getShader("\x54\x65\x78\x74");WO=this.v.getShader("\x50\x6c\x61\x69\x6e\x43\x6f\x6c\x6f\x72");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x69\x4c"){if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;this.color[3]=0.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.iMg){u4=jsonObject.iMg;Ie=new CmiTexture(this.v,this.entityName);Ie.Cr(u4,false,true);}if(jsonObject.wD)F1=jsonObject.wD;if(jsonObject.hT)Jp=jsonObject.hT;if(jsonObject.a2d)jk=jsonObject.a2d;if(jsonObject.elA)vd=new Float32Array(jsonObject.elA);if(jsonObject.lsP)wJ=new Float32Array(jsonObject.lsP);if(jsonObject.leP)MC=new Float32Array(jsonObject.leP);if(jsonObject.imP)zF=new Float32Array(jsonObject.imP);if(jsonObject.brd)Ag=jsonObject.brd;if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.arS)xM=jsonObject.arS;if(xM==0.0)xM=Jp*0.2;if(jsonObject.kTp)return this.buildLabel(false);else return this.buildLabel(true);}else{this.v.s("\x43\x6d\x69\x49\x6d\x61\x67\x65\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.getJsonString=function(){return JSON.stringify(this.getJsonObject());};this.getJsonObject=function(){var O_={"\x63\x6c\x4e\x6d":"\x69\x4c","\x61\x4e\x72":this.__,"\x65\x4e\x6d":this.entityName,"\x73\x54\x78":this.E6,"\x68\x52\x66":this.iq,"\x63\x6f\x6c":this.color,"\x73\x69\x5a":this.size,"\x69\x4d\x67":u4,"\x77\x44":F1,"\x68\x54":Jp,"\x61\x32\x64":jk,"\x65\x6c\x41":new Array(vd[0],vd[1],vd[2]),"\x6c\x73\x50":new Array(wJ[0],wJ[1],wJ[2]),"\x6c\x65\x50":new Array(MC[0],MC[1],MC[2]),"\x69\x6d\x50":new Array(zF[0],zF[1],zF[2]),"\x62\x72\x64":Ag,"\x61\x72\x53":xM};if(this.ib!=null)O_.lAn=this.ib.getLayerName();if(this.attributes.length>0)O_.attribs=this.VQ();return O_;};this.buildLabel=function(iB){var KH;var qh="\x6c\x6c";this.yu=false;var _=new Float32Array([0.0,0.0,0.0]);var mw=new Float32Array([0.0,0.0,0.0]);var a2=new Float32Array([0.0,0.0,0.0]);var Da=new Float32Array([0.0,0.0,0.0]);if((F1==0.0)||(Jp==0.0)){this.v.s("\x43\x6d\x69\x49\x6d\x61\x67\x65\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x54\x65\x78\x74\x20\x77\x69\x64\x74\x68\x20\x6f\x72\x20\x68\x65\x69\x67\x68\x74\x20\x3d\x20\x30","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}var qV=new mat4.createIdent();var O9=new mat4.createIdent();mat4.AddXRotation(qV,vd[0]*Math.PI/180.0);mat4.AddYRotation(qV,vd[1]*Math.PI/180.0);mat4.AddZRotation(qV,vd[2]*Math.PI/180.0);if(iB==false){var OA=new Float32Array([zF[0],zF[1],zF[2]]);var KT=new Float32Array([wJ[0],wJ[1],wJ[2]]);var eD=new mat4.createIdent();mat4.inverse(qV,eD);mat4.multiplyVec3(eD,OA);mat4.multiplyVec3(eD,KT);_[0]=OA[0];_[1]=OA[1];_[2]=OA[2];mw[0]=OA[0]+F1;mw[1]=OA[1];mw[2]=OA[2];a2[0]=OA[0];a2[1]=OA[1]+Jp;a2[2]=OA[2];Da[0]=OA[0]+F1;Da[1]=OA[1]+Jp;Da[2]=OA[2];var Y1=CmiHelpers.calculate3dDistance(KT,_);var _T=CmiHelpers.calculate3dDistance(KT,mw);var kn=CmiHelpers.calculate3dDistance(KT,a2);var YP=CmiHelpers.calculate3dDistance(KT,Da);var D6=Math.min(Math.min(Y1,_T),Math.min(kn,YP));if(CmiHelpers.isEqual(D6,Y1)){qh="\x6c\x6c";}else if(CmiHelpers.isEqual(D6,_T)){qh="\x6c\x72";}else if(CmiHelpers.isEqual(D6,kn)){qh="\x75\x6c";}else if(CmiHelpers.isEqual(D6,YP)){qh="\x75\x72";}_=new Float32Array([0.0,0.0,0.0]);mw=new Float32Array([0.0,0.0,0.0]);a2=new Float32Array([0.0,0.0,0.0]);Da=new Float32Array([0.0,0.0,0.0]);}if(jk==0.0){var eD=new mat4.createIdent();mat4.inverse(qV,eD);jk=CmiHelpers.jc(wJ,MC,eD);}mat4.addTranslation(qV,wJ,O9);CmiHelpers.AA(xM,xM*0.5,jk,mw,a2);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);jj[0]=_[0];jj[1]=_[1];jj[2]=_[2];jj[3]=mw[0];jj[4]=mw[1];jj[5]=mw[2];jj[6]=a2[0];jj[7]=a2[1];jj[8]=a2[2];mat4.addTranslation(qV,zF,O9);if(qh=="\x6c\x6c"){_[0]=0.0;mw[0]=F1;a2[0]=0.0;Da[0]=F1;_[1]=0.0;mw[1]=0.0;a2[1]=Jp;Da[1]=Jp;_[2]=0.0;mw[2]=0.0;a2[2]=0.0;Da[2]=0.0;}else if(qh=="\x6c\x72"){_[0]=-F1;mw[0]=0.0;a2[0]=-F1;Da[0]=0.0;_[1]=0.0;mw[1]=0.0;a2[1]=Jp;Da[1]=Jp;_[2]=0.0;mw[2]=0.0;a2[2]=0.0;Da[2]=0.0;}else if(qh=="\x75\x6c"){_[0]=0.0;mw[0]=F1;a2[0]=0.0;Da[0]=F1;_[1]=-Jp;mw[1]=-Jp;a2[1]=0.0;Da[1]=0.0;_[2]=0.0;mw[2]=0.0;a2[2]=0.0;Da[2]=0.0;}else if(qh=="\x75\x72"){_[0]=-F1;mw[0]=0.0;a2[0]=-F1;Da[0]=0.0;_[1]=-Jp;mw[1]=-Jp;a2[1]=0.0;Da[1]=0.0;_[2]=0.0;mw[2]=0.0;a2[2]=0.0;Da[2]=0.0;}switch(Ag){case 0:U=new Float32Array(6);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];Hz=1;break;case 1:U=new Float32Array(12);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=a2[0];U[7]=a2[1];U[8]=a2[2];U[9]=Da[0];U[10]=Da[1];U[11]=Da[2];Hz=2;break;case 2:U=new Float32Array(12);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=_[0];U[7]=_[1];U[8]=_[2];U[9]=mw[0];U[10]=mw[1];U[11]=mw[2];Hz=2;break;case 3:U=new Float32Array(30);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=_[0];U[7]=_[1];U[8]=_[2];U[9]=mw[0];U[10]=mw[1];U[11]=mw[2];U[12]=a2[0];U[13]=a2[1];U[14]=a2[2];U[15]=Da[0];U[16]=Da[1];U[17]=Da[2];U[18]=_[0];U[19]=_[1];U[20]=_[2];U[21]=a2[0];U[22]=a2[1];U[23]=a2[2];U[24]=mw[0];U[25]=mw[1];U[26]=mw[2];U[27]=Da[0];U[28]=Da[1];U[29]=Da[2];Hz=5;break;case 4:{var NW=(a2[1]-_[1])*0.5;var kR=0;var jP=0;var ol=new Float32Array([_[0],_[1]+NW,0.0]);var Hg=new Float32Array([mw[0],_[1]+NW,0.0]);var tf=CmiHelpers.Di(ol,NW,90,270,O9,false);var Dv=CmiHelpers.Di(Hg,NW,-90,90,O9,false);kR=parseInt(tf.length/6);jP=parseInt(Dv.length/6);U=new Float32Array((kR+jP+3)*3*2);mat4.multiplyVec3(O9,_);mat4.multiplyVec3(O9,mw);mat4.multiplyVec3(O9,a2);mat4.multiplyVec3(O9,Da);U[0]=wJ[0];U[1]=wJ[1];U[2]=wJ[2];U[3]=MC[0];U[4]=MC[1];U[5]=MC[2];U[6]=_[0];U[7]=_[1];U[8]=_[2];U[9]=mw[0];U[10]=mw[1];U[11]=mw[2];Hz=2;U[12]=a2[0];U[13]=a2[1];U[14]=a2[2];U[15]=Da[0];U[16]=Da[1];U[17]=Da[2];Hz=3+kR+jP;U.set(tf,3*3*2);U.set(Dv,(3+kR)*3*2);}break;}S0[0]=_[0];S0[1]=_[1];S0[2]=_[2];S0[3]=mw[0];S0[4]=mw[1];S0[5]=mw[2];S0[6]=Da[0];S0[7]=Da[1];S0[8]=Da[2];S0[9]=Da[0];S0[10]=Da[1];S0[11]=Da[2];S0[12]=a2[0];S0[13]=a2[1];S0[14]=a2[2];S0[15]=_[0];S0[16]=_[1];S0[17]=_[2];T1[0]=0.0;T1[1]=0.0;T1[2]=1.0;T1[3]=0.0;T1[4]=1.0;T1[5]=1.0;T1[6]=1.0;T1[7]=1.0;T1[8]=0.0;T1[9]=1.0;T1[10]=0.0;T1[11]=0.0;var _I=Math.max(2,Hz*2);Gi=new Uint16Array(_I*3);for(var G=0;G<_I*3;G++){Gi[G]=G;}this.Q4();this.calculateExtensions();this.yu=true;return 0;};this.calculateExtensions=function(){if(S0.length<3){return;}var m=new Array(10000000.0,10000000.0,10000000.0);var V=new Array(-10000000.0,-10000000.0,-10000000.0);var L5=S0.length/3;for(var G=0;G<L5;G++){if(S0[3*G+0]<m[0])m[0]=S0[3*G+0];if(S0[3*G+1]<m[1])m[1]=S0[3*G+1];if(S0[3*G+2]<m[2])m[2]=S0[3*G+2];if(S0[3*G+0]>V[0])V[0]=S0[3*G+0];if(S0[3*G+1]>V[1])V[1]=S0[3*G+1];if(S0[3*G+2]>V[2])V[2]=S0[3*G+2];}L5=jj.length/3;for(var G=0;G<L5;G++){if(jj[3*G+0]<m[0])m[0]=jj[3*G+0];if(jj[3*G+1]<m[1])m[1]=jj[3*G+1];if(jj[3*G+2]<m[2])m[2]=jj[3*G+2];if(jj[3*G+0]>V[0])V[0]=jj[3*G+0];if(jj[3*G+1]>V[1])V[1]=jj[3*G+1];if(jj[3*G+2]>V[2])V[2]=jj[3*G+2];}L5=U.length/3;for(var G=0;G<L5;G++){if(U[3*G+0]<m[0])m[0]=U[3*G+0];if(U[3*G+1]<m[1])m[1]=U[3*G+1];if(U[3*G+2]<m[2])m[2]=U[3*G+2];if(U[3*G+0]>V[0])V[0]=U[3*G+0];if(U[3*G+1]>V[1])V[1]=U[3*G+1];if(U[3*G+2]>V[2])V[2]=U[3*G+2];}this.Ox=CmiHelpers.mv(m,V);this.size=CmiHelpers.calculate3dDistance(m,V);this.KA=this.size*0.5;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(vn!=null)this.h.deleteBuffer(vn);vn=null;if(nF!=null)this.h.deleteBuffer(nF);nF=null;if(vt!=null)this.h.deleteBuffer(vt);vt=null;if(wL!=null)this.h.deleteBuffer(wL);wL=null;if(AO!=null)this.h.deleteBuffer(AO);AO=null;};this.Q4=function(){var C=this.v.q9();this.QD();vn=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.bufferData(this.h.ARRAY_BUFFER,S0,this.h.STATIC_DRAW);vn.itemSize=3;vn.numItems=S0.length/3;nF=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.bufferData(this.h.ARRAY_BUFFER,jj,this.h.STATIC_DRAW);nF.itemSize=3;nF.numItems=jj.length/3;vt=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,vt);this.h.bufferData(this.h.ARRAY_BUFFER,U,this.h.STATIC_DRAW);vt.itemSize=3;vt.numItems=U.length/3;wL=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.bufferData(this.h.ARRAY_BUFFER,T1,this.h.STATIC_DRAW);wL.itemSize=2;wL.numItems=T1.length/2;AO=this.h.createBuffer();this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);this.h.bufferData(this.h.ELEMENT_ARRAY_BUFFER,Gi,this.h.STATIC_DRAW);AO.itemSize=1;AO.numItems=Gi.length;this.h.bindTexture(this.h.TEXTURE_2D,null);};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x49\x6d\x61\x67\x65\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x49\x6d\x61\x67\x65\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,1*3);}this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x49\x6d\x61\x67\x65\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(ym.A==null){this.v.s("\x43\x6d\x69\x49\x6d\x61\x67\x65\x4c\x61\x62\x65\x6c\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}WO.Np(this.getColor(),0);this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.vertexAttribPointer(WO.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,1*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,1*3);}WO.Np(this.getColor(),0);this.h.bindBuffer(this.h.ARRAY_BUFFER,vt);this.h.vertexAttribPointer(WO.W,3,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.LINES,0,Hz*2);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.LINES,0,Hz*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,Hz*2);}WO.PL(0);ym.Np(this.v.bgColIni,0);this.h.activeTexture(this.h.TEXTURE0);if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true)))this.h.bindTexture(this.h.TEXTURE_2D,Ie.Dz);else this.h.bindTexture(this.h.TEXTURE_2D,Ie.Dz);this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.vertexAttribPointer(ym.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.vertexAttribPointer(ym.rD,2,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);ym.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);ym.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}ym.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};CmiImageLabelObject.prototype=new CmiBaseObject();var eP=function(o){var oL="\x63\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74";var iu=new Float32Array(18);var y0=new Float32Array(0);var jj=new Float32Array(0);var T1=new Float32Array(12);var Gi=new Uint16Array(0);var vn=null;var Uj=null;var nF=null;var wL=null;var AO=null;var ym=null;var WO=null;var vl="";var hZ=0.0;var g8=0.0;var Ie=null;var QR=null;var No=null;var mh=null;var Z_=0;var rS=0;var UT="\x6c\x69\x6e";var Ck=o.jD();var xm=o.sH();var Xp=o.BV();this.getClassName=function(){return oL;};this.v=o;this.h=o.q9();this.cmiType=4;this.attributes=new Array();this.color[3]=0.0;ym=this.v.getShader("\x54\x65\x78\x74");WO=this.v.getShader("\x50\x6c\x61\x69\x6e\x43\x6f\x6c\x6f\x72");this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x64\x49"){var KH;var un="";var DL="";var L2=0;var utPos=0;var Ii=new Float32Array([0.0,0.0,0.0]);this.yu=false;if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm)this.entityName=jsonObject.eNm;if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;this.color[3]=0.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.fnt)vl=jsonObject.fnt;if(jsonObject.dimTxt)un=jsonObject.dimTxt;if(jsonObject.utTxt)DL=jsonObject.utTxt;if(jsonObject.tolTyp)L2=jsonObject.tolTyp;if(jsonObject.typ)UT=jsonObject.typ;if(jsonObject.hT)g8=jsonObject.hT;if(jsonObject.wD)hZ=jsonObject.wD;if(jsonObject.utPos)utPos=jsonObject.utPos;if(jsonObject.elA)Ii=new Float32Array(jsonObject.elA);if(jsonObject.vAar)jj=new Float32Array(jsonObject.vAar);if(jsonObject.vAln)y0=new Float32Array(jsonObject.vAln);if(jsonObject.vAtx)KH=new Float32Array(jsonObject.vAtx);if((hZ==0.0)||(g8==0.0)){var Mu=new Array(KH[0],KH[1],KH[2]);var Su=new Array(KH[3],KH[4],KH[5]);var h2=new Array(KH[6],KH[7],KH[8]);var D4=new Array(KH[9],KH[10],KH[11]);hZ=CmiHelpers.calculate3dDistance(Mu,Su);g8=CmiHelpers.calculate3dDistance(Mu,D4);}if((g8==0.0)||(hZ==0.0)){this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x54\x65\x78\x74\x20\x77\x69\x64\x74\x68\x20\x6f\x72\x20\x68\x65\x69\x67\x68\x74\x20\x3d\x20\x30","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if((L2==4)&&(DL.length>0)){QR=this.v.ZC(g8,hZ,vl,un,this.getColor(),null,0,DL,utPos);mh=this.v.ZC(g8,hZ,vl,un,this.v.hlColIni,null,0,DL,utPos);}else{QR=this.v.ZC(g8,hZ,vl,un,this.getColor(),null,0);mh=this.v.ZC(g8,hZ,vl,un,this.v.hlColIni,null,0);}if(QR==null){this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x43\x61\x6e\x6e\x6f\x74\x20\x63\x72\x65\x61\x74\x65\x20\x74\x65\x78\x74\x20\x69\x6d\x61\x67\x65","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(UT=="\x61\x6e\x67"){if(!jsonObject.adInf){this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x4d\x69\x73\x73\x69\x6e\x67\x20\x65\x6e\x74\x69\x74\x79\x20\x69\x6e\x66\x6f\x72\x6d\x61\x74\x69\x6f\x6e\x20\x61\x64\x49\x6e\x66","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}var NW=1.0;var V3=0.0;var yq=90.0;var rn=0.0;var pQ=90.0;var kR=0;var jP=0;var qV=new mat4.createIdent();var j3=new Float32Array([0.0,0.0,0.0]);var Zm=new Float32Array([0.0,0.0,0.0]);var a2=new Float32Array([0.0,0.0,0.0]);var Da=new Float32Array([0.0,0.0,0.0]);var ol=new Float32Array([0.0,0.0,0.0]);var A_=new Float32Array(0);var aM=true;var zW;var Nt=new Float32Array(6);A_=new Float32Array(jsonObject.adInf);Ii[0]=A_[0];Ii[1]=A_[1];Ii[2]=A_[2];j3[0]=A_[3];j3[1]=A_[4];j3[2]=A_[5];NW=A_[6];V3=A_[7];yq=A_[8];rn=A_[9];pQ=A_[10];if(A_.length>11){aM=false;Nt[0]=A_[11];Nt[1]=A_[12];Nt[2]=A_[13];Nt[3]=A_[14];Nt[4]=A_[15];Nt[5]=A_[16];}if((Ii[0]!=0.0)||(Ii[1]!=0.0)||(Ii[2]!=0.0)){mat4.AddXRotation(qV,Ii[0]*Math.PI/180.0);mat4.AddYRotation(qV,Ii[1]*Math.PI/180.0);mat4.AddZRotation(qV,Ii[2]*Math.PI/180.0);}mat4.addTranslation(qV,j3);var Dv;var tf;var zj=new Float32Array([0.0,0.0,0.0]);if((aM)&&(rn!=pQ)){Dv=CmiHelpers.Di(zj,NW,V3,yq,qV,false);tf=CmiHelpers.Di(zj,NW,rn,pQ,qV,false);}else{Dv=CmiHelpers.Di(zj,NW,V3,yq,qV,false);tf=new Float32Array(0);}if(aM)zW=new Float32Array(Dv.length+tf.length+y0.length);else zW=new Float32Array(Dv.length+tf.length+y0.length+6);var Ja=0;for(var G=0;G<y0.length;G++){zW[Ja]=y0[G];Ja++;}for(var G=0;G<Dv.length;G++){zW[Ja]=Dv[G];Ja++;}for(var G=0;G<tf.length;G++){zW[Ja]=tf[G];Ja++;}if(!aM){zW[Ja]=Nt[0];Ja++;zW[Ja]=Nt[1];Ja++;zW[Ja]=Nt[2];Ja++;zW[Ja]=Nt[3];Ja++;zW[Ja]=Nt[4];Ja++;zW[Ja]=Nt[5];Ja++;}y0=new Float32Array(zW);}iu[0]=KH[0];iu[1]=KH[1];iu[2]=KH[2];iu[3]=KH[3];iu[4]=KH[4];iu[5]=KH[5];iu[6]=KH[6];iu[7]=KH[7];iu[8]=KH[8];iu[9]=KH[6];iu[10]=KH[7];iu[11]=KH[8];iu[12]=KH[9];iu[13]=KH[10];iu[14]=KH[11];iu[15]=KH[0];iu[16]=KH[1];iu[17]=KH[2];Z_=jj.length/9;rS=y0.length/6;T1[0]=0.0;T1[1]=0.0;T1[2]=QR.L0;T1[3]=0.0;T1[4]=QR.L0;T1[5]=1.0;T1[6]=QR.L0;T1[7]=1.0;T1[8]=0.0;T1[9]=1.0;T1[10]=0.0;T1[11]=0.0;var _I=Math.max(Z_*3,rS*2);Gi=new Uint16Array(_I*3);for(var G=0;G<_I*3;G++){Gi[G]=G;}this.Q4();this.calculateExtensions();this.yu=true;return 0;}else{this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.calculateExtensions=function(){if(iu.length<3){return;}var m=new Array(10000000.0,10000000.0,10000000.0);var V=new Array(-10000000.0,-10000000.0,-10000000.0);var L5=iu.length/3;for(var G=0;G<L5;G++){if(iu[3*G+0]<m[0])m[0]=iu[3*G+0];if(iu[3*G+1]<m[1])m[1]=iu[3*G+1];if(iu[3*G+2]<m[2])m[2]=iu[3*G+2];if(iu[3*G+0]>V[0])V[0]=iu[3*G+0];if(iu[3*G+1]>V[1])V[1]=iu[3*G+1];if(iu[3*G+2]>V[2])V[2]=iu[3*G+2];}L5=jj.length/3;for(var G=0;G<L5;G++){if(jj[3*G+0]<m[0])m[0]=jj[3*G+0];if(jj[3*G+1]<m[1])m[1]=jj[3*G+1];if(jj[3*G+2]<m[2])m[2]=jj[3*G+2];if(jj[3*G+0]>V[0])V[0]=jj[3*G+0];if(jj[3*G+1]>V[1])V[1]=jj[3*G+1];if(jj[3*G+2]>V[2])V[2]=jj[3*G+2];}L5=y0.length/3;for(var G=0;G<L5;G++){if(y0[3*G+0]<m[0])m[0]=y0[3*G+0];if(y0[3*G+1]<m[1])m[1]=y0[3*G+1];if(y0[3*G+2]<m[2])m[2]=y0[3*G+2];if(y0[3*G+0]>V[0])V[0]=y0[3*G+0];if(y0[3*G+1]>V[1])V[1]=y0[3*G+1];if(y0[3*G+2]>V[2])V[2]=y0[3*G+2];}this.Ox=CmiHelpers.mv(m,V);this.size=CmiHelpers.calculate3dDistance(m,V);this.KA=this.size*0.5;this.uv(m,V);};this.QD=function(){var C=this.v.q9();if(vn!=null)this.h.deleteBuffer(vn);vn=null;if(nF!=null)this.h.deleteBuffer(nF);nF=null;if(Uj!=null)this.h.deleteBuffer(Uj);Uj=null;if(wL!=null)this.h.deleteBuffer(wL);wL=null;if(AO!=null)this.h.deleteBuffer(AO);AO=null;if(Ie!=null)this.h.deleteTexture(Ie);Ie=null;if(No!=null)this.h.deleteTexture(No);No=null;};this.Q4=function(){var C=this.v.q9();this.QD();vn=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.bufferData(this.h.ARRAY_BUFFER,iu,this.h.STATIC_DRAW);vn.itemSize=3;vn.numItems=iu.length/3;nF=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.bufferData(this.h.ARRAY_BUFFER,jj,this.h.STATIC_DRAW);nF.itemSize=3;nF.numItems=jj.length/3;Uj=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,Uj);this.h.bufferData(this.h.ARRAY_BUFFER,y0,this.h.STATIC_DRAW);Uj.itemSize=3;Uj.numItems=y0.length/3;wL=this.h.createBuffer();this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.bufferData(this.h.ARRAY_BUFFER,T1,this.h.STATIC_DRAW);wL.itemSize=2;wL.numItems=T1.length/2;AO=this.h.createBuffer();this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);this.h.bufferData(this.h.ELEMENT_ARRAY_BUFFER,Gi,this.h.STATIC_DRAW);AO.itemSize=1;AO.numItems=Gi.length;Ie=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,Ie);this.h.pixelStorei(this.h.UNPACK_FLIP_Y_WEBGL,true);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,this.h.RGBA,this.h.UNSIGNED_BYTE,QR.nD);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MAG_FILTER,this.h.LINEAR);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MIN_FILTER,this.h.LINEAR_MIPMAP_LINEAR);this.h.generateMipmap(this.h.TEXTURE_2D);this.h.bindTexture(this.h.TEXTURE_2D,null);No=this.h.createTexture();this.h.bindTexture(this.h.TEXTURE_2D,No);this.h.pixelStorei(this.h.UNPACK_FLIP_Y_WEBGL,true);this.h.texImage2D(this.h.TEXTURE_2D,0,this.h.RGBA,this.h.RGBA,this.h.UNSIGNED_BYTE,mh.nD);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_S,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_WRAP_T,this.h.CLAMP_TO_EDGE);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MAG_FILTER,this.h.LINEAR);this.h.texParameteri(this.h.TEXTURE_2D,this.h.TEXTURE_MIN_FILTER,this.h.LINEAR_MIPMAP_LINEAR);this.h.generateMipmap(this.h.TEXTURE_2D);this.h.bindTexture(this.h.TEXTURE_2D,null);};this.Li=function(tN,Wg){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}tN.Np(Wg,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,Z_*3);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,Z_*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,Z_*3);}this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.vertexAttribPointer(tN.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);tN.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}tN.PL(0);return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;var C=this.v.q9();if(C==null){this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(ym.A==null){this.v.s("\x43\x6d\x69\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.IS(useViewportCulling)==false)return 0;if(this.P!=null){this.v.TF(true,true);mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}WO.Np(this.getColor(),0);this.h.bindBuffer(this.h.ARRAY_BUFFER,nF);this.h.vertexAttribPointer(WO.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,Z_*3);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.TRIANGLES,0,Z_*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,Z_*3);}WO.PL(0);WO.Np(this.getColor(),0);this.h.bindBuffer(this.h.ARRAY_BUFFER,Uj);this.h.vertexAttribPointer(WO.W,3,this.h.FLOAT,false,0,0);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);WO.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.Za(true);WO.hE();this.h.drawArrays(this.h.LINES,0,rS*2);this.v.kF(true,true);}else{this.h.drawArrays(this.h.LINES,0,rS*2);}WO.PL(0);ym.Np(this.v.bgColIni,0);this.h.activeTexture(this.h.TEXTURE0);if((this.isHighlighted==true)||((this.ib!=null)&&(this.ib.contentHighlighted==true)))this.h.bindTexture(this.h.TEXTURE_2D,No);else this.h.bindTexture(this.h.TEXTURE_2D,Ie);this.h.bindBuffer(this.h.ARRAY_BUFFER,vn);this.h.vertexAttribPointer(ym.W,3,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ARRAY_BUFFER,wL);this.h.vertexAttribPointer(ym.rD,2,this.h.FLOAT,false,0,0);this.h.bindBuffer(this.h.ELEMENT_ARRAY_BUFFER,AO);if(this.v.OY==true){this.v.TF(true,true);this.v.jH(true);ym.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.Za(true);ym.hE();this.h.drawArrays(this.h.TRIANGLES,0,2*3);this.v.kF(true,true);}else{this.h.drawArrays(this.h.TRIANGLES,0,2*3);}ym.PL(0);if(this.P!=null){this.v.kF(true,true);}return 0;};};eP.prototype=new CmiBaseObject();var CmiComponentObject=function(o){var oL="\x63\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74";var Rv="";var SY=null;var VG=null;var hI=false;var l0=mat4.createIdent();var i1=true;var Ck=o.jD();var xm=o.sH();var Xp=o.BV();var V7=false;var zO=new Array();var QN=new Array();var FV=new Array();var rg=new Array();var Wo=false;var w8=false;var Tu=null;var Bg=false;var vd=new Float32Array([0.0,0.0,0.0]);var mZ=new Float32Array([0.0,0.0,0.0]);var sg=new Float32Array([0.0,0.0,0.0]);var CA=new Float32Array([0.0,0.0,0.0]);var mT=new Float32Array([0.0,0.0,0.0]);var l4=null;var zH=null;var sE=null;var os=false;var eF=0;var MW=false;var Q3=null;var wf="\x66\x61\x6c\x73\x65";var m0=false;var zk="";var Kw=null;var Ev=null;this.entityFullName="";this.rJ=false;this.modelEntity=null;this.gy="";this.HY=null;this.textureName=null;this.cc=null;this.HA=null;this.BY=null;this.Qz=null;this.normalMap=null;this.Vi=false;this.Q9=false;this.Et=false;this.R3=false;this.getClassName=function(){return oL;};this.getModel=function(){return VG;};this.setModel=function(Xc){VG=Xc;};this.getModelTemplateName=function(){return Rv;};this.Tr=function(ze){Rv=ze;};this.getModelTemplateData=function(){return SY;};this.getBrowserVisibleState=function(){return i1;};this.setBrowserVisibleState=function(kp){i1=kp;};this.Q7=function(){return V7;};this.Fn=function(Ug){V7=Ug;};this.iV=function(){return l0;};this.A2=function(KI){l0.set(KI);};this.CP=function(Sa){hI=Sa;};this.RI=function(){return hI;};this.getPosNr=function(){return eF;};this.setPosNr=function(fg){eF=fg;};this.getPosNrFixed=function(){return MW;};this.setPosNrFixed=function(Vl){MW=Vl};this.getParentComponent=function(){return Q3;};this.ZQ=function(o3){Q3=o3;};this.getHandledState=function(){return wf;};this.setHandledState=function(Tg){wf=Tg;};this.getLockedState=function(){return m0;};this.setLockedState=function(fn){m0=fn;};this.getRepresentedType=function(){return zk;};this.setRepresentedType=function(jz){zk=jz;};this.getDerivedUid=function(){return this.gy;};this.setDerivedUid=function(Vd){this.gy=Vd;};this.getEulerAngles=function(){return vd;};this.setEulerAngles=function(_x){if((_x!=undefined)&&(_x.length>2)){vd[0]=_x[0];vd[1]=_x[1];vd[2]=_x[2];l0=mat4.createIdent();mat4.AddXRotation(l0,vd[0]*Math.PI/180.0);mat4.AddYRotation(l0,vd[1]*Math.PI/180.0);mat4.AddZRotation(l0,vd[2]*Math.PI/180.0);mat4.addTranslation(l0,mZ);}};this.Bz=function(){if(os==false){var ip=new Array();var bp=this.getParentComponent();while(bp!=null){ip.push(bp);bp=bp.getParentComponent();}CA[0]=0.0;CA[1]=0.0;CA[2]=0.0;sg[0]=0.0;sg[1]=0.0;sg[2]=0.0;mT[0]=0.0;mT[1]=0.0;mT[2]=0.0;l4=mat4.createIdent();zH=mat4.createIdent();sE=mat4.createIdent();for(var G=ip.length-1;G>=0;G--){mat4.multiply(l4,ip[G].iV());}mat4.multiply(l4,l0);mat4.inverse(l4,zH);var qV=new mat4.createIdent();mat4.set(l4,qV);qV[12]=0.0;qV[13]=0.0;qV[14]=0.0;mat4.inverse(qV,sE);var tX=CmiHelpers.qR(l4);sg[0]=CmiHelpers.fA(tX[0]);sg[1]=CmiHelpers.fA(tX[1]);sg[2]=CmiHelpers.fA(tX[2]);var Q5=CmiHelpers.VK(l4);CA[0]=Q5[0];CA[1]=Q5[1];CA[2]=Q5[2];var cP=VG.getModelCenterPoint();mat4.multiplyVec3(l4,cP,mT);os=true;}};this.getGlobalEulerAngles=function(){if(os==false)this.Bz();return sg;};this.I6=function(_x){if((_x!=undefined)&&(_x.length>2)){sg[0]=_x[0];sg[1]=_x[1];sg[2]=_x[2];}};this.getOrigin=function(){return mZ;};this.setOrigin=function(rl){if((rl!=undefined)&&(rl.length>2)){mZ[0]=rl[0];mZ[1]=rl[1];mZ[2]=rl[2];l0=mat4.createIdent();mat4.AddXRotation(l0,vd[0]*Math.PI/180.0);mat4.AddYRotation(l0,vd[1]*Math.PI/180.0);mat4.AddZRotation(l0,vd[2]*Math.PI/180.0);mat4.addTranslation(l0,mZ);}};this.getGlobalOrigin=function(){if(os==false)this.Bz();return CA;};this.vB=function(rl){if((rl!=undefined)&&(rl.length>2)){CA[0]=rl[0];CA[1]=rl[1];CA[2]=rl[2];}};this.getGlobalCenterPoint=function(){if(os==false)this.Bz();return mT;};this.getGlobalTransformationMatrix=function(){if(os==false)this.Bz();if(this.HY!=null){let KI=mat4.create(l4);mat4.multiply(KI,this.HY);return KI;}else return l4;};this.Le=function(){if(os==false)this.Bz();return zH;};this.N5=function(){if(os==false)this.Bz();return sE;};this.getSubComponents=function(R2){if(Wo==false)this.xt();if(R2==true){var W9=new Array();this.q_(W9);return W9;}else return zO;};this.q_=function(IO){if(Wo==false)this.xt();for(var G=0;G<zO.length;G++){IO.push(zO[G]);zO[G].q_(IO);}};this.IQ=function(){if(Wo==false)this.xt();return QN;};this.LC=function(){if(Wo==false)this.xt();return rg;};this.Tb=function(l2,IO){var entities=VG.Rh();for(var G=0;G<entities.length;G++){if((entities[G].cmiType==l2)&&(IO.includes(entities[G])==false)){IO.push(entities[G]);}if(entities[G].cmiType==18)entities[G].Tb(l2,IO);}};this.cQ=function(){var Od=new Array(0,0,0,0);var J=[0.0,0.0,0.0];var g4=10000000;var RD=10000000;var iN=10000000;var Ar=-10000000;var Fw=-10000000;var oN=-10000000;var fH=[0,0,this.v.Rg().width,this.v.Rg().height];var yh=this.v.uf();var BL=this.v.jD();var V=[0.0,0.0,0.0];var m=[0.0,0.0,0.0];if(os==false)this.Bz();V[0]=mT[0]+this.KA;V[1]=mT[1]+this.KA;V[2]=mT[2]+this.KA;m[0]=mT[0]-this.KA;m[1]=mT[1]-this.KA;m[2]=mT[2]-this.KA;GLU.project(m[0],m[1],m[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];GLU.project(V[0],m[1],m[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];GLU.project(m[0],V[1],m[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];GLU.project(V[0],V[1],m[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];GLU.project(m[0],m[1],V[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];GLU.project(V[0],m[1],V[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];GLU.project(m[0],V[1],V[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];GLU.project(V[0],V[1],V[2],BL,yh,fH,J);if(J[0]<g4)g4=J[0];if(J[1]<RD)RD=J[1];if(J[2]<iN)iN=J[2];if(J[0]>Ar)Ar=J[0];if(J[1]>Fw)Fw=J[1];if(J[2]>oN)oN=J[2];g4=Math.min(g4,Ar);Ar=Math.max(g4,Ar);RD=Math.min(RD,Fw);Fw=Math.max(RD,Fw);RD=this.v.Rg().height-RD;Fw=this.v.Rg().height-Fw;Od[0]=g4;Od[1]=RD;Od[2]=Ar;Od[3]=Fw;return Od;};this.dR=false;this.v=o;this.h=o.q9();this.cmiType=18;this.attributes=new Array();this.isComponentObject=true;this.setTexture=function(textureName){this.cc=this.v.getPreloadedTexture(textureName);if(this.cc!=null){this.textureName=textureName;this.Vi=true;}};this.T8=function(textureName){this.BY=this.v.getPreloadedTexture(textureName);if(this.BY!=null){this.HA=textureName;this.Q9=true;}};this.gi=function(textureName){this.normalMap=this.v.getPreloadedTexture(textureName);if(this.normalMap!=null){this.Qz=textureName;if(textureName=="\x47\x65\x6e\x65\x72\x69\x63\x42\x75\x6d\x70\x4d\x61\x70")this.R3=true;else this.R3=false;this.Et=true;}};this.setShader=function(QK){if(!QK){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x73\x68\x61\x64\x65\x72\x20\x67\x69\x76\x65\x6e","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(QK.usable==false){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x53\x68\x61\x64\x65\x72\x20\x6e\x6f\x74\x20\x75\x73\x61\x62\x6c\x65","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if((QK.aN=="\x54\x65\x78\x74\x75\x72\x65\x33\x44")){if(this.textureName==null){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x61\x6d\x65\x20\x6e\x6f\x74\x20\x67\x69\x76\x65\x6e","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}this.cc=this.v.getTexture(this.textureName);if(this.cc==null){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x74\x65\x78\x74\x75\x72\x65\x20\x66\x6f\x75\x6e\x64\x20"+this.textureName,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.cc.Na){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x6f\x74\x20\x66\x6f\x75\x6e\x64\x20\x28\x6c\x6f\x61\x64\x20\x65\x72\x72\x6f\x72\x29\x20"+this.textureName,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}this.Vi=true;}else if((QK.aN=="\x47\x65\x6e\x65\x72\x69\x63")||(QK.aN=="\x57\x61\x76\x65\x66\x72\x6f\x6e\x74\x42\x75\x6d\x70")||(QK.aN=="\x47\x65\x6e\x65\x72\x69\x63\x4e\x6f\x52\x65\x66\x6c\x65\x63\x74")){if(this.HA==null){this.HA=this.v.getBitmapDirectory()+"\x2f\x47\x65\x6e\x65\x72\x69\x63\x54\x65\x78\x74\x75\x72\x65\x2e\x6a\x70\x67";}this.BY=this.v.getTexture(this.HA);if(this.BY==null){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x74\x65\x78\x74\x75\x72\x65\x20\x66\x6f\x75\x6e\x64\x20"+Jx,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.BY.Na){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x6f\x74\x20\x66\x6f\x75\x6e\x64\x20\x28\x6c\x6f\x61\x64\x20\x65\x72\x72\x6f\x72\x29\x20"+Jx,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.Qz==null){this.Qz=this.v.getBitmapDirectory()+"\x2f\x47\x65\x6e\x65\x72\x69\x63\x42\x75\x6d\x70\x4d\x61\x70\x2e\x6a\x70\x67";this.R3=true;}else if(this.Qz.indexOf("\x47\x65\x6e\x65\x72\x69\x63\x42\x75\x6d\x70\x4d\x61\x70")!=-1){this.R3=true;}this.normalMap=this.v.getTexture(this.Qz);if(this.normalMap==null){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x4e\x6f\x20\x74\x65\x78\x74\x75\x72\x65\x20\x66\x6f\x75\x6e\x64\x20"+e2,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if(this.normalMap.Na){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x53\x68\x61\x64\x65\x72","\x54\x65\x78\x74\x75\x72\x65\x20\x6e\x6f\x74\x20\x66\x6f\x75\x6e\x64\x20\x28\x6c\x6f\x61\x64\x20\x65\x72\x72\x6f\x72\x29\x20"+e2,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}this.Q9=true;this.Et=true;}this.shaderObject=QK;return 0;};this.L9=function(){this.Fx=null;if(Ev!=null){this.Fx=Ev;if(this.Fx.baseTexture!=undefined){this.HA=this.IP(this.Fx.baseTexture);}if(this.Fx.normalMap!=undefined){this.Qz=this.IP(this.Fx.normalMap);}}this.shaderObject=null;if(Kw!=null){if(this.setShader(Kw)!=0){this.shaderObject=null;}}};this.bm=function(){var G=0;var Yd=VG.getEntityCollection();for(G=0;G<FV.length;G++){FV[G]=null;}FV=new Array();for(G=0;G<Yd.length;G++){if(hI==true){if((Yd[G].cmiType!=18)&&(Yd[G].cmiType!=10))FV.push(Yd[G]);}else FV.push(Yd[G]);}for(G=0;G<zO.length;G++){FV.push(zO[G]);}for(G=0;G<QN.length;G++){FV.push(QN[G]);}FV.sort(CmiHelpers.Er);return 0;};this.updateTemplateReferences=function(){this.xt();return 0;};this.R1=function(Mb){if(Mb==undefined)Mb=this.getSubComponents();for(var G=0;G<Mb.length;G++){if(Mb[G].cmiType==18){this.R1(Mb[G].getSubComponents());}if(Mb[G].isHighlighted==true){Mb[G].isHighlighted=false;}}};this.gq=function(Mb,uId){if(Mb==undefined)Mb=this.getSubComponents();for(var G=0;G<Mb.length;G++){Mb[G].FA=uId;if(Mb[G].cmiType==18){this.gq(Mb[G].getSubComponents(),uId);}}};this.xt=function(){var hu=zO;var G=0;var M=0;Wo=true;w8=false;zO=new Array();for(G=0;G<rg.length;G++){rg[G]=null;}rg=new Array();if(Rv.length>0){SY=this.v.getTemplateModel(Rv);if((SY==null)||(SY.Xc==null)){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x62\x75\x69\x6c\x64\x53\x75\x62\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x41\x72\x72\x61\x79","\x4e\x6f\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x20\x6d\x6f\x64\x65\x6c\x20\x66\x6f\x75\x6e\x64\x20\x28"+Rv+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if((SY.dk()==-1)){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x62\x75\x69\x6c\x64\x53\x75\x62\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x41\x72\x72\x61\x79","\x54\x65\x6d\x70\x6c\x61\x74\x65\x20\x6d\x6f\x64\x65\x6c\x20\x68\x61\x73\x20\x65\x72\x72\x6f\x72\x73\x20\x28"+Rv+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}var entities=VG.Rh();var fw=false;var z9=null;for(G=0;G<entities.length;G++){if(entities[G].isComponentObject==true){fw=false;if(this.v.M4==true){for(M=0;M<hu.length;M++){if(hu[M].modelEntity==entities[G]){fw=true;z9=hu[M];hu=hu.filter(function(item){return item!==hu[M]});M=hu.length;}}}if(fw==false){z9=new CmiComponentObject(this.v);z9.modelEntity=entities[G];z9.Tr(entities[G].getModelTemplateName());z9.__=entities[G].__;z9.entityName=entities[G].entityName;z9.entityFullName=this.entityFullName+"\x2e"+entities[G].entityName;z9.zz=entities[G].zz;z9.E6=entities[G].E6;z9.iq=entities[G].iq;z9.color=entities[G].color;z9.shaderObject=entities[G].shaderObject;z9.textureName=entities[G].textureName;z9.cc=entities[G].cc;z9.HA=entities[G].HA;z9.BY=entities[G].BY;z9.Qz=entities[G].Qz;z9.normalMap=entities[G].normalMap;z9.Vi=entities[G].Vi;z9.Q9=entities[G].Q9;z9.Et=entities[G].Et;z9.R3=entities[G].R3;z9.Fx=entities[G].Fx;z9.rJ=entities[G].rJ;z9.setOrigin(entities[G].getOrigin());z9.setEulerAngles(entities[G].getEulerAngles());z9.setRepresentedType(entities[G].getRepresentedType());z9.setPosNr(entities[G].getPosNr());z9.setPosNrFixed(entities[G].getPosNrFixed());z9.setUid(entities[G].getUid(),false);z9.setDerivedUid(entities[G].getDerivedUid());z9.setHandledState(entities[G].getHandledState());z9.setLockedState(entities[G].getLockedState());z9.ZQ(this);z9.size=entities[G].size;z9.KA=z9.size*0.5;z9.BS=entities[G].BS;z9.attributes=entities[G].attributes;z9.e7=entities[G].e7;if(entities[G].getLayer()!=null)z9.setLayer(entities[G].getLayer().getLayerName());z9.CP(true);z9.setModel(entities[G].getModel());z9.A2(entities[G].iV());z9.Fn(entities[G].Q7());z9.setBrowserVisibleState(entities[G].getBrowserVisibleState());z9.yu=true;}zO.push(z9);if((entities[G].E6.length>0)||(entities[G].Q7()==true)){var p4=new Ps();p4.vW=z9;p4.Jg=z9.entityFullName;if((entities[G].E6.length==0)&&(entities[G].cmiType!=10))p4.E0=true;rg.push(p4);V7=true;}z9.xt();}else if(entities[G].cmiType==10){var rI=new CmiLocatorObject(this.v);rI.__=entities[G].__;rI.entityName=entities[G].entityName;rI.DD=entities[G].DD;rI.E6=entities[G].E6;if(entities[G].getLayer()!=null)rI.setLayer(entities[G].getLayer().getLayerName());var pW=new Float32Array([entities[G].origin[0],entities[G].origin[1],entities[G].origin[2]]);var E7=new Float32Array([entities[G].Ii[0],entities[G].Ii[1],entities[G].Ii[2]]);rI.x_(pW[0],pW[1],pW[2],E7[0],E7[1],E7[2]);mat4.multiplyVec3(l0,pW);rI.Jq[0]=pW[0];rI.Jq[1]=pW[1];rI.Jq[2]=pW[2];var nS=CmiHelpers.qR(l0);rI.qQ[0]=CmiHelpers.getCorrectedAngle(CmiHelpers.fA(nS[0])+E7[0]);rI.qQ[1]=CmiHelpers.getCorrectedAngle(CmiHelpers.fA(nS[1])+E7[1]);rI.qQ[2]=CmiHelpers.getCorrectedAngle(CmiHelpers.fA(nS[2])+E7[2]);rI.yu=true;QN.push(rI);var p4=new Ps();p4.vW=rI;p4.Jg=this.entityFullName+"\x2e"+rI.entityName;rg.push(p4);}else if(entities[G].E6.length>0){var p4=new Ps();p4.vW=entities[G];p4.Jg=this.entityFullName+"\x2e"+entities[G].entityName;rg.push(p4);V7=true;}}}else{var entities=VG.Rh();for(G=0;G<entities.length;G++){if(entities[G].isComponentObject==true){entities[G].entityFullName=this.entityFullName+"\x2e"+entities[G].entityName;if((entities[G].E6.length>0)||(entities[G].Q7()==true)){var p4=new Ps();p4.vW=entities[G];p4.Jg=this.entityFullName+"\x2e"+entities[G].entityName;if((entities[G].E6.length==0)&&(entities[G].cmiType!=10))p4.E0=true;rg.push(p4);V7=true;}entities[G].xt();}else if((entities[G].E6.length>0)||(entities[G].cmiType==10)){var p4=new Ps();p4.vW=entities[G];p4.Jg=this.entityFullName+"\x2e"+entities[G].entityName;rg.push(p4);V7=true;}}}this.calculateExtensions();this.bm();return 0;};this.loadFromJSON=function(jsonObject){if(jsonObject.clNm=="\x63\x4d\x70"){if(jsonObject.tpNm)Rv=jsonObject.tpNm;if(jsonObject.aNr)this.__=jsonObject.aNr;if(jsonObject.eNm){this.entityName=jsonObject.eNm;this.entityFullName=this.entityName;}if(jsonObject.cAt)this.zz=jsonObject.cAt;if(jsonObject.sTx)this.E6=jsonObject.sTx;if(jsonObject.hRf)this.iq=jsonObject.hRf;if(jsonObject.col){this.color=jsonObject.col;this.rJ=true;if(this.color[3]==undefined)this.color[3]=1.0;}if(jsonObject.siZ){this.size=jsonObject.siZ;this.KA=this.size*0.5;}if(jsonObject.lAn)this.setLayer(jsonObject.lAn);if(jsonObject.attribs)this.Pu(jsonObject.attribs.slice());if(jsonObject.uId)this.FA=jsonObject.uId;if(jsonObject.dId)this.gy=jsonObject.dId;if(jsonObject.pNr){eF=jsonObject.pNr;MW=true};if(jsonObject.bVis!=null)i1=jsonObject.bVis;var UB="";if(jsonObject.tEx){this.textureName=this.IP(jsonObject.tEx);}if(jsonObject.shPar){Ev=jsonObject.shPar;this.Fx=jsonObject.shPar;if(this.Fx.baseTexture!=undefined){this.HA=this.IP(this.Fx.baseTexture);}if(this.Fx.normalMap!=undefined){this.Qz=this.IP(this.Fx.normalMap);}}if(jsonObject.shNm){var QK=this.v.getShader(jsonObject.shNm);if(this.setShader(QK)!=0){this.shaderObject=null;}else Kw=this.shaderObject;}if(Rv.length>0){hI=true;if(Rv.includes("\x2e\x77\x70\x6d")){var mn=this.v.getCmiModel().E_()+"\x2f"+Rv;Rv=CmiHelpers.l9(mn)+"\x2e\x74\x65\x6d\x70\x6c\x61\x74\x65";if(this.v.getTemplateModel(Rv)==null)this.v.updateTemplateModelFromUrl(Rv,mn,true)}SY=this.v.getTemplateModel(Rv);if((SY==null)||(SY.Xc==null)){var Xj=new CmiTemplateModel(this.v);Xj.createEmptyTemplate(Rv,Rv,true);var k="\x43\x4d\x49\x5f\x49\x4e\x46\x4f\x7c\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e"+"\x7c"+"\x45\x6d\x70\x74\x79\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x28"+Rv+"\x29";this.v.sendCmiNotification(k);}SY=this.v.getTemplateModel(Rv);if((SY==null)||(SY.Xc==null)){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x4e\x6f\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x20\x6d\x6f\x64\x65\x6c\x20\x66\x6f\x75\x6e\x64\x20\x28"+Rv+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}if((SY.dk()==-1)){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x54\x65\x6d\x70\x6c\x61\x74\x65\x20\x6d\x6f\x64\x65\x6c\x20\x68\x61\x73\x20\x65\x72\x72\x6f\x72\x73\x20\x28"+Rv+"\x29","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}VG=SY.Xc;if(jsonObject.lOc){Gw=new Float32Array(jsonObject.lOc);if(Gw.length>=16){l0.set(Gw);this.Jq=CmiHelpers.qR(Gw);this.qQ=new Float32Array(Gw[12],Gw[13],Gw[14]);}}else{if(jsonObject.org){mZ=new Float32Array(jsonObject.org);CA=new Float32Array(jsonObject.org);}if(jsonObject.elA){vd=new Float32Array(jsonObject.elA);sg=new Float32Array(jsonObject.elA);}mat4.AddXRotation(l0,vd[0]*Math.PI/180.0);mat4.AddYRotation(l0,vd[1]*Math.PI/180.0);mat4.AddZRotation(l0,vd[2]*Math.PI/180.0);mat4.addTranslation(l0,mZ);}var ip=new Array();var bp=this.getParentComponent();while(bp!=null){ip.push(bp);bp=bp.getParentComponent();};l4=mat4.createIdent();for(var G=ip.length-1;G>=0;G--){mat4.multiply(l4,ip[G].iV());}mat4.multiply(l4,l0);this.yu=true;}else{VG=new CmiModel(this.v);VG.xY=this;VG.loadFromJSON(jsonObject);this.yu=true;}if(this.v.createComponentInfoCallback!=null){this.v.createComponentInfoCallback(this);}var e1=VG.QY();if(this.rJ==true){if(this.color[3]<1.0){}else{this.color[3]=e1;}}else{this.color[3]=e1;}if(VG.Q7()==true)V7=true;return 0;}else{this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e","\x57\x72\x6f\x6e\x67\x20\x63\x6c\x61\x73\x73\x20\x66\x72\x6f\x6d\x20\x6c\x6f\x61\x64\x46\x72\x6f\x6d\x4a\x53\x4f\x4e\x20\x63\x61\x6c\x6c","\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return-1;}};this.calculateExtensions=function(){if(Wo==false)this.xt();if(Rv.length>0){if((SY==null)||(SY.dk()<1))return;}if(VG.areExtensionsCalculated()==false)VG.calculateExtensions();var cP=CmiHelpers.mv(VG.getLowerLeftBdryPoint(),VG.getUpperRightBdryPoint());this.size=VG.getDiagonalModelLength();this.Ox=new Array(cP[0],cP[1],cP[2]);this.KA=this.size*0.5;this.uv(VG.getLowerLeftBdryPoint(),VG.getUpperRightBdryPoint(),l0);mat4.multiplyVec3(l0,this.Ox);w8=true;};this.Li=function(tN,Wg,hi){if((this.yu==false)||(this.qw(true)==false))return-1;if(this.h==null){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x47\x4c\x20\x43\x6f\x6e\x74\x65\x78\x74","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}else if(tN==null){this.v.s("\x43\x6d\x69\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4f\x62\x6a\x65\x63\x74\x2e\x64\x72\x61\x77\x49\x6e\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x4d\x6f\x64\x65","\x55\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x73\x68\x61\x64\x65\x72\x20\x70\x72\x6f\x67\x72\x61\x6d","\x4f\x70\x65\x6e\x47\x4c\x5f\x45\x52\x52\x4f\x52");return-1;}if(hI){this.v.oh();this.v.up();if(this.IS(true)==false){this.v.ac();return 0;}this.v.ac();}else if(this.IS(true)==false){return 0;}var entities=VG.Rh();var r3=VG.mM();var pm=VG._p();if(hI){this.v.TF(false,false);if(this.P!=null){mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}mat4.multiply(Ck,l0);if(this.v.clipPlaneActive==true){this.v.VN=this.Le();this.v.ln=this.N5();}if(this.HY!=null){mat4.multiply(Ck,this.HY);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}VG.xY=this;for(G=0;G<FV.length;G++){if(FV[G].cmiType!=10)FV[G].Li(tN,Wg,hi);}for(var G=0;G<r3.length;G++)r3[G].vW.Li(tN,r3[G].IU,false);for(var G=0;G<rg.length;G++){rg[G].vW.Li(tN,rg[G].IU,hi);}VG.xY=null;this.v.kF(false,false);}else{for(var G=0;G<entities.length;G++){entities[G].Li(tN,Wg,hi);}for(var G=0;G<r3.length;G++){r3[G].vW.Li(tN,r3[G].IU,false);}for(var G=0;G<rg.length;G++){rg[G].vW.Li(tN,rg[G].IU,hi);}}return 0;};this.draw=function(useViewportCulling){if((this.yu==false)||(this.qw(false)==false))return-1;if(hI){this.v.oh();this.v.up();if(this.IS(useViewportCulling)==false){this.v.ac();return 0;}this.v.ac();}else if(this.IS(useViewportCulling)==false){return 0;}Tu=this.v.getCmiModel().Sg;if(this.shaderObject!=null){if(Tu==null){this.v.getCmiModel().Sg=this;Bg=true;}else{Bg=false;}}else if(Tu!=null){Bg=false;}if(this.drawBoundingBox==true)this.yI(false,false,true);var EO=0;if(this.CB)EO=2;else if(this.Z7)EO=4;else if(this.isHighlighted)EO=1;else if(this.Bb)EO=3;else if((this.ib!=null)&&(this.ib.contentHighlighted))EO=1;else EO=0;this.v.TF(VG.f0,VG.Fg);this.v.Cx=true;if(this.P!=null){mat4.multiply(Ck,this.P);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}mat4.multiply(Ck,l0);if(this.v.clipPlaneActive==true){this.v.VN=this.Le();this.v.ln=this.N5();}if(this.HY!=null){mat4.multiply(Ck,this.HY);mat4.inverse(Ck,Xp);mat4.transpose(Xp,xm);}if(VG.f0==true)mat4.inverse(Ck,Xp);if(VG.Fg==true)mat4.transpose(Xp,xm);VG.xY=this;if(this.nL==false)this.h.disable(this.h.DEPTH_TEST);var G=0;if(EO==4){for(var G=0;G<FV.length;G++){if(FV[G].isHighlighted==true)FV[G].draw(useViewportCulling);}}for(G=0;G<FV.length;G++){if(EO==1){if(FV[G].isHighlighted==true){FV[G].draw(useViewportCulling);}else{FV[G].isHighlighted=true;FV[G].draw(useViewportCulling);FV[G].isHighlighted=false;}}else if(EO==2){FV[G].CB=true;FV[G].draw(useViewportCulling);FV[G].CB=false;}else if(EO==3){if(FV[G].Bb==true){FV[G].draw(useViewportCulling);}else{FV[G].Bb=true;FV[G].draw(useViewportCulling);FV[G].Bb=false;}}else if(EO==4){FV[G].Z7=true;FV[G].draw(useViewportCulling);FV[G].Z7=false;}else{FV[G].draw(useViewportCulling);}}VG.xY=null;this.v.kF(VG.f0,VG.Fg);this.v.VN=null;this.v.ln=null;this.v.Cx=false;if(Bg==true)this.v.getCmiModel().Sg=null;if(this.nL==false)this.h.enable(this.h.DEPTH_TEST);return 0;};};CmiComponentObject.prototype=new CmiBaseObject();
